[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Modules / template_default_argument.cpp
blob5a7d1c04cf1817508195e44f743281c0e728380b
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
7 //
8 //--- templ.h
9 template <typename T, typename U = T>
10 class templ {};
11 template <typename T, typename U = void>
12 void templ_func() {}
14 //--- B.cppm
15 module;
16 #include "templ.h"
17 export module B;
18 export template <typename G>
19 templ<G> bar() {
20 templ_func<G>();
21 return {};
24 //--- Use.cpp
25 // expected-no-diagnostics
26 import B;
27 auto foo() {
28 return bar<int>();