c++: Move hidden-lambda entity lookup checking
authorNathan Sidwell <nathan@acm.org>
Tue, 18 Aug 2020 13:02:37 +0000 (06:02 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 18 Aug 2020 13:05:04 +0000 (06:05 -0700)
commit634046d1a81b48a48b3564ff2f90974f6b7b087b
treef3518da97e26a659ed3893fb324853a451d13a97
parent6bebbc033d8bf2246745ffef7186b0424e08ba6b
c++: Move hidden-lambda entity lookup checking

Hidden lambda entities only occur in block and class scopes.  There's
no need to check for them on every lookup.  So moving that particular
piece of validation to lookup_name_1, which cares.  Also reordered the
namespace and type checking, as that is also simpler.

gcc/cp/
* name-lookup.c (qualify_lookup): Drop lambda checking here.
Reorder namespace & type checking.
(lookup_name_1): Do hidden lambda checking here.
gcc/cp/name-lookup.c