Port c++/78252 from GCC
authorNathan Sidwell <nathan@acm.org>
Mon, 12 Dec 2016 17:52:37 +0000 (12:52 -0500)
committerNathan Sidwell <nathan@acm.org>
Mon, 12 Dec 2016 17:52:37 +0000 (12:52 -0500)
commit88acc2e16743fc1e6384758c9a68cd6d2a8bbd46
treee144ee82168a30bb3e355a038ccd3fffc0e0f803
parentd36cab83a963f5bb3773e0218cc02f63b0851d0b
Port c++/78252 from GCC

PR c++/78252
* cp-demangle.c (struct d_print_info): Add is_lambda_arg field.
(d_print_init): Initialize it.
(d_print_comp_inner) <DEMANGLE_COMPONENT_TEMPLATE_PARAM>: Check
is_lambda_arg for auto.
<DEMANGLE_COMPONENT_REFERENCE,
DEMANGLE_COMPONENT_RVALUE_REFERENCE>: Skip smashing check when
is_lambda_arg.
<DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg
printing.
* testsuite/demangle-expected: Add lambda auto mangling cases.
libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected