xref: /aosp_15_r20/external/clang/test/Modules/wildcard-submodule-exports.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: rm -rf %t
2*67e74705SXin Li // RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/wildcard-submodule-exports %s -verify
3*67e74705SXin Li // FIXME: When we have a syntax for modules in C++, use that.
4*67e74705SXin Li 
5*67e74705SXin Li @import C.One;
6*67e74705SXin Li 
test_C_One()7*67e74705SXin Li void test_C_One() {
8*67e74705SXin Li   int *A1_ptr = A1;
9*67e74705SXin Li   long *C1_ptr = C1;
10*67e74705SXin Li   (void)B1; // expected-error{{use of undeclared identifier 'B1'}}
11*67e74705SXin Li }
12*67e74705SXin Li 
13*67e74705SXin Li @import C.Two;
14*67e74705SXin Li 
test_C_Two()15*67e74705SXin Li void test_C_Two() {
16*67e74705SXin Li   unsigned int *A2_ptr = A2;
17*67e74705SXin Li   unsigned short *B2_ptr = B2;
18*67e74705SXin Li   unsigned long *C2_ptr = C2;
19*67e74705SXin Li }
20*67e74705SXin Li 
21*67e74705SXin Li @import B.One;
22*67e74705SXin Li 
test_B_One()23*67e74705SXin Li void test_B_One() {
24*67e74705SXin Li   short *B1_ptr = B1;
25*67e74705SXin Li }
26*67e74705SXin Li 
27