clang/test/Modules/forward-friend.cppm
raw| 1 | // RUN: rm -rf %t |
| 2 | // RUN: split-file %s %t |
| 3 | // RUN: cd %t |
| 4 | // |
| 5 | // RUN: %clang_cc1 -std=c++20 %t/m.cppm -fsyntax-only -verify |
| 6 | |
| 7 | //--- foo.h |
| 8 | |
| 9 | template <typename... U> |
| 10 | static void foo(U...) noexcept; |
| 11 | |
| 12 | class A { |
| 13 | template <typename... U> |
| 14 | friend void foo(U...) noexcept; |
| 15 | }; |
| 16 | |
| 17 | //--- m.cppm |
| 18 | // expected-no-diagnostics |
| 19 | module; |
| 20 | #include "foo.h" |
| 21 | export module m; |
| 22 | export using ::A; |