[Lldb-commits] [lldb] 4a0ba41 - [lldb] Fix pessimizing move warning
Benjamin Kramer via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 6 12:18:42 PDT 2021
Author: Benjamin Kramer
Date: 2021-09-06T21:17:29+02:00
New Revision: 4a0ba4180b3655aa39c68648c7a12ce9a1cec99a
URL: https://github.com/llvm/llvm-project/commit/4a0ba4180b3655aa39c68648c7a12ce9a1cec99a
DIFF: https://github.com/llvm/llvm-project/commit/4a0ba4180b3655aa39c68648c7a12ce9a1cec99a.diff
LOG: [lldb] Fix pessimizing move warning
lldb/source/Core/PluginManager.cpp:695:21: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
return Status(std::move(ret.takeError()));
^
lldb/source/Core/PluginManager.cpp:695:21: note: remove std::move call here
return Status(std::move(ret.takeError()));
^~~~~~~~~~ ~
Added:
Modified:
lldb/source/Core/PluginManager.cpp
Removed:
################################################################################
diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp
index d8cebc83005fe..012143576e527 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -692,7 +692,7 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
// Try saving core directly from the process plugin first.
llvm::Expected<bool> ret = process_sp->SaveCore(outfile.GetPath());
if (!ret)
- return Status(std::move(ret.takeError()));
+ return Status(ret.takeError());
if (ret.get())
return Status();
}
More information about the lldb-commits
mailing list