diff options
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 6 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index f2e6b37..15f9613 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2016-12-13 Jakub Jelinek <jakub@redhat.com> + + 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 <nathan@acm.org> PR c++/78252 diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 6c2f902..510eb45 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 803decd..b65dcd3 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4200,6 +4200,9 @@ decltype (new auto({parm#1})) f<int>(int) _Z1fIiERDaRKT_S1_ auto& f<int>(int const&, int) --format=gnu-v3 +_Z1gIiEDcRKT_S0_ +decltype(auto) g<int>(int const&, int) +--format=gnu-v3 _Z1gILi1EEvR1AIXT_EER1BIXscbT_EE void g<1>(A<1>&, B<static_cast<bool>(1)>&) --format=gnu-v3 |