ast: swap range regardless of range_left >= 0

This commit is contained in:
Eddie Hung 2020-05-04 12:18:20 -07:00
parent 2e911bc806
commit e936ac61ea
1 changed files with 1 additions and 1 deletions

View File

@ -1079,7 +1079,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
}
if (old_range_valid != range_valid)
did_something = true;
if (range_valid && range_left >= 0 && range_right > range_left) {
if (range_valid && range_right > range_left) {
int tmp = range_right;
range_right = range_left;
range_left = tmp;