@@ -14882,7 +14882,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
14882
14882
// dependent CharUnits)
14883
14883
DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
14884
14884
PDiag(DiagID)
14885
- << toString( index, 10, true) << AddrBits
14885
+ << index << AddrBits
14886
14886
<< (unsigned)ASTC.toBits(*ElemCharUnits)
14887
14887
<< toString(ElemBytes, 10, false)
14888
14888
<< toString(MaxElems, 10, false)
@@ -14970,10 +14970,10 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
14970
14970
unsigned CastMsg = (!ASE || BaseType == EffectiveType) ? 0 : 1;
14971
14971
QualType CastMsgTy = ASE ? ASE->getLHS()->getType() : QualType();
14972
14972
14973
- DiagRuntimeBehavior(
14974
- BaseExpr->getBeginLoc(), BaseExpr,
14975
- PDiag(DiagID) << toString( index, 10, true) << ArrayTy->desugar()
14976
- << CastMsg << CastMsgTy << IndexExpr->getSourceRange());
14973
+ DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
14974
+ PDiag(DiagID)
14975
+ << index << ArrayTy->desugar() << CastMsg
14976
+ << CastMsgTy << IndexExpr->getSourceRange());
14977
14977
} else {
14978
14978
unsigned DiagID = diag::warn_array_index_precedes_bounds;
14979
14979
if (!ASE) {
@@ -14982,8 +14982,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
14982
14982
}
14983
14983
14984
14984
DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
14985
- PDiag(DiagID) << toString(index, 10, true)
14986
- << IndexExpr->getSourceRange());
14985
+ PDiag(DiagID) << index << IndexExpr->getSourceRange());
14987
14986
}
14988
14987
14989
14988
const NamedDecl *ND = nullptr;
0 commit comments