c++: local class in nested generic lambda [PR109241]
commit4872e46e080c6695dfe1f9dc9db26b4703bc348c
authorJason Merrill <jason@redhat.com>
Wed, 22 Mar 2023 20:11:47 +0000 (22 16:11 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 23 Mar 2023 03:23:13 +0000 (22 23:23 -0400)
tree7745d14d3bdf6eecd0792983c5f44e2df4a3a866
parentcd0c433e5faba9a18f64881cd761a53a530aa798
c++: local class in nested generic lambda [PR109241]

In this testcase, the tree walk to look for bare parameter packs was
confused by finding a type with no TREE_BINFO.  But it should be fine that
it's unset; we already checked for unexpanded packs at parse time.

I also tried doing the partial instantiation of the local class, which is
probably the long-term direction we want to go, but for stage 4 let's go
with this safer change.

PR c++/109241

gcc/cp/ChangeLog:

* pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1y/lambda-generic-local-class2.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C [new file with mode: 0644]