diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-06 01:42:02 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-06 01:42:02 +0000 |
commit | 4db7c1e7e5b389c33af83768b0344ac5450c5d50 (patch) | |
tree | de8b5301565b892da9ed12d9bf43fc759b5d837e /clang/lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | 7caf2fbdc3d07fd7860bf352713d96297e66092d (diff) | |
download | bcm5719-llvm-4db7c1e7e5b389c33af83768b0344ac5450c5d50.tar.gz bcm5719-llvm-4db7c1e7e5b389c33af83768b0344ac5450c5d50.zip |
[analyzer] When creating a trimmed graph, preserve whether a node is a sink.
This is important because sometimes two nodes are identical, except the
second one is a sink.
This bug has probably been around for a while, but it wouldn't have been an
issue in the old report graph algorithm. I'm ashamed to say I actually looked
at this the first time around and thought it would never be a problem...and
then didn't include an assertion to back that up.
PR15684
llvm-svn: 178944
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index 8f8eb3bb850..76cfb89d49f 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -2010,7 +2010,8 @@ bool TrimmedGraph::popNextReportGraph(ReportGraph &GraphWrapper) { while (true) { // Create the equivalent node in the new graph with the same state // and location. - ExplodedNode *NewN = GNew->getNode(OrigN->getLocation(), OrigN->getState()); + ExplodedNode *NewN = GNew->getNode(OrigN->getLocation(), OrigN->getState(), + OrigN->isSink()); // Store the mapping to the original node. InterExplodedGraphMap::const_iterator IMitr = InverseMap.find(OrigN); |