53 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \7// RUN: -fprebuilt-module-path=%t8// RUN: %clang_cc1 -std=c++20 %t/c.cppm -emit-module-interface -o %t/c.pcm \9// RUN: -fprebuilt-module-path=%t10// RUN: %clang_cc1 -std=c++20 %t/d.cpp -fsyntax-only -verify \11// RUN: -fprebuilt-module-path=%t12 13//--- a.cppm14export module a;15 16export template<typename>17struct a;18 19template<typename>20struct a {21};22 23export template<typename T>24constexpr auto aa = a<T>();25 26//--- b.cppm27export module b;28 29import a;30 31static void b() {32 static_cast<void>(a<void>());33}34 35//--- c.cppm36export module c;37 38import a;39 40static void c() {41 static_cast<void>(aa<void>);42}43 44//--- d.cpp45// expected-no-diagnostics46import a;47import b;48import c;49 50static void d() {51 static_cast<void>(a<void>());52}53