forked from OSchip/llvm-project
20 lines
427 B
C
20 lines
427 B
C
// RUN: clang %s -verify -fsyntax-only
|
|
|
|
void foo(void);
|
|
void foo(void) {}
|
|
void foo(void);
|
|
void foo(void); // expected-error{{previous declaration is here}}
|
|
|
|
void foo(int); // expected-error {{conflicting types for 'foo'}}
|
|
|
|
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'}}
|
|
|