[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 04:46:09 PST 2024
================
@@ -2223,9 +2227,14 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
++Prefix;
};
+ int Pos = 0;
while (N) {
+ if (insertSeparators && Pos % Grouping == 0 && Pos > 0) {
+ *--BufPtr = '\'';
+ }
----------------
AaronBallman wrote:
```suggestion
if (insertSeparators && Pos % Grouping == 0 && Pos > 0)
*--BufPtr = '\'';
```
Our coding style guideline is rather unintuitive in that it requires leaving braces off single-line substatements like this.
https://github.com/llvm/llvm-project/pull/80939
More information about the llvm-commits
mailing list