1*67e74705SXin Li// RUN: rm -rf %t 2*67e74705SXin Li// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify 3*67e74705SXin Li// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify 4*67e74705SXin Li 5*67e74705SXin Li@import DependsOnModule; 6*67e74705SXin Li 7*67e74705SXin Livoid testSubFramework() { 8*67e74705SXin Li float *sf1 = sub_framework; // expected-error{{declaration of 'sub_framework' must be imported from module 'DependsOnModule.SubFramework' before it is required}} 9*67e74705SXin Li // expected-note@Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h:2 {{previous}} 10*67e74705SXin Li} 11*67e74705SXin Li 12*67e74705SXin Li@import DependsOnModule.SubFramework; 13*67e74705SXin Li 14*67e74705SXin Livoid testSubFrameworkAgain() { 15*67e74705SXin Li float *sf2 = sub_framework; 16*67e74705SXin Li double *sfo1 = sub_framework_other; 17*67e74705SXin Li} 18*67e74705SXin Li 19*67e74705SXin Li#ifdef __cplusplus 20*67e74705SXin Li@import DependsOnModule.CXX; 21*67e74705SXin Li 22*67e74705SXin LiCXXOnly cxxonly; 23*67e74705SXin Li#endif 24*67e74705SXin Li 25*67e74705SXin Li@import HasSubModules; 26*67e74705SXin Li 27*67e74705SXin Li// expected-warning@Inputs/HasSubModules.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h:1{{treating #include as an import of module 'HasSubModules.Sub.Types'}} 28*67e74705SXin Li#import <HasSubModules/HasSubModulesPriv.h> 29*67e74705SXin Li 30*67e74705SXin Listruct FrameworkSubStruct ss; 31