Skip to content

Commit 5552fa2

Browse files
committed
Do not truncate to 32-bit in streaming diagnostics
1 parent b01a001 commit 5552fa2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14880,12 +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(
14884-
BaseExpr->getBeginLoc(), BaseExpr,
14885-
PDiag(DiagID) << index << AddrBits
14886-
<< (unsigned)ASTC.toBits(*ElemCharUnits) << ElemBytes
14887-
<< MaxElems << (unsigned)MaxElems.getLimitedValue(~0U)
14888-
<< IndexExpr->getSourceRange());
14883+
DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr,
14884+
PDiag(DiagID) << index << AddrBits
14885+
<< (unsigned)ASTC.toBits(*ElemCharUnits)
14886+
<< ElemBytes << MaxElems
14887+
<< MaxElems.getZExtValue()
14888+
<< IndexExpr->getSourceRange());
1488914889

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

0 commit comments

Comments
 (0)