3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/Invisible.cppm -emit-module-interface -o %t/Invisible.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/Other.cppm -emit-module-interface -fprebuilt-module-path=%t \
7 // RUN: -o %t/Other.pcm
8 // RUN: %clang_cc1 -std=c++20 %t/Another.cppm -emit-module-interface -o %t/Another.pcm
9 // RUN: %clang_cc1 -std=c++20 %t/A-interface.cppm -emit-module-interface \
10 // RUN: -fprebuilt-module-path=%t -o %t/A-interface.pcm
11 // RUN: %clang_cc1 -std=c++20 %t/A-interface2.cppm -emit-module-interface \
12 // RUN: -fprebuilt-module-path=%t -o %t/A-interface2.pcm
13 // RUN: %clang_cc1 -std=c++20 %t/A-interface3.cppm -emit-module-interface \
14 // RUN: -fprebuilt-module-path=%t -o %t/A-interface3.pcm
15 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface \
16 // RUN: -fprebuilt-module-path=%t -o %t/A.pcm
18 // RUN: %clang_cc1 -std=c++20 %t/A.cpp -fprebuilt-module-path=%t -fsyntax-only -verify
19 // RUN: %clang_cc1 -std=c++20 %t/A-impl.cppm -fprebuilt-module-path=%t -fsyntax-only -verify
21 // RUN: %clang_cc1 -std=c++20 %t/A-impl2.cppm -fprebuilt-module-path=%t -fsyntax-only -verify
24 export module Invisible;
25 export void invisible() {}
30 export void other() {}
33 export module Another;
34 export void another() {}
36 //--- A-interface.cppm
37 export module A:interface;
39 export void a_interface() {}
41 //--- A-interface2.cppm
42 export module A:interface2;
44 export void a_interface2() {}
46 //--- A-interface3.cppm
47 export module A:interface3;
50 export void a_interface3() {}
72 invisible(); // expected-error {{declaration of 'invisible' must be imported from module 'Invisible' before it is required}}
73 // expected-note@* {{declaration here is not visible}}
88 invisible(); // expected-error {{declaration of 'invisible' must be imported from module 'Invisible' before it is required}}
89 // expected-note@* {{declaration here is not visible}}
107 invisible(); // expected-error {{declaration of 'invisible' must be imported from module 'Invisible' before it is required}}
108 // expected-note@* {{declaration here is not visible}}