Do not warn when the other message-send-expression is correctly wrapped in a different autorelease pool
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp | ||
---|---|---|
126–127 ↗ | (On Diff #157708) | Can this logic be moved into the matcher, eg. hasAncestor(autoreleasePoolStmt(unless(equalsBoundNode(AutoreleasePoolBind))))? The good thing here, apart from moving more logic into matchers, would be that we won't be relying on the order in which ancestors are matched. |
clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp | ||
---|---|---|
126–127 ↗ | (On Diff #157708) | I'm not sure the relation I need can be encoded with existing matchers =/ The problem is that there's no way to "fix" the hasAncestor matcher at the closest ancestor of a given type (kind of hasParent), and if it does not find a match, it would move on to further ancestors. |
clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp | ||
---|---|---|
126–127 ↗ | (On Diff #157708) | Hmm, okay, hasAncestor(autoreleasePoolStmt( hasAncestor(autoreleasePoolStmt(equalsBoundNode(AutoreleasePoolBind))))) ? |