brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 95d087e Raw
31 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// RUN: %clang_cc1 -std=c++20 -verify %t/A.cppm5// RUN: %clang_cc1 -std=c++20 -verify %t/B.cppm6// RUN: %clang_cc1 -std=c++20 %t/C.cppm -emit-module-interface -o %t/C.pcm7// RUN: %clang_cc1 -std=c++20 %t/D.cppm -fmodule-file=foo=%t/C.pcm8// RUN: %clang_cc1 -std=c++20 %t/E.cppm -fmodule-file=foo=%t/C.pcm9// RUN: %clang_cc1 -std=c++20 -verify %t/F.cppm -fmodule-file=foo=%t/C.pcm10 11//--- A.cppm12export module foo; // expected-note {{previous module declaration is here}}13export module bar; // expected-error {{translation unit contains multiple module declarations}}14 15//--- B.cppm16export module foo; // expected-note {{previous module declaration is here}}17module bar; // expected-error {{translation unit contains multiple module declarations}}18 19//--- C.cppm20export module foo;21 22//--- D.cppm23module foo;24 25//--- E.cppm26export module bar;27 28//--- F.cppm29module foo; // expected-note {{previous module declaration is here}}30export module bar; // expected-error {{translation unit contains multiple module declarations}}31