forked from OSchip/llvm-project
[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:
parent
bd4b1b5f6d
commit
4a0ba4180b
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue