[PATCH] D59712: [APSInt][OpenMP] Fix isNegative, etc. for unsigned types
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 16 13:23:01 PDT 2019
jdenny marked an inline comment as done.
jdenny added inline comments.
Comment at: llvm/unittests/ADT/APSIntTest.cpp:188-194
> I do not understand.
> `0x7f` is 127, it is obviously a maximal positive 8-bit value.
> but `0x80` is 128 aka -128, is it not minimal negative 8-bit value?
> Is the test correct?
This test checks that unsigned types are never seen as negative, so it's checking values that would be negative if the type were signed.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits