]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: TARGET_EXPR location in default arg [PR96997]
authorJason Merrill <jason@redhat.com>
Wed, 13 Dec 2023 19:15:44 +0000 (14:15 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 13 Dec 2023 20:04:44 +0000 (15:04 -0500)
commit063564ecbfc618cd019f86216a0224e144effae1
treec5bb74529620d16b892b09255fe0ae41472c2752
parentda730b29f10fb48d5ed812535768c69ff7d74248
c++: TARGET_EXPR location in default arg [PR96997]

My r14-6505-g52b4b7d7f5c7c0 change to copy the location in
build_aggr_init_expr reopened PR96997; let's fix it properly this time, by
clearing the location like we do for other trees.

PR c++/96997

gcc/cp/ChangeLog:

* tree.cc (bot_manip): Check data.clear_location for TARGET_EXPR.

gcc/testsuite/ChangeLog:

* g++.dg/debug/cleanup2.C: New test.
gcc/cp/tree.cc
gcc/testsuite/g++.dg/debug/cleanup2.C [new file with mode: 0644]