Enum attributes would be overwritten by enum value attributes.

This commit is contained in:
Christoffer Lerno
2024-09-19 23:02:06 +02:00
parent ff36380ddf
commit 2fec1c83a4
3 changed files with 3 additions and 2 deletions

View File

@@ -1498,7 +1498,7 @@ static inline bool sema_analyse_enum(SemaContext *context, Decl *decl, bool *era
Decl *enum_value = enum_values[i];
bool erase_val = false;
if (!sema_analyse_attributes(context, decl, enum_value->attributes, ATTR_ENUM, &erase_val)) return decl_poison(decl);
if (!sema_analyse_attributes(context, enum_value, enum_value->attributes, ATTR_ENUM_VALUE, &erase_val)) return decl_poison(decl);
if (erase_val)
{