1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc char *funk(int format); 4*f4a2713aSLionel Sambuc enum Test {A=-1}; 5*f4a2713aSLionel Sambuc char *funk(enum Test x); 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc int eli(float b); // expected-note {{previous declaration is here}} \ 8*f4a2713aSLionel Sambuc // expected-note{{passing argument to parameter 'b' here}} b(int c)9*f4a2713aSLionel Sambucint b(int c) {return 1;} 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc int foo(); foo()12*f4a2713aSLionel Sambucint foo() { 13*f4a2713aSLionel Sambuc int eli(int (int)); // expected-error {{conflicting types for 'eli'}} 14*f4a2713aSLionel Sambuc eli(b); // expected-error{{passing 'int (int)' to parameter of incompatible type 'float'}} 15*f4a2713aSLionel Sambuc return 0; 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc int bar(); bar(int i)19*f4a2713aSLionel Sambucint bar(int i) // expected-note {{previous definition is here}} 20*f4a2713aSLionel Sambuc { 21*f4a2713aSLionel Sambuc return 0; 22*f4a2713aSLionel Sambuc } bar()23*f4a2713aSLionel Sambucint bar() // expected-error {{redefinition of 'bar'}} 24*f4a2713aSLionel Sambuc { 25*f4a2713aSLionel Sambuc return 0; 26*f4a2713aSLionel Sambuc } 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc int foobar(int); // note {{previous declaration is here}} foobar()29*f4a2713aSLionel Sambucint foobar() // error {{conflicting types for 'foobar'}} 30*f4a2713aSLionel Sambuc { 31*f4a2713aSLionel Sambuc return 0; 32*f4a2713aSLionel Sambuc } 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc int wibble(); // expected-note {{previous declaration is here}} wibble()35*f4a2713aSLionel Sambucfloat wibble() // expected-error {{conflicting types for 'wibble'}} 36*f4a2713aSLionel Sambuc { 37*f4a2713aSLionel Sambuc return 0.0f; 38*f4a2713aSLionel Sambuc } 39