blob: 4ee03c6f6387f7415c89f14f217a0d6a25b8ea72 [file] [log] [blame]
// RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s
template <class T> void bar(const T &t) { foo(t); }
template <class>
struct HasFriend {
template <class T>
friend void foo(const HasFriend<T> &m) noexcept(false);
template <class T>
void foo(const HasFriend<T> &m) noexcept(false) {}
void f() {
HasFriend<int> x;
template<typename T> void droid();
struct X {
template<typename T> friend void ::droid();
template<int N> friend void ::droid(); // expected-error {{does not match}}
// FIXME: We should produce a note for the above candidate explaining why
// it's not the droid we're looking for.