blob: b26532c5eace59dde1972a16c5ebdb78fb23ae77 [file] [log] [blame]
Chris Lattnere3995fe2007-11-06 06:07:26 +00001// RUN: clang %s -verify -fsyntax-only
2
3void foo(void);
Steve Naroffadbbd0c2008-01-14 20:51:29 +00004void foo(void) {}
Chris Lattnere3995fe2007-11-06 06:07:26 +00005void foo(void);
Chris Lattner5f4a6822008-11-23 23:12:31 +00006void foo(void); // expected-note {{previous declaration is here}}
Chris Lattnere3995fe2007-11-06 06:07:26 +00007
Steve Naroff837618c2008-01-16 15:01:34 +00008void foo(int); // expected-error {{conflicting types for 'foo'}}
Steve Naroffadbbd0c2008-01-14 20:51:29 +00009
10int funcdef()
11{
12 return 0;
13}
14
15int funcdef();
16
Chris Lattner5f4a6822008-11-23 23:12:31 +000017int funcdef2() { return 0; } // expected-note {{previous definition is here}}
Steve Naroffadbbd0c2008-01-14 20:51:29 +000018int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}}
19