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.yaghm...@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; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits