summaryrefslogtreecommitdiff
path: root/clang/test/Modules/redecl-namespaces.mm
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/redecl-namespaces.mm')
-rw-r--r--clang/test/Modules/redecl-namespaces.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Modules/redecl-namespaces.mm b/clang/test/Modules/redecl-namespaces.mm
new file mode 100644
index 0000000..e338821
--- /dev/null
+++ b/clang/test/Modules/redecl-namespaces.mm
@@ -0,0 +1,13 @@
+@__experimental_modules_import redecl_namespaces_left;
+@__experimental_modules_import redecl_namespaces_right;
+
+void test() {
+ A::i;
+ A::j;
+ A::k; // expected-error {{no member named 'k' in namespace 'A'}}
+}
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -w %s -verify