28 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//--- Templ.cppm12export module Templ;13template <typename T>14class Templ {15public:16 Templ(T a) {}17};18 19template<typename T>20Templ(T t) -> Templ<T>;21 22//--- Use.cpp23import Templ;24void func() {25 Templ t(5); // expected-error {{unknown type name 'Templ'}}26}27 28