From b84619155e8f8537140aae55ab53125cafa8bc6c Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 12 Jan 2018 18:35:15 +0000 Subject: [PATCH] [C++ PATCH] some reformatting https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01107.html * cp-tree.h (mark_rvalue_use): Add parm name. * expr.c (mark_lvalue_use, mark_lvalue_use_nonread): Move next to mark_rvalue_use. * call.c (convert_like_real): Fix formatting. From-SVN: r256593 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/call.c | 6 +++--- gcc/cp/cp-tree.h | 5 +++-- gcc/cp/expr.c | 32 ++++++++++++++++---------------- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 840cbd4f3e1..c1558040baa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2018-01-12 Nathan Sidwell + + * cp-tree.h (mark_rvalue_use): Add parm name. + * expr.c (mark_lvalue_use, mark_lvalue_use_nonread): Move next to + mark_rvalue_use. + * call.c (convert_like_real): Fix formatting. + 2018-01-11 Jason Merrill PR c++/82728 - wrong -Wunused-but-set-variable diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 5f2c6becb35..f5542850cea 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6890,9 +6890,9 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum, }; expr = convert_like_real (next_conversion (convs), expr, fn, argnum, - convs->kind == ck_ref_bind ? issue_conversion_warnings : false, - c_cast_p, - complain); + convs->kind == ck_ref_bind + ? issue_conversion_warnings : false, + c_cast_p, complain); if (expr == error_mark_node) return error_mark_node; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 9c6c1791e1a..4300d9217a8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6330,7 +6330,7 @@ extern tree create_try_catch_expr (tree, tree); extern tree cplus_expand_constant (tree); extern tree mark_rvalue_use (tree, location_t = UNKNOWN_LOCATION, - bool = true); + bool reject_builtin = true); extern tree mark_lvalue_use (tree); extern tree mark_lvalue_use_nonread (tree); extern tree mark_type_use (tree); @@ -6341,7 +6341,8 @@ extern void mark_exp_read (tree); extern int is_friend (tree, tree); extern void make_friend_class (tree, tree, bool); extern void add_friend (tree, tree, bool); -extern tree do_friend (tree, tree, tree, tree, enum overload_flags, bool); +extern tree do_friend (tree, tree, tree, tree, + enum overload_flags, bool); extern void set_global_friend (tree); extern bool is_global_friend (tree); diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index 7d7921597d5..da09ab844cf 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -199,6 +199,22 @@ mark_rvalue_use (tree e, return mark_use (e, true, true, loc, reject_builtin); } +/* Called whenever an expression is used in an lvalue context. */ + +tree +mark_lvalue_use (tree expr) +{ + return mark_use (expr, false, true, input_location, false); +} + +/* As above, but don't consider this use a read. */ + +tree +mark_lvalue_use_nonread (tree expr) +{ + return mark_use (expr, false, false, input_location, false); +} + /* Called when expr appears as a discarded-value expression. */ tree @@ -245,22 +261,6 @@ mark_discarded_use (tree expr) return mark_use (expr, true, true, input_location, false); } -/* Called whenever an expression is used in an lvalue context. */ - -tree -mark_lvalue_use (tree expr) -{ - return mark_use (expr, false, true, input_location, false); -} - -/* As above, but don't consider this use a read. */ - -tree -mark_lvalue_use_nonread (tree expr) -{ - return mark_use (expr, false, false, input_location, false); -} - /* Called whenever an expression is used in a type use context. */ tree -- 2.30.2