aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-07-02 11:27:37 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2021-07-02 11:31:16 -0700
commitfd2433e139f78658e059cf911af8ae735fcda57c (patch)
tree9208b8e65997f7b324df6c8f03a4ccfd2a54467b /lldb/source/Plugins/ScriptInterpreter/Python
parent678211de6d5f75c22beb72ec1203b1e857ddebf3 (diff)
downloadllvm-fd2433e139f78658e059cf911af8ae735fcda57c.zip
llvm-fd2433e139f78658e059cf911af8ae735fcda57c.tar.gz
llvm-fd2433e139f78658e059cf911af8ae735fcda57c.tar.bz2
[lldb] Replace default bodies of special member functions with = default;
Replace default bodies of special member functions with = default; $ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix , https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html Differential revision: https://reviews.llvm.org/D104041
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h4
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp10
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 6ca0e75..4577253 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -229,7 +229,7 @@ struct PythonFormat<
class PythonObject {
public:
- PythonObject() {}
+ PythonObject() = default;
PythonObject(PyRefType type, PyObject *py_obj) {
m_py_obj = py_obj;
@@ -421,7 +421,7 @@ public:
Py_DECREF(py_obj);
}
- TypedPythonObject() {}
+ TypedPythonObject() = default;
};
class PythonBytes : public TypedPythonObject<PythonBytes> {
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 9a59308..86549b0 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1358,7 +1358,7 @@ Status ScriptInterpreterPythonImpl::ExportFunctionDefinitionToInterpreter(
Status error = ExecuteMultipleLines(
function_def_string.c_str(),
- ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false));
+ ExecuteScriptOptions().SetEnableIO(false));
return error;
}
@@ -2767,7 +2767,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule(
directory.c_str(), directory.c_str());
bool syspath_retval =
ExecuteMultipleLines(command_stream.GetData(),
- ScriptInterpreter::ExecuteScriptOptions()
+ ExecuteScriptOptions()
.SetEnableIO(false)
.SetSetLLDBGlobals(false))
.Success();
@@ -2855,7 +2855,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule(
(ExecuteOneLineWithReturn(
command_stream.GetData(),
ScriptInterpreterPythonImpl::eScriptReturnTypeBool, &does_contain,
- ScriptInterpreter::ExecuteScriptOptions()
+ ExecuteScriptOptions()
.SetEnableIO(false)
.SetSetLLDBGlobals(false)) &&
does_contain);
@@ -2877,7 +2877,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule(
command_stream.Printf("import %s", module_name.c_str());
error = ExecuteMultipleLines(command_stream.GetData(),
- ScriptInterpreter::ExecuteScriptOptions()
+ ExecuteScriptOptions()
.SetEnableIO(false)
.SetSetLLDBGlobals(false));
if (error.Fail())
@@ -3055,7 +3055,7 @@ bool ScriptInterpreterPythonImpl::GetDocumentationForItem(const char *item,
if (ExecuteOneLineWithReturn(
command, ScriptInterpreter::eScriptReturnTypeCharStrOrNone,
&result_ptr,
- ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false))) {
+ ExecuteScriptOptions().SetEnableIO(false))) {
if (result_ptr)
dest.assign(result_ptr);
return true;
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
index 9eb6efc..e0056f1 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
@@ -418,7 +418,7 @@ public:
: IOHandler(debugger, IOHandler::Type::PythonInterpreter),
m_python(python) {}
- ~IOHandlerPythonInterpreter() override {}
+ ~IOHandlerPythonInterpreter() override = default;
ConstString GetControlSequence(char ch) override {
if (ch == 'd')