Debian Codegraph @

clang/test/Modules/subframeworks.m

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