aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index ea6b4c5..72bbfc5 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -2195,6 +2195,26 @@ pp_cxx_canonical_template_parameter (cxx_pretty_printer *pp, tree parm)
pp_cxx_end_template_argument_list (pp);
}
+/* Print a constrained-type-specifier. */
+
+void
+pp_cxx_constrained_type_spec (cxx_pretty_printer *pp, tree c)
+{
+ tree t, a;
+ placeholder_extract_concept_and_args (c, t, a);
+ pp->id_expression (t);
+ if (TREE_VEC_LENGTH (a) > 1)
+ {
+ pp_cxx_begin_template_argument_list (pp);
+ tree args = make_tree_vec (TREE_VEC_LENGTH (a) - 1);
+ for (int i = TREE_VEC_LENGTH (a) - 1; i > 0; --i)
+ TREE_VEC_ELT (args, i-1) = TREE_VEC_ELT (a, i);
+ pp_cxx_template_argument_list (pp, args);
+ ggc_free (args);
+ pp_cxx_end_template_argument_list (pp);
+ }
+}
+
/*
template-declaration:
export(opt) template < template-parameter-list > declaration