Fix compiler warning with shift of negative value.

It seems newer versions of gcc complain about undefined behavior.

Fixes #28923.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2723233002 .
This commit is contained in:
Florian Schneider 2017-03-01 10:47:07 -08:00
parent cc7c61124b
commit 67c42c7d10

View file

@ -2348,7 +2348,7 @@ void Range::BitwiseOp(const Range* left_range,
*result_min = RangeBoundary::FromConstant(0);
} else {
*result_min =
RangeBoundary::FromConstant(static_cast<int64_t>(-1) << bitsize);
RangeBoundary::FromConstant(-(static_cast<int64_t>(1) << bitsize));
}
*result_max =