brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · 0ef6390 Raw
38 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm6// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cppm -verify -fsyntax-only7 8// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm9// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cppm -verify -fsyntax-only10 11//--- foo.h12template <typename T, typename U = int>13class Templ;14 15template <typename T, typename U>16class Templ {17public:18    Templ(T t) {}19};20 21template <typename T>22Templ(T t) -> Templ<T, int>;23 24//--- A.cppm25module;26#include "foo.h"27export module A;28 29//--- Use.cppm30// expected-no-diagnostics31module;32#include "foo.h"33export module X;34import A;35void foo() {36    Templ t(0);37}38