public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3583] c++: formatting tweaks
Date: Tue,  1 Nov 2022 01:23:16 +0000 (GMT)	[thread overview]
Message-ID: <20221101012337.C8B7E3858D37@sourceware.org> (raw)

https://gcc.gnu.org/g:6a1f27f45e44bcfbcc06a1aad74bb076e56eda36

commit r13-3583-g6a1f27f45e44bcfbcc06a1aad74bb076e56eda36
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Oct 31 13:37:13 2022 -0400

    c++: formatting tweaks
    
    gcc/cp/ChangeLog:
    
            * decl.cc (duplicate_decls): Reformat loop.
            * parser.cc (cp_parser_member_declaration): Add newline.
            * semantics.cc: Remove newline.

Diff:
---
 gcc/cp/decl.cc      | 9 +++------
 gcc/cp/parser.cc    | 1 +
 gcc/cp/semantics.cc | 1 -
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index c7f1937ea48..87cb7a6c3a4 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -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);
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 9bdc60949f4..6a5b0652a09 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -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)
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index 36aa9c4499f..7c5f90b5127 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -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

                 reply	other threads:[~2022-11-01  1:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221101012337.C8B7E3858D37@sourceware.org \
    --to=jason@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).