]> granicus.if.org Git - clang/commit
[analyzer] Pass value expression for inlined defensive checks when binding null to...
authorDevin Coughlin <dcoughlin@apple.com>
Tue, 24 Nov 2015 19:15:11 +0000 (19:15 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Tue, 24 Nov 2015 19:15:11 +0000 (19:15 +0000)
commit4fe7f1bdf465654a65e7d7880ca3eb30a75445c7
tree5acbac6ca7cb7d3ac5f335bc202ecfe2210907b2
parent449c5870aca4e5f2a35b20ac859fca3b8d3699de
[analyzer] Pass value expression for inlined defensive checks when binding null to nonnull.

The nullability checker was not suppressing false positives resulting from
inlined defensive checks when null was bound to a nonnull variable because it
was passing the entire bind statement rather than the value expression to
trackNullOrUndefValue().

This commit changes that checker to synactically match on the bind statement to
extract the value expression so it can be passed to trackNullOrUndefValue().

rdar://problem/23575439

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254007 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
test/Analysis/nullability.mm