aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-06-29 17:45:21 -0400
committerJason Merrill <jason@redhat.com>2022-10-13 17:18:20 -0400
commit537e08cfad04e79fb97d368e397cfc7e782865ec (patch)
tree1424b5a18e6c0d07cc1f3f5e403ebf3e5800cbe5 /gcc/cp/pt.cc
parent99da523359e9333555585484eb3b8f854a98f1b4 (diff)
downloadgcc-537e08cfad04e79fb97d368e397cfc7e782865ec.zip
gcc-537e08cfad04e79fb97d368e397cfc7e782865ec.tar.gz
gcc-537e08cfad04e79fb97d368e397cfc7e782865ec.tar.bz2
c++: trivial formatting cleanups
Split out from the C++ contracts patch. gcc/cp/ChangeLog: * cp-tree.h: Fix whitespace. * parser.h: Fix whitespace. * decl.cc: Fix whitespace. * parser.cc: Fix whitespace. * pt.cc: Fix whitespace.
Diffstat (limited to 'gcc/cp/pt.cc')
-rw-r--r--gcc/cp/pt.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index ec337e2..f680085 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -1581,6 +1581,7 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend,
there were no definition, and vice versa. */
DECL_INITIAL (fn) = NULL_TREE;
duplicate_decls (spec, fn, /*hiding=*/is_friend);
+
/* The call to duplicate_decls will have applied
[temp.expl.spec]:
@@ -12185,6 +12186,7 @@ instantiate_class_template (tree type)
r = tsubst (t, args, tf_error, NULL_TREE);
if (TREE_CODE (t) == TEMPLATE_DECL)
--processing_template_decl;
+
set_current_access_from_decl (r);
finish_member_declaration (r);
/* Instantiate members marked with attribute used. */
@@ -17020,7 +17022,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
/* This can happen for a parameter name used later in a function
declaration (such as in a late-specified return type). Just
make a dummy decl, since it's only used for its type. */
- gcc_assert (cp_unevaluated_operand != 0);
+ gcc_assert (cp_unevaluated_operand);
r = tsubst_decl (t, args, complain);
/* Give it the template pattern as its context; its true context
hasn't been instantiated yet and this is good enough for
@@ -21918,6 +21920,7 @@ instantiate_template (tree tmpl, tree orig_args, tsubst_flags_t complain)
}
return error_mark_node;
}
+
return fndecl;
}
@@ -26183,12 +26186,9 @@ regenerate_decl_from_template (tree decl, tree tmpl, tree args)
{
/* The arguments used to instantiate DECL, from the most general
template. */
- tree code_pattern;
-
- code_pattern = DECL_TEMPLATE_RESULT (tmpl);
+ tree code_pattern = DECL_TEMPLATE_RESULT (tmpl);
- /* Make sure that we can see identifiers, and compute access
- correctly. */
+ /* Make sure that we can see identifiers, and compute access correctly. */
push_access_scope (decl);
if (TREE_CODE (decl) == FUNCTION_DECL)