[clang] [clang][ExprConstant] Remove an outdated TODO comment (PR #111959)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 11 00:34:25 PDT 2024
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/111959
Seems like passing the quantities directly seems to work fine.
>From b76af9501358a60b7aaa62c5710dab6c65168bca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Fri, 11 Oct 2024 09:33:13 +0200
Subject: [PATCH] [clang][ExprConstant] Remove an outdated TODO comment
Seems like passing the quantities directly seems to work fine.
---
clang/lib/AST/ExprConstant.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
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