blob: 4fbcf09e4d7929420de4b8daed8fc166153a0900 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/Base.cppm -emit-module-interface -o %t/Base.pcm
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm -fprebuilt-module-path=%t
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fsyntax-only -verify -fprebuilt-module-path=%t
//--- Base.cppm
export module Base;
export template <class T>
class Base {};
//--- A.cppm
export module A;
import Base;
struct S {};
export Base<S> a;
//--- B.cppm
// expected-no-diagnostics
export module B;
import A;
import Base;
struct S {};
export Base<S> b;
|