brintos

brintos / llvm-project-archived public Read only

0
0
Text · 899 B · e0dab1a Raw
54 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \7// RUN:   -fprebuilt-module-path=%t8// RUN: %clang_cc1 -std=c++20 %t/c.cppm -emit-module-interface -o %t/c.pcm \9// RUN:   -fprebuilt-module-path=%t10// RUN: %clang_cc1 -std=c++20 %t/d.cpp -fsyntax-only -verify \11// RUN:   -fprebuilt-module-path=%t12 13//--- a.cppm14export module a;15 16template<typename>17constexpr auto impl = true;18 19export template<typename T>20void a() {21}22 23export template<typename T> requires impl<T>24void a() {25}26 27//--- b.cppm28export module b;29 30import a;31 32static void b() {33	a<void>();34}35 36//--- c.cppm37export module c;38 39import a;40 41static void c() {42	a<void>();43}44 45//--- d.cpp46// expected-no-diagnostics47import a;48import b;49import c;50 51static void d() {52	a<void>();53}54