[clang] [Clang] [NFC] Add "human" diagnostic argument format (PR #115835)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 02:25:57 PST 2024
================
@@ -315,6 +315,18 @@ Description:
than ``1`` are not supported. This formatter is currently hard-coded to use
English ordinals.
+**"human" format**
+
+Example:
+ ``"total size is %human0 bytes"``
+Class:
+ Integers
+Description:
+ This is a formatter which represents the argument number in a human readable
+ format: the value ``123`` stays ``123``, ``12345`` becomes ``12.34k``,
+ ``6666666` becomes ``6.67M``, and so on for 'G' and 'T'. Values less than
+ ``0`` are not supported.
----------------
Sirraide wrote:
> Values less than ``0`` are not supported.
Are they really not? With how everything is set up a the moment, wouldn’t e.g. `-10000` just become `-10k`, which is fine imo?
https://github.com/llvm/llvm-project/pull/115835
More information about the cfe-commits
mailing list