[clang] 42ec740 - [clang][ExprConstant] Remove an outdated TODO comment (#111959)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 11 02:36:59 PDT 2024
Author: Timm Baeder
Date: 2024-10-11T11:36:55+02:00
New Revision: 42ec740d0347a89b656c9be5ac4a7e4d8bcd30d5
URL: https://github.com/llvm/llvm-project/commit/42ec740d0347a89b656c9be5ac4a7e4d8bcd30d5
DIFF: https://github.com/llvm/llvm-project/commit/42ec740d0347a89b656c9be5ac4a7e4d8bcd30d5.diff
LOG: [clang][ExprConstant] Remove an outdated TODO comment (#111959)
Seems like passing the quantities directly seems to work fine.
Added:
Modified:
clang/lib/AST/ExprConstant.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 4d5af96093cfeb..06e653f96d6de1 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -9768,11 +9768,8 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
if (BaseAlignment < Align) {
Result.Designator.setInvalid();
- // FIXME: Add support to Diagnostic for long / long long.
- CCEDiag(E->getArg(0),
- diag::note_constexpr_baa_insufficient_alignment) << 0
- << (unsigned)BaseAlignment.getQuantity()
- << (unsigned)Align.getQuantity();
+ CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment)
+ << 0 << BaseAlignment.getQuantity() << Align.getQuantity();
return false;
}
}
@@ -9783,11 +9780,11 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
(OffsetResult.Base
? CCEDiag(E->getArg(0),
- diag::note_constexpr_baa_insufficient_alignment) << 1
+ diag::note_constexpr_baa_insufficient_alignment)
+ << 1
: CCEDiag(E->getArg(0),
diag::note_constexpr_baa_value_insufficient_alignment))
- << (int)OffsetResult.Offset.getQuantity()
- << (unsigned)Align.getQuantity();
+ << OffsetResult.Offset.getQuantity() << Align.getQuantity();
return false;
}
More information about the cfe-commits
mailing list