2007-11-21 03:04:50 +08:00
|
|
|
// RUN: clang -fsyntax-only -verify -pedantic %s
|
2008-01-10 06:43:08 +08:00
|
|
|
|
|
|
|
char *funk(int format);
|
|
|
|
enum Test {A=-1};
|
|
|
|
char *funk(enum Test x);
|
|
|
|
|
2008-01-16 23:01:34 +08:00
|
|
|
int eli(float b); // expected-error {{previous declaration is here}}
|
2008-01-10 07:34:55 +08:00
|
|
|
int b(int c) {return 1;}
|
|
|
|
|
2007-11-21 03:04:50 +08:00
|
|
|
int foo();
|
|
|
|
int foo()
|
|
|
|
{
|
2008-01-16 23:01:34 +08:00
|
|
|
int eli(int (int)); // expected-error {{conflicting types for 'eli'}}
|
2008-01-10 07:34:55 +08:00
|
|
|
eli(b);
|
2007-11-21 03:04:50 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int bar();
|
|
|
|
int bar(int i) // expected-error {{previous definition is here}}
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2008-02-18 03:31:09 +08:00
|
|
|
int bar() // expected-error {{redefinition of 'bar'}}
|
2007-11-21 03:04:50 +08:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-02-18 03:31:09 +08:00
|
|
|
#if 0
|
2008-01-16 23:01:34 +08:00
|
|
|
int foobar(int); // expected-error {{previous declaration is here}}
|
|
|
|
int foobar() // expected-error {{conflicting types for 'foobar'}}
|
2007-11-21 03:04:50 +08:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2008-02-18 03:31:09 +08:00
|
|
|
#endif
|
2007-11-21 03:04:50 +08:00
|
|
|
|
2008-01-16 23:01:34 +08:00
|
|
|
int wibble(); // expected-error {{previous declaration is here}}
|
|
|
|
float wibble() // expected-error {{conflicting types for 'wibble'}}
|
2007-11-21 03:04:50 +08:00
|
|
|
{
|
|
|
|
return 0.0f;
|
|
|
|
}
|