[cfe-commits] r163374 - /cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
Ted Kremenek
kremenek at apple.com
Thu Sep 6 23:56:18 PDT 2012
Author: kremenek
Date: Fri Sep 7 01:56:18 2012
New Revision: 163374
URL: http://llvm.org/viewvc/llvm-project?rev=163374&view=rev
Log:
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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp?rev=163374&r1=163373&r2=163374&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp Fri Sep 7 01:56:18 2012
@@ -94,9 +94,6 @@
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 @@
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))
More information about the cfe-commits
mailing list