Commit abb0ed44 authored by Kazu Hirata's avatar Kazu Hirata
Browse files

[Commands] Remove redundant member initialization (NFC)

Identified with readability-redundant-member-init.
parent 7a29b0b5
...@@ -129,7 +129,7 @@ class SourceFileCompleter : public Completer { ...@@ -129,7 +129,7 @@ class SourceFileCompleter : public Completer {
public: public:
SourceFileCompleter(CommandInterpreter &interpreter, SourceFileCompleter(CommandInterpreter &interpreter,
CompletionRequest &request) CompletionRequest &request)
: Completer(interpreter, request), m_matching_files() { : Completer(interpreter, request) {
FileSpec partial_spec(m_request.GetCursorArgumentPrefix()); FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
m_file_name = partial_spec.GetFilename().GetCString(); m_file_name = partial_spec.GetFilename().GetCString();
m_dir_name = partial_spec.GetDirectory().GetCString(); m_dir_name = partial_spec.GetDirectory().GetCString();
......
...@@ -49,7 +49,7 @@ static void AddBreakpointDescription(Stream *s, Breakpoint *bp, ...@@ -49,7 +49,7 @@ static void AddBreakpointDescription(Stream *s, Breakpoint *bp,
class lldb_private::BreakpointOptionGroup : public OptionGroup { class lldb_private::BreakpointOptionGroup : public OptionGroup {
public: public:
BreakpointOptionGroup() : OptionGroup(), m_bp_opts(false) {} BreakpointOptionGroup() : m_bp_opts(false) {}
~BreakpointOptionGroup() override = default; ~BreakpointOptionGroup() override = default;
...@@ -179,7 +179,7 @@ public: ...@@ -179,7 +179,7 @@ public:
class BreakpointDummyOptionGroup : public OptionGroup { class BreakpointDummyOptionGroup : public OptionGroup {
public: public:
BreakpointDummyOptionGroup() : OptionGroup() {} BreakpointDummyOptionGroup() {}
~BreakpointDummyOptionGroup() override = default; ~BreakpointDummyOptionGroup() override = default;
...@@ -234,8 +234,7 @@ public: ...@@ -234,8 +234,7 @@ public:
interpreter, "breakpoint set", interpreter, "breakpoint set",
"Sets a breakpoint or set of breakpoints in the executable.", "Sets a breakpoint or set of breakpoints in the executable.",
"breakpoint set <cmd-options>"), "breakpoint set <cmd-options>"),
m_bp_opts(), m_python_class_options("scripted breakpoint", true, 'P'), m_python_class_options("scripted breakpoint", true, 'P') {
m_options() {
// We're picking up all the normal options, commands and disable. // We're picking up all the normal options, commands and disable.
m_all_options.Append(&m_python_class_options, m_all_options.Append(&m_python_class_options,
LLDB_OPT_SET_1 | LLDB_OPT_SET_2, LLDB_OPT_SET_11); LLDB_OPT_SET_1 | LLDB_OPT_SET_2, LLDB_OPT_SET_11);
...@@ -253,9 +252,7 @@ public: ...@@ -253,9 +252,7 @@ public:
class CommandOptions : public OptionGroup { class CommandOptions : public OptionGroup {
public: public:
CommandOptions() CommandOptions() {}
: OptionGroup(), m_condition(), m_filenames(), m_func_names(),
m_func_regexp(), m_source_text_regexp(), m_modules() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -809,8 +806,7 @@ public: ...@@ -809,8 +806,7 @@ public:
"created breakpoint. " "created breakpoint. "
"With the exception of -e, -d and -i, passing an " "With the exception of -e, -d and -i, passing an "
"empty argument clears the modification.", "empty argument clears the modification.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange); eArgTypeBreakpointIDRange);
...@@ -1100,8 +1096,7 @@ public: ...@@ -1100,8 +1096,7 @@ public:
: CommandObjectParsed( : CommandObjectParsed(
interpreter, "breakpoint list", interpreter, "breakpoint list",
"List some or all breakpoints at configurable levels of detail.", "List some or all breakpoints at configurable levels of detail.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandArgumentData bp_id_arg; CommandArgumentData bp_id_arg;
...@@ -1123,7 +1118,7 @@ public: ...@@ -1123,7 +1118,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1246,8 +1241,7 @@ public: ...@@ -1246,8 +1241,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint clear", : CommandObjectParsed(interpreter, "breakpoint clear",
"Delete or disable breakpoints matching the " "Delete or disable breakpoints matching the "
"specified source file and line.", "specified source file and line.",
"breakpoint clear <cmd-options>"), "breakpoint clear <cmd-options>") {}
m_options() {}
~CommandObjectBreakpointClear() override = default; ~CommandObjectBreakpointClear() override = default;
...@@ -1255,7 +1249,7 @@ public: ...@@ -1255,7 +1249,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options(), m_filename() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1384,8 +1378,7 @@ public: ...@@ -1384,8 +1378,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint delete", : CommandObjectParsed(interpreter, "breakpoint delete",
"Delete the specified breakpoint(s). If no " "Delete the specified breakpoint(s). If no "
"breakpoints are specified, delete them all.", "breakpoints are specified, delete them all.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange); eArgTypeBreakpointIDRange);
...@@ -1408,7 +1401,7 @@ public: ...@@ -1408,7 +1401,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1565,8 +1558,7 @@ private: ...@@ -1565,8 +1558,7 @@ private:
class BreakpointNameOptionGroup : public OptionGroup { class BreakpointNameOptionGroup : public OptionGroup {
public: public:
BreakpointNameOptionGroup() BreakpointNameOptionGroup()
: OptionGroup(), m_breakpoint(LLDB_INVALID_BREAK_ID), m_use_dummy(false) { : m_breakpoint(LLDB_INVALID_BREAK_ID), m_use_dummy(false) {}
}
~BreakpointNameOptionGroup() override = default; ~BreakpointNameOptionGroup() override = default;
...@@ -1626,7 +1618,7 @@ public: ...@@ -1626,7 +1618,7 @@ public:
class BreakpointAccessOptionGroup : public OptionGroup { class BreakpointAccessOptionGroup : public OptionGroup {
public: public:
BreakpointAccessOptionGroup() : OptionGroup() {} BreakpointAccessOptionGroup() {}
~BreakpointAccessOptionGroup() override = default; ~BreakpointAccessOptionGroup() override = default;
...@@ -1696,8 +1688,7 @@ public: ...@@ -1696,8 +1688,7 @@ public:
"the breakpoint, otherwise only the options specified will be set " "the breakpoint, otherwise only the options specified will be set "
"on the name.", "on the name.",
"breakpoint name configure <command-options> " "breakpoint name configure <command-options> "
"<breakpoint-name-list>"), "<breakpoint-name-list>") {
m_bp_opts(), m_option_group() {
// Create the first variant for the first (and only) argument for this // Create the first variant for the first (and only) argument for this
// command. // command.
CommandArgumentEntry arg1; CommandArgumentEntry arg1;
...@@ -1787,8 +1778,7 @@ public: ...@@ -1787,8 +1778,7 @@ public:
CommandObjectBreakpointNameAdd(CommandInterpreter &interpreter) CommandObjectBreakpointNameAdd(CommandInterpreter &interpreter)
: CommandObjectParsed( : CommandObjectParsed(
interpreter, "add", "Add a name to the breakpoints provided.", interpreter, "add", "Add a name to the breakpoints provided.",
"breakpoint name add <command-options> <breakpoint-id-list>"), "breakpoint name add <command-options> <breakpoint-id-list>") {
m_name_options(), m_option_group() {
// Create the first variant for the first (and only) argument for this // Create the first variant for the first (and only) argument for this
// command. // command.
CommandArgumentEntry arg1; CommandArgumentEntry arg1;
...@@ -1872,8 +1862,7 @@ public: ...@@ -1872,8 +1862,7 @@ public:
: CommandObjectParsed( : CommandObjectParsed(
interpreter, "delete", interpreter, "delete",
"Delete a name from the breakpoints provided.", "Delete a name from the breakpoints provided.",
"breakpoint name delete <command-options> <breakpoint-id-list>"), "breakpoint name delete <command-options> <breakpoint-id-list>") {
m_name_options(), m_option_group() {
// Create the first variant for the first (and only) argument for this // Create the first variant for the first (and only) argument for this
// command. // command.
CommandArgumentEntry arg1; CommandArgumentEntry arg1;
...@@ -1956,8 +1945,7 @@ public: ...@@ -1956,8 +1945,7 @@ public:
"List either the names for a breakpoint or info " "List either the names for a breakpoint or info "
"about a given name. With no arguments, lists all " "about a given name. With no arguments, lists all "
"names", "names",
"breakpoint name list <command-options>"), "breakpoint name list <command-options>") {
m_name_options(), m_option_group() {
m_option_group.Append(&m_name_options, LLDB_OPT_SET_3, LLDB_OPT_SET_ALL); m_option_group.Append(&m_name_options, LLDB_OPT_SET_3, LLDB_OPT_SET_ALL);
m_option_group.Finalize(); m_option_group.Finalize();
} }
...@@ -2063,8 +2051,7 @@ public: ...@@ -2063,8 +2051,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint read", : CommandObjectParsed(interpreter, "breakpoint read",
"Read and set the breakpoints previously saved to " "Read and set the breakpoints previously saved to "
"a file with \"breakpoint write\". ", "a file with \"breakpoint write\". ",
nullptr), nullptr) {}
m_options() {}
~CommandObjectBreakpointRead() override = default; ~CommandObjectBreakpointRead() override = default;
...@@ -2072,7 +2059,7 @@ public: ...@@ -2072,7 +2059,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -2245,8 +2232,7 @@ public: ...@@ -2245,8 +2232,7 @@ public:
"Write the breakpoints listed to a file that can " "Write the breakpoints listed to a file that can "
"be read in with \"breakpoint read\". " "be read in with \"breakpoint read\". "
"If given no arguments, writes all breakpoints.", "If given no arguments, writes all breakpoints.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID, CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange); eArgTypeBreakpointIDRange);
...@@ -2269,7 +2255,7 @@ public: ...@@ -2269,7 +2255,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
......
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
nullptr), nullptr),
IOHandlerDelegateMultiline("DONE", IOHandlerDelegateMultiline("DONE",
IOHandlerDelegate::Completion::LLDBCommand), IOHandlerDelegate::Completion::LLDBCommand),
m_options(), m_func_options("breakpoint command", false, 'F') { m_func_options("breakpoint command", false, 'F') {
SetHelpLong( SetHelpLong(
R"( R"(
General information about entering breakpoint commands General information about entering breakpoint commands
...@@ -281,7 +281,7 @@ are no syntax errors may indicate that a function was declared but never called. ...@@ -281,7 +281,7 @@ are no syntax errors may indicate that a function was declared but never called.
class CommandOptions : public OptionGroup { class CommandOptions : public OptionGroup {
public: public:
CommandOptions() : OptionGroup(), m_one_liner() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -479,8 +479,7 @@ public: ...@@ -479,8 +479,7 @@ public:
CommandObjectBreakpointCommandDelete(CommandInterpreter &interpreter) CommandObjectBreakpointCommandDelete(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "delete", : CommandObjectParsed(interpreter, "delete",
"Delete the set of commands from a breakpoint.", "Delete the set of commands from a breakpoint.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandArgumentData bp_id_arg; CommandArgumentData bp_id_arg;
...@@ -502,7 +501,7 @@ public: ...@@ -502,7 +501,7 @@ public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
......
...@@ -38,8 +38,7 @@ public: ...@@ -38,8 +38,7 @@ public:
: CommandObjectParsed( : CommandObjectParsed(
interpreter, "command source", interpreter, "command source",
"Read and execute LLDB commands from the file <filename>.", "Read and execute LLDB commands from the file <filename>.",
nullptr), nullptr) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandArgumentData file_arg; CommandArgumentData file_arg;
...@@ -76,8 +75,8 @@ protected: ...@@ -76,8 +75,8 @@ protected:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() CommandOptions()
: Options(), m_stop_on_error(true), m_silent_run(false), : m_stop_on_error(true), m_silent_run(false), m_stop_on_continue(true),
m_stop_on_continue(true), m_cmd_relative_to_command_file(false) {} m_cmd_relative_to_command_file(false) {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -207,7 +206,7 @@ class CommandObjectCommandsAlias : public CommandObjectRaw { ...@@ -207,7 +206,7 @@ class CommandObjectCommandsAlias : public CommandObjectRaw {
protected: protected:
class CommandOptions : public OptionGroup { class CommandOptions : public OptionGroup {
public: public:
CommandOptions() : OptionGroup(), m_help(), m_long_help() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -258,8 +257,7 @@ public: ...@@ -258,8 +257,7 @@ public:
CommandObjectCommandsAlias(CommandInterpreter &interpreter) CommandObjectCommandsAlias(CommandInterpreter &interpreter)
: CommandObjectRaw( : CommandObjectRaw(
interpreter, "command alias", interpreter, "command alias",
"Define a custom command in terms of an existing command."), "Define a custom command in terms of an existing command.") {
m_option_group(), m_command_options() {
m_option_group.Append(&m_command_options); m_option_group.Append(&m_command_options);
m_option_group.Finalize(); m_option_group.Finalize();
...@@ -793,8 +791,7 @@ public: ...@@ -793,8 +791,7 @@ public:
"regular expressions.", "regular expressions.",
"command regex <cmd-name> [s/<regex>/<subst>/ ...]"), "command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
IOHandlerDelegateMultiline("", IOHandlerDelegateMultiline("",
IOHandlerDelegate::Completion::LLDBCommand), IOHandlerDelegate::Completion::LLDBCommand) {
m_options() {
SetHelpLong( SetHelpLong(
R"( R"(
)" )"
...@@ -1025,7 +1022,7 @@ private: ...@@ -1025,7 +1022,7 @@ private:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1239,8 +1236,7 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed { ...@@ -1239,8 +1236,7 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
public: public:
CommandObjectCommandsScriptImport(CommandInterpreter &interpreter) CommandObjectCommandsScriptImport(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "command script import", : CommandObjectParsed(interpreter, "command script import",
"Import a scripting module in LLDB.", nullptr), "Import a scripting module in LLDB.", nullptr) {
m_options() {
CommandArgumentEntry arg1; CommandArgumentEntry arg1;
CommandArgumentData cmd_arg; CommandArgumentData cmd_arg;
...@@ -1271,7 +1267,7 @@ public: ...@@ -1271,7 +1267,7 @@ public:
protected: protected:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1395,7 +1391,7 @@ public: ...@@ -1395,7 +1391,7 @@ public:
"must be a path to a user-added container " "must be a path to a user-added container "
"command, and the last element will be the new " "command, and the last element will be the new "
"command name."), "command name."),
IOHandlerDelegateMultiline("DONE"), m_options() { IOHandlerDelegateMultiline("DONE") {
CommandArgumentEntry arg1; CommandArgumentEntry arg1;
CommandArgumentData cmd_arg; CommandArgumentData cmd_arg;
...@@ -1426,8 +1422,7 @@ public: ...@@ -1426,8 +1422,7 @@ public:
protected: protected:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() CommandOptions() {}
: Options(), m_class_name(), m_funct_name(), m_short_help() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -1884,7 +1879,7 @@ public: ...@@ -1884,7 +1879,7 @@ public:
protected: protected:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options(), m_short_help(), m_long_help() {} CommandOptions() {}
~CommandOptions() override = default; ~CommandOptions() override = default;
......
...@@ -30,8 +30,7 @@ using namespace lldb_private; ...@@ -30,8 +30,7 @@ using namespace lldb_private;
#define LLDB_OPTIONS_disassemble #define LLDB_OPTIONS_disassemble
#include "CommandOptions.inc" #include "CommandOptions.inc"
CommandObjectDisassemble::CommandOptions::CommandOptions() CommandObjectDisassemble::CommandOptions::CommandOptions() {
: Options(), func_name(), plugin_name(), flavor_string(), arch() {
OptionParsingStarting(nullptr); OptionParsingStarting(nullptr);
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
using namespace lldb; using namespace lldb;
using namespace lldb_private; using namespace lldb_private;
CommandObjectExpression::CommandOptions::CommandOptions() : OptionGroup() {} CommandObjectExpression::CommandOptions::CommandOptions() {}
CommandObjectExpression::CommandOptions::~CommandOptions() = default; CommandObjectExpression::CommandOptions::~CommandOptions() = default;
...@@ -200,10 +200,10 @@ CommandObjectExpression::CommandObjectExpression( ...@@ -200,10 +200,10 @@ CommandObjectExpression::CommandObjectExpression(
"", "",
eCommandProcessMustBePaused | eCommandTryTargetAPILock), eCommandProcessMustBePaused | eCommandTryTargetAPILock),
IOHandlerDelegate(IOHandlerDelegate::Completion::Expression), IOHandlerDelegate(IOHandlerDelegate::Completion::Expression),
m_option_group(), m_format_options(eFormatDefault), m_format_options(eFormatDefault),
m_repl_option(LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false, m_repl_option(LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false,
true), true),
m_command_options(), m_expr_line_count(0), m_expr_lines() { m_command_options(), m_expr_line_count(0) {
SetHelpLong( SetHelpLong(
R"( R"(
Single and multi-line expressions: Single and multi-line expressions:
......
...@@ -49,7 +49,7 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed { ...@@ -49,7 +49,7 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
public: public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() { OptionParsingStarting(nullptr); } CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default; ~CommandOptions() override = default;
...@@ -110,8 +110,7 @@ public: ...@@ -110,8 +110,7 @@ public:
nullptr, nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock | eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBeLaunched |
eCommandProcessMustBePaused), eCommandProcessMustBePaused) {
m_options() {
CommandArgumentEntry arg; CommandArgumentEntry arg;
CommandArgumentData index_arg; CommandArgumentData index_arg;
...@@ -222,7 +221,7 @@ class CommandObjectFrameSelect : public CommandObjectParsed { ...@@ -222,7 +221,7 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
public: public:
class CommandOptions : public Options { class CommandOptions : public Options {
public: public:
CommandOptions() : Options() { OptionParsingStarting(nullptr); } CommandOptions() { OptionParsingStarting(nullptr); }