brintos

brintos / llvm-project-archived public Read only

0
0
Text · 760 B · 113edbf Raw
39 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/test.cpp -fsyntax-only -verify \9// RUN:   -fprebuilt-module-path=%t10 11//--- a.cppm12export module a;13 14namespace n {15template<typename, int...>16struct integer_sequence {17 18};19 20export template<typename>21using make_integer_sequence = __make_integer_seq<integer_sequence, int, 0>;22}23 24//--- b.cppm25export module b;26import a;27 28export template<typename T>29void b() {30	n::make_integer_sequence<T>();31}32 33//--- test.cpp34// expected-no-diagnostics35import b;36void test() {37  b<int>();38}39