c++: deferred noexcept parsing for friend tmpl spec [PR123189]

Since we now defer noexcept parsing for templated friends, a couple of
routines related to deferred parsing need to be updated to cope with friend
template specializations -- their TI_TEMPLATE is a TREE_LIST rather than
a TEMPLATE_DECL, and they don't introduce new template parameters.

	PR c++/123189

gcc/cp/ChangeLog:

	* name-lookup.cc (binding_to_template_parms_of_scope_p):
	Gracefully handle TEMPLATE_INFO whose TI_TEMPLATE is a TREE_LIST.
	* pt.cc (maybe_begin_member_template_processing): For a friend
	template specialization consider its class context instead.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/noexcept92.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
3 files changed