diff options
Diffstat (limited to 'clang/test/Modules/expose-static-inline-from-gmf-5.cppm')
-rw-r--r-- | clang/test/Modules/expose-static-inline-from-gmf-5.cppm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/Modules/expose-static-inline-from-gmf-5.cppm b/clang/test/Modules/expose-static-inline-from-gmf-5.cppm new file mode 100644 index 0000000..334af845 --- /dev/null +++ b/clang/test/Modules/expose-static-inline-from-gmf-5.cppm @@ -0,0 +1,26 @@ +// 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 { +namespace { +template <typename G> 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 |