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

Ted Kremenek kremenek at apple.com
Mon Apr 6 21:53:35 PDT 2009


Author: kremenek
Date: Mon Apr  6 23:53:35 2009
New Revision: 68495

URL: http://llvm.org/viewvc/llvm-project?rev=68495&view=rev
Log:
Removed some commented code.

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=68495&r1=68494&r2=68495&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Mon Apr  6 23:53:35 2009
@@ -949,11 +949,6 @@
       return;
 
     if (containsLocation(TopContextLoc, L)) {
-    // /  if (const Stmt *S = L.asStmt())
-    //     if (isa<Expr>(S))
-    //       if (const Stmt *P = PDB.getParent(S))
-    //         addContext(PDB.getEnclosingStmtLocation(P).asStmt());
-      
       CLocs.push_back(L);
       return;      
     }
@@ -974,7 +969,6 @@
 
   const ExplodedNode<GRState>* NextNode = N->pred_empty() 
                                         ? NULL : *(N->pred_begin());
-
   while (NextNode) {
     N = NextNode;
     NextNode = GetPredecessorNode(N);
@@ -987,13 +981,6 @@
       if (const Stmt *Term = Blk.getTerminator())
         EB.addContext(Term);
 
-      // Only handle blocks with more than 1 statement here, as the blocks
-      // with one statement are handled at BlockEntrances.
-//      if (Blk.size() > 1) {
-//        const Stmt *S = *Blk.rbegin();
-//        EB.addEdge(S);
-//      }
-
       continue;
     }
 
@@ -1002,15 +989,15 @@
        if (IsControlFlowExpr(S))
          EB.addContext(S);
        else
-        EB.addEdge(S);
+         EB.addContext(PDB.getEnclosingStmtLocation(S).asStmt());
       }
 
       continue;
     }
     
     PathDiagnosticPiece* p =
-    PDB.getReport().VisitNode(N, NextNode, PDB.getGraph(),
-                              PDB.getBugReporter(), PDB.getNodeMapClosure());
+      PDB.getReport().VisitNode(N, NextNode, PDB.getGraph(),
+                                PDB.getBugReporter(), PDB.getNodeMapClosure());
     
     if (p) {
       EB.addEdge(p->getLocation(), true);





More information about the cfe-commits mailing list