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

@ -430,8 +430,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
TRY
{
expr = std::move (parse_expression_with_language (arg.type_str,
language_c));
expr = parse_expression_with_language (arg.type_str, language_c);
}
CATCH (ex, RETURN_MASK_ERROR)
{