summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
diff options
context:
space:
mode:
authorAnton Yartsev <anton.yartsev@gmail.com>2014-02-28 22:29:48 +0000
committerAnton Yartsev <anton.yartsev@gmail.com>2014-02-28 22:29:48 +0000
commitefeac4d14e06b0c6279189a060d626fe4e04a521 (patch)
tree409ba7d8707b5e9bdf910dc0c7eb0f7d190fa924 /lib/StaticAnalyzer/Core/ExplodedGraph.cpp
parentd066fe94b043330d26e29f3911aca79e52ebb0a9 (diff)
downloadclang-efeac4d14e06b0c6279189a060d626fe4e04a521.tar.gz
clang-efeac4d14e06b0c6279189a060d626fe4e04a521.tar.bz2
clang-efeac4d14e06b0c6279189a060d626fe4e04a521.tar.xz
[analyzer] Fix for PR18394.
Additional conditions that prevent useful nodes before call from being reclaimed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExplodedGraph.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
index e9c4a35de6..7812c96f86 100644
--- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+++ b/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<CallEnter>() || SuccLoc.getAs<PreImplicitCall>())
+ return false;
+
return true;
}