[Lldb-commits] [PATCH] D80990: [lldb] Fix sizeof() in Scalar::operator=()

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 2 04:58:37 PDT 2020


labath added a comment.

The fix looks obviously correct, but could you please also add a unit test for this. I guess this would manifest itself as the inability to roundtrip e.g. `std::numeric_limits<long long>::max()` to a Scalar and back.

It's not required, but if you're interested, it would be nice to change all of these assignment operators to do `return *this = Scalar(v);`. That would remove this class of bugs (constructor/operator= inconsistencies) completely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80990/new/

https://reviews.llvm.org/D80990





More information about the lldb-commits mailing list