]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: more xobj lambda 'this' capture [PR113563]
authorJason Merrill <jason@redhat.com>
Fri, 30 May 2025 12:59:31 +0000 (08:59 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 30 May 2025 17:14:32 +0000 (13:14 -0400)
commit611d59589d8c48db051b31e727d7f52910a4cbcd
tree4783db0c638155d4cc10d8e48ebf3535a7486929
parent70418e6c0120cfce33ab69628602dfdadbed683a
c++: more xobj lambda 'this' capture [PR113563]

Nathaniel shared a more extensive test, which revealed more needed fixes.

PR c++/113563

gcc/cp/ChangeLog:

* lambda.cc (lambda_capture_field_type): Handle 'this' normally.
(build_capture_proxy): Special-case 'this' by-ref capture more.
(nonlambda_method_basetype): Look through xobj lambdas.

gcc/testsuite/ChangeLog:

* g++.dg/cpp23/explicit-obj-lambda17.C: New test.
gcc/cp/lambda.cc
gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda17.C [new file with mode: 0644]