[analyzer] ObjCSelfInitChecker should always clean up in postCall checks.
ObjCSelfInitChecker stashes information in the GDM to persist it across function calls; it is stored in pre-call checks and retrieved post-call. The post-call check is supposed to clear out the stored state, but was failing to do so in cases where the call did not have a symbolic return value. This was actually causing the inappropriate cache-out from r163361. Per discussion with Anna, we should never actually cache out when assuming the receiver of an Objective-C message is non-nil, because we guarded that node generation by checking that the state has changed. Therefore, the only states that could reach this exact ExplodedNode are ones that should have merged /before/ making this assumption. r163361 has been reverted and the test case removed, since it won't actually test anything interesting now. llvm-svn: 163449
Showing
- clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp 3 additions, 2 deletionsclang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
- clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp 4 additions, 4 deletionsclang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
- clang/test/Analysis/retain-release-crashes.m 0 additions, 62 deletionsclang/test/Analysis/retain-release-crashes.m
Loading
Please register or sign in to comment