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