c++: implicit lookup of std::initializer_list [PR102576]
commitc2ee70f20de8133a88553270073226b0f3f55f62
authorPatrick Palka <ppalka@redhat.com>
Thu, 29 Sep 2022 20:27:30 +0000 (29 16:27 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 29 Sep 2022 20:27:30 +0000 (29 16:27 -0400)
treee1766651c58ad168f649c81630633e992277759e
parent04d54b70fe2c3d69eb1d08f7212f01c8a972b701
c++: implicit lookup of std::initializer_list [PR102576]

Here the lookup for the implicit use of std::initializer_list fails
because we do it using get_namespace_binding, which isn't import aware.
Fix this by using lookup_qualified_name instead.

PR c++/102576

gcc/cp/ChangeLog:

* pt.cc (listify): Use lookup_qualified_name instead of
get_namespace_binding.

gcc/testsuite/ChangeLog:

* g++.dg/modules/pr102576_a.H: New test.
* g++.dg/modules/pr102576_b.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/modules/pr102576_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr102576_b.C [new file with mode: 0644]