This patch wants to avoid Sema crash for inline friend decl like
template <class F1> int foo(F1 X); template <int A1> struct A { template <class F1> friend int foo(F1 X) { return A1; } }; template struct A<1>; int a = foo(1.0);
But this case is still not fixed