mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
Fix TODO in eval_object_of
This commit is contained in:
@@ -2619,14 +2619,14 @@ maybe_get_reference_referent (tree r)
|
||||
|
||||
static tree
|
||||
eval_object_of (location_t loc, const constexpr_ctx *ctx, tree r,
|
||||
reflect_kind kind, bool *non_constant_p, tree *jump_target,
|
||||
tree fun)
|
||||
reflect_kind kind, bool *non_constant_p, bool *overflow_p,
|
||||
tree *jump_target, tree fun)
|
||||
{
|
||||
tree orig = r;
|
||||
if (TYPE_REF_P (TREE_TYPE (r)))
|
||||
r = DECL_INITIAL (r);
|
||||
r = cxx_eval_constant_expression (ctx, r, vc_prvalue, non_constant_p,
|
||||
overflow_p, jump_target);
|
||||
r = maybe_get_reference_referent (r);
|
||||
// TODO check "usable in constant expressions"
|
||||
if (eval_has_static_storage_duration (orig, kind) == boolean_false_node
|
||||
&& (orig == r
|
||||
|| eval_has_static_storage_duration (r, kind) == boolean_false_node))
|
||||
@@ -7466,8 +7466,8 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call,
|
||||
case METAFN_TYPE_OF:
|
||||
return eval_type_of (loc, ctx, h, kind, non_constant_p, jump_target, fun);
|
||||
case METAFN_OBJECT_OF:
|
||||
return eval_object_of (loc, ctx, h, kind, non_constant_p, jump_target,
|
||||
fun);
|
||||
return eval_object_of (loc, ctx, h, kind, non_constant_p, overflow_p,
|
||||
jump_target, fun);
|
||||
case METAFN_CONSTANT_OF:
|
||||
return eval_constant_of (loc, ctx, h, kind, non_constant_p, overflow_p,
|
||||
jump_target, fun);
|
||||
|
||||
Reference in New Issue
Block a user