+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
};
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;
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);
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);
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
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