vkd3d-shader/hlsl: Remove some unnecessary YYABORTs from the func_prototype_no_attrs rule.

This commit is contained in:
Zebediah Figura 2022-11-10 19:18:52 -06:00 committed by Alexandre Julliard
parent 13c8e8b856
commit 6c2472ce16
Notes: Alexandre Julliard 2023-01-19 22:45:50 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/63

View File

@ -3967,11 +3967,8 @@ func_prototype_no_attrs:
struct hlsl_type *type; struct hlsl_type *type;
if (modifiers & ~HLSL_MODIFIERS_MAJORITY_MASK) if (modifiers & ~HLSL_MODIFIERS_MAJORITY_MASK)
{
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER, hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
"Only majority modifiers are allowed on functions."); "Only majority modifiers are allowed on functions.");
YYABORT;
}
if (!(type = apply_type_modifiers(ctx, $2, &modifiers, @1))) if (!(type = apply_type_modifiers(ctx, $2, &modifiers, @1)))
YYABORT; YYABORT;
if ((var = hlsl_get_var(ctx->globals, $3))) if ((var = hlsl_get_var(ctx->globals, $3)))
@ -3980,7 +3977,6 @@ func_prototype_no_attrs:
"\"%s\" is already declared as a variable.", $3); "\"%s\" is already declared as a variable.", $3);
hlsl_note(ctx, &var->loc, VKD3D_SHADER_LOG_ERROR, hlsl_note(ctx, &var->loc, VKD3D_SHADER_LOG_ERROR,
"\"%s\" was previously declared here.", $3); "\"%s\" was previously declared here.", $3);
YYABORT;
} }
if (hlsl_types_are_equal(type, ctx->builtin_types.Void) && $7.semantic.name) if (hlsl_types_are_equal(type, ctx->builtin_types.Void) && $7.semantic.name)
{ {