]> 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>
Thu, 12 May 2022 21:14:58 +0000 (17:14 -0400)
commit20dc7a2119cc0a4e5ddc4a6899a7350621f05440
treeabbeff783474549f788d044cc549ea40e83d3aa1
parentb01044ec7fbed24e9394bcf49e524acdd52849e7
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]