]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: formatting tweaks
authorJason Merrill <jason@redhat.com>
Mon, 31 Oct 2022 17:37:13 +0000 (13:37 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 1 Nov 2022 01:23:02 +0000 (21:23 -0400)
gcc/cp/ChangeLog:

* decl.cc (duplicate_decls): Reformat loop.
* parser.cc (cp_parser_member_declaration): Add newline.
* semantics.cc: Remove newline.

gcc/cp/decl.cc
gcc/cp/parser.cc
gcc/cp/semantics.cc

index c7f1937ea48f3748c9be65c3335b693fc5547903..87cb7a6c3a41992b45a5eeeef6e6132c92f3ba63 100644 (file)
@@ -2343,12 +2343,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool hiding, bool was_hidden)
          DECL_INITIAL (old_result) = DECL_INITIAL (new_result);
          if (DECL_FUNCTION_TEMPLATE_P (newdecl))
            {
-             tree parm;
-             DECL_ARGUMENTS (old_result)
-               = DECL_ARGUMENTS (new_result);
-             for (parm = DECL_ARGUMENTS (old_result); parm;
-                  parm = DECL_CHAIN (parm))
-               DECL_CONTEXT (parm) = old_result;
+             DECL_ARGUMENTS (old_result) = DECL_ARGUMENTS (new_result);
+             for (tree p = DECL_ARGUMENTS (old_result); p; p = DECL_CHAIN (p))
+               DECL_CONTEXT (p) = old_result;
 
              if (tree fc = DECL_FRIEND_CONTEXT (new_result))
                SET_DECL_FRIEND_CONTEXT (old_result, fc);
index 9bdc60949f406cd640c7680b8fa4c538d38dba78..6a5b0652a0934792b3b5718a00d9f16161400606 100644 (file)
@@ -27522,6 +27522,7 @@ cp_parser_member_declaration (cp_parser* parser)
              decl = grokfield (declarator, &decl_specifiers,
                                initializer, /*init_const_expr_p=*/true,
                                asm_specification, attributes);
+
              if (parser->fully_implicit_function_template_p)
                {
                  if (friend_p)
index 36aa9c4499fa29f24c54d8cec585c864a0464641..7c5f90b512704b27b42f40033d122096de41fd1f 100644 (file)
@@ -731,7 +731,6 @@ end_maybe_infinite_loop (tree cond)
     }
 }
 
-
 /* Begin a conditional that might contain a declaration.  When generating
    normal code, we want the declaration to appear before the statement
    containing the conditional.  When generating template code, we want the