// RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s
template<class T>voidbar(const T &t){foo(t);}template<class>structHasFriend{template<class T>friendvoid foo(const HasFriend<T>&m)noexcept(false);};template<class T>voidfoo(const HasFriend<T>&m)noexcept(false){}voidf(){
HasFriend<int> x;foo(x);bar(x);}template<typename T>voiddroid();structX{template<typename T>friendvoid::droid();template<int N>friendvoid::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.
};