Page MenuHomePhabricator

Fix many -Wsign-compare and -Wtautological-constant-compare warnings in clang-cl.
ClosedPublic

Authored by zturner on Dec 14 2017, 1:09 PM.

Details

Summary

The latter class of warnings triggers on x86 builds where size_t is 4 bytes, so x > numeric_limits<unsigned>::max() is always false. The former class of warnings mostly involves comparing enums to unsigned values, since enums are signed by default in the MSVC ABI.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Dec 14 2017, 1:09 PM
zturner retitled this revision from Find many -Wsign-compare and -Wtautological-constant-compare warnings in clang-cl. to Fix many -Wsign-compare and -Wtautological-constant-compare warnings in clang-cl..Dec 14 2017, 1:11 PM
rnk accepted this revision.Dec 14 2017, 1:32 PM

lgtm

This revision is now accepted and ready to land.Dec 14 2017, 1:32 PM
This revision was automatically updated to reflect the committed changes.