forked from OSchip/llvm-project
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:
parent
74eb55a23d
commit
891bcdb644
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue