[clang] [Clang][Sema] Switch diagnostics from toString to operator<< for APSInt/APInt (PR #161474)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 06:54:44 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)
----------------
erichkeane wrote:
Oh shoot! Then you actually have to do something different on the `index` line above! Since now it is changing the signedness. IT probably needs to do the APSInt dance.
https://github.com/llvm/llvm-project/pull/161474
More information about the cfe-commits
mailing list