================
@@ -356,12 +356,10 @@ bool AddSubMulHelper(InterpState &S, CodePtr OpPC,
unsigned Bits, const T &LHS,
if (S.checkingForUndefinedBehavior()) {
const Expr *E = S.Current->getExpr(OpPC);
QualType Type = E->getType();
- SmallString<32> Trunc;
- Value.trunc(Result.bitWidth())
- .toString(Trunc, 10, Result.isSigned(), /*formatAsCLiteral=*/false,
- /*UpperCase=*/true, /*InsertSeparators=*/true);
S.report(E->getExprLoc(), diag::warn_integer_constant_overflow)
- << Trunc << Type << E->getSourceRange();
+ << formatDiagnosticInteger(Value.trunc(Result.bitWidth()),
+ Result.isSigned())
----------------
Sirraide wrote:
> outside of implementations of operator<<
As well as the two functions that format `int64_t`/`uint64_t` of course
https://github.com/llvm/llvm-project/pull/211785
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits