[cfe-commits] r69814 - /cfe/trunk/lib/Analysis/BugReporter.cpp

Ted Kremenek kremenek at apple.com
Wed Apr 22 11:37:42 PDT 2009


Author: kremenek
Date: Wed Apr 22 13:37:42 2009
New Revision: 69814

URL: http://llvm.org/viewvc/llvm-project?rev=69814&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Analysis/BugReporter.cpp

Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=69814&r1=69813&r2=69814&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Wed Apr 22 13:37:42 2009
@@ -787,7 +787,8 @@
   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 @@
     // Context does not contain the location.  Flush it.
     popLocation();
   }
-
-  assert(0 && "addEdge should never pop the top context");
 }
 
 void EdgeBuilder::addContext(const Stmt *S) {





More information about the cfe-commits mailing list