From 036e657b48144d7449ddfcfcf9214bcd7bcf268b Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 24 Nov 2016 12:01:24 -0800 Subject: Do not use std::move when assigning an anonymous object to a unique_ptr. Using std::move forces an extra copy of the object. These changes fix -Wpessimizing-move warnings from clang. gdb/ChangeLog: * ada-lang.c (create_excep_cond_exprs): Do not use 'std::move'. * ax-gdb.c (agent_eval_command_one): Likewise. (agent_eval_command_one): Likewise. * breakpoint.c (parse_cond_to_aexpr): Likewise. (parse_cmd_to_aexpr): Likewise. * dtrace-probe.c (dtrace_process_dof_probe): Likewise. * parse.c (parse_expression_for_completion): Likewise. --- gdb/ax-gdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/ax-gdb.c') diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index cd97585..49108de 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -2555,8 +2555,8 @@ agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc) arg = exp; if (!eval && strcmp (arg, "$_ret") == 0) { - agent = std::move (gen_trace_for_return_address (pc, get_current_arch (), - trace_string)); + agent = gen_trace_for_return_address (pc, get_current_arch (), + trace_string); } else { @@ -2565,10 +2565,10 @@ agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc) if (eval) { gdb_assert (trace_string == 0); - agent = std::move (gen_eval_for_expr (pc, expr.get ())); + agent = gen_eval_for_expr (pc, expr.get ()); } else - agent = std::move (gen_trace_for_expr (pc, expr.get (), trace_string)); + agent = gen_trace_for_expr (pc, expr.get (), trace_string); } ax_reqs (agent.get ()); -- cgit v1.1