aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/forward-friend.cppm
blob: dfadf4fcc1dae9597c98918558b18adc7baa710c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: cd %t
//
// RUN: %clang_cc1 -std=c++20 %t/m.cppm -fsyntax-only -verify

//--- foo.h

template <typename... U>
static void foo(U...) noexcept;

class A {
  template <typename... U>
  friend void foo(U...) noexcept;
};

//--- m.cppm
// expected-no-diagnostics
module;
#include "foo.h"
export module m;
export using ::A;