diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-07 04:53:35 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-07 04:53:35 +0000 |
commit | 581329c09fd5a3db85c9602f33d2abf0884a2b8e (patch) | |
tree | 3cce06947350a4e2e8cdade891df54f0e0979dd9 /lib/Analysis/BugReporter.cpp | |
parent | 3a5cbd37c91d29bbd169ae869b234ed1fc954cb6 (diff) |
Removed some commented code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 995833a29c..01f5e81bf5 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -949,11 +949,6 @@ void EdgeBuilder::addContext(const Stmt *S) { 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 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, const ExplodedNode<GRState>* NextNode = N->pred_empty() ? NULL : *(N->pred_begin()); - while (NextNode) { N = NextNode; NextNode = GetPredecessorNode(N); @@ -987,13 +981,6 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, 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 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, 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); |