Let -vet ignore intentional declaration shadowing #637

This commit is contained in:
gingerBill
2020-05-12 10:31:49 +01:00
parent d49ecd9009
commit fcdfcfce19
3 changed files with 27 additions and 7 deletions

View File

@@ -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);