=?utf-8?q?“Nhat?= <nhat7...@gmail.com>, =?utf-8?q?“Nhat?= <nhat7...@gmail.com>, =?utf-8?q?“Nhat?= <nhat7...@gmail.com>, =?utf-8?q?“Nhat?= <nhat7...@gmail.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/75...@github.com>
================ @@ -17132,6 +17132,10 @@ static bool ConvertAPValueToString(const APValue &V, QualType T, case BuiltinType::WChar_U: { unsigned TyWidth = Context.getIntWidth(T); assert(8 <= TyWidth && TyWidth <= 32 && "Unexpected integer width"); + if (V.getInt() > std::numeric_limits<uint64_t>::max() || ---------------- ShamrockLee wrote: Besides, as @tbaederr and @shafik suggest, printing the hexadecimal representation of the integer is better than avoid printing it. This would be something like. ```c if (V.getInt() > std::numeric_limits<uint64_t>::max() || V.getInt() < std::numeric_limits<int64_t>::min()) { // Code to print the hexadecimal expression } else { V.getInt().toString(Str); } ``` https://github.com/llvm/llvm-project/pull/75902 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits