Skip to content

Commit f7ae8d6

Browse files
committed
Use new check for some missed cases in SemaChecking.cpp
1 parent 11e7cb8 commit f7ae8d6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14880,14 +14880,12 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
1488014880

1488114881
// Diag message shows element size in bits and in "bytes" (platform-
1488214882
// dependent CharUnits)
14883-
DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
14884-
PDiag(DiagID)
14885-
<< index << AddrBits
14886-
<< (unsigned)ASTC.toBits(*ElemCharUnits)
14887-
<< toString(ElemBytes, 10, false)
14888-
<< toString(MaxElems, 10, false)
14889-
<< (unsigned)MaxElems.getLimitedValue(~0U)
14890-
<< IndexExpr->getSourceRange());
14883+
DiagRuntimeBehavior(
14884+
BaseExpr->getBeginLoc(), BaseExpr,
14885+
PDiag(DiagID) << index << AddrBits
14886+
<< (unsigned)ASTC.toBits(*ElemCharUnits) << ElemBytes
14887+
<< MaxElems << (unsigned)MaxElems.getLimitedValue(~0U)
14888+
<< IndexExpr->getSourceRange());
1489114889

1489214890
const NamedDecl *ND = nullptr;
1489314891
// Try harder to find a NamedDecl to point at in the note.

0 commit comments

Comments
 (0)