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.
This commit is contained in:
John Baldwin 2016-11-24 12:01:24 -08:00
parent bbe910e6e1
commit 036e657b48
6 changed files with 23 additions and 14 deletions

View file

@ -12343,9 +12343,9 @@ create_excep_cond_exprs (struct ada_catchpoint *c)
s = cond_string;
TRY
{
exp = std::move (parse_exp_1 (&s, bl->address,
block_for_pc (bl->address),
0));
exp = parse_exp_1 (&s, bl->address,
block_for_pc (bl->address),
0);
}
CATCH (e, RETURN_MASK_ERROR)
{