]> git.ipfire.org Git - thirdparty/gcc.git/commit - libiberty/testsuite/demangle-expected
libiberty: Demangling 'M' prefixes
authorNathan Sidwell <nathan@acm.org>
Fri, 30 Sep 2022 16:43:30 +0000 (09:43 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 11 Oct 2022 11:39:50 +0000 (04:39 -0700)
commit0fa35c7e2974a22b2107fa378895c3069fe07ff3
tree36fd8ccab6d49574e1974f2ad178e5506999735a
parentee467644c53ee2f7d633a8e1f53603feafab4351
libiberty: Demangling 'M' prefixes

The grammar for a lambda context can include <source-name> 'M', and we
were adding the component that generated to the substitution table
twice.  Just ignore the 'M' completely -- we'll already have done the
checks we need when we saw its predecessor.  A prefix cannot be the
last component of a nested name, so we do not need to check for that
case (although we could if we wanted to be more lenient).

libiberty/
* cp-demangle.c (d_prefix): 'M' components are not
(re-)added to the substitution table.
* testsuite/demangle-expected: Add tests.
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected