]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: nested generic lambda in DMI [PR101717]
authorJason Merrill <jason@redhat.com>
Thu, 7 Apr 2022 02:20:49 +0000 (22:20 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 12 Apr 2022 20:11:44 +0000 (16:11 -0400)
commiteea5641912b914f3589ec1ec576a596451180baa
tree1818e5ae38f1f030996dfae6bbe30d436b688a4b
parent25167a3d8cfc738deb4b2bfb74ad37fd8a0f1ca4
c++: nested generic lambda in DMI [PR101717]

We were already checking COMPLETE_TYPE_P to recognize instantiation of a
generic lambda, but didn't consider that we might be nested in a non-generic
lambda.

PR c++/101717

gcc/cp/ChangeLog:

* lambda.c (lambda_expr_this_capture): Check all enclosing
lambdas for completeness.

gcc/testsuite/ChangeLog:

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