static struct value *
evaluate_subexp_type (struct expression *exp, int *pos)
{
- return evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ return evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
}
/* If VAL is wrapped in an aligner or subtype wrapper, return the
return ada_evaluate_subexp (type, exp, pos, noside);
case BINOP_ASSIGN:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (exp->elts[*pos].opcode == OP_AGGREGATE)
{
arg1 = assign_aggregate (arg1, arg1, exp, pos, noside);
case BINOP_DIV:
case BINOP_REM:
case BINOP_MOD:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
case BINOP_EQUAL:
case BINOP_NOTEQUAL:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
return value_from_longest (type, (LONGEST) tem);
case UNOP_NEG:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
else if (ada_is_gnat_encoded_fixed_point_type (value_type (arg1)))
{
struct value *val;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
- *pos = pc;
+ arg1 = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ *pos = pc;
val = evaluate_subexp_standard (expect_type, exp, pos, noside);
return value_cast (value_type (arg1), val);
a fixed type would result in the loss of that type name,
thus preventing us from printing the name of the ancestor
type in the type description. */
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_NORMAL);
+ arg1 = evaluate_subexp (nullptr, exp, pos, EVAL_NORMAL);
if (type->code () != TYPE_CODE_REF)
{
else
{
for (tem = 0; tem <= nargs; tem += 1)
- argvec[tem] = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- argvec[tem] = 0;
+ argvec[tem] = evaluate_subexp (nullptr, exp, pos, noside);
+ argvec[tem] = 0;
if (noside == EVAL_SKIP)
goto nosideret;
case TERNOP_SLICE:
{
- struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- struct value *low_bound_val =
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
- struct value *high_bound_val =
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
- LONGEST low_bound;
+ struct value *array = evaluate_subexp (nullptr, exp, pos, noside);
+ struct value *low_bound_val
+ = evaluate_subexp (nullptr, exp, pos, noside);
+ struct value *high_bound_val
+ = evaluate_subexp (nullptr, exp, pos, noside);
+ LONGEST low_bound;
LONGEST high_bound;
low_bound_val = coerce_ref (low_bound_val);
case UNOP_IN_RANGE:
(*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type = check_typedef (exp->elts[pc + 1].type);
if (noside == EVAL_SKIP)
case BINOP_IN_BOUNDS:
(*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
|| value_equal (arg2, arg1)));
case TERNOP_IN_RANGE:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg3 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
if (exp->elts[*pos].opcode == OP_TYPE)
{
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = NULL;
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ arg1 = NULL;
type_arg = check_typedef (exp->elts[pc + 2].type);
}
else
{
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- type_arg = NULL;
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ type_arg = NULL;
}
if (exp->elts[*pos].opcode != OP_LONG)
}
case OP_ATR_TAG:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
case OP_ATR_MIN:
case OP_ATR_MAX:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
struct type *type_arg = check_typedef (exp->elts[pc + 2].type);
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- if (noside == EVAL_SKIP)
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ if (noside == EVAL_SKIP)
goto nosideret;
if (!ada_is_modular_type (type_arg))
case OP_ATR_POS:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
type = builtin_type (exp->gdbarch)->builtin_int;
return value_pos_atr (type, arg1);
case OP_ATR_SIZE:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type = value_type (arg1);
/* If the argument is a reference, then dereference its type, since
TARGET_CHAR_BIT * TYPE_LENGTH (type));
case OP_ATR_VAL:
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type = exp->elts[pc + 2].type;
if (noside == EVAL_SKIP)
goto nosideret;
return value_val_atr (type, arg1);
case BINOP_EXP:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
}
case UNOP_PLUS:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
else
return arg1;
case UNOP_ABS:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
unop_promote (exp->language_defn, exp->gdbarch, &arg1);
case UNOP_IND:
preeval_pos = *pos;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
type = ada_check_typedef (value_type (arg1));
|| type->code () == TYPE_CODE_PTR)
&& ada_is_tagged_type (TYPE_TARGET_TYPE (type), 0))
{
- arg1 = evaluate_subexp (NULL_TYPE, exp, &preeval_pos,
- EVAL_NORMAL);
+ arg1
+ = evaluate_subexp (nullptr, exp, &preeval_pos, EVAL_NORMAL);
type = value_type (ada_value_ind (arg1));
}
else
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
preeval_pos = *pos;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
goto nosideret;
if (noside == EVAL_AVOID_SIDE_EFFECTS)
if (type == NULL)
{
- arg1 = evaluate_subexp (NULL_TYPE, exp, &preeval_pos,
- EVAL_NORMAL);
+ arg1
+ = evaluate_subexp (nullptr, exp, &preeval_pos, EVAL_NORMAL);
arg1 = ada_value_struct_elt (arg1,
&exp->elts[pc + 2].string,
0);
{
int pc = 0;
- return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_NORMAL);
+ return evaluate_subexp (nullptr, exp, &pc, EVAL_NORMAL);
}
/* Evaluate an expression, avoiding all memory references
{
int pc = 0;
- return evaluate_subexp (NULL_TYPE, exp, &pc, EVAL_AVOID_SIDE_EFFECTS);
+ return evaluate_subexp (nullptr, exp, &pc, EVAL_AVOID_SIDE_EFFECTS);
}
/* Evaluate a subexpression, avoiding all memory references and
struct value *
evaluate_subexpression_type (struct expression *exp, int subexp)
{
- return evaluate_subexp (NULL_TYPE, exp, &subexp, EVAL_AVOID_SIDE_EFFECTS);
+ return evaluate_subexp (nullptr, exp, &subexp, EVAL_AVOID_SIDE_EFFECTS);
}
/* Find the current value of a watchpoint on EXP. Return the value in
try
{
- result = evaluate_subexp (NULL_TYPE, exp, pc, EVAL_NORMAL);
+ result = evaluate_subexp (nullptr, exp, pc, EVAL_NORMAL);
}
catch (const gdb_exception &ex)
{
}
else
{
- index = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ index = value_as_long (evaluate_subexp (nullptr, exp, pos, noside));
if (index < low_bound || index > high_bound)
error (_("tuple index out of range"));
memcpy (value_contents_raw (array) + (index - low_bound) * element_size,
if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
low_bound = range->bounds ()->low.const_val ();
else
- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ low_bound = value_as_long (evaluate_subexp (nullptr, exp, pos, noside));
if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
high_bound = range->bounds ()->high.const_val ();
else
- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ high_bound = value_as_long (evaluate_subexp (nullptr, exp, pos, noside));
return value_slice (array, low_bound, high_bound - low_bound + 1);
}
}
else
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
}
/* If the function is a virtual function, then the aggregate
the vtable. Otherwise, it is just along for the ride: call
the function directly. */
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type *a1_type = check_typedef (value_type (arg1));
if (noside == EVAL_SKIP)
}
else
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
/* Check to see if the operator '->' has been overloaded.
If the operator has been overloaded replace arg2 with the
enum noside noside)
{
for (int i = 0; i < nargs; ++i)
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, noside);
}
/* Return true if type is integral or reference to integral */
tem2 = longest_to_int (exp->elts[pc + 1].longconst);
tem3 = longest_to_int (exp->elts[pc + 2].longconst);
nargs = tem3 - tem2 + 1;
- type = expect_type ? check_typedef (expect_type) : NULL_TYPE;
+ type = expect_type ? check_typedef (expect_type) : nullptr;
- if (expect_type != NULL_TYPE && noside != EVAL_SKIP
+ if (expect_type != nullptr && noside != EVAL_SKIP
&& type->code () == TYPE_CODE_STRUCT)
{
struct value *rec = allocate_value (expect_type);
return evaluate_struct_tuple (rec, exp, pos, noside, nargs);
}
- if (expect_type != NULL_TYPE && noside != EVAL_SKIP
+ if (expect_type != nullptr && noside != EVAL_SKIP
&& type->code () == TYPE_CODE_ARRAY)
{
struct type *range_type = type->index_type ();
return array;
}
- if (expect_type != NULL_TYPE && noside != EVAL_SKIP
+ if (expect_type != nullptr && noside != EVAL_SKIP
&& type->code () == TYPE_CODE_SET)
{
struct value *set = allocate_value (expect_type);
case TERNOP_SLICE:
{
- struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ struct value *array = evaluate_subexp (nullptr, exp, pos, noside);
int lowbound
- = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
- int upper
- = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ = value_as_long (evaluate_subexp (nullptr, exp, pos, noside));
+ int upper = value_as_long (evaluate_subexp (nullptr, exp, pos, noside));
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
case TERNOP_COND:
/* Skip third and second args to evaluate the first one. */
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (value_logical_not (arg1))
{
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
- return evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
+ return evaluate_subexp (nullptr, exp, pos, noside);
}
else
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
return arg2;
}
(*pos) += 2;
/* First determine the type code we are dealing with. */
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type = check_typedef (value_type (arg1));
code = type->code ();
/* We have a complex number, There should be 2 floating
point numbers that compose it. */
(*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
return value_literal_complex (arg1, arg2, exp->elts[pc + 1].type);
case STRUCTOP_STRUCT:
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
arg3 = value_struct_elt (&arg1, NULL, &exp->elts[pc + 2].string,
case STRUCTOP_PTR:
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (op == STRUCTOP_MEMBER)
arg1 = evaluate_subexp_for_address (exp, pos, noside);
else
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
return value_concat (arg1, arg2);
case BINOP_ASSIGN:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
/* Special-case assignments where the left-hand-side is a
convenience variable -- in these, don't bother setting an
expected type. This avoids a weird case where re-assigning a
string or array to an internal variable could error with "Too
many array elements". */
arg2 = evaluate_subexp (VALUE_LVAL (arg1) == lval_internalvar
- ? NULL_TYPE : value_type (arg1),
+ ? nullptr
+ : value_type (arg1),
exp, pos, noside);
if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
case BINOP_ASSIGN_MODIFY:
(*pos) += 2;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS)
return arg1;
case BINOP_BITWISE_AND:
case BINOP_BITWISE_IOR:
case BINOP_BITWISE_XOR:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
}
case BINOP_SUBSCRIPT:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (binop_user_defined_p (op, arg1, arg2))
}
case BINOP_LOGICAL_AND:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, noside);
return eval_skip_value (exp);
}
oldpos = *pos;
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ arg2 = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
*pos = oldpos;
if (binop_user_defined_p (op, arg1, arg2))
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
}
else
{
tem = value_logical_not (arg1);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
- (tem ? EVAL_SKIP : noside));
+ arg2
+ = evaluate_subexp (nullptr, exp, pos, (tem ? EVAL_SKIP : noside));
type = language_bool_type (exp->language_defn, exp->gdbarch);
return value_from_longest (type,
(LONGEST) (!tem && !value_logical_not (arg2)));
}
case BINOP_LOGICAL_OR:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, noside);
return eval_skip_value (exp);
}
oldpos = *pos;
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ arg2 = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
*pos = oldpos;
if (binop_user_defined_p (op, arg1, arg2))
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
return value_x_binop (arg1, arg2, op, OP_NULL, noside);
}
else
{
tem = value_logical_not (arg1);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
- (!tem ? EVAL_SKIP : noside));
+ arg2
+ = evaluate_subexp (nullptr, exp, pos, (!tem ? EVAL_SKIP : noside));
type = language_bool_type (exp->language_defn, exp->gdbarch);
return value_from_longest (type,
(LONGEST) (!tem || !value_logical_not (arg2)));
}
case BINOP_EQUAL:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_NOTEQUAL:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_LESS:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_GTR:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_GEQ:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_LEQ:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
}
case BINOP_REPEAT:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
type = check_typedef (value_type (arg2));
return value_repeat (arg1, longest_to_int (value_as_long (arg2)));
case BINOP_COMMA:
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
- return evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, noside);
+ return evaluate_subexp (nullptr, exp, pos, noside);
case UNOP_PLUS:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
}
case UNOP_NEG:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
case UNOP_COMPLEMENT:
/* C++: check for and handle destructor names. */
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (unop_user_defined_p (UNOP_COMPLEMENT, arg1))
}
case UNOP_LOGICAL_NOT:
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return eval_skip_value (exp);
if (unop_user_defined_p (op, arg1))
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
return eval_skip_value (exp);
}
else
case UNOP_SIZEOF:
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
return eval_skip_value (exp);
}
return evaluate_subexp_for_sizeof (exp, pos, noside);
case UNOP_ALIGNOF:
{
- type = value_type (evaluate_subexp (NULL_TYPE, exp, pos,
- EVAL_AVOID_SIDE_EFFECTS));
+ type = value_type (
+ evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS));
/* FIXME: This should be size_t. */
struct type *size_type = builtin_type (exp->gdbarch)->builtin_int;
ULONGEST align = type_align (type);
case OP_DECLTYPE:
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
return eval_skip_value (exp);
}
else if (noside == EVAL_AVOID_SIDE_EFFECTS)
enum exp_opcode sub_op = exp->elts[*pos].opcode;
struct value *result;
- result = evaluate_subexp (NULL_TYPE, exp, pos,
- EVAL_AVOID_SIDE_EFFECTS);
+ result = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
/* 'decltype' has special semantics for lvalues. */
if (op == OP_DECLTYPE
enum exp_opcode sub_op = exp->elts[*pos].opcode;
if (sub_op == OP_TYPE || sub_op == OP_DECLTYPE || sub_op == OP_TYPEOF)
- result = evaluate_subexp (NULL_TYPE, exp, pos,
- EVAL_AVOID_SIDE_EFFECTS);
+ result = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
else
- result = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ result = evaluate_subexp (nullptr, exp, pos, noside);
if (noside != EVAL_NORMAL)
return allocate_value (cplus_typeid_type (exp->gdbarch));
{
case UNOP_IND:
(*pos)++;
- x = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ x = evaluate_subexp (nullptr, exp, pos, noside);
/* We can't optimize out "&*" if there's a user-defined operator*. */
if (unop_user_defined_p (op, x))
case UNOP_MEMVAL:
(*pos) += 3;
return value_cast (lookup_pointer_type (exp->elts[pc + 1].type),
- evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ evaluate_subexp (nullptr, exp, pos, noside));
case UNOP_MEMVAL_TYPE:
{
struct type *type;
(*pos) += 1;
- x = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ x = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
type = value_type (x);
return value_cast (lookup_pointer_type (type),
- evaluate_subexp (NULL_TYPE, exp, pos, noside));
+ evaluate_subexp (nullptr, exp, pos, noside));
}
case OP_VAR_VALUE:
default:
default_case:
- x = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ x = evaluate_subexp (nullptr, exp, pos, noside);
default_case_after_eval:
if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
/* FALLTHROUGH */
default:
- return evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ return evaluate_subexp (nullptr, exp, pos, noside);
}
}
create a value unnecessarily. */
case UNOP_IND:
(*pos)++;
- val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ val = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
type = check_typedef (value_type (val));
if (type->code () != TYPE_CODE_PTR
&& !TYPE_IS_REFERENCE (type)
type = SYMBOL_TYPE (exp->elts[pc + 2].symbol);
if (is_dynamic_type (type))
{
- val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_NORMAL);
+ val = evaluate_subexp (nullptr, exp, pos, EVAL_NORMAL);
type = value_type (val);
if (type->code () == TYPE_CODE_ARRAY
&& is_dynamic_type (type->index_type ())
{
int npc = (*pos) + 1;
- val = evaluate_subexp (NULL_TYPE, exp, &npc, EVAL_AVOID_SIDE_EFFECTS);
+ val = evaluate_subexp (nullptr, exp, &npc, EVAL_AVOID_SIDE_EFFECTS);
type = check_typedef (value_type (val));
if (type->code () == TYPE_CODE_ARRAY)
{
is a variable length type. */
if (type->bounds ()->flag_bound_evaluated)
{
- val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_NORMAL);
+ val = evaluate_subexp (nullptr, exp, pos, EVAL_NORMAL);
return value_from_longest
(size_type, (LONGEST) TYPE_LENGTH (value_type (val)));
}
/* Fall through. */
default:
- val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
+ val = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
type = value_type (val);
break;
}
scalar-to-vector widening. */
case BINOP_ASSIGN:
(*pos)++;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type1 = value_type (arg1);
arg2 = evaluate_subexp (type1, exp, pos, noside);
case BINOP_GEQ:
case BINOP_LEQ:
(*pos)++;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
if (noside == EVAL_SKIP)
/* Handle the logical unary operator not(!). */
case UNOP_LOGICAL_NOT:
(*pos)++;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
return value_from_longest (builtin_type (exp->gdbarch)->
case BINOP_LOGICAL_AND:
case BINOP_LOGICAL_OR:
(*pos)++;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
if (noside == EVAL_SKIP)
{
- evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, noside);
return value_from_longest (builtin_type (exp->gdbarch)->
builtin_int, 1);
Therefore we evaluate it once using EVAL_AVOID_SIDE_EFFECTS. */
int oldpos = *pos;
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
- EVAL_AVOID_SIDE_EFFECTS);
+ arg2 = evaluate_subexp (nullptr, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
*pos = oldpos;
type1 = check_typedef (value_type (arg1));
type2 = check_typedef (value_type (arg2));
if ((type1->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type1))
|| (type2->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type2)))
{
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
return opencl_relop (exp, arg1, arg2, op);
}
if (op == BINOP_LOGICAL_OR)
tmp = !tmp;
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos,
- tmp ? EVAL_SKIP : noside);
+ arg2
+ = evaluate_subexp (nullptr, exp, pos, tmp ? EVAL_SKIP : noside);
type1 = language_bool_type (exp->language_defn, exp->gdbarch);
if (op == BINOP_LOGICAL_AND)
/* Handle the ternary selection operator. */
case TERNOP_COND:
(*pos)++;
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type1 = check_typedef (value_type (arg1));
if (type1->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type1))
{
int t2_is_vec, t3_is_vec, i;
LONGEST lowb1, lowb2, lowb3, highb1, highb2, highb3;
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
+ arg3 = evaluate_subexp (nullptr, exp, pos, noside);
type2 = check_typedef (value_type (arg2));
type3 = check_typedef (value_type (arg3));
t2_is_vec
if (value_logical_not (arg1))
{
/* Skip the second operand. */
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
- return evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ return evaluate_subexp (nullptr, exp, pos, noside);
}
else
{
/* Skip the third operand. */
- arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
- evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+ arg2 = evaluate_subexp (nullptr, exp, pos, noside);
+ evaluate_subexp (nullptr, exp, pos, EVAL_SKIP);
return arg2;
}
int tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
- arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+ arg1 = evaluate_subexp (nullptr, exp, pos, noside);
type1 = check_typedef (value_type (arg1));
if (noside == EVAL_SKIP)