aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-08-27 23:16:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-08-27 23:16:26 +0000
commite8d6d2b9a2c5d3f0e7e0f88f54f1711bbc6c6f78 (patch)
tree33b1758a452d6e81540440001e53a32703c7d688 /lib/Analysis/CFG.cpp
parent8e0293406f9d62a293be6be3b1fb89d359f5ea40 (diff)
CFG construction: Abort CFG construction when processing a CompoundStmt if any
of its subexpressions resulted in a "bad CFG". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r--lib/Analysis/CFG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 3677f7ee0d..ee64bd2f3f 100644
--- a/lib/Analysis/CFG.cpp
+++ b/lib/Analysis/CFG.cpp
@@ -560,6 +560,9 @@ CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) {
for (CompoundStmt::reverse_body_iterator I=C->body_rbegin(), E=C->body_rend();
I != E; ++I ) {
LastBlock = addStmt(*I);
+
+ if (badCFG)
+ return NULL;
}
return LastBlock;
}