From 68a172ca1626ce380395b47b0c1ca76031a0d8bd Mon Sep 17 00:00:00 2001 From: Anton Yartsev Date: Fri, 28 Feb 2014 22:29:48 +0000 Subject: [analyzer] Fix for PR18394. Additional conditions that prevent useful nodes before call from being reclaimed. llvm-svn: 202553 --- clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index e9c4a35de6e..7812c96f869 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -90,8 +90,9 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { // (7) The LocationContext is the same as the predecessor. // (8) Expressions that are *not* lvalue expressions. // (9) The PostStmt isn't for a non-consumed Stmt or Expr. - // (10) The successor is not a CallExpr StmtPoint (so that we would - // be able to find it when retrying a call with no inlining). + // (10) The successor is neither a CallExpr StmtPoint nor a CallEnter or + // PreImplicitCall (so that we would be able to find it when retrying a + // call with no inlining). // FIXME: It may be safe to reclaim PreCall and PostCall nodes as well. // Conditions 1 and 2. @@ -153,6 +154,10 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { if (CallEvent::isCallStmt(SP->getStmt())) return false; + // Condition 10, continuation. + if (SuccLoc.getAs() || SuccLoc.getAs()) + return false; + return true; } -- cgit v1.2.3