c++: preserve BASELINK from lookup [PR91706]
authorJason Merrill <jason@redhat.com>
Fri, 16 Apr 2021 17:52:02 +0000 (13:52 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 8 Jun 2021 03:55:04 +0000 (23:55 -0400)
commit1a98f830332e5a623278aaeea39c2a88177b2a9a
tree394b8795839aa54eec537dd66513b208bea6d90f
parentf07edb5d7f3e77218ec846a9382f7c1d23e67b71
c++: preserve BASELINK from lookup [PR91706]

In the earlier patch for PR91706 I fixed the BASELINK built by
baselink_for_fns, but since we already had one from lookup, we should keep
that one around instead of stripping it.  The removed hunk in
get_class_binding was a wierdly large amount of code to decide whether to
pull out BASELINK_FUNCTIONS.

gcc/cp/ChangeLog:

PR c++/91706
* name-lookup.c (get_class_binding): Keep a BASELINK.
(set_inherited_value_binding_p): Adjust.
* lambda.c (is_lambda_ignored_entity): Adjust.
* pt.c (lookup_template_function): Copy a BASELINK before
modifying it.
gcc/cp/lambda.c
gcc/cp/name-lookup.c
gcc/cp/pt.c