aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-01-12 18:35:15 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-01-12 18:35:15 +0000
commitb84619155e8f8537140aae55ab53125cafa8bc6c (patch)
tree7d8e60ff469d89dbad8f4bce456a95f28b260af9 /gcc
parent8f72ce2cec8b8961f381995eb6e2c5de1cd0f3d3 (diff)
downloadgcc-b84619155e8f8537140aae55ab53125cafa8bc6c.zip
gcc-b84619155e8f8537140aae55ab53125cafa8bc6c.tar.gz
gcc-b84619155e8f8537140aae55ab53125cafa8bc6c.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/call.c6
-rw-r--r--gcc/cp/cp-tree.h5
-rw-r--r--gcc/cp/expr.c32
4 files changed, 29 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 840cbd4..c155804 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2018-01-12 Nathan Sidwell <nathan@acm.org>
+
+ * 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 <jason@redhat.com>
PR c++/82728 - wrong -Wunused-but-set-variable
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 5f2c6be..f554285 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 9c6c179..4300d92 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 7d79215..da09ab8 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