aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/GH153933.cpp
blob: 41184c6b00607f7e5d9c61df7e3064acfa5d587a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -fprebuilt-module-path=%t %t/C.cpp

//--- A.hpp
template<class> struct A {};
template<class T> struct B {
  virtual A<T> v() { return {}; }
};
B<void> x;

//--- B.cppm
module;
#include "A.hpp"
export module B;
using ::x;

//--- C.cpp
#include "A.hpp"
import B;