aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/predefined-function.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-17 19:31:09 +0000
committerChris Lattner <sabre@nondot.org>2008-02-17 19:31:09 +0000
commit5280408ab323a213ac63d5b557475ea5037aa553 (patch)
tree85b66eb4b7235ee0a48a5b8788d28027e8c3cb4a /test/Sema/predefined-function.c
parenta9b20e57d407dfc8bd260e6228ba40f64439869c (diff)
Fix PR2042. One remaining issue: we don't currently diagnose
int foobar(int); int foobar() {} which requires ifdef'ing out a testcase in predefined-function.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/predefined-function.c')
-rw-r--r--test/Sema/predefined-function.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/predefined-function.c b/test/Sema/predefined-function.c
index 1dcd1d38a2..daade82b46 100644
--- a/test/Sema/predefined-function.c
+++ b/test/Sema/predefined-function.c
@@ -20,16 +20,18 @@ int bar(int i) // expected-error {{previous definition is here}}
{
return 0;
}
-int bar() // expected-error {{redefinition of 'bar'}} expected-error {{conflicting types for 'bar'}}
+int bar() // expected-error {{redefinition of 'bar'}}
{
return 0;
}
+#if 0
int foobar(int); // expected-error {{previous declaration is here}}
int foobar() // expected-error {{conflicting types for 'foobar'}}
{
return 0;
}
+#endif
int wibble(); // expected-error {{previous declaration is here}}
float wibble() // expected-error {{conflicting types for 'wibble'}}