diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /test/Sema/warn-missing-prototypes.c | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'test/Sema/warn-missing-prototypes.c')
-rw-r--r-- | test/Sema/warn-missing-prototypes.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/Sema/warn-missing-prototypes.c b/test/Sema/warn-missing-prototypes.c new file mode 100644 index 0000000..299d8a7 --- /dev/null +++ b/test/Sema/warn-missing-prototypes.c @@ -0,0 +1,37 @@ +// 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; } + +// rdar://6759522 +int main(void) { return 0; } |