Write isUInt using template specializations to work around an incorrect MSVC warning.
authorJustin Lebar <jlebar@google.com>
Mon, 18 Jul 2016 20:40:35 +0000 (20:40 +0000)
committerJustin Lebar <jlebar@google.com>
Mon, 18 Jul 2016 20:40:35 +0000 (20:40 +0000)
commit413358450445619ef514ab9e94374dbd8fd6c3e3
tree6c540a354b99011d6a30ec844e23489320ad56de
parentdbf44f501624b610797bf411d6aa4e76fb0c9db8
Write isUInt using template specializations to work around an incorrect MSVC warning.

Summary:
Per D22441, MSVC warns on our old implementation of isUInt<64>.  It sees
uint64_t(1) << 64 and doesn't realize that it's not going to be
executed.  Writing as a template specialization is ugly, but prevents
the warning.

Reviewers: RKSimon

Subscribers: majnemer, llvm-commits

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

llvm-svn: 275909
llvm/include/llvm/Support/MathExtras.h