[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 00:02:05 PST 2024


================
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
     }
   }
 
+  // Number of digits in a group between separators
+  int Grouping = 4;
----------------
tbaederr wrote:

```suggestion
  unsigned Grouping = (Radix == 8 || Radix == 10) ? 3 : 4;
```

https://github.com/llvm/llvm-project/pull/80939


More information about the cfe-commits mailing list