aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/namespace-alias.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/namespace-alias.cpp')
-rw-r--r--test/SemaCXX/namespace-alias.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/namespace-alias.cpp b/test/SemaCXX/namespace-alias.cpp
new file mode 100644
index 0000000000..745893082b
--- /dev/null
+++ b/test/SemaCXX/namespace-alias.cpp
@@ -0,0 +1,11 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+namespace N { };
+
+namespace A = N;
+
+int B; // expected-note {{previous definition is here}}
+namespace B = N; // expected-error {{redefinition of 'B' as different kind of symbol}}
+
+namespace C { } // expected-note {{previous definition is here}}
+namespace C = N; // expected-error {{redefinition of 'C'}}