Add testcase for -Wmissing-prototypes

llvm-svn: 68212
This commit is contained in:
Douglas Gregor 2009-04-01 16:38:48 +00:00
parent c4971721ea
commit 7c15b9c9a0
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
// RUN: clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s
int f();
int f(int x) { return x; } // expected-warning{{no previous prototype for function 'f'}}
static int g(int x) { return x; }
int h(int x) { return x; } // expected-warning{{no previous prototype for function 'h'}}
static int g2();
int g2(int x) { return x; }
void test(void);
int h3();
int h4(int);
int h4();
void test(void) {
int h2(int x);
int h3(int x);
int h4();
}
int h2(int x) { return x; } // expected-warning{{no previous prototype for function 'h2'}}
int h3(int x) { return x; } // expected-warning{{no previous prototype for function 'h3'}}
int h4(int x) { return x; }
int f2(int);
int f2();
int f2(int x) { return x; }