25 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang -std=c++20 %t/a.cppm --precompile -o %t/a.pcm6// RUN: %clang -std=c++20 %t/test.cc -fprebuilt-module-path=%t -fsyntax-only -Xclang -verify7 8//--- a.h9namespace ns {10template <typename G> static void func() {}11template <typename T = long> void a() { func<T>(); }12}13 14//--- a.cppm15module;16#include "a.h"17export module a;18export using ns::a;19 20//--- test.cc21import a;22auto m = (a(), 0);23 24// expected-no-diagnostics25