Author: Pavel Labath Date: 2019-11-12T14:39:34+01:00 New Revision: 1dfb1a85e7cbc37bf6fff9bb046c6e8be0c26b8e
URL: https://github.com/llvm/llvm-project/commit/1dfb1a85e7cbc37bf6fff9bb046c6e8be0c26b8e DIFF: https://github.com/llvm/llvm-project/commit/1dfb1a85e7cbc37bf6fff9bb046c6e8be0c26b8e.diff LOG: [lldb] Fix some warnings in the python plugin Added: Modified: lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 05f280ae6988..b6d63373b433 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -130,7 +130,7 @@ template <typename T> T Take(PyObject *obj) { assert(!PyErr_Occurred()); T thing(PyRefType::Owned, obj); assert(thing.IsValid()); - return std::move(thing); + return thing; } // Retain a reference you have borrowed, and turn it into @@ -148,7 +148,7 @@ template <typename T> T Retain(PyObject *obj) { assert(!PyErr_Occurred()); T thing(PyRefType::Borrowed, obj); assert(thing.IsValid()); - return std::move(thing); + return thing; } // This class can be used like a utility function to convert from diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 29509f5b98e0..5ed01cf47934 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1190,6 +1190,7 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLineWithReturn( return true; } } + llvm_unreachable("Fully covered switch!"); } Status ScriptInterpreterPythonImpl::ExecuteMultipleLines( _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits