1// RUN: rm -rf %t
2// RUN: split-file %s %t
3// RUN: cd %t
4//
5// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
6// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cppm -verify -fsyntax-only
7
8//--- foo.h
9template <typename T, typename U = int>
10class Templ;
11
12template <typename T, typename U>
13class Templ {
14public:
15    Templ(T t) {}
16};
17
18template <typename T>
19Templ(T t) -> Templ<T, int>;
20
21//--- A.cppm
22module;
23#include "foo.h"
24export module A;
25
26//--- Use.cppm
27// expected-no-diagnostics
28module;
29#include "foo.h"
30export module X;
31import A;
32void foo() {
33    Templ t(0);
34}
35