mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Enum attributes would be overwritten by enum value attributes.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
- Temp allocator overwrites data when doing reset on extra allocated pages. #1462
|
||||
- User defined attributes could not have more than 1 parameter due to bug.
|
||||
- Folding a constant array of structs at compile time would cause an assert.
|
||||
- Enum attributes would be overwritten by enum value attributes.
|
||||
|
||||
### Stdlib changes
|
||||
- Additional init functions for hashmap.
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -59,5 +59,5 @@ fn void main()
|
||||
@test.BAZ2 = local_unnamed_addr constant i32 2, align 4
|
||||
@test.ABC = local_unnamed_addr constant [1 x %TestUnion] [%TestUnion { i32 112 }], align 4
|
||||
@test.BCD = local_unnamed_addr constant %TestUnion { i32 112 }, align 4
|
||||
@test.MY_VALUE_1 = local_unnamed_addr constant i32 -1, align 4
|
||||
@test.MY_VALUE_1 = local_unnamed_addr constant i32 32, align 4
|
||||
@test.MY_VALUE_2 = local_unnamed_addr constant i32 32, align 4
|
||||
|
||||
Reference in New Issue
Block a user