diff options
| author | gingerBill <bill@gingerbill.org> | 2019-11-21 18:21:27 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-11-21 18:21:27 +0000 |
| commit | b74f8f204776c7cacc22fcbb44898ea496e02645 (patch) | |
| tree | 8146845327f3b7b11cbb9929ab2743a38834c32c /src/check_type.cpp | |
| parent | 88c90cf99a1d134bc7026fdc3b16181ebe7c76ba (diff) | |
Fix SOA entity usage error on `-vet`
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 6a3a000c7..fbe729280 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2781,6 +2781,7 @@ Type *make_soa_struct_slice(CheckerContext *ctx, Ast *array_typ_expr, Ast *elem_ new_field->flags |= EntityFlag_SoaPtrField; soa_struct->Struct.fields[i] = new_field; add_entity(ctx->checker, scope, nullptr, new_field); + add_entity_use(ctx, nullptr, new_field); } else { soa_struct->Struct.fields[i] = old_field; } @@ -3056,6 +3057,7 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t Entity *new_field = alloc_entity_field(scope, old_field->token, array_type, false, old_field->Variable.field_src_index); soa_struct->Struct.fields[i] = new_field; add_entity(ctx->checker, scope, nullptr, new_field); + add_entity_use(ctx, nullptr, new_field); } else { soa_struct->Struct.fields[i] = old_field; } |