blob: d3f8496c47c2a73932302136dd6d156de85cd9bb [file] [log] [blame]
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify
// RUN: rm %t/A.pcm
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify
//--- A.cppm
export module A;
//--- B.cppm
import A; // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
export module B; // expected-error {{module declaration must occur at the start of the translation unit}}