1 // RUN: clang-cc %s -emit-llvm -o %t && 2 3 int g(); 4 5 int foo(int i) { 6 return g(i); 7 } 8 9 int g(int i) { 10 return g(i); 11 } 12 13 // rdar://6110827 14 typedef void T(void); 15 void test3(T f) { 16 f(); 17 } 18 19 int a(int); 20 int a() {return 1;} 21 22 // RUN: grep 'define void @f0()' %t && 23 void f0() {} 24 25 void f1(); 26 // RUN: grep 'call void @f1()' %t && 27 void f2(void) { 28 f1(1, 2, 3); 29 } 30 // RUN: grep 'define void @f1()' %t && 31 void f1() {} 32 33 // RUN: grep 'define .* @f3' %t | not grep -F '...' 34 struct foo { int X, Y, Z; } f3() { 35 while (1) {} 36 } 37 38 // PR4423 - This shouldn't crash in codegen 39 void f4() {} 40 void f5() { f4(42); } 41