34 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-module-interface -o %t/Templ.pcm6// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only7 8// RUN: %clang_cc1 -std=c++20 %t/Templ.cppm -emit-reduced-module-interface -o %t/Templ.pcm9// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only10 11//--- foo.h12template <typename T>13class Templ {14public:15 Templ(T a) {}16};17 18template<typename T>19Templ(T t) -> Templ<T>;20 21//--- Templ.cppm22module;23#include "foo.h"24export module Templ;25export using ::Templ;26 27//--- Use.cpp28// expected-no-diagnostics29import Templ;30void func() {31 Templ t(5);32}33 34