HomePhabricator

[ADT][Support] Fix C4146 error from MSVC

Authored by vinograd47 on Jan 15 2021, 2:32 PM.

Description

[ADT][Support] Fix C4146 error from MSVC

Unary minus operator applied to unsigned type, result still unsigned.

Use ~0U instead of -1U and 1 + ~VAL instead of -VAL.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94417

Details

Committed
dblaikieJan 15 2021, 2:34 PM
Reviewer
dblaikie
Differential Revision
D94417: [ADT][Support] Fix C4146 error from MSVC
Parents
rGaa8a2d8a3da3: [AArch64][GlobalISel] Select immediate fcmp if the zero is on the LHS.
Branches
Unknown
Tags
Unknown