static tree cxx_eval_constant_expression (const constexpr_ctx *, tree,
value_cat, bool *, bool *, tree * = NULL);
-static tree cxx_fold_indirect_ref (const constexpr_ctx *, location_t, tree, tree,
- bool * = NULL);
static tree find_heap_var_refs (tree *, int *, void *);
/* Attempt to evaluate T which represents a call to a builtin function.
At this point it has already been evaluated in the call
to cxx_bind_parameters_in_call. */
new_obj = TREE_VEC_ELT (new_call.bindings, 0);
- new_obj = cxx_fold_indirect_ref (ctx, loc, DECL_CONTEXT (fun), new_obj);
+ STRIP_NOPS (new_obj);
+ if (TREE_CODE (new_obj) == ADDR_EXPR)
+ new_obj = TREE_OPERAND (new_obj, 0);
if (ctx->call && ctx->call->fundef
&& DECL_CONSTRUCTOR_P (ctx->call->fundef->decl))
&& CLASS_TYPE_P (optype)
&& DERIVED_FROM_P (type, optype))
{
- if (empty_base)
- *empty_base = true;
+ *empty_base = true;
return op;
}
}
static tree
cxx_fold_indirect_ref (const constexpr_ctx *ctx, location_t loc, tree type,
- tree op0, bool *empty_base /* = NULL*/)
+ tree op0, bool *empty_base)
{
tree sub = op0;
tree subtype;