summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/GRCoreEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/GRCoreEngine.cpp')
-rw-r--r--clang/lib/Analysis/GRCoreEngine.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/Analysis/GRCoreEngine.cpp b/clang/lib/Analysis/GRCoreEngine.cpp
index d55bf6d9f8e..5641baac5fc 100644
--- a/clang/lib/Analysis/GRCoreEngine.cpp
+++ b/clang/lib/Analysis/GRCoreEngine.cpp
@@ -452,7 +452,12 @@ GRStmtNodeBuilderImpl::generateNodeImpl(PostStmt Loc, const void* State,
}
ExplodedNodeImpl* GRBranchNodeBuilderImpl::generateNodeImpl(const void* State,
- bool branch) {
+ bool branch) {
+
+ // If the branch has been marked infeasible we should not generate a node.
+ if (!isFeasible(branch))
+ return NULL;
+
bool IsNew;
ExplodedNodeImpl* Succ =
@@ -460,8 +465,10 @@ ExplodedNodeImpl* GRBranchNodeBuilderImpl::generateNodeImpl(const void* State,
Succ->addPredecessor(Pred);
- if (branch) GeneratedTrue = true;
- else GeneratedFalse = true;
+ if (branch)
+ GeneratedTrue = true;
+ else
+ GeneratedFalse = true;
if (IsNew) {
Deferred.push_back(Succ);
OpenPOWER on IntegriCloud