aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.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/call.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/call.c')
-rw-r--r--gcc/cp/call.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index ff0a26b..b83ffa8 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -8878,7 +8878,7 @@ build_special_member_call (tree instance, tree name, vec<tree, va_gc> **args,
static char *
name_as_c_string (tree name, tree type, bool *free_p)
{
- char *pretty_name;
+ const char *pretty_name;
/* Assume that we will not allocate memory. */
*free_p = false;
@@ -8886,7 +8886,7 @@ name_as_c_string (tree name, tree type, bool *free_p)
if (IDENTIFIER_CDTOR_P (name))
{
pretty_name
- = CONST_CAST (char *, identifier_to_locale (IDENTIFIER_POINTER (constructor_name (type))));
+ = identifier_to_locale (IDENTIFIER_POINTER (constructor_name (type)));
/* For a destructor, add the '~'. */
if (IDENTIFIER_DTOR_P (name))
{
@@ -8905,9 +8905,9 @@ name_as_c_string (tree name, tree type, bool *free_p)
*free_p = true;
}
else
- pretty_name = CONST_CAST (char *, identifier_to_locale (IDENTIFIER_POINTER (name)));
+ pretty_name = identifier_to_locale (IDENTIFIER_POINTER (name));
- return pretty_name;
+ return CONST_CAST (char *, pretty_name);
}
/* Build a call to "INSTANCE.FN (ARGS)". If FN_P is non-NULL, it will
@@ -9118,11 +9118,10 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args,
&candidates, complain);
}
else
- {
- add_candidates (fns, first_mem_arg, user_args, optype,
- explicit_targs, template_only, conversion_path,
- access_binfo, flags, &candidates, complain);
- }
+ add_candidates (fns, first_mem_arg, user_args, optype,
+ explicit_targs, template_only, conversion_path,
+ access_binfo, flags, &candidates, complain);
+
any_viable_p = false;
candidates = splice_viable (candidates, false, &any_viable_p);