1 // RUN: %clang_cc1 %s -verify -fsyntax-only 2 3 void foo(void); 4 void foo(void) {} 5 void foo(void); 6 void foo(void); // expected-note {{previous declaration is here}} 7 8 void foo(int); // expected-error {{conflicting types for 'foo'}} 9 10 int funcdef() 11 { 12 return 0; 13 } 14 15 int funcdef(); 16 17 int funcdef2() { return 0; } // expected-note {{previous definition is here}} 18 int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}} 19 20 // PR2502 21 void (*f)(void); 22 void (*f)() = 0; 23 24 typedef __attribute__(( ext_vector_type(2) )) int Vi2; 25 typedef __attribute__(( ext_vector_type(2) )) float Vf2; 26 27 Vf2 g0; // expected-note {{previous definition is here}} 28 Vi2 g0; // expected-error {{redefinition of 'g0'}} 29 30 _Complex int g1; // expected-note {{previous definition is here}} 31 _Complex float g1; // expected-error {{redefinition of 'g1'}} 32 33 // rdar://6096412 34 extern char i6096412[10]; 35 extern char i6096412[]; 36 void foo6096412(void) { 37 int x = sizeof(i6096412); 38 } 39 40