Author: Jonas Devlieghere Date: 2025-05-19T18:37:49-07:00 New Revision: df0358f36b69689b8d502efd08cb8422cf170600
URL: https://github.com/llvm/llvm-project/commit/df0358f36b69689b8d502efd08cb8422cf170600 DIFF: https://github.com/llvm/llvm-project/commit/df0358f36b69689b8d502efd08cb8422cf170600.diff LOG: [lldb-dap] Remove spurious move (NFC) (#140641) getArgumentsIfRequest is returning a local variable by value. Using std::move is not needed and may inhibit copy elision. Also fixes the braces around a single-line if. Added: Modified: lldb/tools/lldb-dap/DAP.cpp Removed: ################################################################################ diff --git a/lldb/tools/lldb-dap/DAP.cpp b/lldb/tools/lldb-dap/DAP.cpp index af7a04a215fec..3419b2c3a841b 100644 --- a/lldb/tools/lldb-dap/DAP.cpp +++ b/lldb/tools/lldb-dap/DAP.cpp @@ -873,11 +873,10 @@ static std::optional<T> getArgumentsIfRequest(const Message &pm, T args; llvm::json::Path::Root root; - if (!fromJSON(req->arguments, args, root)) { + if (!fromJSON(req->arguments, args, root)) return std::nullopt; - } - return std::move(args); + return args; } llvm::Error DAP::Loop() { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits