1 | // RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s |
---|---|
2 | |
3 | // expected-no-diagnostics |
4 | |
5 | template <class T> void bar(const T &t) { foo(t); } |
6 | |
7 | template <class> |
8 | struct HasFriend { |
9 | template <class T> |
10 | friend void foo(const HasFriend<T> &m) noexcept(false); |
11 | }; |
12 | |
13 | template <class T> |
14 | void foo(const HasFriend<T> &m) noexcept(false) {} |
15 | |
16 | void f() { |
17 | HasFriend<int> x; |
18 | foo(x); |
19 | bar(x); |
20 | } |
21 |