[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CXX / module / module.reach / p5.cpp
blob9c498a260530f829d0250268c8a9cf1b47cf91ad
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/B.cppm -fsyntax-only -verify
7 //
8 //--- A.cppm
9 export module A;
10 struct X {};
11 export using Y = X;
13 //--- B.cppm
14 export module B;
15 import A;
16 Y y; // OK, definition of X is reachable
17 X x; // expected-error {{declaration of 'X' must be imported from module 'A' before it is required}}
18 // expected-note@* {{declaration here is not visible}}