]> granicus.if.org Git - clang/commitdiff
fix my containsBreak predicate.
authorChris Lattner <sabre@nondot.org>
Mon, 28 Feb 2011 00:42:31 +0000 (00:42 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 28 Feb 2011 00:42:31 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126600 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.cpp

index 999788f58c349af7295b7e6c08a6f7cd3aac8c1b..4ab327712a59ae46c782de2ca7cd09ead832fa3b 100644 (file)
@@ -421,6 +421,9 @@ bool CodeGenFunction::containsBreak(const Stmt *S) {
   // include it and anything inside of it.
   if (isa<SwitchStmt>(S) || isa<WhileStmt>(S) || isa<DoStmt>(S) ||
       isa<ForStmt>(S))
+    return false;
+  
+  if (isa<BreakStmt>(S))
     return true;
   
   // Scan subexpressions for verboten breaks.