brintos

brintos / llvm-project-archived public Read only

0
0
Text · 572 B · 3a251f1 Raw
42 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %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.cpp -fmodule-file=a=%t/a.pcm -emit-llvm -o /dev/null -verify7 8//--- a.cppm9module;10 11namespace n12{13 14template<typename>15struct a {16	template<typename T>17	friend void aa(a<T>);18};19 20template<typename T>21inline void aa(a<T>) {22}23 24} //namespace n25 26export module a;27 28namespace n {29 30export using n::a;31export using n::aa;32 33}34 35//--- b.cpp36// expected-no-diagnostics37import a;38 39void b() {40	aa(n::a<int>());41}42