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 {};
14
15template <typename T>
16Templ(T t) -> Templ<T, int>;
17
18//--- A.cppm
19module;
20#include "foo.h"
21export module A;
22
23//--- Use.cppm
24// expected-no-diagnostics
25module;
26#include "foo.h"
27export module X;
28import A;
29