Fix 32-bit build

Bug: oss-fuzz:51844
Change-Id: I7e6583c67ffa72659e00b5c8a4b692b44fe92a57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104642
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano 2022-10-05 18:25:22 +00:00 committed by Dawn LUCI CQ
parent 8fd4ef26f5
commit 7aaf23eac9
1 changed files with 1 additions and 1 deletions

View File

@ -1460,7 +1460,7 @@ ConstEval::Result ConstEval::OpShiftLeft(const sem::Type* ty,
// Check sign change only if e2 is less than bit width of e1. If e1 is larger
// than bit width, we check for non-representable value below.
if (e2u < bit_width) {
size_t must_match_msb = e2u + 1;
UT must_match_msb = e2u + 1;
UT mask = ~UT{0} << (bit_width - must_match_msb);
if ((e1u & mask) != 0 && (e1u & mask) != mask) {
AddError("shift left operation results in sign change", source);