]> granicus.if.org Git - clang/commitdiff
Don't overguard to adding a control-flow piece when "alwaysAdd" is true.
authorTed Kremenek <kremenek@apple.com>
Tue, 7 Apr 2009 00:11:40 +0000 (00:11 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 7 Apr 2009 00:11:40 +0000 (00:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68476 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index c068b4b4df84caa6519113a6eee4148644c004c2..b7a1cd90ac34923e44b77a3045f81ce00c6eed93 100644 (file)
@@ -914,7 +914,7 @@ void EdgeBuilder::addEdge(PathDiagnosticLocation NewLoc, bool alwaysAdd) {
     
     // Is the top location context the same as the one for the new location?
     if (TopContextLoc == CLoc) {
-      if (alwaysAdd && NewLoc.asLocation() != CLoc.asLocation())
+      if (alwaysAdd)
         rawAddEdge(NewLoc);
 
       return;
@@ -949,7 +949,7 @@ void EdgeBuilder::addContext(const Stmt *S) {
       return;
 
     if (containsLocation(TopContextLoc, L)) {
-    //   if (const Stmt *S = L.asStmt())
+    // /  if (const Stmt *S = L.asStmt())
     //     if (isa<Expr>(S))
     //       if (const Stmt *P = PDB.getParent(S))
     //         addContext(PDB.getEnclosingStmtLocation(P).asStmt());