+2020-12-16 Tom Tromey <tom@tromey.com>
+
+ * parse.c (parse_exp_1, parse_expression_for_completion): Update.
+ (parse_exp_in_context): Change void_context_p to bool.
+ * language.h (struct language_defn) <post_parser>: Change
+ void_context_p to bool.
+ * ada-lang.c (class ada_language) <post_parser>: Update.
+
2020-12-16 Tom Tromey <tom@tromey.com>
Tom Tromey <tromey@redhat.com>
Tom de Vries <tdevries@suse.de>
A null CONTEXT_TYPE indicates that a non-void return type is
preferred. May change (expand) *EXP. */
- void post_parser (expression_up *expp, int void_context_p, int completing,
+ void post_parser (expression_up *expp, bool void_context_p, int completing,
innermost_block_tracker *tracker) const override
{
struct type *context_type = NULL;
non-zero, then the expression has been parsed for completion, not
evaluation. */
- virtual void post_parser (expression_up *expp, int void_context_p,
+ virtual void post_parser (expression_up *expp, bool void_context_p,
int completing,
innermost_block_tracker *tracker) const
{
static expression_up parse_exp_in_context (const char **, CORE_ADDR,
const struct block *, int,
- int, int *,
+ bool, int *,
innermost_block_tracker *,
expr_completion_state *);
parse_exp_1 (const char **stringptr, CORE_ADDR pc, const struct block *block,
int comma, innermost_block_tracker *tracker)
{
- return parse_exp_in_context (stringptr, pc, block, comma, 0, NULL,
+ return parse_exp_in_context (stringptr, pc, block, comma, false, NULL,
tracker, nullptr);
}
static expression_up
parse_exp_in_context (const char **stringptr, CORE_ADDR pc,
const struct block *block,
- int comma, int void_context_p, int *out_subexp,
+ int comma, bool void_context_p, int *out_subexp,
innermost_block_tracker *tracker,
expr_completion_state *cstate)
{
try
{
- exp = parse_exp_in_context (&string, 0, 0, 0, 0, &subexp,
+ exp = parse_exp_in_context (&string, 0, 0, 0, false, &subexp,
nullptr, &cstate);
}
catch (const gdb_exception_error &except)