]>
git.ipfire.org Git - thirdparty/gcc.git/commit
c++/reflection: add assert to eval_type_trait
As discussed in
<https://gcc.gnu.org/pipermail/gcc-patches/2026-January/705756.html>.
Since we check eval_is_type in process_metafunction:
if (eval_is_type (ht) != boolean_true_node)
return throw_exception_nontype (loc, ctx, fun, non_constant_p,
jump_target);
finish_trait_expr should never return error_mark_node. We can ensure
that it's so by adding an assert.
gcc/cp/ChangeLog:
* reflect.cc (eval_type_trait): Assert that finish_trait_expr didn't
return error_mark_node.
Reviewed-by: Jason Merrill <jason@redhat.com>