diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-13 15:54:17 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-13 15:54:17 +0200 |
commit | bd21c04269deded2c7476ceca1100a26f28ea526 (patch) | |
tree | 197bf75eedac69362078a4ccc0afe5615c45c327 /libiberty | |
parent | d9e7934d25da4a78ffef1f738206aa1d897911df (diff) | |
parent | 786e4c024f941671a233f5779d73a5d22f4e9588 (diff) | |
download | gcc-bd21c04269deded2c7476ceca1100a26f28ea526.zip gcc-bd21c04269deded2c7476ceca1100a26f28ea526.tar.gz gcc-bd21c04269deded2c7476ceca1100a26f28ea526.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 8 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 21 |
3 files changed, 30 insertions, 5 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 2c0d46b..b181a69 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2022-10-11 Nathan Sidwell <nathan@acm.org> + + * cp-demangle.c (d_prefix): 'M' components are not + (re-)added to the substitution table. + * testsuite/demangle-expected: Add tests. + 2022-10-07 Nathan Sidwell <nathan@acm.org> * cp-demangle.c (d_print_comp_inner): Allow parameter packs diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 303bfbf..4beb4d2 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1609,12 +1609,10 @@ d_prefix (struct d_info *di, int substable) } else if (peek == 'M') { - /* Initializer scope for a lambda. We don't need to represent - this; the normal code will just treat the variable as a type - scope, which gives appropriate output. */ - if (ret == NULL) - return NULL; + /* Initializer scope for a lambda. We already added it as a + substitution candidate, don't do that again. */ d_advance (di, 1); + continue; } else { diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 90dd4a1..bd92b12 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -1581,3 +1581,24 @@ void L1()::{lambda((auto:1)...)#1}::operator()<int, int*>(int, int*) const _ZZ2L1vENKUlDpT_E_clIJiPiEEEDaS0_ auto L1()::{lambda((auto:1)...)#1}::operator()<int, int*>(int, int*) const +_Z7captureIN4gvarMUlvE_EE7WrapperIT_EOS3_ +Wrapper<gvar::{lambda()#1}> capture<gvar::{lambda()#1}>(gvar::{lambda()#1}&&) + +_ZNK2L2MUlT_T0_E_clIifEEvS_S0_ +void L2::{lambda(auto:1, auto:2)#1}::operator()<int, float>(L2, int) const + +_ZNK1C1fMUlT_E_clIMS_iEEDaS1_ +auto C::f::{lambda(auto:1)#1}::operator()<int C::*>(int C::*) const + +_ZNK2L2MUlT_T0_E_clIifEEvS0_S1_ +void L2::{lambda(auto:1, auto:2)#1}::operator()<int, float>(int, float) const + +_ZNK1B2L3MUlT_T0_E_clIjdEEvS1_S2_ +void B::L3::{lambda(auto:1, auto:2)#1}::operator()<unsigned int, double>(unsigned int, double) const + +_Z3fooIN1qMUlvE_ENS0_UlvE0_EEiOT_OT0_ +int foo<q::{lambda()#1}, q::{lambda()#2}>(q::{lambda()#1}&&, q::{lambda()#2}&&) + +_ZNK2L1MUlDpT_E_clIJiPiEEEvS1_ +void L1::{lambda((auto:1)...)#1}::operator()<int, int*>(int, int*) const + |