diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-04-13 12:20:37 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-04-16 09:24:00 +1000 |
commit | a6f4178d0d5a51c0de175d282f693f923ffefa27 (patch) | |
tree | 90f82f7e6fa8f02448304ba53cb385ced378b8c6 /libjava/gnu/java | |
parent | 674b0875a9861e61544e7040452ac22142db7c8b (diff) | |
download | gcc-a6f4178d0d5a51c0de175d282f693f923ffefa27.zip gcc-a6f4178d0d5a51c0de175d282f693f923ffefa27.tar.gz gcc-a6f4178d0d5a51c0de175d282f693f923ffefa27.tar.bz2 |
c++: Prune lambda captures from more places [PR119755]
Currently, pruned lambda captures are still leftover in the function's
BLOCK and topmost BIND_EXPR; this doesn't cause any issues for normal
compilation, but does break modules streaming as we try to reconstruct a
FIELD_DECL that no longer exists on the type itself.
PR c++/119755
gcc/cp/ChangeLog:
* lambda.cc (prune_lambda_captures): Remove pruned capture from
function's BLOCK_VARS and BIND_EXPR_VARS.
gcc/testsuite/ChangeLog:
* g++.dg/modules/lambda-10_a.H: New test.
* g++.dg/modules/lambda-10_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/gnu/java')
0 files changed, 0 insertions, 0 deletions