[Lldb-commits] [lldb] r362570 - Fix -Wsign-compare by explicit cast after r362557

Shafik Yaghmour via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 5 12:39:01 PDT 2019


Apologies, I somehow missed the offset < 0.

> On Jun 5, 2019, at 12:38 PM, Pavel Labath <pavel at labath.sk> wrote:
> 
> On 05/06/2019 21:23, Shafik Yaghmour via lldb-commits wrote:
>> abs(offset) is not the same as addr_t(-offset)
> 
> It is, if you assume that offset is negative, which is what this code is doing:
> 
>>> if (offset < 0 && addr_t(-offset) > current_func_text_offset)
> 
> So, we will only ever convert -offset into an addr_t if offset is negative (i.e. -offset is positive).



More information about the lldb-commits mailing list