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
This commit is contained in:
Ted Kremenek 2012-09-07 06:56:18 +00:00
parent 74eb55a23d
commit 891bcdb644
1 changed files with 3 additions and 3 deletions

View File

@ -94,9 +94,6 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) {
PostStmt ps = cast<PostStmt>(progPoint);
if (ps.getTag())
return false;
if (isa<BinaryOperator>(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<Expr>(ps.getStmt()))
return false;
if (const Expr *Ex = dyn_cast<Expr>(ps.getStmt())) {
ParentMap &PM = progPoint.getLocationContext()->getParentMap();
if (!PM.isConsumedExpr(Ex))