[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

Erich Keane via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 06:48:03 PDT 2025


================
@@ -2278,8 +2285,28 @@ void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
     }
   } else {
     int Pos = 0;
+    // The value of cutOffSize is not special, it is just a number of
+    // characters that gives us enough info without losing readability.
+    constexpr int cutOffSize = 20;
----------------
erichkeane wrote:

Should this be an argument?  

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


More information about the llvm-commits mailing list