[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Modules / cxx20-10-3-ex1.cpp
blob5d6e2554f753b07d46db6604a33689738f1bc31f
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu1.cpp \
6 // RUN: -o %t/M_PartImpl.pcm
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu2.cpp \
9 // RUN: -fmodule-file=M:PartImpl=%t/M_PartImpl.pcm -o %t/M.pcm -verify
11 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu3.cpp \
12 // RUN: -o %t/M_Part.pcm
14 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex1-tu4.cpp \
15 // RUN: -fmodule-file=M:Part=%t/M_Part.pcm -o %t/M.pcm
17 //--- std10-3-ex1-tu1.cpp
18 module M:PartImpl;
20 // expected-no-diagnostics
22 //--- std10-3-ex1-tu2.cpp
23 export module M;
24 // error: exported partition :Part is an implementation unit
25 export import :PartImpl; // expected-error {{module partition implementations cannot be exported}}
27 //--- std10-3-ex1-tu3.cpp
28 export module M:Part;
30 // expected-no-diagnostics
32 //--- std10-3-ex1-tu4.cpp
33 export module M;
34 export import :Part;
36 // expected-no-diagnostics