]> granicus.if.org Git - clang/commit
[analyzer] Apply the suppression rules to the nil receiver only if the value particip...
authorAnna Zaks <ganna@apple.com>
Thu, 28 Mar 2013 23:15:22 +0000 (23:15 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 28 Mar 2013 23:15:22 +0000 (23:15 +0000)
commitaabb4c5eacca6d78ef778f33ec5cd4c755d71a39
tree5881525c540ae4712d3b404b2ed2da7634c71ab5
parente93e2552e76ab704ec85919cc2c76f02b8b081ee
[analyzer] Apply the suppression rules to the nil receiver only if the value participates in the computation of the nil we warn about.

We should only suppress a bug report if the IDCed or null returned nil value is directly related to the value we are warning about. This was
not the case for nil receivers - we would suppress a bug report that had an IDCed nil receiver on the path regardless of how it’s
related to the warning.

1) Thread EnableNullFPSuppression parameter through the visitors to differentiate between tracking the value which
is directly responsible for the bug and other values that visitors are tracking (ex: general tracking of nil receivers).
2) in trackNullOrUndef specifically address the case when a value of the message send is nil due to the receiver being nil.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178309 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/NSContainers.m
test/Analysis/inlining/inline-defensive-checks.m