diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-09-07 06:56:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-09-07 06:56:18 +0000 |
commit | 62bde3e0a0699a72f9dbd1045dc4a3c554a46dd3 (patch) | |
tree | 37ed580fa84749f424f43444fb55df232384cb18 /lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | 689268a426cf4624c1b8ce67bf9d437ad84c6b04 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index ae746f6325..ff296403a8 100644 --- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -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)) |