1// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s 2 3int bar(); 4int test0() { 5 int i; 6 i = 1 + 2; 7 do { 8 i = bar(); 9 i = bar(); 10 } while(0); 11 return i; 12} 13 14 15int test1() { 16 int i; 17 i = 1 + 2; 18 do { 19 i = bar(); 20 if (i == 42) 21 break; 22 i = bar(); 23 } while(1); 24 return i; 25} 26 27 28int test2() { 29 int i; 30 i = 1 + 2; 31 do { 32 i = bar(); 33 if (i == 42) 34 continue; 35 i = bar(); 36 } while(1); 37 return i; 38} 39 40 41int test3() { 42 int i; 43 i = 1 + 2; 44 do { 45 i = bar(); 46 if (i == 42) 47 break; 48 } while(0); 49 return i; 50} 51 52 53int test4() { 54 int i; 55 i = 1 + 2; 56 do { 57 i = bar(); 58 if (i == 42) 59 continue; 60 } while(0); 61 return i; 62} 63 64// rdar://6103124 65void test5() { 66 do { break; } while(0); 67} 68 69// PR14191 70void test6f(void); 71void test6() { 72 do { 73 } while (test6f(), 0); 74 // CHECK: call void @test6f() 75} 76 77