diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-12 10:31:49 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-12 10:31:49 +0100 |
| commit | fcdfcfce19bff98a3dbfa4b8f960d7bcd64679aa (patch) | |
| tree | e6866601f15b6138a4e338a5f6acaa94c69cf7df /src/check_decl.cpp | |
| parent | d49ecd9009c25279adc25adce064bdd072557c74 (diff) | |
Let -vet ignore intentional declaration shadowing #637
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 809ccbc9b..69e7c563e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -40,6 +40,10 @@ Type *check_init_variable(CheckerContext *ctx, Entity *e, Operand *operand, Stri return nullptr; } + if (e->kind == Entity_Variable) { + e->Variable.init_expr = operand->expr; + } + if (operand->mode == Addressing_Type) { if (e->type != nullptr && is_type_typeid(e->type)) { add_type_info_type(ctx, operand->type); |