function-redecl.c revision 6871981fbccba9e8a63997d58245ec0add114f49
1// RUN: clang -fsyntax-only -verify %s 2 3// PR3588 4void g0(int, int); 5void g0(); // expected-note{{previous declaration is here}} 6 7void f0() { 8 g0(1, 2, 3); // expected-error{{too many arguments to function call}} 9} 10 11void g0(int); // expected-error{{conflicting types for 'g0'}} 12 13int g1(int, int); 14 15typedef int INT; 16 17INT g1(x, y) 18 int x; 19 int y; 20{ 21 return x + y; 22} 23 24int g2(int, int); // expected-note{{previous declaration is here}} 25 26INT g2(x) // expected-error{{conflicting types for 'g2'}} 27 int x; 28{ 29 return x; 30} 31