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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 5 12:38:06 PDT 2019

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 

>> 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