[clang] [clang][bytecode][NFC] Avoid an APFloat copy (PR #215543)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 05:39:38 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/215543
None
>From bad76452009ceafef841620b1ed1c33502dfe038 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 11 Aug 2026 14:38:32 +0200
Subject: [PATCH] [clang][bytecode][NFC] Avoid an APFloat copy
---
clang/lib/AST/ByteCode/InterpBuiltin.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 0e81059a0f6cf..68fab67ebe848 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -202,7 +202,7 @@ static llvm::APSInt convertBoolVectorToInt(const Pointer &Val) {
// Strict double -> float conversion used for X86 PD2PS/cvtsd2ss intrinsics.
// Reject NaN/Inf/Subnormal inputs and any lossy/inexact conversions.
-static bool convertDoubleToFloatStrict(APFloat Src, Floating &Dst,
+static bool convertDoubleToFloatStrict(const APFloat &Src, Floating &Dst,
InterpState &S, const Expr *DiagExpr) {
if (Src.isInfinity()) {
if (S.diagnosing())
More information about the cfe-commits
mailing list