blob: bfd1459b41d0b7f2da3a57d37359d640b601ed3e [file] [log] [blame]
Daniel Dunbar80737ad2009-12-15 22:01:24 +00001// RUN: %clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s
Douglas Gregor4eee2742009-04-01 16:38:48 +00002
3int f();
4
5int f(int x) { return x; } // expected-warning{{no previous prototype for function 'f'}}
6
7static int g(int x) { return x; }
8
9int h(int x) { return x; } // expected-warning{{no previous prototype for function 'h'}}
10
11static int g2();
12
13int g2(int x) { return x; }
14
15void test(void);
16
17int h3();
18int h4(int);
19int h4();
20
21void test(void) {
22 int h2(int x);
23 int h3(int x);
24 int h4();
25}
26
27int h2(int x) { return x; } // expected-warning{{no previous prototype for function 'h2'}}
28int h3(int x) { return x; } // expected-warning{{no previous prototype for function 'h3'}}
29int h4(int x) { return x; }
30
31int f2(int);
32int f2();
33
34int f2(int x) { return x; }
Douglas Gregor2c2d9dc2009-04-08 15:21:36 +000035
Chris Lattner73f35e62009-04-11 17:26:58 +000036// rdar://6759522
Douglas Gregor2c2d9dc2009-04-08 15:21:36 +000037int main(void) { return 0; }