merge-decls.c revision 5f4a6829dc58cab2f76e2b98492859aa3b91e3f2
1// RUN: clang %s -verify -fsyntax-only 2 3void foo(void); 4void foo(void) {} 5void foo(void); 6void foo(void); // expected-note {{previous declaration is here}} 7 8void foo(int); // expected-error {{conflicting types for 'foo'}} 9 10int funcdef() 11{ 12 return 0; 13} 14 15int funcdef(); 16 17int funcdef2() { return 0; } // expected-note {{previous definition is here}} 18int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}} 19 20