Modify the RetainCountChecker to perform state "adjustments" in checkEndFunction, as performing work in PreStmt<ReturnStmt> does not work with destructors. The previous version made an implicit assumption that no code runs after the return statement is executed. rdar://43945028
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
Comment Actions
I suspect that other checkers may suffer from the same problem.
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp | ||
---|---|---|
817 ↗ | (On Diff #166401) | Whitespace. |
946 ↗ | (On Diff #166401) | Let's use generateNonFatalErrorNode() here, in order to indicate that we're going to throw a report against it. |
973 ↗ | (On Diff #166401) | Same here. |
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h | ||
430 ↗ | (On Diff #166401) | Whitespace. |