Files
clang-p2996/clang/test/CodeGen/functions.c
Chris Lattner 36797ab251 When defining a function whose type has no prototype, make an effort
to go back and clean up existing uses of the bitcasted function.  This
is not just an optimization: it is required for correctness to get
always inline functions to work, see testcases in function-attributes.c.

llvm-svn: 70971
2009-05-05 06:16:31 +00:00

36 lines
494 B
C

// RUN: clang-cc %s -emit-llvm -o %t &&
int g();
int foo(int i) {
return g(i);
}
int g(int i) {
return g(i);
}
// rdar://6110827
typedef void T(void);
void test3(T f) {
f();
}
int a(int);
int a() {return 1;}
// RUN: grep 'define void @f0()' %t &&
void f0() {}
void f1();
// RUN: grep 'call void @f1()' %t &&
void f2(void) {
f1(1, 2, 3);
}
// RUN: grep 'define void @f1()' %t &&
void f1() {}
// RUN: grep 'define .* @f3' %t | not grep -F '...'
struct foo { int X, Y, Z; } f3() {
}