xref: /llvm-project/clang/test/Modules/forward-friend.cppm (revision 76864e6af134aa240069d42ba15e0b89fd7d6b4c)
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
9template <typename... U>
10static void foo(U...) noexcept;
11
12class A {
13  template <typename... U>
14  friend void foo(U...) noexcept;
15};
16
17//--- m.cppm
18// expected-no-diagnostics
19module;
20#include "foo.h"
21export module m;
22export using ::A;
23