Douglas Gregor | f119670 | 2009-02-16 18:20:44 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | // PR3588 |
| 4 | void g0(int, int); |
| 5 | void g0(); // expected-note{{previous declaration is here}} |
| 6 | |
| 7 | void f0() { |
| 8 | g0(1, 2, 3); // expected-error{{too many arguments to function call}} |
| 9 | } |
| 10 | |
| 11 | void g0(int); // expected-error{{conflicting types for 'g0'}} |
| 12 | |
| 13 | int g1(int, int); |
| 14 | |
| 15 | typedef int INT; |
| 16 | |
| 17 | INT g1(x, y) |
| 18 | int x; |
| 19 | int y; |
| 20 | { |
| 21 | return x + y; |
| 22 | } |
| 23 | |
| 24 | int g2(int, int); // expected-note{{previous declaration is here}} |
| 25 | |
| 26 | INT g2(x) // expected-error{{conflicting types for 'g2'}} |
| 27 | int x; |
| 28 | { |
| 29 | return x; |
| 30 | } |