brintos

brintos / llvm-project-archived public Read only

0
0
Text · 564 B · ba3f352 Raw
32 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-reduced-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify7 8//--- a.cppm9export module a;10 11struct Base {12    template <class T>13    friend constexpr auto f(T) { return 0; }14};15export struct A: Base {};16 17//--- b.cppm18export module b;19 20import a;21 22namespace n {23 24struct B {};25 26auto b() -> void {27	f(A{});28    f(B{}); // expected-error {{use of undeclared identifier 'f'}}29}30 31} // namespace n32