aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Modules/Inputs/normal-module-map/module.map5
-rw-r--r--test/Modules/Inputs/normal-module-map/nested_umbrella/a.h2
-rw-r--r--test/Modules/Inputs/normal-module-map/nested_umbrella/b.h2
-rw-r--r--test/Modules/normal-module-map.cpp18
4 files changed, 27 insertions, 0 deletions
diff --git a/test/Modules/Inputs/normal-module-map/module.map b/test/Modules/Inputs/normal-module-map/module.map
index 91e4bf7178..e17f44a8f4 100644
--- a/test/Modules/Inputs/normal-module-map/module.map
+++ b/test/Modules/Inputs/normal-module-map/module.map
@@ -6,3 +6,8 @@ module libA {
module libB {
header "b1.h"
}
+
+module nested_umbrella {
+ umbrella "nested_umbrella"
+ module * { }
+}
diff --git a/test/Modules/Inputs/normal-module-map/nested_umbrella/a.h b/test/Modules/Inputs/normal-module-map/nested_umbrella/a.h
new file mode 100644
index 0000000000..ab180fe073
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/nested_umbrella/a.h
@@ -0,0 +1,2 @@
+int nested_umbrella_a;
+
diff --git a/test/Modules/Inputs/normal-module-map/nested_umbrella/b.h b/test/Modules/Inputs/normal-module-map/nested_umbrella/b.h
new file mode 100644
index 0000000000..a903f5d8ab
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/nested_umbrella/b.h
@@ -0,0 +1,2 @@
+int nested_umbrella_b;
+
diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp
index 19294950d4..5a7d549053 100644
--- a/test/Modules/normal-module-map.cpp
+++ b/test/Modules/normal-module-map.cpp
@@ -1,3 +1,5 @@
+// Note: inside the module. expected-note{{ 'nested_umbrella_a' declared here}}
+
// RUN: rm -rf %t
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map %s -verify
#include "Umbrella/umbrella_sub.h"
@@ -15,3 +17,19 @@ __import_module__ Umbrella2;
int test() {
return a1 + b1 + nested2;
}
+
+__import_module__ nested_umbrella.a;
+
+int testNestedUmbrellaA() {
+ return nested_umbrella_a;
+}
+
+int testNestedUmbrellaBFail() {
+ return nested_umbrella_b; // expected-error{{use of undeclared identifier 'nested_umbrella_b'; did you mean 'nested_umbrella_a'?}}
+}
+
+__import_module__ nested_umbrella.b;
+
+int testNestedUmbrellaB() {
+ return nested_umbrella_b;
+}