[llvm] r217830 - [Support] add decodeSLEB128()

Reid Kleckner rnk at google.com
Wed Sep 17 13:14:17 PDT 2014


On Wed, Sep 17, 2014 at 11:33 AM, Alexey Samsonov <vonosmas at gmail.com>
wrote:
>
> On Mon, Sep 15, 2014 at 2:51 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>
>> +    Value |= (-1LL) << Shift;
>>
>
> ^^
> UBSan marks left shifts of negative values as undefined behavior. I've
> changed this to -1ULL in r217974.
>

Is -1ULL really an unsigned integer literal? I thought you had to use
something like ~0ULL if you want an unsigned all ones literal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140917/cefb604b/attachment.html>


More information about the llvm-commits mailing list