diff options
Diffstat (limited to 'test/Modules')
4 files changed, 22 insertions, 0 deletions
diff --git a/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/Other.h b/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/Other.h new file mode 100644 index 0000000000..69f9e8e4d0 --- /dev/null +++ b/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/Other.h @@ -0,0 +1 @@ +double *sub_framework_other; diff --git a/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h b/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h new file mode 100644 index 0000000000..e6e835ecc4 --- /dev/null +++ b/test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h @@ -0,0 +1,2 @@ +#include "SubFramework/Other.h" +float *sub_framework; diff --git a/test/Modules/Inputs/DependsOnModule.framework/module.map b/test/Modules/Inputs/DependsOnModule.framework/module.map index d4c2a67061..d771275285 100644 --- a/test/Modules/Inputs/DependsOnModule.framework/module.map +++ b/test/Modules/Inputs/DependsOnModule.framework/module.map @@ -4,4 +4,7 @@ framework module DependsOnModule { module * { export * } + explicit framework module SubFramework { + umbrella "SubFramework.h" + } } diff --git a/test/Modules/subframeworks.m b/test/Modules/subframeworks.m new file mode 100644 index 0000000000..44b6746a4a --- /dev/null +++ b/test/Modules/subframeworks.m @@ -0,0 +1,16 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify + +__import_module__ DependsOnModule; + +void testSubFramework() { + float *sf1 = sub_framework; // expected-error{{use of undeclared identifier 'sub_framework'}} +} + +__import_module__ DependsOnModule.SubFramework; + +void testSubFrameworkAgain() { + float *sf2 = sub_framework; + double *sfo1 = sub_framework_other; +} + |