+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.
/* 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
{ "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 },
{ "rs", NL (">>"), 2 },
{ "st", NL ("sizeof "), 1 },
{ "sz", NL ("sizeof "), 1 },
- { "at", NL ("alignof "), 1 },
- { "az", NL ("alignof "), 1 },
{ NULL, NULL, 0, 0 }
};
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':
case 'v':
ret = d_vector_type (di);
+ can_subst = 1;
break;
case 'n':
--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.
#