summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2012-03-24 03:03:29 +0000
committerJordy Rose <jediknil@belkadan.com>2012-03-24 03:03:29 +0000
commit43a9af7352c0f4e2fd59eebfbd5ad7e88c38baea (patch)
tree6dd9a2c0adfed428e113ced524e8af123f23b863 /clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parentf78877e99a85b2396ea93ebc2f08452a9c5bc795 (diff)
downloadbcm5719-llvm-43a9af7352c0f4e2fd59eebfbd5ad7e88c38baea.tar.gz
bcm5719-llvm-43a9af7352c0f4e2fd59eebfbd5ad7e88c38baea.zip
[analyzer] Restart path diagnostic generation if any of the visitors change the report configuration while walking the path.
This required adding a change count token to BugReport, but also allowed us to ditch ImmutableList as the BugReporterVisitor data type. Also, remove the hack from MallocChecker, now that visitors appear in the opposite order. This is not exactly a fix, but the common case -- custom diagnostics after generic ones -- is now the default behavior. llvm-svn: 153369
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 8f4502ca319..f5218746bef 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -875,10 +875,6 @@ void MallocChecker::reportLeak(SymbolRef Sym, ExplodedNode *N,
BugReport *R = new BugReport(*BT_Leak, os.str(), N, LocUsedForUniqueing);
R->markInteresting(Sym);
- // FIXME: This is a hack to make sure the MallocBugVisitor gets to look at
- // the ExplodedNode chain first, in order to mark any failed realloc symbols
- // as interesting for ConditionBRVisitor.
- R->addVisitor(new ConditionBRVisitor());
R->addVisitor(new MallocBugVisitor(Sym));
C.EmitReport(R);
}
OpenPOWER on IntegriCloud