From: Jason Merrill Date: Sat, 14 Sep 2019 18:45:46 +0000 (-0400) Subject: Formatting and comment syntax adjustments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62dca3d53ee985e5fd69eb5e2611a8d157ea7bdc;p=gcc.git Formatting and comment syntax adjustments. From-SVN: r275717 --- diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 20cfd10501a..a8332ab3b14 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4605,7 +4605,7 @@ build_clone (tree fn, tree name) } else { - // Clone constraints. + /* Clone constraints. */ if (flag_concepts) if (tree ci = get_constraints (fn)) set_constraints (clone, copy_node (ci)); diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 95e5eda7e87..793847d03d8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1470,7 +1470,7 @@ check_nonnull (T* p) return p; } -// Returns true iff T is non-null and represents constraint info. +/* Returns true iff T is non-null and represents constraint info. */ inline tree_constraint_info * check_constraint_info (tree t) { @@ -1479,35 +1479,35 @@ check_constraint_info (tree t) return NULL; } -// Access the expression describing the template constraints. This may be -// null if no constraints were introduced in the template parameter list, -// a requirements clause after the template parameter list, or constraints -// through a constrained-type-specifier. +/* Access the expression describing the template constraints. This may be + null if no constraints were introduced in the template parameter list, + a requirements clause after the template parameter list, or constraints + through a constrained-type-specifier. */ #define CI_TEMPLATE_REQS(NODE) \ - check_constraint_info (check_nonnull(NODE))->template_reqs + check_constraint_info (check_nonnull (NODE))->template_reqs -// Access the expression describing the trailing constraints. This is non-null -// for any implicit instantiation of a constrained declaration. For a -// templated declaration it is non-null only when a trailing requires-clause -// was specified. +/* Access the expression describing the trailing constraints. This is non-null + for any implicit instantiation of a constrained declaration. For a + templated declaration it is non-null only when a trailing requires-clause + was specified. */ #define CI_DECLARATOR_REQS(NODE) \ - check_constraint_info (check_nonnull(NODE))->declarator_reqs + check_constraint_info (check_nonnull (NODE))->declarator_reqs -// The computed associated constraint expression for a declaration. +/* The computed associated constraint expression for a declaration. */ #define CI_ASSOCIATED_CONSTRAINTS(NODE) \ - check_constraint_info (check_nonnull(NODE))->associated_constr + check_constraint_info (check_nonnull (NODE))->associated_constr -// Access the logical constraints on the template parameters introduced -// at a given template parameter list level indicated by NODE. +/* Access the constraint-expression introduced by the requires-clause + associate the template parameter list NODE. */ #define TEMPLATE_PARMS_CONSTRAINTS(NODE) \ TREE_TYPE (TREE_LIST_CHECK (NODE)) -// Access the logical constraints on the template parameter declaration -// indicated by NODE. +/* Access the logical constraints on the template parameter declaration + indicated by NODE. */ #define TEMPLATE_PARM_CONSTRAINTS(NODE) \ TREE_TYPE (TREE_LIST_CHECK (NODE)) -/* Non-zero if the noexcept is present in a compound requirement. */ +/* Non-zero if the noexcept is present in a compound requirement. */ #define COMPOUND_REQ_NOEXCEPT_P(NODE) \ TREE_LANG_FLAG_0 (TREE_CHECK (NODE, COMPOUND_REQ)) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9218eefa0b4..e0d67328121 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8949,10 +8949,10 @@ grokfndecl (tree ctype, if (location == UNKNOWN_LOCATION) location = input_location; - // Was the concept specifier present? + /* Was the concept specifier present? */ bool concept_p = inlinep & 4; - // Concept declarations must have a corresponding definition. + /* Concept declarations must have a corresponding definition. */ if (concept_p && !funcdef_flag) { error_at (location, "concept %qD has no definition", declarator); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 254a77ba54b..b2fb150c912 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19734,7 +19734,7 @@ cp_parser_alias_declaration (cp_parser* parser) if (decl == error_mark_node) return decl; - // Attach constraints to the alias declaration. + /* Attach constraints to the alias declaration. */ if (flag_concepts && current_template_parms) { tree reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms); @@ -22551,12 +22551,14 @@ cp_parser_parameter_declaration (cp_parser *parser, && !LAMBDA_TYPE_P (current_class_type)) default_argument = cp_parser_cache_defarg (parser, /*nsdmi=*/false); - // A constrained-type-specifier may declare a type template-parameter. + /* A constrained-type-specifier may declare a type + template-parameter. */ else if (declares_constrained_type_template_parameter (type)) default_argument = cp_parser_default_type_template_argument (parser); - // A constrained-type-specifier may declare a template-template-parameter. + /* A constrained-type-specifier may declare a + template-template-parameter. */ else if (declares_constrained_template_template_parameter (type)) default_argument = cp_parser_default_template_template_argument (parser); @@ -28475,9 +28477,9 @@ cp_parser_single_declaration (cp_parser* parser, if (cp_parser_declares_only_class_p (parser) || (declares_class_or_enum & 2)) { - // If this is a declaration, but not a definition, associate - // any constraints with the type declaration. Constraints - // are associated with definitions in cp_parser_class_specifier. + /* If this is a declaration, but not a definition, associate + any constraints with the type declaration. Constraints + are associated with definitions in cp_parser_class_specifier. */ if (declares_class_or_enum == 1) associate_classtype_constraints (decl_specifiers.type);