Use DECL_VIRTUAL_P in eval_is_override

This commit is contained in:
Marek Polacek
2026-01-08 12:56:26 -05:00
parent a8a62bf3fc
commit b3ee2b522e

View File

@@ -1477,10 +1477,7 @@ eval_is_override (tree r)
{
r = maybe_get_reflection_fndecl (r);
if (TREE_CODE (r) == FUNCTION_DECL
&& DECL_CLASS_SCOPE_P (r)
&& !DECL_CONSTRUCTOR_P (r)
&& (IDENTIFIER_VIRTUAL_P (DECL_NAME (r))
|| DECL_CONV_FN_P (r))
&& (DECL_VIRTUAL_P (r) || DECL_CONV_FN_P (r))
&& !DECL_STATIC_FUNCTION_P (r)
&& is_override (DECL_CONTEXT (r), r))
return boolean_true_node;