Fix bitwise not for signed integers

This commit is contained in:
gingerBill
2018-06-15 23:01:12 +01:00
parent cd7e260f4e
commit ba776a3c9f
2 changed files with 5 additions and 3 deletions

View File

@@ -1465,7 +1465,7 @@ void check_unary_expr(CheckerContext *c, Operand *o, Token op, AstNode *node) {
return;
}
o->value = exact_unary_operator_value(op.kind, o->value, precision);
o->value = exact_unary_operator_value(op.kind, o->value, precision, is_type_unsigned(type));
if (is_type_typed(type)) {
if (node != nullptr) {