functions.c revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// RUN: %clang_cc1 %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