aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-06-29 14:13:11 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-06-29 14:13:11 +0000
commite98889226cc487b39334ae069422c0ac4615f9ec (patch)
treea5f3433070fd82111d79d7aaa831f37cca63f1c4 /gcc/cp/decl.c
parent0630a4ecda602a90e978c3285cf1028e92ff5e8b (diff)
downloadgcc-e98889226cc487b39334ae069422c0ac4615f9ec.zip
gcc-e98889226cc487b39334ae069422c0ac4615f9ec.tar.gz
gcc-e98889226cc487b39334ae069422c0ac4615f9ec.tar.bz2
Whitespace cleanups.
* call.c (name_as_c_string): Move CONST_CAST to return. (build_new_method_call_1): Remove unneeded bracing. * class.c (include_empty_classes): Unbreak line. * constraint.cc (tsubst_check_constraint): Add space. * cp-tree.h (lang_decl_ns): Add comment. (PTRMEM_CST_MEMBER): Break line. * decl.c (grokfndecl): Add blank lines. Unbreak some others. (grokdeclarator): Remove lines, move declaration to first use. * decl2.c (decl_needed_p): Fix indentation. (c_parse_final_cleanups): Remove blank line. * method.c (implicitly_declare_fn): Move declaration to first use. * search.c (current_scope): Add blank lines. From-SVN: r249786
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3d96a3e..38c0348 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8502,9 +8502,11 @@ grokfndecl (tree ctype,
/* Allocate space to hold the vptr bit if needed. */
SET_DECL_ALIGN (decl, MINIMUM_METHOD_BOUNDARY);
}
+
DECL_ARGUMENTS (decl) = parms;
for (t = parms; t; t = DECL_CHAIN (t))
DECL_CONTEXT (t) = decl;
+
/* Propagate volatile out from type to decl. */
if (TYPE_VOLATILE (type))
TREE_THIS_VOLATILE (decl) = 1;
@@ -8524,13 +8526,11 @@ grokfndecl (tree ctype,
break;
}
- if (friendp
- && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
+ if (friendp && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
{
if (funcdef_flag)
- error
- ("defining explicit specialization %qD in friend declaration",
- orig_declarator);
+ error ("defining explicit specialization %qD in friend declaration",
+ orig_declarator);
else
{
tree fns = TREE_OPERAND (orig_declarator, 0);
@@ -9132,7 +9132,6 @@ build_ptrmemfunc_type (tree type)
this method instead of type_hash_canon, because it only does a
simple equality check on the list of field members. */
-
t = TYPE_PTRMEMFUNC_TYPE (type);
if (t)
return t;
@@ -10068,8 +10067,6 @@ grokdeclarator (const cp_declarator *declarator,
{
case BIT_NOT_EXPR:
{
- tree type;
-
if (innermost_code != cdk_function)
{
error ("declaration of %qD as non-function", decl);
@@ -10082,7 +10079,7 @@ grokdeclarator (const cp_declarator *declarator,
return error_mark_node;
}
- type = TREE_OPERAND (decl, 0);
+ tree type = TREE_OPERAND (decl, 0);
if (TYPE_P (type))
type = constructor_name (type);
name = identifier_to_locale (IDENTIFIER_POINTER (type));