aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authorAndrew Sutton <andrew.n.sutton@gmail.com>2015-08-07 05:44:49 +0000
committerJason Merrill <jason@gcc.gnu.org>2015-08-07 01:44:49 -0400
commit971e17ff87337ad533b51c2dff0bbdf607fa1faf (patch)
tree23bad22378f96699b757d5523bf73d4139ad66da /gcc/cp/cxx-pretty-print.c
parentbf5372e7f0c5c0df7f239ce96ce35a2114400269 (diff)
downloadgcc-971e17ff87337ad533b51c2dff0bbdf607fa1faf.zip
gcc-971e17ff87337ad533b51c2dff0bbdf607fa1faf.tar.gz
gcc-971e17ff87337ad533b51c2dff0bbdf607fa1faf.tar.bz2
Add C++ Concepts TS support.
gcc/c-family/ * c-common.c (c_common_reswords): Add __is_same_as, concept, requires. * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES. (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts. * c-opts.c (set_std_cxx1z): Set flag_concepts. * c.opt (fconcepts): New. gcc/cp/ * constraint.cc, logic.cc: New files. * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o. (c++.tags): Also process .cc files. * call.c (enum rejection_reason_code): Add rr_constraint_failure. (print_z_candidate): Handle it. (constraint_failure): New. (add_function_candidate): Check constraints. (build_new_function_call): Handle evaluating concepts. (joust): Check more_constrained. * class.c (add_method): Check equivalently_constrained. (build_clone): Copy constraints. (currently_open_class): Return tree. (resolve_address_of_overloaded_function): Check constraints. * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR. (potential_constant_expression_1): Likewise. * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO. (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR. * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR, SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR, EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR, EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR. * cp-tree.h (struct tree_constraint_info, check_nonnull) (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS) (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS) (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS) (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P) (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR) (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE) (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN) (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS) (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT) (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE) (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated) (struct local_specialization_stack, enum auto_deduction_context) (variable_concept_p, concept_template_p) (struct deferring_access_check_sentinel): New. (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO. (union lang_tree_node): Add constraint_info field. (struct lang_decl_base): Add concept_p flag. (enum cp_decl_spec): Add ds_concept. (struct cp_declarator): Add requires_clause. * cxx-pretty-print.c (cxx_pretty_printer::primary_expression) (cxx_pretty_printer::expression): Handle REQUIRES_EXPR, TRAIT_EXPR, *_CONSTR. (pp_cxx_parameter_declaration_clause): Accept a chain of PARM_DECLs. (cxx_pretty_printer::declarator): Print requires-clause. (pp_cxx_template_declaration): Likewise. (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS. (pp_cxx_requires_clause, pp_cxx_requirement) (pp_cxx_requirement_list, pp_cxx_requirement_body) (pp_cxx_requires_expr, pp_cxx_simple_requirement) (pp_cxx_type_requirement, pp_cxx_compound_requirement) (pp_cxx_nested_requirement, pp_cxx_predicate_constraint) (pp_cxx_expression_constraint, pp_cxx_type_constraint) (pp_cxx_implicit_conversion_constraint) (pp_cxx_argument_deduction_constraint) (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint) (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New. * cxx-pretty-print.h: Declare them. * decl.c (decls_match): Compare constraints. (duplicate_decls): Likewise. Remove constraints before freeing. (cxx_init_decl_processing): Call init_constraint_processing. (cp_finish_decl): Diagnose concept without initializer. (grokfndecl, grokvardecl): Handle concepts and constraints. (grokdeclarator): Handle concept, requires-clause. (grokparms): No longer static. (xref_tag_1): Check constraints. (finish_function): Call check_function_concept. (cp_tree_node_structure): Handle CONSTRAINT_INFO. (check_concept_refinement, is_concept_var, check_concept_fn): New. * decl2.c (check_classfn): Compare constraints. (mark_used): Don't instantiate concepts. * error.c (dump_template_decl): Print constraints. (dump_function_decl): Likewise. (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR. * lex.c (init_reswords): Set D_CXX_CONCEPTS. * method.c (implicitly_declare_fn): Copy constraints from inherited ctor. * parser.h (struct cp_parser): Add in_result_type_constraint_p and prevent_constrained_type_specifiers fields. * parser.c (make_call_declarator): Add requires_clause parm. (cp_parser_new): Clear prevent_constrained_type_specifiers. (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES. (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers. (cp_parser_trait_expr): Handle RID_IS_SAME_AS. (cp_parser_declaration): Handle concept introduction. (cp_parser_member_declaration): Likewise. (cp_parser_template_parameter): Handle constrained parameter. (cp_parser_type_parameter): Handle constraints. (cp_parser_decl_specifier_seq): Handle RID_CONCEPT. (cp_parser_template_id): Handle partial concept id. (cp_parser_type_name): Add overload that takes typename_keyword_p. Handle constrained parameter. (cp_parser_nonclass_name): Handle concept names. (cp_parser_alias_declaration): Handle constraints. (cp_parser_late_return_type_opt): Also handle requires-clause. (cp_parser_type_id_1): Handle deduction constraint. (cp_parser_parameter_declaration): Handle constrained parameters. (cp_parser_class_specifier_1): Handle constraints. (cp_parser_template_declaration_after_parameters): Split out from cp_parser_template_declaration_after_export. (cp_parser_single_declaration): Handle constraints. (synthesize_implicit_template_parm): Handle constraints. (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id) (cp_parser_introduction_list, get_id_declarator) (get_unqualified_id, is_constrained_parameter) (cp_parser_check_constrained_type_parm) (cp_parser_constrained_type_template_parm) (cp_parser_constrained_template_template_parm) (constrained_non_type_template_parm, finish_constrained_parameter) (declares_constrained_type_template_parameter) (declares_constrained_template_template_parameter) (check_type_concept, cp_parser_maybe_constrained_type_specifier) (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id) (cp_parser_requires_clause, cp_parser_requires_clause_opt) (cp_parser_requires_expression) (cp_parser_requirement_parameter_list, cp_parser_requirement_body) (cp_parser_requirement_list, cp_parser_requirement) (cp_parser_simple_requirement, cp_parser_type_requirement) (cp_parser_compound_requirement, cp_parser_nested_requirement) (cp_parser_template_introduction) (cp_parser_explicit_template_declaration) (get_concept_from_constraint): New. * pt.c (local_specialization_stack): Implement. (maybe_new_partial_specialization): New. (maybe_process_partial_specialization): Use it. (retrieve_local_specialization, register_local_specialization) (template_parm_to_arg, build_template_decl, extract_fnparm_pack) (tsubst_expr): No longer static. (spec_hasher::equal): Compare constraints. (determine_specialization): Handle constraints. (check_explicit_specialization): Handle concepts. (process_template_parm): Handle constraints. (end_template_parm_list): Add overload taking no arguments. (process_partial_specialization): Handle concepts and constraints. Register partial specializations of variable templates. (redeclare_class_template): Handle constraints. (convert_template_argument): Handle WILDCARD_DECL. Check is_compatible_template_arg. (coerce_template_parameter_pack): Handle wildcard packs. (coerce_template_parms): DR 1430 also applies to concepts. Add overloads taking fewer parameters. (lookup_template_class_1): Handle constraints. (lookup_template_variable): Concepts are always bool. (finish_template_variable): Handle concepts and constraints. (tsubst_friend_class): Handle constraints. (gen_elem_of_pack_expansion_instantiation): Handle constraints. (tsubst_pack_expansion): Handle local parameters. (tsubst_decl) [FUNCTION_DECL]: Handle constraints. (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints. (tsubst_copy_and_build): Handle REQUIRES_EXPR. (more_specialized_fn, more_specialized_partial_spec): Check constraints. (more_specialized_inst): Split out from most_specialized_instantiation. (most_specialized_partial_spec): Check constraints. (instantiate_decl): Never instantiate a concept. (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ, variable concepts. (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR. (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts. (do_auto_deduction): Add overload taking tsubst flags and context enum. Handle constraints. (get_template_for_ordering, most_constrained_function) (is_compatible_template_arg, convert_wildcard_argument) (struct constr_entry, struct constr_hasher, decl_constraints) (valid_constraints_p, get_constraints, set_constraints) (remove_constraints, init_constraint_processing): New. * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO. * search.c (lookup_member): Do lookup in the open partial instantiation. * semantics.c (finish_template_template_parm): Handle constraints. (fixup_template_type): New. (finish_template_type): Call it. (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS. * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO. (cp_walk_subtrees): Handle REQUIRES_EXPR. * typeck.c (cp_build_function_call_vec): Check constraints. Co-Authored-By: Braden Obrzut <admin@maniacsvault.net> Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r226713
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c339
1 files changed, 333 insertions, 6 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 60be71a..879eb71 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -451,6 +451,10 @@ cxx_pretty_printer::primary_expression (tree t)
pp_cxx_offsetof_expression (this, t);
break;
+ case REQUIRES_EXPR:
+ pp_cxx_requires_expr (this, t);
+ break;
+
default:
c_pretty_printer::primary_expression (t);
break;
@@ -1064,6 +1068,7 @@ cxx_pretty_printer::expression (tree t)
case TEMPLATE_PARM_INDEX:
case TEMPLATE_TEMPLATE_PARM:
case STMT_EXPR:
+ case REQUIRES_EXPR:
primary_expression (t);
break;
@@ -1158,6 +1163,22 @@ cxx_pretty_printer::expression (tree t)
pp_cxx_ws_string (this, "<lambda>");
break;
+ case TRAIT_EXPR:
+ pp_cxx_trait_expression (this, t);
+ break;
+
+ case PRED_CONSTR:
+ case EXPR_CONSTR:
+ case TYPE_CONSTR:
+ case ICONV_CONSTR:
+ case DEDUCT_CONSTR:
+ case EXCEPT_CONSTR:
+ case PARM_CONSTR:
+ case CONJ_CONSTR:
+ case DISJ_CONSTR:
+ pp_cxx_constraint (this, t);
+ break;
+
case PAREN_EXPR:
pp_cxx_left_paren (this);
expression (TREE_OPERAND (t, 0));
@@ -1423,10 +1444,26 @@ pp_cxx_parameter_declaration (cxx_pretty_printer *pp, tree t)
static void
pp_cxx_parameter_declaration_clause (cxx_pretty_printer *pp, tree t)
{
- tree args = TYPE_P (t) ? NULL : FUNCTION_FIRST_USER_PARM (t);
- tree types =
- TYPE_P (t) ? TYPE_ARG_TYPES (t) : FUNCTION_FIRST_USER_PARMTYPE (t);
- const bool abstract = args == NULL || pp->flags & pp_c_flag_abstract;
+ tree args;
+ tree types;
+ bool abstract;
+
+ // For a requires clause or the explicit printing of a parameter list
+ // we expect T to be a chain of PARM_DECLs. Otherwise, the list of
+ // args and types are taken from the function decl T.
+ if (TREE_CODE (t) == PARM_DECL)
+ {
+ args = t;
+ types = t;
+ abstract = false;
+ }
+ else
+ {
+ bool type_p = TYPE_P (t);
+ args = type_p ? NULL : FUNCTION_FIRST_USER_PARM (t);
+ types = type_p ? TYPE_ARG_TYPES (t) : FUNCTION_FIRST_USER_PARMTYPE (t);
+ abstract = args == NULL || pp->flags & pp_c_flag_abstract;
+ }
bool first = true;
/* Skip artificial parameter for nonstatic member functions. */
@@ -1574,6 +1611,12 @@ void
cxx_pretty_printer::declarator (tree t)
{
direct_declarator (t);
+
+ // Print a requires clause.
+ if (flag_concepts)
+ if (tree ci = get_constraints (t))
+ if (tree reqs = CI_DECLARATOR_REQS (ci))
+ pp_cxx_requires_clause (this, reqs);
}
/* ctor-initializer:
@@ -2154,7 +2197,13 @@ pp_cxx_canonical_template_parameter (cxx_pretty_printer *pp, tree parm)
/*
template-declaration:
- export(opt) template < template-parameter-list > declaration */
+ export(opt) template < template-parameter-list > declaration
+
+ Concept extensions:
+
+ template-declaration:
+ export(opt) template < template-parameter-list >
+ requires-clause(opt) declaration */
static void
pp_cxx_template_declaration (cxx_pretty_printer *pp, tree t)
@@ -2171,6 +2220,15 @@ pp_cxx_template_declaration (cxx_pretty_printer *pp, tree t)
pp_cxx_end_template_argument_list (pp);
pp_newline_and_indent (pp, 3);
}
+
+ if (flag_concepts)
+ if (tree ci = get_constraints (t))
+ if (tree reqs = CI_TEMPLATE_REQS (ci))
+ {
+ pp_cxx_requires_clause (pp, reqs);
+ pp_newline_and_indent (pp, 6);
+ }
+
if (TREE_CODE (t) == FUNCTION_DECL && DECL_SAVED_TREE (t))
pp_cxx_function_definition (pp, t);
else
@@ -2387,6 +2445,9 @@ pp_cxx_trait_expression (cxx_pretty_printer *pp, tree t)
case CPTK_IS_POLYMORPHIC:
pp_cxx_ws_string (pp, "__is_polymorphic");
break;
+ case CPTK_IS_SAME_AS:
+ pp_cxx_ws_string (pp, "__is_same_as");
+ break;
case CPTK_IS_STD_LAYOUT:
pp_cxx_ws_string (pp, "__is_std_layout");
break;
@@ -2416,7 +2477,7 @@ pp_cxx_trait_expression (cxx_pretty_printer *pp, tree t)
pp_cxx_left_paren (pp);
pp->type_id (TRAIT_EXPR_TYPE1 (t));
- if (kind == CPTK_IS_BASE_OF)
+ if (kind == CPTK_IS_BASE_OF || kind == CPTK_IS_SAME_AS)
{
pp_cxx_separate_with (pp, ',');
pp->type_id (TRAIT_EXPR_TYPE2 (t));
@@ -2424,6 +2485,272 @@ pp_cxx_trait_expression (cxx_pretty_printer *pp, tree t)
pp_cxx_right_paren (pp);
}
+
+// requires-clause:
+// 'requires' logical-or-expression
+void
+pp_cxx_requires_clause (cxx_pretty_printer *pp, tree t)
+{
+ if (!t)
+ return;
+ pp->padding = pp_before;
+ pp_cxx_ws_string (pp, "requires");
+ pp_space (pp);
+ pp->expression (t);
+}
+
+/* requirement:
+ simple-requirement
+ compound-requirement
+ type-requirement
+ nested-requirement */
+static void
+pp_cxx_requirement (cxx_pretty_printer *pp, tree t)
+{
+ switch (TREE_CODE (t))
+ {
+ case SIMPLE_REQ:
+ pp_cxx_simple_requirement (pp, t);
+ break;
+
+ case TYPE_REQ:
+ pp_cxx_type_requirement (pp, t);
+ break;
+
+ case COMPOUND_REQ:
+ pp_cxx_compound_requirement (pp, t);
+ break;
+
+ case NESTED_REQ:
+ pp_cxx_nested_requirement (pp, t);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
+// requirement-list:
+// requirement
+// requirement-list ';' requirement[opt]
+//
+static void
+pp_cxx_requirement_list (cxx_pretty_printer *pp, tree t)
+{
+ for (; t; t = TREE_CHAIN (t))
+ pp_cxx_requirement (pp, TREE_VALUE (t));
+}
+
+// requirement-body:
+// '{' requirement-list '}'
+static void
+pp_cxx_requirement_body (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_left_brace (pp);
+ pp_cxx_requirement_list (pp, t);
+ pp_cxx_right_brace (pp);
+}
+
+// requires-expression:
+// 'requires' requirement-parameter-list requirement-body
+void
+pp_cxx_requires_expr (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "requires");
+ if (tree parms = TREE_OPERAND (t, 0))
+ {
+ pp_cxx_parameter_declaration_clause (pp, parms);
+ pp_cxx_whitespace (pp);
+ }
+ pp_cxx_requirement_body (pp, TREE_OPERAND (t, 1));
+}
+
+/* simple-requirement:
+ expression ';' */
+void
+pp_cxx_simple_requirement (cxx_pretty_printer *pp, tree t)
+{
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_cxx_semicolon (pp);
+}
+
+/* type-requirement:
+ typename type-name ';' */
+void
+pp_cxx_type_requirement (cxx_pretty_printer *pp, tree t)
+{
+ pp->type_id (TREE_OPERAND (t, 0));
+ pp_cxx_semicolon (pp);
+}
+
+/* compound-requirement:
+ '{' expression '}' 'noexcept' [opt] trailing-return-type [opt] */
+void
+pp_cxx_compound_requirement (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_left_brace (pp);
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_cxx_right_brace (pp);
+
+ if (COMPOUND_REQ_NOEXCEPT_P (t))
+ pp_cxx_ws_string (pp, "noexcept");
+
+ if (tree type = TREE_OPERAND (t, 1))
+ {
+ pp_cxx_ws_string (pp, "->");
+ pp->type_id (type);
+ }
+}
+
+/* nested requirement:
+ 'requires' constraint-expression */
+void
+pp_cxx_nested_requirement (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_ws_string (pp, "requires");
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_cxx_semicolon (pp);
+}
+
+void
+pp_cxx_predicate_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "predicate");
+ pp_left_paren (pp);
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_expression_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "valid_expr");
+ pp_left_paren (pp);
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_type_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "valid_type");
+ pp_left_paren (pp);
+ pp->type_id (TREE_OPERAND (t, 0));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_implicit_conversion_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "convertible");
+ pp_left_paren (pp);
+ pp->expression (ICONV_CONSTR_EXPR (t));
+ pp_cxx_separate_with (pp, ',');
+ pp->expression (ICONV_CONSTR_TYPE (t));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_argument_deduction_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_string (pp, "deducible");
+ pp_left_paren (pp);
+ pp->expression (DEDUCT_CONSTR_EXPR (t));
+ pp_cxx_separate_with (pp, ',');
+ pp->expression (DEDUCT_CONSTR_PATTERN (t));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_exception_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_ws_string (pp, "noexcept");
+ pp_left_paren (pp);
+ pp->expression (TREE_OPERAND (t, 0));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_parameterized_constraint (cxx_pretty_printer *pp, tree t)
+{
+ pp_left_paren (pp);
+ pp_string (pp, "forall");
+ if (tree parms = PARM_CONSTR_PARMS (t))
+ {
+ if (parms)
+ pp_cxx_parameter_declaration_clause (pp, parms);
+ pp_cxx_whitespace (pp);
+ }
+ pp_cxx_constraint (pp, PARM_CONSTR_OPERAND (t));
+ pp_right_paren (pp);
+}
+
+void
+pp_cxx_conjunction (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_constraint (pp, TREE_OPERAND (t, 0));
+ pp_string (pp, " and ");
+ pp_cxx_constraint (pp, TREE_OPERAND (t, 1));
+}
+
+void
+pp_cxx_disjunction (cxx_pretty_printer *pp, tree t)
+{
+ pp_cxx_constraint (pp, TREE_OPERAND (t, 0));
+ pp_string (pp, " or ");
+ pp_cxx_constraint (pp, TREE_OPERAND (t, 1));
+}
+
+void
+pp_cxx_constraint (cxx_pretty_printer *pp, tree t)
+{
+ if (t == error_mark_node)
+ return pp->expression (t);
+
+ switch (TREE_CODE (t))
+ {
+ case PRED_CONSTR:
+ pp_cxx_predicate_constraint (pp, t);
+ break;
+
+ case EXPR_CONSTR:
+ pp_cxx_expression_constraint (pp, t);
+ break;
+
+ case TYPE_CONSTR:
+ pp_cxx_type_constraint (pp, t);
+ break;
+
+ case ICONV_CONSTR:
+ pp_cxx_implicit_conversion_constraint (pp, t);
+ break;
+
+ case DEDUCT_CONSTR:
+ pp_cxx_argument_deduction_constraint (pp, t);
+ break;
+
+ case EXCEPT_CONSTR:
+ pp_cxx_exception_constraint (pp, t);
+ break;
+
+ case PARM_CONSTR:
+ pp_cxx_parameterized_constraint (pp, t);
+ break;
+
+ case CONJ_CONSTR:
+ pp_cxx_conjunction (pp, t);
+ break;
+
+ case DISJ_CONSTR:
+ pp_cxx_disjunction (pp, t);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
+
typedef c_pretty_print_fn pp_fun;