Skip to content

Commit 42ec740

Browse files
authored
[clang][ExprConstant] Remove an outdated TODO comment (#111959)
Seems like passing the quantities directly seems to work fine.
1 parent a440203 commit 42ec740

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9768,11 +9768,8 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
97689768

97699769
if (BaseAlignment < Align) {
97709770
Result.Designator.setInvalid();
9771-
// FIXME: Add support to Diagnostic for long / long long.
9772-
CCEDiag(E->getArg(0),
9773-
diag::note_constexpr_baa_insufficient_alignment) << 0
9774-
<< (unsigned)BaseAlignment.getQuantity()
9775-
<< (unsigned)Align.getQuantity();
9771+
CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment)
9772+
<< 0 << BaseAlignment.getQuantity() << Align.getQuantity();
97769773
return false;
97779774
}
97789775
}
@@ -9783,11 +9780,11 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
97839780

97849781
(OffsetResult.Base
97859782
? CCEDiag(E->getArg(0),
9786-
diag::note_constexpr_baa_insufficient_alignment) << 1
9783+
diag::note_constexpr_baa_insufficient_alignment)
9784+
<< 1
97879785
: CCEDiag(E->getArg(0),
97889786
diag::note_constexpr_baa_value_insufficient_alignment))
9789-
<< (int)OffsetResult.Offset.getQuantity()
9790-
<< (unsigned)Align.getQuantity();
9787+
<< OffsetResult.Offset.getQuantity() << Align.getQuantity();
97919788
return false;
97929789
}
97939790

0 commit comments

Comments
 (0)