This revision was automatically updated to reflect the committed changes.
Closed by commit rGfffd70291e12: [LLDB] Replacing use of ul suffix in
GetMaxU64Bitfield since it not guarenteed… (authored by shafik).
Herald added a project: LLDB.
Changed prior to commit:
shafik added inline comments.
Comment at: lldb/source/Utility/DataExtractor.cpp:595
+ (bitfield_bit_size == 64
+ ? -static_cast(1)
+ : ((static_cast(1) << bitfield_bit_size) - 1));
teemperor wrote:
> How about
teemperor accepted this revision.
teemperor added a comment.
LGTM minus a small nitpick. Thanks!
Comment at: lldb/source/Utility/DataExtractor.cpp:595
+ (bitfield_bit_size == 64
+ ? -static_cast(1)
+ : ((static_cast(1) << bitfield_bit_size) - 1));
shafik created this revision.
shafik added reviewers: aprantl, teemperor, JDevlieghere.
`GetMaxU64Bitfield(...)` uses the `ul` suffix but we require a 64 bit unsigned
integer and `ul` could be 32 bit. So this replacing it with a explicit cast and
refactors the code around it to use an early