[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 19 10:39:01 PDT 2016


> On Oct 19, 2016, at 10:38 AM, Jim Ingham via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> 
>> On Oct 19, 2016, at 6:35 AM, Pavel Labath via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>> 
>> 
>> ================
>> Comment at: source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp:110
>> +  if (name == ConstString("ptr") || name == ConstString("pointer")) return 2;
>> +  return UINT32_MAX;
>> +}
>> ----------------
>> ~0 ?
>> 
> 
> Everywhere else in lldb where we use the maximum of the size returned to mean some error condition, we use UINT32_MAX.  I actually think that's clearer, and looks similar to places where we have other illegal value defines, whereas this just looks like some odd computation.  I don't think this is a good change, and certainly not done in just one place.

To be pedantic:

UINT32_MAX -> <WHATEVER_SIZE>_MAX...

Jim

> 
> Jim
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list