c++: Consistently expose singleton overloads
authorNathan Sidwell <nathan@acm.org>
Fri, 6 Nov 2020 20:11:01 +0000 (12:11 -0800)
committerNathan Sidwell <nathan@acm.org>
Mon, 9 Nov 2020 13:09:50 +0000 (05:09 -0800)
commit4081596e852a3a1c2baaa5aa5bb539a8de1a78a3
tree039f56ab84191536cfbb0c27ded6f402062118c2
parentede8cfb8a450ff95f5c510605de76958613dc4a5
c++: Consistently expose singleton overloads

This is a patch from my name-lookup overhaul.  I noticed the parser
and one path in name-lookup looked through an overload of a single
known decl.  It seems more consistent to do that in both paths through
name-lookup, and not in the parser itself.

gcc/cp/
* name-lookup.c (lookup_qualified_name): Expose an overload of a
singleton with known type.
(lookup_name_1): Just check the overload's type to expose it.
* parser.c (cp_parser_lookup_name): Do not do that check here.
gcc/cp/name-lookup.c
gcc/cp/parser.c