summaryrefslogtreecommitdiffstats
path: root/test/Sema/typedef-redef.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
committered <ed@FreeBSD.org>2009-06-02 17:58:47 +0000
commitf27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch)
treece7d964cbb5e39695b71481698f10cb099c23d4a /test/Sema/typedef-redef.c
downloadFreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip
FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz
Import Clang, at r72732.
Diffstat (limited to 'test/Sema/typedef-redef.c')
-rw-r--r--test/Sema/typedef-redef.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/typedef-redef.c b/test/Sema/typedef-redef.c
new file mode 100644
index 0000000..9a1c488
--- /dev/null
+++ b/test/Sema/typedef-redef.c
@@ -0,0 +1,11 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+typedef const int x; // expected-note {{previous definition is here}}
+extern x a;
+typedef int x; // expected-error {{typedef redefinition with different types}}
+extern x a;
+
+// <rdar://problem/6097585>
+int y; // expected-note 2 {{previous definition is here}}
+float y; // expected-error{{redefinition of 'y' with a different type}}
+double y; // expected-error{{redefinition of 'y' with a different type}}
OpenPOWER on IntegriCloud