summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
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
commit6c867a1460a01866e6dcaffdc8320f6784e327a5 (patch)
tree36a2952d767fe248a3449cd96b83291ef6342263 /clang/lib/Analysis/BugReporter.cpp
parent0752a5dff3b82f4d663c983abae5b3667b5c7f6e (diff)
downloadbcm5719-llvm-6c867a1460a01866e6dcaffdc8320f6784e327a5.tar.gz
bcm5719-llvm-6c867a1460a01866e6dcaffdc8320f6784e327a5.zip
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. llvm-svn: 69814
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 33ff12d17ee..d27ead442e9 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud