[clang] [Clang][Sema] Switch diagnostics from toString to operator<< for APSInt/APInt (PR #161474)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 1 06:57:47 PDT 2025


================
@@ -14882,7 +14882,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
       // dependent CharUnits)
       DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
                           PDiag(DiagID)
-                              << toString(index, 10, true) << AddrBits
+                              << index << AddrBits
                               << (unsigned)ASTC.toBits(*ElemCharUnits)
                               << toString(ElemBytes, 10, false)
----------------
tbaederr wrote:

But `index` is an `APSInt` :)

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


More information about the cfe-commits mailing list