From 816f4314406078414c7d200fa28ccb680530bed9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 13 Dec 2016 07:16:05 +0100 Subject: [PATCH] re PR c++/78761 (C++14, compiler generate mangled name that can not be demangled) PR c++/78761 * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto). * testsuite/demangle-expected: Add test for decltype(auto). From-SVN: r243593 --- libiberty/ChangeLog | 6 ++++++ libiberty/cp-demangle.c | 6 +++++- libiberty/testsuite/demangle-expected | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index f2e6b373e01..15f9613b549 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2016-12-13 Jakub Jelinek + + PR c++/78761 + * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto). + * testsuite/demangle-expected: Add test for decltype(auto). + 2016-12-12 Nathan Sidwell PR c++/78252 diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 6c2f902955e..510eb455841 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2593,7 +2593,11 @@ cplus_demangle_type (struct d_info *di) /* auto */ ret = d_make_name (di, "auto", 4); break; - + case 'c': + /* decltype(auto) */ + ret = d_make_name (di, "decltype(auto)", 14); + break; + case 'f': /* 32-bit decimal floating point */ ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]); diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 803decdb096..b65dcd3450e 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4200,6 +4200,9 @@ decltype (new auto({parm#1})) f(int) _Z1fIiERDaRKT_S1_ auto& f(int const&, int) --format=gnu-v3 +_Z1gIiEDcRKT_S0_ +decltype(auto) g(int const&, int) +--format=gnu-v3 _Z1gILi1EEvR1AIXT_EER1BIXscbT_EE void g<1>(A<1>&, B(1)>&) --format=gnu-v3 -- 2.30.2