[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 03:32:45 PDT 2024
================
@@ -6229,7 +6231,37 @@ static ExprResult BuildConvertedConstantExpression(Sema &S, Expr *From,
if (Result.isInvalid())
return Result;
- // Check for a narrowing implicit conversion.
+ if (SCS->Second == ICK_Floating_Conversion) {
----------------
Sirraide wrote:
Right, there’s a difference between ‘can be represented in the range of’ and ‘can be represented exactly’, that makes sense. I missed that somehow.
https://github.com/llvm/llvm-project/pull/90387
More information about the cfe-commits
mailing list