blob: 22026e7f2589270b99b53be947157d8a21d8207c [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);
Steve Naroffadbbd0c2008-01-14 20:51:29 +00006void foo(void); // expected-error{{previous definition is here}}
Chris Lattnere3995fe2007-11-06 06:07:26 +00007
8void foo(int); // expected-error {{redefinition of 'foo'}}
Steve Naroffadbbd0c2008-01-14 20:51:29 +00009
10int funcdef()
11{
12 return 0;
13}
14
15int funcdef();
16
17int funcdef2() { return 0; } // expected-error{{previous definition is here}}
18int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}}
19