[clang] [clang][bytecode][NFC] Avoid an APFloat copy (PR #215543)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 05:40:28 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/215543.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-1)
``````````diff
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())
``````````
</details>
https://github.com/llvm/llvm-project/pull/215543
More information about the cfe-commits
mailing list