]> granicus.if.org Git - clang/commit
[analyzer] Trust _Nonnull annotations for system framework
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 23 Mar 2018 00:16:03 +0000 (00:16 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 23 Mar 2018 00:16:03 +0000 (00:16 +0000)
commit1b19ec8be97eca3ec7c158ba0e155e7131660864
treed54cf720cb84e7c49ad59bcefee17ed8571b809d
parent4a8ed9adb565dc1d262bc9439b23a35654ef397d
[analyzer] Trust _Nonnull annotations for system framework

Changes the analyzer to believe that methods annotated with _Nonnull
from system frameworks indeed return non null objects.
Local methods with such annotation are still distrusted.
rdar://24291919

Differential Revision: https://reviews.llvm.org/D44341

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328282 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Checkers/Checkers.td
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp [new file with mode: 0644]
lib/StaticAnalyzer/Core/CheckerHelpers.cpp
test/Analysis/Inputs/system-header-simulator-for-nullability.h
test/Analysis/trustnonnullchecker_test.m [new file with mode: 0644]