[analyzer] Change the way in which IDC Visitor decides to kick in and make sure it...
authorAnna Zaks <ganna@apple.com>
Thu, 14 Mar 2013 22:31:56 +0000 (22:31 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 14 Mar 2013 22:31:56 +0000 (22:31 +0000)
commit2672a4cc0c34c7b231d39302d924894d7a59ab04
tree037fe3af799909d1b25af3eaf0929ac275541a7a
parentfafaa9d967a5de9cda3bf9c3f56ace6c850ee6ca
[analyzer] Change the way in which IDC Visitor decides to kick in and make sure it attaches in the given edge case

In the test case below, the value V is not constrained to 0 in ErrorNode but it is in node N.
So we used to fail to register the Suppression visitor.

We also need to change the way we determine that the Visitor should kick in because the node N belongs to
the ExplodedGraph and might not be on the BugReporter path that the visitor sees. Instead of trying to match the node,
turn on the visitor when we see the last node in which the symbol is ‘0’.

llvm-svn: 177121
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/test/Analysis/inlining/inline-defensive-checks.cpp