blob: 80b5ab0c6bcafba0f4bce8bed75e05b3abcc470e [file] [log] [blame]
Chris Lattner55196442007-11-20 19:04:50 +00001// RUN: clang -fsyntax-only -verify -pedantic %s
Steve Naroff4a746782008-01-09 22:43:08 +00002
3char *funk(int format);
4enum Test {A=-1};
5char *funk(enum Test x);
6
Chris Lattner55196442007-11-20 19:04:50 +00007int foo();
8int foo()
9{
10 return 0;
11}
12
13int bar();
14int bar(int i) // expected-error {{previous definition is here}}
15{
16 return 0;
17}
18int bar() // expected-error {{redefinition of 'bar'}}
19{
20 return 0;
21}
22
23int foobar(int); // expected-error {{previous definition is here}}
24int foobar() // expected-error {{redefinition of 'foobar'}}
25{
26 return 0;
27}
28
29int wibble(); // expected-error {{previous definition is here}}
30float wibble() // expected-error {{redefinition of 'wibble'}}
31{
32 return 0.0f;
33}