3 // RUN: split-file %s %t
4 // RUN: %clang_cc1 -std=c++20 %t/impl.cppm -emit-module-interface -o %t/M-impl.pcm
5 // RUN: %clang_cc1 -std=c++20 %t/M.cppm -emit-module-interface -fprebuilt-module-path=%t -o %t/M.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/Use.cpp -fprebuilt-module-path=%t -verify -fsyntax-only
7 // RUN: %clang_cc1 -std=c++20 %t/UseInPartA.cppm -fprebuilt-module-path=%t -verify -fsyntax-only
8 // RUN: %clang_cc1 -std=c++20 %t/UseInAnotherModule.cppm -fprebuilt-module-path=%t -verify -fsyntax-only
9 // RUN: %clang_cc1 -std=c++20 %t/Private.cppm -emit-module-interface -fprebuilt-module-path=%t -o %t/A.pcm
10 // RUN: %clang_cc1 -std=c++20 %t/TryUseFromPrivate.cpp -fprebuilt-module-path=%t -verify -fsyntax-only
11 // RUN: %clang_cc1 -std=c++20 %t/Global.cppm -emit-module-interface -fprebuilt-module-path=%t -o %t/C.pcm
12 // RUN: %clang_cc1 -std=c++20 %t/UseGlobal.cpp -fprebuilt-module-path=%t -verify -fsyntax-only
26 A a
; // expected-error {{unknown type name 'A'}}
30 export module M
:partA
;
31 import
:impl
; // expected-warning {{importing an implementation partition unit in a module interface is not recommended.}}
36 //--- UseInAnotherModule.cppm
40 A a
; // expected-error {{unknown type name 'A'}}
52 //--- TryUseFromPrivate.cpp
56 A a
; // expected-error {{unknown type name 'A'}}
70 A a
; // expected-error {{'A' must be declared before it is used}}
71 // expected-note@Global.cppm:2 {{declaration here is not visible}}