]> granicus.if.org Git - clang/commitdiff
CFG construction: Abort CFG construction when processing a CompoundStmt if any
authorTed Kremenek <kremenek@apple.com>
Thu, 27 Aug 2009 23:16:26 +0000 (23:16 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 27 Aug 2009 23:16:26 +0000 (23:16 +0000)
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

lib/Analysis/CFG.cpp

index 3677f7ee0d59838b822062461611ed93de04428a..ee64bd2f3fef53ed249117b3908af684eb106cb3 100644 (file)
@@ -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;
 }