]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: avoid too many hidden friends in ADL
authorJason Merrill <jason@redhat.com>
Mon, 10 Nov 2025 13:02:53 +0000 (18:32 +0530)
committerJason Merrill <jason@redhat.com>
Tue, 11 Nov 2025 16:20:47 +0000 (21:50 +0530)
commit52a24bcecd388ab6e7d4e6500809fc761f6e7ca5
tree5d854faea9d5e3d16b8efa38ae5897dce16f6391
parentf0eda7b41dfcf0f5d98b840690e8d524eb8c1790
c++/modules: avoid too many hidden friends in ADL

Most of the add_fns calls in adl_namespace_fns also call ovl_skip_hidden,
but we were forgetting that in the case of imports, which meant that for
24_iterators/const_iterator/112490.cc we were considering the
unreachable_sentinel_t hidden friend operator== and therefore failing.

gcc/cp/ChangeLog:

* name-lookup.cc (name_lookup::adl_namespace_fns): Also skip hidden
in the module case.
gcc/cp/name-lookup.cc