This is an archive of the discontinued LLVM Phabricator instance.

Write isUInt using template specializations to work around an incorrect MSVC warning.
ClosedPublic

Authored by jlebar on Jul 18 2016, 1:13 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 64370.Jul 18 2016, 1:13 PM
jlebar retitled this revision from to Write isUInt using template specializations to work around an incorrect MSVC warning..
jlebar updated this object.
jlebar added a reviewer: RKSimon.
jlebar added subscribers: llvm-commits, majnemer.
majnemer accepted this revision.Jul 18 2016, 1:40 PM
majnemer added a reviewer: majnemer.

LGTM

This revision is now accepted and ready to land.Jul 18 2016, 1:40 PM
This revision was automatically updated to reflect the committed changes.