[clang] [Clang] [NFC] Add "human" diagnostic argument format (PR #115835)
Boaz Brickner via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 04:30:49 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.
----------------
bricknerb wrote:
Added support for negative numbers.
https://github.com/llvm/llvm-project/pull/115835
More information about the cfe-commits
mailing list