static const char *aggr_variety PROTO((tree));
static tree ident_fndecl PROTO((tree));
static int interesting_scope_p PROTO((tree));
+static void dump_template_value PROTO((tree, int, int));
void
init_error ()
value. */
static char digit_buffer[128];
+/* Dump a template parameter or template argument VALUE at VERBOSITY
+ level. The boolean CANONICAL_NAME indicates whether to dump abstract
+ names, e.g. typedefs, or not. */
+
+static void
+dump_template_value (value, verbosity, canonical_name)
+ tree value;
+ int verbosity, canonical_name;
+{
+ if (TREE_CODE_CLASS (TREE_CODE (value)) == 't'
+ || TREE_CODE (value) == TEMPLATE_DECL)
+ dump_type_real (value, verbosity, canonical_name);
+ else
+ dump_expr (value, verbosity);
+}
+
/* Dump into the obstack a human-readable equivalent of TYPE. */
static void
OB_PUTC ('<');
for (i = 0; i < TREE_VEC_LENGTH (args); i++)
{
- tree arg = TREE_VEC_ELT (args, i);
- if (TREE_CODE_CLASS (TREE_CODE (arg)) == 't'
- || TREE_CODE (arg) == TEMPLATE_DECL)
- dump_type_real (arg, 0, canonical_name);
- else
- dump_expr (arg, 0);
+ dump_template_value (TREE_VEC_ELT (args, i), 0, canonical_name);
if (i < TREE_VEC_LENGTH (args)-1)
OB_PUTC2 (',', ' ');
}
OB_PUTC ('<');
for (args = TREE_OPERAND (t, 1); args; args = TREE_CHAIN (args))
{
- if (TREE_CODE_CLASS (TREE_CODE (TREE_VALUE (args))) == 't'
- || TREE_CODE (TREE_VALUE (args)) == TEMPLATE_DECL)
- dump_type (TREE_VALUE (args), 0);
- else
- dump_expr (TREE_VALUE (args), 0);
+ dump_template_value (TREE_VALUE (args), 0, 0);
if (TREE_CHAIN (args))
OB_PUTC2 (',', ' ');
}
&& ! DECL_CONSTRUCTOR_P (t)
&& ! DECL_DESTRUCTOR_P (t))
{
- dump_type_prefix (TREE_TYPE (fntype), 1, 0);
+ dump_type_prefix (TREE_TYPE (fntype), 0, 0);
OB_PUTC (' ');
}
}
OB_PUTS (", ");
if (a)
- {
- if (TREE_CODE_CLASS (TREE_CODE (a)) == 't'
- || TREE_CODE (a) == TEMPLATE_DECL)
- dump_type (a, 0);
- else
- dump_expr (a, 0);
- }
+ dump_template_value (a, 0, 0);
need_comma = 1;
}
OB_PUTS (", ");
if (a)
- {
- if (TREE_CODE_CLASS (TREE_CODE (a)) == 't'
- || TREE_CODE (a) == TEMPLATE_DECL)
- dump_type (a, 0);
- else
- dump_expr (a, 0);
- }
+ dump_template_value (a, 0, 0);
need_comma = 1;
}