[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:02 PDT 2025


================
@@ -2164,6 +2164,13 @@ void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) {
 void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix, bool Signed,
                      bool formatAsCLiteral, bool UpperCase,
                      bool InsertSeparators) const {
+  toStringTruncated(Str, Radix, Signed, false, formatAsCLiteral, UpperCase,
----------------
erichkeane wrote:

IS there ANY perf hit whatsoever for doing this?  We're doing quite a bit of work on what is perhaps a hot-ish path, can you run the compiler perf tester thing on this?  @Endilll knows how if you don't.

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


More information about the llvm-commits mailing list