================ @@ -17575,7 +17576,21 @@ static bool ConvertAPValueToString(const APValue &V, QualType T, break; } } - V.getInt().toString(Str); + + llvm::APSInt vInt = V.getInt(); + if (llvm::APSInt::compareValues( + vInt, llvm::APSInt::getUnsigned( + std::numeric_limits<uint64_t>::max())) >= 0 || + vInt < std::numeric_limits<int64_t>::min()) { + // The value of cutSize is not special, it is just a number of + // characters that gives us enough info without losing readability + const int cutSize = 20; + vInt.toString(Str, 16); + Str.erase(Str.begin() + cutSize, Str.end() - cutSize); ---------------- maramatias wrote:
I like the idea of keeping the decimals. I think it avoids the weirdness happening in the enum test, which I think might have been caused by some characters getting cut in half. Working on it https://github.com/llvm/llvm-project/pull/145053 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits