2011-12-07 01:16:41 +08:00
|
|
|
// RUN: rm -rf %t
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify
|
|
|
|
// 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
|
2011-12-07 01:16:41 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import DependsOnModule;
|
2011-12-07 01:16:41 +08:00
|
|
|
|
|
|
|
void testSubFramework() {
|
2013-08-21 04:35:18 +08:00
|
|
|
float *sf1 = sub_framework; // expected-error{{declaration of 'sub_framework' must be imported from module 'DependsOnModule.SubFramework' before it is required}}
|
|
|
|
// expected-note@Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h:2 {{previous}}
|
2011-12-07 01:16:41 +08:00
|
|
|
}
|
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import DependsOnModule.SubFramework;
|
2011-12-07 01:16:41 +08:00
|
|
|
|
|
|
|
void testSubFrameworkAgain() {
|
|
|
|
float *sf2 = sub_framework;
|
|
|
|
double *sfo1 = sub_framework_other;
|
|
|
|
}
|
|
|
|
|
2011-12-31 12:05:44 +08:00
|
|
|
#ifdef __cplusplus
|
2012-12-12 06:11:52 +08:00
|
|
|
@import DependsOnModule.CXX;
|
2011-12-31 12:05:44 +08:00
|
|
|
|
|
|
|
CXXOnly cxxonly;
|
|
|
|
#endif
|
2013-02-08 08:10:48 +08:00
|
|
|
|
|
|
|
@import HasSubModules;
|
|
|
|
|
2013-04-17 16:06:46 +08:00
|
|
|
// expected-warning@Inputs/HasSubModules.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h:1{{treating #include as an import of module 'HasSubModules.Sub.Types'}}
|
2013-02-08 08:10:48 +08:00
|
|
|
#import <HasSubModules/HasSubModulesPriv.h>
|
|
|
|
|
|
|
|
struct FrameworkSubStruct ss;
|