Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / cxx20-10-3-ex2.cpp
blobb1d6d669c0a0e60fedfb0348433fa4ff60589d8d
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex2-tu1.cpp \
6 // RUN: -o %t/M.pcm
8 // RUN: %clang_cc1 -std=c++20 -S %t/std10-3-ex2-tu2.cpp \
9 // RUN: -fmodule-file=M=%t/M.pcm -o %t/tu_8.s -verify
11 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/std10-3-ex2-tu3.cpp \
12 // RUN: -o %t/M.pcm -verify
14 //--- std10-3-ex2-tu1.cpp
15 export module M;
17 //--- std10-3-ex2-tu2.cpp
18 module M;
19 // error: cannot import M in its own unit
20 import M; // expected-error {{import of module 'M' appears within its own implementation}}
22 //--- std10-3-ex2-tu3.cpp
23 export module M;
24 // error: cannot import M in its own unit
25 import M; // expected-error {{import of module 'M' appears within its own interface}}