[Lldb-commits] [PATCH] D129490: [lldb/libc++] Simplify the libc++ string formatter

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 11 13:44:04 PDT 2022


mib accepted this revision.
mib added a comment.
This revision is now accepted and ready to land.

This is great! Thanks for taking care of this! LGTM!



================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp:609
   } else {
-    ValueObjectSP size_mode(dataval_sp->GetChildAtIndexPath({1, 0, 0}));
-    if (!size_mode)
+    if (ValueObjectSP size_mode = short_sp->GetChildMemberWithName(
+            ConstString("__size_"), /*can_create=*/true)) {
----------------
Nit: In the if statement it's called `size_mode` but it the other branch (line `603`) it's called `size_member`. Would be nice to make it more consistent.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129490



More information about the lldb-commits mailing list