Consider the following code: class TestClass { private: void func(); void func2(); void func2(int); }; template <void (TestClass::*)()> class TemplateClass { }; template class TemplateClass<&TestClass::func>; template class TemplateClass<&TestClass::func2>; clang rejects the second instantiation while gcc does not. If I'm reading the standard correctly we should accept both.
Confirmed, we're probably leaving the "no access checking errors" context before checking and converting the arguments rather than afterwards. We also seem to get this wrong for both the overloaded and non-overload case for a partial specialization, for which the same rules apply ([temp.class.spec]p10): template<typename T, void (TestClass::*)()> class TemplateClass2 {}; template<typename T> class TemplateClass2<T, &TestClass::func>; template<typename T> class TemplateClass2<T, &TestClass::func2>; ... but it looks like we don't implement the rule at all for partial specializations.
Addressed in https://reviews.llvm.org/D78404.