c++: further lookup_member simplification
authorPatrick Palka <ppalka@redhat.com>
Wed, 16 Mar 2022 12:26:11 +0000 (08:26 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 16 Mar 2022 12:26:11 +0000 (08:26 -0400)
commit5809bb4f78c9aae0f3be3c8d942b6af75ba23a74
treec6d79ed94b459343f7929e7b63d26430373e8b6e
parente55c5e24b97ad8ddc44588da18e894c139e02c0a
c++: further lookup_member simplification

As a minor followup to r12-7656-gffe9c0a0d3564a, this condenses the
handling of ambiguity and access w.r.t. the value of 'protect' so that
the logic is more clear.

gcc/cp/ChangeLog:

* search.cc (lookup_member): Simplify by handling all values
of protect together in the ambiguous case.  Don't modify protect.
gcc/cp/search.cc