c++: Fix ICE diagnosing incomplete type of overloaded function set [PR98356]
In the linked PR the result of 'get_first_fn' is a USING_DECL against
the template parameter, to be filled in on instantiation. But we don't
actually need to get the first set of the member functions: it's enough
to know that we have a (possibly overloaded) member function at all.
PR c++/98356
gcc/cp/ChangeLog:
* typeck2.cc (cxx_incomplete_type_diagnostic): Don't assume
'member' will be a FUNCTION_DECL (or something like it).
gcc/testsuite/ChangeLog:
* g++.dg/pr98356.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>