[Lldb-commits] [lldb] 28c3380 - Remove unnecessary std::moves [NFC]

Sterling Augustine via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 13 19:26:15 PDT 2023


Author: Sterling Augustine
Date: 2023-07-13T19:24:01-07:00
New Revision: 28c33805d49366b5ef22c60b32df62f123adc3bb

URL: https://github.com/llvm/llvm-project/commit/28c33805d49366b5ef22c60b32df62f123adc3bb
DIFF: https://github.com/llvm/llvm-project/commit/28c33805d49366b5ef22c60b32df62f123adc3bb.diff

LOG: Remove unnecessary std::moves [NFC]

These trigger the following error:

error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]

Added: 
    

Modified: 
    lldb/bindings/python/python-wrapper.swig

Removed: 
    


################################################################################
diff  --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig
index c25fa0c4d9b5b1..cb54901e66d03c 100644
--- a/lldb/bindings/python/python-wrapper.swig
+++ b/lldb/bindings/python/python-wrapper.swig
@@ -1126,11 +1126,11 @@ static SBError LLDBSwigPythonCallLocateModuleCallback(
 
   PyErr_Cleaner py_err_cleaner(true);
   PythonObject module_spec_arg = SWIGBridge::ToSWIGWrapper(
-      std::move(std::make_unique<SBModuleSpec>(module_spec_sb)));
+      std::make_unique<SBModuleSpec>(module_spec_sb));
   PythonObject module_file_spec_arg = SWIGBridge::ToSWIGWrapper(
-      std::move(std::make_unique<SBFileSpec>(module_file_spec_sb)));
+      std::make_unique<SBFileSpec>(module_file_spec_sb));
   PythonObject symbol_file_spec_arg = SWIGBridge::ToSWIGWrapper(
-      std::move(std::make_unique<SBFileSpec>(symbol_file_spec_sb)));
+      std::make_unique<SBFileSpec>(symbol_file_spec_sb));
 
   PythonCallable callable =
       Retain<PythonCallable>(reinterpret_cast<PyObject *>(callback_baton));


        


More information about the lldb-commits mailing list