[clang] [Clang][Bytecode][NFC] Move Result into APSInt constructor (PR #153664)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 14 13:07:41 PDT 2025
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/153664
Static analysis flagged this line because we are copying Result instead of moving it.
>From 83777761389ca73e9c70731ef9dd8c7b0fac1f06 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour <shafik.yaghmour at intel.com>
Date: Thu, 14 Aug 2025 13:05:43 -0700
Subject: [PATCH] [Clang][Bytecode][NFC] Move Result into APSInt constructor
Static analysis flagged this line because we are copying Result instead of
moving it.
---
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 ee2d532551583..3c0dd8f901dc0 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -2285,7 +2285,7 @@ static bool interp__builtin_elementwise_sat(InterpState &S, CodePtr OpPC,
llvm_unreachable("Wrong builtin ID");
}
- pushInteger(S, APSInt(Result, !LHS.isSigned()), Call->getType());
+ pushInteger(S, APSInt(std::move(Result), !LHS.isSigned()), Call->getType());
return true;
}
More information about the cfe-commits
mailing list