[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
================
@@ -2257,17 +2266,27 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
unsigned ShiftAmt = (Radix == 16 ? 4 : (Radix == 8 ? 3 : 1));
unsigned MaskAmt = Radix - 1;
+ int Pos = 0;
while (Tmp.getBoolValue()) {
unsigned Digit = unsigned(Tmp.getRawData()[0]) & MaskAmt;
+ if (insertSeparators && Pos % Grouping == 0 && Pos > 0) {
+ Str.push_back('\'');
+ }
----------------
AaronBallman wrote:
Same here as above
https://github.com/llvm/llvm-project/pull/80939
More information about the llvm-commits
mailing list