summaryrefslogtreecommitdiffstats
path: root/test/Sema/typedef-redef.c
diff options
context:
space:
mode:
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