aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/wildcard-submodule-exports.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/wildcard-submodule-exports.cpp')
-rw-r--r--test/Modules/wildcard-submodule-exports.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Modules/wildcard-submodule-exports.cpp b/test/Modules/wildcard-submodule-exports.cpp
new file mode 100644
index 0000000000..b892acbe59
--- /dev/null
+++ b/test/Modules/wildcard-submodule-exports.cpp
@@ -0,0 +1,25 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/wildcard-submodule-exports %s -verify
+
+__import_module__ C.One;
+
+void test_C_One() {
+ int *A1_ptr = A1;
+ long *C1_ptr = C1;
+ (void)B1; // expected-error{{use of undeclared identifier 'B1'}}
+}
+
+__import_module__ C.Two;
+
+void test_C_Two() {
+ unsigned int *A2_ptr = A2;
+ unsigned short *B2_ptr = B2;
+ unsigned long *C2_ptr = C2;
+}
+
+__import_module__ B.One;
+
+void test_B_One() {
+ short *B1_ptr = B1;
+}
+