diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-08-27 23:16:26 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-08-27 23:16:26 +0000 |
commit | ce499c20783494798bee1dfd27a0a6877301e1b9 (patch) | |
tree | 8c85e312500095b14b4e1da537f657342fd70818 /clang/lib/Analysis/CFG.cpp | |
parent | 1d5f2f35467bf3096df8627e2d20552a25466af9 (diff) | |
download | bcm5719-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.cpp | 3 |
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; } |