Declaration of friend function may depend on template parameters,
however it does not become a template function:
template<typename T> class C1 { friend void func(T x); };
It may be not obvious for user, so compiler could emit a warning in
such case. This patch implements appropriate warning, similar to GCC
warning -Wnon-template-friend. The warning is not issued if translation
unit contains a function declaration in appropriate namespace that
can redeclare the friend function in some class instantiation.
For the example above it could be a declaration:
void func(int x);
This change fixes PR23342.
template function -> function template