]> granicus.if.org Git - clang/commit
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
authorZachary Turner <zturner@google.com>
Thu, 14 Dec 2017 22:07:03 +0000 (22:07 +0000)
committerZachary Turner <zturner@google.com>
Thu, 14 Dec 2017 22:07:03 +0000 (22:07 +0000)
commitc0bbfc6da1c653acfd2c047bb1f334cef3a14ad5
tree55e8106fc6c96b2a4edb550a44d3d79c237a2921
parent2e8732d1c668d518d3799a141051f7b8db0b5f74
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.

Most of the -Wsign-compare warnings are due to the fact that
enums are signed by default in the MS ABI, while the
tautological comparison warnings trigger on x86 builds where
sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max()
is always false.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320750 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp