blob: cb9a4ef81f139e8b594aa5ccd471280bb75a411d [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001// 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); }