Daniel Dunbar | d5d3180 | 2009-02-19 07:15:39 +0000 | [diff] [blame] | 1 | // RUN: clang %s -emit-llvm -o %t && |
| 2 | |
Chris Lattner | 58c3f9e | 2007-12-02 06:27:33 +0000 | [diff] [blame] | 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 | |
Chris Lattner | 05d2fb4 | 2008-07-31 04:58:58 +0000 | [diff] [blame] | 13 | // rdar://6110827 |
| 14 | typedef void T(void); |
| 15 | void test3(T f) { |
| 16 | f(); |
| 17 | } |
| 18 | |
Douglas Gregor | 450da98 | 2009-02-16 20:58:07 +0000 | [diff] [blame] | 19 | int a(int); |
| 20 | int a() {return 1;} |
Daniel Dunbar | d5d3180 | 2009-02-19 07:15:39 +0000 | [diff] [blame] | 21 | |
| 22 | // RUN: grep 'define void @f0()' %t && |
| 23 | void f0() {} |
| 24 | |
| 25 | void f1(); |
| 26 | // RUN: grep 'call void (...)\* bitcast (void ()\* @f1' %t && |
| 27 | void f2(void) { |
| 28 | f1(1, 2, 3); |
| 29 | } |
| 30 | // RUN: grep 'define void @f1()' %t |
| 31 | void f1() {} |