public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3583] c++: formatting tweaks
@ 2022-11-01 1:23 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-11-01 1:23 UTC (permalink / raw)
To: gcc-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-01 1:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 1:23 [gcc r13-3583] c++: formatting tweaks Jason Merrill
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).