llvm-project/clang/lib
Devin Coughlin 3fc67e47e5 [analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.
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
2016-02-29 21:44:08 +00:00
..
ARCMigrate Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-10 19:11:58 +00:00
AST [OPENMP 4.5] Initial support for data members in 'reduction' clauses. 2016-02-29 05:54:20 +00:00
ASTMatchers Fix a -Wunused-variable diagnostic. 2016-02-23 10:29:04 +00:00
Analysis [analyzer] Find ObjC 'self' decl even when block captures local named 'self'. 2016-02-23 22:26:04 +00:00
Basic AMDGPU: Add missing Volcanic Islands targets 2016-02-29 15:08:56 +00:00
CodeGen [PGO] clang cc1 option change to enable IR level instrumentation 2016-02-29 18:54:59 +00:00
Driver [clang-cl] /EHc should not effect functions with explicit exception specifications 2016-02-29 01:40:36 +00:00
Edit Remove autoconf support 2016-01-26 21:30:40 +00:00
Format clang-format: Don't format unrelated nested blocks. 2016-02-29 12:26:20 +00:00
Frontend [PGO] clang cc1 option change to enable IR level instrumentation 2016-02-29 18:54:59 +00:00
FrontendTool Revert r260265, "clang-cl: Support loading plugins on Windows" 2016-02-11 16:33:20 +00:00
Headers Add ARM EHABI-related constants to unwind.h. 2016-02-28 15:01:42 +00:00
Index [index] Print and test module import references. 2016-02-29 07:56:07 +00:00
Lex SemaCXX: Support templates in availability attributes 2016-02-26 19:27:00 +00:00
Parse [OpenMP] Fix parsing of delete map clause modifier in C++ mode. 2016-02-27 00:01:58 +00:00
Rewrite Remove use of builtin comma operator. 2016-02-18 22:34:54 +00:00
Sema [OPENMP 4.5] Initial support for data members in 'reduction' clauses. 2016-02-29 05:54:20 +00:00
Serialization [modules] Prefer more complete array types. 2016-02-28 19:08:24 +00:00
StaticAnalyzer [analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc. 2016-02-29 21:44:08 +00:00
Tooling Revert "Implement new interfaces for code-formatting when applying replacements." 2016-02-29 16:44:16 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00