1 // RUN: split-file --leading-lines %s %t 2 // RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm 3 // RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp 4 // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm 5 // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp 6 // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm 7 // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp 8 9 //--- module.cppm 10 // expected-no-diagnostics 11 export module A; 12 13 namespace cwg2630 { 14 export class X {}; 15 } // namespace cwg2630 16 17 //--- main.cpp 18 // expected-no-diagnostics 19 import A; 20 21 namespace cwg2630 { // cwg2630: 9 22 X x; 23 } // namespace cwg2630 24