]> granicus.if.org Git - clang/commit
[analyzer] Trust _Nonnull annotations, and trust analyzer knowledge about receiver...
authorGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 31 May 2018 00:28:13 +0000 (00:28 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Thu, 31 May 2018 00:28:13 +0000 (00:28 +0000)
commitc1d322ac64b3ca72e442b2471da33357b7255350
tree49f0e2b299a787286a135799bd0a7fd19d3022f5
parent06c4f71550260cf92b22d0f86215a73114427ed1
[analyzer] Trust _Nonnull annotations, and trust analyzer knowledge about receiver nullability

Previously, the checker was using the nullability of the expression,
which is nonnull IFF both receiver and method are annotated as _Nonnull.
However, the receiver could be known to the analyzer to be nonnull
without being explicitly marked as _Nonnull.

rdar://40635584

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333612 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp
test/Analysis/Inputs/system-header-simulator-for-nullability.h
test/Analysis/trustnonnullchecker_test.m