aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-22 18:37:42 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-22 18:37:42 +0000
commit404dd7afe15c9d8b614da031bbfae6a28ffaea72 (patch)
treea4880060066e7959f578ec93a0935ab998c7c06a
parenta301a6773db085575ac51e3c966858180390c25b (diff)
BugReporter (extensive diagnostics):
- Remove stale assertion that was breaking the test suite. - When popping location contexts, only add a control-flow piece for fileID locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69814 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/BugReporter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index 33ff12d17e..d27ead442e 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -787,7 +787,8 @@ class VISIBILITY_HIDDEN EdgeBuilder {
void rawAddEdge(PathDiagnosticLocation NewLoc);
void popLocation() {
- rawAddEdge(CLocs.back());
+ PathDiagnosticLocation L = CLocs.back();
+ if (L.asLocation().isFileID()) rawAddEdge(CLocs.back());
CLocs.pop_back();
}
@@ -945,8 +946,6 @@ void EdgeBuilder::addEdge(PathDiagnosticLocation NewLoc, bool alwaysAdd) {
// Context does not contain the location. Flush it.
popLocation();
}
-
- assert(0 && "addEdge should never pop the top context");
}
void EdgeBuilder::addContext(const Stmt *S) {