[Lldb-commits] [PATCH] D159127: [lldb][libc++] Adds chrono data formatters.

Mark de Wever via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 29 23:16:00 PDT 2023


Mordante added a comment.

In D159127#4626311 <https://reviews.llvm.org/D159127#4626311>, @kastiglione wrote:

> Thanks for doing this!
>
> Question to all: Should the summary string include the unit? lldb doesn't always show the type, so it could help comprehension if the unit is included. For example `60s` instead of `60`.

I was wondering about that too, but I wasn't sure whether that was wanted. If we do that what do you prefer for micro seconds us or µs. The latter uses Unicode. The C++ Standard allows both http://eel.is/c++draft/time.duration.io.



================
Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py:23
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd("type format clear", check=False)
----------------
aprantl wrote:
> You probably copied & pasted this — this is no longer needed since every test function is now running in its own instance.
I indeed copy-pasted the vector code; it's the first time I look at these formatters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159127



More information about the lldb-commits mailing list