24 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm6// RUN: %clang_cc1 -std=c++20 -fsyntax-only -fprebuilt-module-path=%t %t/C.cpp7 8//--- A.hpp9template<class> struct A {};10template<class T> struct B {11 virtual A<T> v() { return {}; }12};13B<void> x;14 15//--- B.cppm16module;17#include "A.hpp"18export module B;19using ::x;20 21//--- C.cpp22#include "A.hpp"23import B;24