c++: memfn lookup consistency and dependent using-decls
authorPatrick Palka <ppalka@redhat.com>
Thu, 10 Feb 2022 13:54:07 +0000 (08:54 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 10 Feb 2022 13:54:07 +0000 (08:54 -0500)
commit3d7341cd731247c2ff6709a000837a6c924247f3
tree8aacb1c758fb742403cf06c8975cc649bbb2833e
parent3881e1823c5a59d988ddcddcc1e25c5738e228fb
c++: memfn lookup consistency and dependent using-decls

Rather than not doing any filtering when filter_memfn_lookup encounters
a dependent using-decl, handle this case less imprecisely by holding on
to the members in the new lookup set that come from a base, i.e. that
could plausibly have been introduced by that using-decl, and filtering
the rest as usual.  This is still imperfect, but it's closer to the
correct answer than the previous behavior was.

gcc/cp/ChangeLog:

* pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
better.
gcc/cp/pt.cc