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/a.cppm -emit-module-interface -o %t/a.pcm 6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \ 7// RUN: -fprebuilt-module-path=%t 8// RUN: %clang_cc1 -std=c++20 %t/c.cppm -emit-module-interface -o %t/c.pcm \ 9// RUN: -fprebuilt-module-path=%t 10// RUN: %clang_cc1 -std=c++20 %t/d.cpp -fsyntax-only -verify \ 11// RUN: -fprebuilt-module-path=%t 12 13//--- a.cppm 14export module a; 15 16template<typename> 17constexpr auto impl = true; 18 19export template<typename T> 20void a() { 21} 22 23export template<typename T> requires impl<T> 24void a() { 25} 26 27//--- b.cppm 28export module b; 29 30import a; 31 32static void b() { 33 a<void>(); 34} 35 36//--- c.cppm 37export module c; 38 39import a; 40 41static void c() { 42 a<void>(); 43} 44 45//--- d.cpp 46// expected-no-diagnostics 47import a; 48import b; 49import c; 50 51static void d() { 52 a<void>(); 53} 54