summaryrefslogtreecommitdiffstats
path: root/clang/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
commitce499c20783494798bee1dfd27a0a6877301e1b9 (patch)
tree8c85e312500095b14b4e1da537f657342fd70818 /clang/lib/Analysis/CFG.cpp
parent1d5f2f35467bf3096df8627e2d20552a25466af9 (diff)
downloadbcm5719-llvm-ce499c20783494798bee1dfd27a0a6877301e1b9.tar.gz
bcm5719-llvm-ce499c20783494798bee1dfd27a0a6877301e1b9.zip
CFG construction: Abort CFG construction when processing a CompoundStmt if any
of its subexpressions resulted in a "bad CFG". llvm-svn: 80298
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r--clang/lib/Analysis/CFG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 3677f7ee0d5..ee64bd2f3fe 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud