aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-04-21 02:02:58 +0000
committerDouglas Gregor <dgregor@apple.com>2008-04-21 02:02:58 +0000
commitf009795057dc8ca254f5618c80a0a90f07cd44b4 (patch)
tree5329561e54fb30356a7b47e6827b3021c5d2047c /test
parent7b989570f0fe262b6bdbad412577450c81304936 (diff)
Clean up handling of function redeclarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Sema/redefinition.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/redefinition.c b/test/Sema/redefinition.c
new file mode 100644
index 0000000000..c45779fdee
--- /dev/null
+++ b/test/Sema/redefinition.c
@@ -0,0 +1,5 @@
+// RUN: clang %s -fsyntax-only -verify
+int f(int) { } // expected-error{{previous definition is here}}
+int f(int);
+int f(int) { } // expected-error{{redefinition of 'f'}}
+