Fix typeid comparison bug; Add extra messages for pointer address errors

This commit is contained in:
gingerBill
2019-11-03 19:49:21 +00:00
parent 57853fe1b1
commit c1176c2bcb
3 changed files with 26 additions and 2 deletions

View File

@@ -1036,6 +1036,8 @@ void add_type_and_value(CheckerInfo *i, Ast *expr, AddressingMode mode, Type *ty
expr->tav.type = type;
if (mode == Addressing_Constant || mode == Addressing_Invalid) {
expr->tav.value = value;
} else if (mode == Addressing_Value && is_type_typeid(type)) {
expr->tav.value = value;
}
}