mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 15:41:35 +08:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user