aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/expose-static-inline-from-gmf-3.cppm
blob: dee7cddafdf701354d0ac4a5d4fda7caad6694a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang -std=c++20 %t/a.cppm --precompile -o %t/a.pcm
// RUN: %clang -std=c++20 %t/test.cc -fprebuilt-module-path=%t -fsyntax-only -Xclang -verify

//--- a.h
namespace ns {
template <typename G> static void func() {}
template <typename T = long> void a() { func<T>(); }
}

//--- a.cppm
module;
#include "a.h"
export module a;
export using ns::a;

//--- test.cc
import a;
auto m = (a(), 0);

// expected-no-diagnostics