mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
Drop eval_is_type checks before calling eval_is_function_type.
This isn't needed after https://forge.sourceware.org/marek/gcc/commit/34293549c7c3 because it is process_metafunction which throws for is_function_type, not eval_is_function_type, and the latter just returns boolean_false_node if the argument is not a type.
This commit is contained in:
committed by
Marek Polacek
parent
16a7a7dd28
commit
29c610e1df
@@ -2778,8 +2778,7 @@ eval_is_noexcept (tree r)
|
||||
return boolean_false_node;
|
||||
}
|
||||
|
||||
if (eval_is_type (r) == boolean_true_node
|
||||
&& eval_is_function_type (r) == boolean_true_node
|
||||
if (eval_is_function_type (r) == boolean_true_node
|
||||
&& TYPE_NOTHROW_P (r))
|
||||
return boolean_true_node;
|
||||
|
||||
@@ -3033,8 +3032,7 @@ eval_parameters_of (location_t loc, const constexpr_ctx *ctx, tree r,
|
||||
bool *non_constant_p, tree *jump_target, tree fun)
|
||||
{
|
||||
if (eval_is_function (r) != boolean_true_node
|
||||
&& (eval_is_type (r) != boolean_true_node
|
||||
|| eval_is_function_type (r) != boolean_true_node))
|
||||
&& eval_is_function_type (r) != boolean_true_node)
|
||||
return throw_exception_nofn (loc, ctx, fun, non_constant_p, jump_target);
|
||||
|
||||
r = maybe_get_reflection_fndecl (r);
|
||||
@@ -3084,8 +3082,7 @@ eval_return_type_of (location_t loc, const constexpr_ctx *ctx, tree r,
|
||||
tree fun)
|
||||
{
|
||||
if ((eval_is_function (r) != boolean_true_node || !has_type (r, kind))
|
||||
&& (eval_is_type (r) != boolean_true_node
|
||||
|| eval_is_function_type (r) != boolean_true_node))
|
||||
&& eval_is_function_type (r) != boolean_true_node)
|
||||
return throw_exception_nofn (loc, ctx, fun, non_constant_p, jump_target);
|
||||
|
||||
r = MAYBE_BASELINK_FUNCTIONS (r);
|
||||
|
||||
Reference in New Issue
Block a user