brintos

brintos / llvm-project-archived public Read only

0
0
Text · 678 B · d3f8496 Raw
18 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm6// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify7 8// RUN: rm %t/A.pcm9// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm10// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify11 12//--- A.cppm13export module A;14 15//--- B.cppm16import A; // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}17export module B; // expected-error {{module declaration must occur at the start of the translation unit}}18