24 lines · cpp
1// RUN: split-file --leading-lines %s %t2// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm3// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp4// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm5// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp6// RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify -emit-module-interface %t/module.cppm -o %t/module.pcm7// RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify -fmodule-file=A=%t/module.pcm %t/main.cpp8 9//--- module.cppm10// expected-no-diagnostics11export module A;12 13namespace cwg2630 {14export class X {};15} // namespace cwg263016 17//--- main.cpp18// expected-no-diagnostics19import A;20 21namespace cwg2630 { // cwg2630: 922X x;23} // namespace cwg263024