[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()));
                    ^~~~~~~~~~               ~
This commit is contained in:
Benjamin Kramer 2021-09-06 21:17:29 +02:00
parent bd4b1b5f6d
commit 4a0ba4180b
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}