forked from OSchip/llvm-project
3fc67e47e5
This prevents false negatives when a -dealloc method, for example, removes itself as as an observer with [[NSNotificationCenter defaultCenter] removeObserver:self]. It is unlikely that passing 'self' to a system header method will release 'self''s instance variables, so this is unlikely to produce false positives. A challenge here is that while CheckObjCDealloc no longer treats these calls as escaping, the rest of the analyzer still does. In particular, this means that loads from the same instance variable before and after a call to a system header will result in different symbols being loaded by the region store. To account for this, the checker now treats different ivar symbols with the same instance and ivar decl as the same for the purpose of release checking and more eagerly removes a release requirement when an instance variable is assumed to be nil. This was not needed before because when an ivar escaped its release requirement was always removed -- now the requirement is not removed for calls to system headers. llvm-svn: 262261 |
||
---|---|---|
.. | ||
ARCMigrate | ||
AST | ||
ASTMatchers | ||
Analysis | ||
Basic | ||
CodeGen | ||
Driver | ||
Edit | ||
Format | ||
Frontend | ||
FrontendTool | ||
Headers | ||
Index | ||
Lex | ||
Parse | ||
Rewrite | ||
Sema | ||
Serialization | ||
StaticAnalyzer | ||
Tooling | ||
CMakeLists.txt |