summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-07 04:53:35 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-07 04:53:35 +0000
commit3cb8a849245156a2306ca0b206d9efc0f8c13ac9 (patch)
tree793bb5fd07714d25a9dc7b1c254e79323ec2331f
parentc2d140156c577111393bd243dadac6a19257cc0e (diff)
downloadbcm5719-llvm-3cb8a849245156a2306ca0b206d9efc0f8c13ac9.tar.gz
bcm5719-llvm-3cb8a849245156a2306ca0b206d9efc0f8c13ac9.zip
Removed some commented code.
llvm-svn: 68495
-rw-r--r--clang/lib/Analysis/BugReporter.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 995833a29c7..01f5e81bf58 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud