clang/test/Modules/GH153933.cpp
raw| 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir -p %t |
| 3 | // RUN: split-file %s %t |
| 4 | // |
| 5 | // RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm |
| 6 | // RUN: %clang_cc1 -std=c++20 -fsyntax-only -fprebuilt-module-path=%t %t/C.cpp |
| 7 | |
| 8 | //--- A.hpp |
| 9 | template<class> struct A {}; |
| 10 | template<class T> struct B { |
| 11 | virtual A<T> v() { return {}; } |
| 12 | }; |
| 13 | B<void> x; |
| 14 | |
| 15 | //--- B.cppm |
| 16 | module; |
| 17 | #include "A.hpp" |
| 18 | export module B; |
| 19 | using ::x; |
| 20 | |
| 21 | //--- C.cpp |
| 22 | #include "A.hpp" |
| 23 | import B; |