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