From 891bcdb644d7e178dcd1a0d64cb59e0920e25518 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 7 Sep 2012 06:56:18 +0000 Subject: [PATCH] ExplodedGraph::shouldCollectNode() should not collect nodes for non-Expr Stmts (as this previously was the case before this was refactored). We also shouldn't need to specially handle BinaryOperators since the eagerly-assume heuristic tags such nodes. llvm-svn: 163374 --- clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index ae746f632505..ff296403a8c0 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -94,9 +94,6 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { PostStmt ps = cast(progPoint); if (ps.getTag()) return false; - - if (isa(ps.getStmt())) - return false; // Conditions 5, 6, and 7. ProgramStateRef state = node->getState(); @@ -106,6 +103,9 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { return false; // Condition 8. + if (!isa(ps.getStmt())) + return false; + if (const Expr *Ex = dyn_cast(ps.getStmt())) { ParentMap &PM = progPoint.getLocationContext()->getParentMap(); if (!PM.isConsumedExpr(Ex))