[Utils] Identity map module-level debug info on first use in CloneFunction* (#118627)
[llvm-project.git] / clang / test / CXX / module / module.private.frag / p1.cpp
blobff89140b42b2cf315866e392a76666c31f1644d0
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/parta.cppm -o %t/mod-parta.pcm -fsyntax-only -verify
6 // RUN: %clang_cc1 -std=c++20 %t/impl.cppm -o %t/mod-impl.pcm -fsyntax-only -verify
7 // RUN: %clang_cc1 -std=c++20 %t/primary.cppm -o %t/mod.pcm -fsyntax-only -verify
9 //--- parta.cppm
10 export module mod:parta;
12 module :private; // expected-error {{private module fragment declaration with no preceding module declaration}}
14 //--- impl.cppm
16 module mod:impl;
18 module :private; // expected-error {{private module fragment declaration with no preceding module declaration}}
20 //--- primary.cppm
21 //expected-no-diagnostics
22 export module mod;
24 module :private;