xref: /llvm-project/clang/test/Modules/expose-static-inline-from-gmf-5.cppm (revision e50ec3e46bea819a1d7aea1cee2d7e11197bbdd2)
1// RUN: rm -rf %t
2// RUN: mkdir -p %t
3// RUN: split-file %s %t
4//
5// RUN: %clang -std=c++20 %t/a.cppm --precompile -o %t/a.pcm
6// RUN: %clang -std=c++20 %t/test.cc -fprebuilt-module-path=%t -fsyntax-only -Xclang -verify
7
8//--- a.h
9namespace ns {
10namespace {
11template <typename G> void func() {}
12}
13template <typename T = long> void a() { func<T>(); }
14}
15
16//--- a.cppm
17module;
18#include "a.h"
19export module a;
20export using ns::a;
21
22//--- test.cc
23import a;
24auto m = (a(), 0);
25
26// expected-no-diagnostics
27