chore: Enable clang-tidy bugprone-pointer-arithmetic-on-polymorphic-object check (#6469)

This commit is contained in:
Alex Kremer
2026-03-09 18:36:56 +00:00
committed by GitHub
parent 0335076359
commit e284969ae4
2 changed files with 15 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ Checks: "-*,
bugprone-no-escape,
bugprone-non-zero-enum-to-bool-conversion,
bugprone-parent-virtual-call,
bugprone-pointer-arithmetic-on-polymorphic-object,
bugprone-posix-return,
bugprone-redundant-branch-condition,
bugprone-return-const-ref-from-parameter,
@@ -95,7 +96,6 @@ Checks: "-*,
# bugprone-move-forwarding-reference,
# bugprone-switch-missing-default-case,
# bugprone-suspicious-stringview-data-usage,
# bugprone-pointer-arithmetic-on-polymorphic-object,
# bugprone-optional-value-conversion,
# bugprone-too-small-loop-variable,
# bugprone-unused-return-value,

View File

@@ -868,7 +868,13 @@ applyClaimAttestations(
XChainClaimAttestations curAtts{sleClaimID->getFieldArray(sfXChainClaimAttestations)};
auto const newAttResult = onNewAttestations(
curAtts, view, &atts[0], &atts[0] + atts.size(), quorum, signersList, j);
curAtts,
view,
&atts[0],
&atts[0] + atts.size(), // NOLINT(bugprone-pointer-arithmetic-on-polymorphic-object)
quorum,
signersList,
j);
// update the claim id
sleClaimID->setFieldArray(sfXChainClaimAttestations, curAtts.toSTArray());
@@ -1026,7 +1032,13 @@ applyCreateAccountAttestations(
}();
auto const newAttResult = onNewAttestations(
curAtts, view, &atts[0], &atts[0] + atts.size(), quorum, signersList, j);
curAtts,
view,
&atts[0],
&atts[0] + atts.size(), // NOLINT(bugprone-pointer-arithmetic-on-polymorphic-object)
quorum,
signersList,
j);
if (!createCID)
{