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 {
public:
SourceFileCompleter(CommandInterpreter &interpreter,
CompletionRequest &request)
: Completer(interpreter, request), m_matching_files() {
: Completer(interpreter, request) {
FileSpec partial_spec(m_request.GetCursorArgumentPrefix());
m_file_name = partial_spec.GetFilename().GetCString();
m_dir_name = partial_spec.GetDirectory().GetCString();
......
......@@ -49,7 +49,7 @@ static void AddBreakpointDescription(Stream *s, Breakpoint *bp,
class lldb_private::BreakpointOptionGroup : public OptionGroup {
public:
BreakpointOptionGroup() : OptionGroup(), m_bp_opts(false) {}
BreakpointOptionGroup() : m_bp_opts(false) {}
~BreakpointOptionGroup() override = default;
......@@ -179,7 +179,7 @@ public:
class BreakpointDummyOptionGroup : public OptionGroup {
public:
BreakpointDummyOptionGroup() : OptionGroup() {}
BreakpointDummyOptionGroup() {}
~BreakpointDummyOptionGroup() override = default;
......@@ -234,8 +234,7 @@ public:
interpreter, "breakpoint set",
"Sets a breakpoint or set of breakpoints in the executable.",
"breakpoint set <cmd-options>"),
m_bp_opts(), m_python_class_options("scripted breakpoint", true, 'P'),
m_options() {
m_python_class_options("scripted breakpoint", true, 'P') {
// We're picking up all the normal options, commands and disable.
m_all_options.Append(&m_python_class_options,
LLDB_OPT_SET_1 | LLDB_OPT_SET_2, LLDB_OPT_SET_11);
......@@ -253,9 +252,7 @@ public:
class CommandOptions : public OptionGroup {
public:
CommandOptions()
: OptionGroup(), m_condition(), m_filenames(), m_func_names(),
m_func_regexp(), m_source_text_regexp(), m_modules() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -809,8 +806,7 @@ public:
"created breakpoint. "
"With the exception of -e, -d and -i, passing an "
"empty argument clears the modification.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
......@@ -1100,8 +1096,7 @@ public:
: CommandObjectParsed(
interpreter, "breakpoint list",
"List some or all breakpoints at configurable levels of detail.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
......@@ -1123,7 +1118,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1246,8 +1241,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint clear",
"Delete or disable breakpoints matching the "
"specified source file and line.",
"breakpoint clear <cmd-options>"),
m_options() {}
"breakpoint clear <cmd-options>") {}
~CommandObjectBreakpointClear() override = default;
......@@ -1255,7 +1249,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options(), m_filename() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1384,8 +1378,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint delete",
"Delete the specified breakpoint(s). If no "
"breakpoints are specified, delete them all.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
......@@ -1408,7 +1401,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1565,8 +1558,7 @@ private:
class BreakpointNameOptionGroup : public OptionGroup {
public:
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;
......@@ -1626,7 +1618,7 @@ public:
class BreakpointAccessOptionGroup : public OptionGroup {
public:
BreakpointAccessOptionGroup() : OptionGroup() {}
BreakpointAccessOptionGroup() {}
~BreakpointAccessOptionGroup() override = default;
......@@ -1696,8 +1688,7 @@ public:
"the breakpoint, otherwise only the options specified will be set "
"on the name.",
"breakpoint name configure <command-options> "
"<breakpoint-name-list>"),
m_bp_opts(), m_option_group() {
"<breakpoint-name-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
......@@ -1787,8 +1778,7 @@ public:
CommandObjectBreakpointNameAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "add", "Add a name to the breakpoints provided.",
"breakpoint name add <command-options> <breakpoint-id-list>"),
m_name_options(), m_option_group() {
"breakpoint name add <command-options> <breakpoint-id-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
......@@ -1872,8 +1862,7 @@ public:
: CommandObjectParsed(
interpreter, "delete",
"Delete a name from the breakpoints provided.",
"breakpoint name delete <command-options> <breakpoint-id-list>"),
m_name_options(), m_option_group() {
"breakpoint name delete <command-options> <breakpoint-id-list>") {
// Create the first variant for the first (and only) argument for this
// command.
CommandArgumentEntry arg1;
......@@ -1956,8 +1945,7 @@ public:
"List either the names for a breakpoint or info "
"about a given name. With no arguments, lists all "
"names",
"breakpoint name list <command-options>"),
m_name_options(), m_option_group() {
"breakpoint name list <command-options>") {
m_option_group.Append(&m_name_options, LLDB_OPT_SET_3, LLDB_OPT_SET_ALL);
m_option_group.Finalize();
}
......@@ -2063,8 +2051,7 @@ public:
: CommandObjectParsed(interpreter, "breakpoint read",
"Read and set the breakpoints previously saved to "
"a file with \"breakpoint write\". ",
nullptr),
m_options() {}
nullptr) {}
~CommandObjectBreakpointRead() override = default;
......@@ -2072,7 +2059,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -2245,8 +2232,7 @@ public:
"Write the breakpoints listed to a file that can "
"be read in with \"breakpoint read\". "
"If given no arguments, writes all breakpoints.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandObject::AddIDsArgumentData(arg, eArgTypeBreakpointID,
eArgTypeBreakpointIDRange);
......@@ -2269,7 +2255,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......
......@@ -69,7 +69,7 @@ public:
nullptr),
IOHandlerDelegateMultiline("DONE",
IOHandlerDelegate::Completion::LLDBCommand),
m_options(), m_func_options("breakpoint command", false, 'F') {
m_func_options("breakpoint command", false, 'F') {
SetHelpLong(
R"(
General information about entering breakpoint commands
......@@ -281,7 +281,7 @@ are no syntax errors may indicate that a function was declared but never called.
class CommandOptions : public OptionGroup {
public:
CommandOptions() : OptionGroup(), m_one_liner() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -479,8 +479,7 @@ public:
CommandObjectBreakpointCommandDelete(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "delete",
"Delete the set of commands from a breakpoint.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
......@@ -502,7 +501,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......
......@@ -38,8 +38,7 @@ public:
: CommandObjectParsed(
interpreter, "command source",
"Read and execute LLDB commands from the file <filename>.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg;
CommandArgumentData file_arg;
......@@ -76,8 +75,8 @@ protected:
class CommandOptions : public Options {
public:
CommandOptions()
: Options(), m_stop_on_error(true), m_silent_run(false),
m_stop_on_continue(true), m_cmd_relative_to_command_file(false) {}
: m_stop_on_error(true), m_silent_run(false), m_stop_on_continue(true),
m_cmd_relative_to_command_file(false) {}
~CommandOptions() override = default;
......@@ -207,7 +206,7 @@ class CommandObjectCommandsAlias : public CommandObjectRaw {
protected:
class CommandOptions : public OptionGroup {
public:
CommandOptions() : OptionGroup(), m_help(), m_long_help() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -258,8 +257,7 @@ public:
CommandObjectCommandsAlias(CommandInterpreter &interpreter)
: CommandObjectRaw(
interpreter, "command alias",
"Define a custom command in terms of an existing command."),
m_option_group(), m_command_options() {
"Define a custom command in terms of an existing command.") {
m_option_group.Append(&m_command_options);
m_option_group.Finalize();
......@@ -793,8 +791,7 @@ public:
"regular expressions.",
"command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
IOHandlerDelegateMultiline("",
IOHandlerDelegate::Completion::LLDBCommand),
m_options() {
IOHandlerDelegate::Completion::LLDBCommand) {
SetHelpLong(
R"(
)"
......@@ -1025,7 +1022,7 @@ private:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1239,8 +1236,7 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
public:
CommandObjectCommandsScriptImport(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "command script import",
"Import a scripting module in LLDB.", nullptr),
m_options() {
"Import a scripting module in LLDB.", nullptr) {
CommandArgumentEntry arg1;
CommandArgumentData cmd_arg;
......@@ -1271,7 +1267,7 @@ public:
protected:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1395,7 +1391,7 @@ public:
"must be a path to a user-added container "
"command, and the last element will be the new "
"command name."),
IOHandlerDelegateMultiline("DONE"), m_options() {
IOHandlerDelegateMultiline("DONE") {
CommandArgumentEntry arg1;
CommandArgumentData cmd_arg;
......@@ -1426,8 +1422,7 @@ public:
protected:
class CommandOptions : public Options {
public:
CommandOptions()
: Options(), m_class_name(), m_funct_name(), m_short_help() {}
CommandOptions() {}
~CommandOptions() override = default;
......@@ -1884,7 +1879,7 @@ public:
protected:
class CommandOptions : public Options {
public:
CommandOptions() : Options(), m_short_help(), m_long_help() {}
CommandOptions() {}
~CommandOptions() override = default;
......
......@@ -30,8 +30,7 @@ using namespace lldb_private;
#define LLDB_OPTIONS_disassemble
#include "CommandOptions.inc"
CommandObjectDisassemble::CommandOptions::CommandOptions()
: Options(), func_name(), plugin_name(), flavor_string(), arch() {
CommandObjectDisassemble::CommandOptions::CommandOptions() {
OptionParsingStarting(nullptr);
}
......
......@@ -24,7 +24,7 @@
using namespace lldb;
using namespace lldb_private;
CommandObjectExpression::CommandOptions::CommandOptions() : OptionGroup() {}
CommandObjectExpression::CommandOptions::CommandOptions() {}
CommandObjectExpression::CommandOptions::~CommandOptions() = default;
......@@ -200,10 +200,10 @@ CommandObjectExpression::CommandObjectExpression(
"",
eCommandProcessMustBePaused | eCommandTryTargetAPILock),
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,
true),
m_command_options(), m_expr_line_count(0), m_expr_lines() {
m_command_options(), m_expr_line_count(0) {
SetHelpLong(
R"(
Single and multi-line expressions:
......
......@@ -49,7 +49,7 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() { OptionParsingStarting(nullptr); }
CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
......@@ -110,8 +110,7 @@ public:
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
eCommandProcessMustBePaused),
m_options() {
eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
......@@ -222,7 +221,7 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() { OptionParsingStarting(nullptr); }
CommandOptions() { OptionParsingStarting(nullptr); }
~CommandOptions() override = default;
......@@ -267,8 +266,7 @@ public:
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
eCommandProcessMustBePaused),
m_options() {
eCommandProcessMustBePaused) {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
......@@ -399,10 +397,9 @@ public:
eCommandRequiresFrame | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
eCommandRequiresProcess),
m_option_group(),
m_option_variable(
true), // Include the frame specific options by passing "true"
m_option_format(eFormatDefault), m_varobj_options() {
m_option_format(eFormatDefault) {
SetHelpLong(R"(
Children of aggregate variables can be specified such as 'var->child.x'. In
'frame variable', the operators -> and [] do not invoke operator overloads if
......@@ -729,7 +726,7 @@ class CommandObjectFrameRecognizerAdd : public CommandObjectParsed {
private:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
......@@ -798,8 +795,7 @@ protected:
public:
CommandObjectFrameRecognizerAdd(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "frame recognizer add",
"Add a new frame recognizer.", nullptr),
m_options() {
"Add a new frame recognizer.", nullptr) {
SetHelpLong(R"(
Frame recognizers allow for retrieving information about special frames based on
ABI, arguments or other special properties of that frame, even without source
......
......@@ -46,8 +46,7 @@ CommandObjectHelp::CommandObjectHelp(CommandInterpreter &interpreter)
"Show a list of all debugger "
"commands, or give details "
"about a specific command.",
"help [<cmd-name>]"),
m_options() {
"help [<cmd-name>]") {
CommandArgumentEntry arg;
CommandArgumentData command_arg;
......
......@@ -32,7 +32,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options() {}
CommandOptions() {}
~CommandOptions() override = default;
......
......@@ -45,8 +45,7 @@ public:
CommandObjectLogEnable(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "log enable",
"Enable logging for a single log channel.",
nullptr),
m_options() {
nullptr) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData channel_arg;
......@@ -76,7 +75,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options(), log_file() {}
CommandOptions() {}
~CommandOptions() override = default;
......
......@@ -48,7 +48,7 @@ using namespace lldb_private;
class OptionGroupReadMemory : public OptionGroup {
public:
OptionGroupReadMemory()
: m_num_per_line(1, 1), m_view_as_type(), m_offset(0, 0),
: m_num_per_line(1, 1), m_offset(0, 0),
m_language_for_type(eLanguageTypeUnknown) {}
~OptionGroupReadMemory() override = default;
......@@ -287,12 +287,10 @@ public:
interpreter, "memory read",
"Read from the memory of the current target process.", nullptr,
eCommandRequiresTarget | eCommandProcessMustBePaused),
m_option_group(), m_format_options(eFormatBytesWithASCII, 1, 8),
m_memory_options(), m_outfile_options(), m_varobj_options(),
m_format_options(eFormatBytesWithASCII, 1, 8),
m_next_addr(LLDB_INVALID_ADDRESS), m_prev_byte_size(0),
m_prev_format_options(eFormatBytesWithASCII, 1, 8),
m_prev_memory_options(), m_prev_outfile_options(),
m_prev_varobj_options() {
m_prev_format_options(eFormatBytesWithASCII, 1, 8) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData start_addr_arg;
......@@ -890,7 +888,7 @@ class CommandObjectMemoryFind : public CommandObjectParsed {
public:
class OptionGroupFindMemory : public OptionGroup {
public:
OptionGroupFindMemory() : OptionGroup(), m_count(1), m_offset(0) {}
OptionGroupFindMemory() : m_count(1), m_offset(0) {}
~OptionGroupFindMemory() override = default;
......@@ -944,8 +942,7 @@ public:
: CommandObjectParsed(
interpreter, "memory find",
"Find a value in the memory of the current target process.",
nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched),
m_option_group(), m_memory_options() {
nullptr, eCommandRequiresProcess | eCommandProcessMustBeLaunched) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData addr_arg;
......@@ -1178,7 +1175,7 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
public:
class OptionGroupWriteMemory : public OptionGroup {
public:
OptionGroupWriteMemory() : OptionGroup() {}
OptionGroupWriteMemory() {}
~OptionGroupWriteMemory() override = default;
......@@ -1230,16 +1227,14 @@ public:
interpreter, "memory write",
"Write to the memory of the current target process.", nullptr,
eCommandRequiresProcess | eCommandProcessMustBeLaunched),
m_option_group(),
m_format_options(
eFormatBytes, 1, UINT64_MAX,
{std::make_tuple(
eArgTypeFormat,
"The format to use for each of the value to be written."),
std::make_tuple(
eArgTypeByteSize,
"The size in bytes to write from input file or each value.")}),
m_memory_options() {
std::make_tuple(eArgTypeByteSize,
"The size in bytes to write from input file or "
"each value.")}) {
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
CommandArgumentData addr_arg;
......
......@@ -138,7 +138,7 @@ class CommandObjectMemoryTagWrite : public CommandObjectParsed {
public:
class OptionGroupTagWrite : public OptionGroup {
public:
OptionGroupTagWrite() : OptionGroup(), m_end_addr(LLDB_INVALID_ADDRESS) {}
OptionGroupTagWrite() : m_end_addr(LLDB_INVALID_ADDRESS) {}
~OptionGroupTagWrite() override = default;
......@@ -177,8 +177,7 @@ public:
"contains the given address.",
nullptr,
eCommandRequiresTarget | eCommandRequiresProcess |
eCommandProcessMustBePaused),
m_option_group(), m_tag_write_options() {
eCommandProcessMustBePaused) {
// Address
m_arguments.push_back(
CommandArgumentEntry{CommandArgumentData(eArgTypeAddressOrExpression)});
......
......@@ -145,7 +145,6 @@ public:
"Create a platform if needed and select it as the "
"current platform.",
"platform select <platform-name>", 0),
m_option_group(),
m_platform_options(
false) // Don't include the "--platform" option by passing false
{
......@@ -377,7 +376,6 @@ public:
"Set settings for the current target's platform, "
"or for a platform by name.",
"platform settings", 0),
m_options(),
m_option_working_dir(LLDB_OPT_SET_1, false, "working-dir", 'w',
CommandCompletions::eRemoteDiskDirectoryCompletion,
eArgTypePath,
......@@ -417,8 +415,7 @@ public:
CommandObjectPlatformMkDir(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform mkdir",
"Make a new directory on the remote end.", nullptr,
0),
m_options() {}
0) {}
~CommandObjectPlatformMkDir() override = default;
......@@ -464,8 +461,7 @@ class CommandObjectPlatformFOpen : public CommandObjectParsed {
public:
CommandObjectPlatformFOpen(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "platform file open",
"Open a file on the remote end.", nullptr, 0),
m_options() {}
"Open a file on the remote end.", nullptr, 0) {}
~CommandObjectPlatformFOpen() override = default;
......@@ -566,8 +562,7 @@ public:
CommandObjectPlatformFRead(CommandInterpreter &interpreter)