Skip to content

Commit 1dfb1a8

Browse files
committed
[lldb] Fix some warnings in the python plugin
1 parent 5022a5f commit 1dfb1a8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ template <typename T> T Take(PyObject *obj) {
130130
assert(!PyErr_Occurred());
131131
T thing(PyRefType::Owned, obj);
132132
assert(thing.IsValid());
133-
return std::move(thing);
133+
return thing;
134134
}
135135

136136
// Retain a reference you have borrowed, and turn it into
@@ -148,7 +148,7 @@ template <typename T> T Retain(PyObject *obj) {
148148
assert(!PyErr_Occurred());
149149
T thing(PyRefType::Borrowed, obj);
150150
assert(thing.IsValid());
151-
return std::move(thing);
151+
return thing;
152152
}
153153

154154
// This class can be used like a utility function to convert from

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLineWithReturn(
11901190
return true;
11911191
}
11921192
}
1193+
llvm_unreachable("Fully covered switch!");
11931194
}
11941195

11951196
Status ScriptInterpreterPythonImpl::ExecuteMultipleLines(

0 commit comments

Comments
 (0)