2007-11-06 14:07:26 +08:00
|
|
|
// RUN: clang %s -verify -fsyntax-only
|
|
|
|
|
|
|
|
void foo(void);
|
2008-01-15 04:51:29 +08:00
|
|
|
void foo(void) {}
|
2007-11-06 14:07:26 +08:00
|
|
|
void foo(void);
|
2008-01-15 04:51:29 +08:00
|
|
|
void foo(void); // expected-error{{previous definition is here}}
|
2007-11-06 14:07:26 +08:00
|
|
|
|
|
|
|
void foo(int); // expected-error {{redefinition of 'foo'}}
|
2008-01-15 04:51:29 +08:00
|
|
|
|
|
|
|
int funcdef()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int funcdef();
|
|
|
|
|
|
|
|
int funcdef2() { return 0; } // expected-error{{previous definition is here}}
|
|
|
|
int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}}
|
|
|
|
|