mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-14 22:43:39 +08:00
cp-demangle.c (cplus_demangle_type): decltype, pack expansion and vector are substitutable.
* cp-demangle.c (cplus_demangle_type): decltype, pack expansion and vector are substitutable. (cplus_demangle_operators): Sort. From-SVN: r182969
This commit is contained in:
parent
1be3db365d
commit
49f2da1a16
@ -1,3 +1,9 @@
|
||||
2012-01-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* cp-demangle.c (cplus_demangle_type): decltype, pack expansion
|
||||
and vector are substitutable.
|
||||
(cplus_demangle_operators): Sort.
|
||||
|
||||
2012-01-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -1554,7 +1554,8 @@ d_identifier (struct d_info *di, int len)
|
||||
/* operator_name ::= many different two character encodings.
|
||||
::= cv <type>
|
||||
::= v <digit> <source-name>
|
||||
*/
|
||||
|
||||
This list is sorted for binary search. */
|
||||
|
||||
#define NL(s) s, (sizeof s) - 1
|
||||
|
||||
@ -1566,6 +1567,8 @@ const struct demangle_operator_info cplus_demangle_operators[] =
|
||||
{ "aa", NL ("&&"), 2 },
|
||||
{ "ad", NL ("&"), 1 },
|
||||
{ "an", NL ("&"), 2 },
|
||||
{ "at", NL ("alignof "), 1 },
|
||||
{ "az", NL ("alignof "), 1 },
|
||||
{ "cl", NL ("()"), 2 },
|
||||
{ "cm", NL (","), 2 },
|
||||
{ "co", NL ("~"), 1 },
|
||||
@ -1611,8 +1614,6 @@ const struct demangle_operator_info cplus_demangle_operators[] =
|
||||
{ "rs", NL (">>"), 2 },
|
||||
{ "st", NL ("sizeof "), 1 },
|
||||
{ "sz", NL ("sizeof "), 1 },
|
||||
{ "at", NL ("alignof "), 1 },
|
||||
{ "az", NL ("alignof "), 1 },
|
||||
{ NULL, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
@ -2242,12 +2243,14 @@ cplus_demangle_type (struct d_info *di)
|
||||
d_expression (di), NULL);
|
||||
if (ret && d_next_char (di) != 'E')
|
||||
ret = NULL;
|
||||
can_subst = 1;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
/* Pack expansion. */
|
||||
ret = d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
|
||||
cplus_demangle_type (di), NULL);
|
||||
can_subst = 1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
@ -2298,6 +2301,7 @@ cplus_demangle_type (struct d_info *di)
|
||||
|
||||
case 'v':
|
||||
ret = d_vector_type (di);
|
||||
can_subst = 1;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
|
@ -4018,6 +4018,18 @@ K<1, &S::m>::f()
|
||||
--format=gnu-v3
|
||||
_ZSt10_ConstructI10CellBorderIS0_EEvPT_DpOT0_
|
||||
_ZSt10_ConstructI10CellBorderIS0_EEvPT_DpOT0_
|
||||
# A pack expansion is substitutable.
|
||||
--format=gnu-v3
|
||||
_Z1fIJiEiEv1AIJDpT_EET0_S4_
|
||||
void f<int, int>(A<int>, int, int)
|
||||
# So is decltype.
|
||||
--format=gnu-v3
|
||||
_Z1fIiiEDTcvT__EET0_S2_
|
||||
decltype ((int)()) f<int, int>(int, int)
|
||||
# And vector.
|
||||
--format=gnu-v3
|
||||
_Z1fDv4_iS_
|
||||
f(int __vector(4), int __vector(4))
|
||||
#
|
||||
# Ada (GNAT) tests.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user