[RFA] Remove a cleanup from parse_expression_for_completion

Simon Marchi simon.marchi@polymtl.ca
Wed Feb 21 03:46:00 GMT 2018


On 2018-02-20 03:23 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
> 
> Tom> There is a case in here where the NULL/empty string distinction matters.
> Tom> So I think we can't use std::string but must instead use
> Tom> unique_xmalloc_ptr.  I'll update the patch.

Woops!

> diff --git a/gdb/expression.h b/gdb/expression.h
> index 030f2f08e7..59a0898805 100644
> --- a/gdb/expression.h
> +++ b/gdb/expression.h
> @@ -101,7 +101,8 @@ extern expression_up parse_expression (const char *);
>  extern expression_up parse_expression_with_language (const char *string,
>  						     enum language lang);
>  
> -extern struct type *parse_expression_for_completion (const char *, char **,
> +extern struct type *parse_expression_for_completion (const char *,
> +						     gdb::unique_xmalloc_ptr<char> *,

This line is now too long.

Otherwise it looks good to me.

Simon



More information about the Gdb-patches mailing list