[clang] [clang] Format bitfield width diagnostics with thousands-separators (PR #117763)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 06:33:48 PST 2024
AaronBallman wrote:
> > Wondering if we should have a toString() version that does this automatically,
>
> Yes, I think either a `toStringWithDigitSeparators` function, or an overload taking an enum rather than a whole bunch of bool would improve this code a lot.
Should we come up with a new format specifier for the diagnostics engine so that the author of the diagnostic can opt in to the additional formatting? My concern with doing this in general is that some numbers really don't need/want the separators so it seems like an opt-in would be better and if we make the opt-in via the diagnostic string itself, nobody has to do anything special to emit the diagnostic.
https://github.com/llvm/llvm-project/pull/117763
More information about the cfe-commits
mailing list