forked from OSchip/llvm-project
[lldb/Interpreter][NFC] Remove explicit default initialization of members and base classes
According to clang-tidy's readability-redundant-member-init.
This commit is contained in:
parent
54d03a4985
commit
8cdcd41e38
|
@ -21,8 +21,7 @@ namespace lldb_private {
|
|||
class OptionGroupPlatform : public OptionGroup {
|
||||
public:
|
||||
OptionGroupPlatform(bool include_platform_option)
|
||||
: OptionGroup(), m_platform_name(), m_sdk_sysroot(),
|
||||
m_include_platform_option(include_platform_option) {}
|
||||
: m_include_platform_option(include_platform_option) {}
|
||||
|
||||
~OptionGroupPlatform() override = default;
|
||||
|
||||
|
|
|
@ -19,17 +19,15 @@ class OptionValueArch : public OptionValue {
|
|||
public:
|
||||
OptionValueArch() = default;
|
||||
|
||||
OptionValueArch(const char *triple)
|
||||
: OptionValue(), m_current_value(triple), m_default_value() {
|
||||
OptionValueArch(const char *triple) : m_current_value(triple) {
|
||||
m_default_value = m_current_value;
|
||||
}
|
||||
|
||||
OptionValueArch(const ArchSpec &value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueArch(const ArchSpec ¤t_value, const ArchSpec &default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueArch() override = default;
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@ namespace lldb_private {
|
|||
class OptionValueBoolean : public OptionValue {
|
||||
public:
|
||||
OptionValueBoolean(bool value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
OptionValueBoolean(bool current_value, bool default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueBoolean() override = default;
|
||||
|
||||
|
|
|
@ -16,11 +16,10 @@ namespace lldb_private {
|
|||
class OptionValueChar : public OptionValue {
|
||||
public:
|
||||
OptionValueChar(char value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueChar(char current_value, char default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueChar() override = default;
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ class OptionValueDictionary : public OptionValue {
|
|||
public:
|
||||
OptionValueDictionary(uint32_t type_mask = UINT32_MAX,
|
||||
bool raw_value_dump = true)
|
||||
: OptionValue(), m_type_mask(type_mask), m_values(),
|
||||
m_raw_value_dump(raw_value_dump) {}
|
||||
: m_type_mask(type_mask), m_raw_value_dump(raw_value_dump) {}
|
||||
|
||||
~OptionValueDictionary() override = default;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
OptionValueFileSpecList() = default;
|
||||
|
||||
OptionValueFileSpecList(const FileSpecList ¤t_value)
|
||||
: OptionValue(), m_current_value(current_value) {}
|
||||
: m_current_value(current_value) {}
|
||||
|
||||
~OptionValueFileSpecList() override = default;
|
||||
|
||||
|
|
|
@ -16,11 +16,10 @@ namespace lldb_private {
|
|||
class OptionValueFormat : public OptionValue {
|
||||
public:
|
||||
OptionValueFormat(lldb::Format value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueFormat() override = default;
|
||||
|
||||
|
|
|
@ -18,12 +18,11 @@ namespace lldb_private {
|
|||
class OptionValueLanguage : public OptionValue {
|
||||
public:
|
||||
OptionValueLanguage(lldb::LanguageType value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueLanguage(lldb::LanguageType current_value,
|
||||
lldb::LanguageType default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueLanguage() override = default;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace lldb_private {
|
|||
class OptionValuePathMappings : public OptionValue {
|
||||
public:
|
||||
OptionValuePathMappings(bool notify_changes)
|
||||
: OptionValue(), m_path_mappings(), m_notify_changes(notify_changes) {}
|
||||
: m_notify_changes(notify_changes) {}
|
||||
|
||||
~OptionValuePathMappings() override = default;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace lldb_private {
|
|||
class OptionValueRegex : public OptionValue {
|
||||
public:
|
||||
OptionValueRegex(const char *value = nullptr)
|
||||
: OptionValue(), m_regex(llvm::StringRef::withNullAsEmpty(value)),
|
||||
: m_regex(llvm::StringRef::withNullAsEmpty(value)),
|
||||
m_default_regex_str(llvm::StringRef::withNullAsEmpty(value).str()) {}
|
||||
|
||||
~OptionValueRegex() override = default;
|
||||
|
|
|
@ -19,13 +19,10 @@ public:
|
|||
OptionValueSInt64() = default;
|
||||
|
||||
OptionValueSInt64(int64_t value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value),
|
||||
m_min_value(INT64_MIN), m_max_value(INT64_MAX) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueSInt64(int64_t current_value, int64_t default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value), m_min_value(INT64_MIN),
|
||||
m_max_value(INT64_MAX) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
OptionValueSInt64(const OptionValueSInt64 &rhs) = default;
|
||||
|
||||
|
|
|
@ -26,21 +26,16 @@ public:
|
|||
OptionValueString() = default;
|
||||
|
||||
OptionValueString(ValidatorCallback validator, void *baton = nullptr)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_options(),
|
||||
m_validator(validator), m_validator_baton(baton) {}
|
||||
: m_validator(validator), m_validator_baton(baton) {}
|
||||
|
||||
OptionValueString(const char *value)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_options(),
|
||||
m_validator(), m_validator_baton() {
|
||||
OptionValueString(const char *value) {
|
||||
if (value && value[0]) {
|
||||
m_current_value.assign(value);
|
||||
m_default_value.assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
OptionValueString(const char *current_value, const char *default_value)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_options(),
|
||||
m_validator(), m_validator_baton() {
|
||||
OptionValueString(const char *current_value, const char *default_value) {
|
||||
if (current_value && current_value[0])
|
||||
m_current_value.assign(current_value);
|
||||
if (default_value && default_value[0])
|
||||
|
@ -49,8 +44,7 @@ public:
|
|||
|
||||
OptionValueString(const char *value, ValidatorCallback validator,
|
||||
void *baton = nullptr)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_options(),
|
||||
m_validator(validator), m_validator_baton(baton) {
|
||||
: m_validator(validator), m_validator_baton(baton) {
|
||||
if (value && value[0]) {
|
||||
m_current_value.assign(value);
|
||||
m_default_value.assign(value);
|
||||
|
@ -59,8 +53,7 @@ public:
|
|||
|
||||
OptionValueString(const char *current_value, const char *default_value,
|
||||
ValidatorCallback validator, void *baton = nullptr)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_options(),
|
||||
m_validator(validator), m_validator_baton(baton) {
|
||||
: m_validator(validator), m_validator_baton(baton) {
|
||||
if (current_value && current_value[0])
|
||||
m_current_value.assign(current_value);
|
||||
if (default_value && default_value[0])
|
||||
|
|
|
@ -19,11 +19,10 @@ public:
|
|||
OptionValueUInt64() = default;
|
||||
|
||||
OptionValueUInt64(uint64_t value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value) {}
|
||||
: m_current_value(value), m_default_value(value) {}
|
||||
|
||||
OptionValueUInt64(uint64_t current_value, uint64_t default_value)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value) {}
|
||||
: m_current_value(current_value), m_default_value(default_value) {}
|
||||
|
||||
~OptionValueUInt64() override = default;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class OptionValueUUID : public OptionValue {
|
|||
public:
|
||||
OptionValueUUID() = default;
|
||||
|
||||
OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
|
||||
OptionValueUUID(const UUID &uuid) : m_uuid(uuid) {}
|
||||
|
||||
~OptionValueUUID() override = default;
|
||||
|
||||
|
|
|
@ -254,8 +254,7 @@ public:
|
|||
|
||||
class OptionGroupOptions : public Options {
|
||||
public:
|
||||
OptionGroupOptions()
|
||||
: Options(), m_option_defs(), m_option_infos(), m_did_finalize(false) {}
|
||||
OptionGroupOptions() : m_did_finalize(false) {}
|
||||
|
||||
~OptionGroupOptions() override = default;
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ CommandAlias::CommandAlias(CommandInterpreter &interpreter,
|
|||
llvm::StringRef help, llvm::StringRef syntax,
|
||||
uint32_t flags)
|
||||
: CommandObject(interpreter, name, help, syntax, flags),
|
||||
m_underlying_command_sp(), m_option_string(std::string(options_args)),
|
||||
m_option_string(std::string(options_args)),
|
||||
m_option_args_sp(new OptionArgVector),
|
||||
m_is_dashdash_alias(eLazyBoolCalculate), m_did_set_help(false),
|
||||
m_did_set_help_long(false) {
|
||||
|
|
|
@ -122,9 +122,8 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
|
|||
IOHandlerDelegate(IOHandlerDelegate::Completion::LLDBCommand),
|
||||
m_debugger(debugger), m_synchronous_execution(true),
|
||||
m_skip_lldbinit_files(false), m_skip_app_init_files(false),
|
||||
m_command_io_handler_sp(), m_comment_char('#'),
|
||||
m_batch_command_mode(false), m_truncation_warning(eNoTruncation),
|
||||
m_command_source_depth(0), m_result(), m_transcript_stream() {
|
||||
m_comment_char('#'), m_batch_command_mode(false),
|
||||
m_truncation_warning(eNoTruncation), m_command_source_depth(0) {
|
||||
SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit");
|
||||
SetEventName(eBroadcastBitResetPrompt, "reset-prompt");
|
||||
SetEventName(eBroadcastBitQuitCommandReceived, "quit");
|
||||
|
|
|
@ -42,8 +42,7 @@ CommandObject::CommandObject(CommandInterpreter &interpreter,
|
|||
llvm::StringRef name, llvm::StringRef help,
|
||||
llvm::StringRef syntax, uint32_t flags)
|
||||
: m_interpreter(interpreter), m_cmd_name(std::string(name)),
|
||||
m_cmd_help_short(), m_cmd_help_long(), m_cmd_syntax(), m_flags(flags),
|
||||
m_arguments(), m_deprecated_command_override_callback(nullptr),
|
||||
m_flags(flags), m_deprecated_command_override_callback(nullptr),
|
||||
m_command_override_callback(nullptr), m_command_override_baton(nullptr) {
|
||||
m_cmd_help_short = std::string(help);
|
||||
m_cmd_syntax = std::string(syntax);
|
||||
|
|
|
@ -17,8 +17,7 @@ OptionGroupFile::OptionGroupFile(uint32_t usage_mask, bool required,
|
|||
const char *long_option, int short_option,
|
||||
uint32_t completion_type,
|
||||
lldb::CommandArgumentType argument_type,
|
||||
const char *usage_text)
|
||||
: m_file() {
|
||||
const char *usage_text) {
|
||||
m_option_definition.usage_mask = usage_mask;
|
||||
m_option_definition.required = required;
|
||||
m_option_definition.long_option = long_option;
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
OptionGroupOutputFile::OptionGroupOutputFile()
|
||||
: m_file(), m_append(false, false) {}
|
||||
OptionGroupOutputFile::OptionGroupOutputFile() : m_append(false, false) {}
|
||||
|
||||
static const uint32_t SHORT_OPTION_APND = 0x61706e64; // 'apnd'
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ OptionGroupPythonClassWithDict::OptionGroupPythonClassWithDict
|
|||
bool is_class,
|
||||
int class_option,
|
||||
int key_option,
|
||||
int value_option) : OptionGroup(), m_is_class(is_class) {
|
||||
int value_option) : m_is_class(is_class) {
|
||||
m_key_usage_text.assign("The key for a key/value pair passed to the "
|
||||
"implementation of a ");
|
||||
m_key_usage_text.append(class_use);
|
||||
|
|
|
@ -67,8 +67,8 @@ static Status ValidateSummaryString(const char *str, void *) {
|
|||
}
|
||||
|
||||
OptionGroupVariable::OptionGroupVariable(bool show_frame_options)
|
||||
: OptionGroup(), include_frame_options(show_frame_options),
|
||||
summary(ValidateNamedSummary), summary_string(ValidateSummaryString) {}
|
||||
: include_frame_options(show_frame_options), summary(ValidateNamedSummary),
|
||||
summary_string(ValidateSummaryString) {}
|
||||
|
||||
Status
|
||||
OptionGroupVariable::SetOptionValue(uint32_t option_idx,
|
||||
|
|
|
@ -15,8 +15,7 @@ using namespace lldb_private;
|
|||
|
||||
OptionValueEnumeration::OptionValueEnumeration(
|
||||
const OptionEnumValues &enumerators, enum_type value)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value),
|
||||
m_enumerations() {
|
||||
: m_current_value(value), m_default_value(value) {
|
||||
SetEnumerations(enumerators);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ using namespace lldb_private;
|
|||
// only usefully complete in the file name part of it so it should be good
|
||||
// enough.
|
||||
OptionValueFileColonLine::OptionValueFileColonLine()
|
||||
: OptionValue(), m_file_spec(), m_line_number(LLDB_INVALID_LINE_NUMBER),
|
||||
: m_line_number(LLDB_INVALID_LINE_NUMBER),
|
||||
m_column_number(LLDB_INVALID_COLUMN_NUMBER),
|
||||
m_completion_mask(CommandCompletions::eSourceFileCompletion) {}
|
||||
|
||||
OptionValueFileColonLine::OptionValueFileColonLine(llvm::StringRef input)
|
||||
: OptionValue(), m_file_spec(), m_line_number(LLDB_INVALID_LINE_NUMBER),
|
||||
: m_line_number(LLDB_INVALID_LINE_NUMBER),
|
||||
m_column_number(LLDB_INVALID_COLUMN_NUMBER),
|
||||
m_completion_mask(CommandCompletions::eSourceFileCompletion) {
|
||||
SetValueFromString(input, eVarSetOperationAssign);
|
||||
|
|
|
@ -19,22 +19,18 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
|
||||
OptionValueFileSpec::OptionValueFileSpec(bool resolve)
|
||||
: OptionValue(), m_current_value(), m_default_value(), m_data_sp(),
|
||||
m_data_mod_time(),
|
||||
m_completion_mask(CommandCompletions::eDiskFileCompletion),
|
||||
: m_completion_mask(CommandCompletions::eDiskFileCompletion),
|
||||
m_resolve(resolve) {}
|
||||
|
||||
OptionValueFileSpec::OptionValueFileSpec(const FileSpec &value, bool resolve)
|
||||
: OptionValue(), m_current_value(value), m_default_value(value),
|
||||
m_data_sp(), m_data_mod_time(),
|
||||
: m_current_value(value), m_default_value(value),
|
||||
m_completion_mask(CommandCompletions::eDiskFileCompletion),
|
||||
m_resolve(resolve) {}
|
||||
|
||||
OptionValueFileSpec::OptionValueFileSpec(const FileSpec ¤t_value,
|
||||
const FileSpec &default_value,
|
||||
bool resolve)
|
||||
: OptionValue(), m_current_value(current_value),
|
||||
m_default_value(default_value), m_data_sp(), m_data_mod_time(),
|
||||
: m_current_value(current_value), m_default_value(default_value),
|
||||
m_completion_mask(CommandCompletions::eDiskFileCompletion),
|
||||
m_resolve(resolve) {}
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
OptionValueFormatEntity::OptionValueFormatEntity(const char *default_format)
|
||||
: OptionValue(), m_current_format(), m_default_format(), m_current_entry(),
|
||||
m_default_entry() {
|
||||
OptionValueFormatEntity::OptionValueFormatEntity(const char *default_format) {
|
||||
if (default_format && default_format[0]) {
|
||||
llvm::StringRef default_format_str(default_format);
|
||||
Status error = FormatEntity::Parse(default_format_str, m_default_entry);
|
||||
|
|
|
@ -20,13 +20,11 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
OptionValueProperties::OptionValueProperties(ConstString name)
|
||||
: OptionValue(), m_name(name), m_properties(), m_name_to_index() {}
|
||||
OptionValueProperties::OptionValueProperties(ConstString name) : m_name(name) {}
|
||||
|
||||
OptionValueProperties::OptionValueProperties(
|
||||
const OptionValueProperties &global_properties)
|
||||
: OptionValue(global_properties),
|
||||
std::enable_shared_from_this<OptionValueProperties>(),
|
||||
m_name(global_properties.m_name),
|
||||
m_properties(global_properties.m_properties),
|
||||
m_name_to_index(global_properties.m_name_to_index) {
|
||||
|
|
|
@ -25,7 +25,7 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
|
||||
// Options
|
||||
Options::Options() : m_getopt_table() { BuildValidOptionSets(); }
|
||||
Options::Options() { BuildValidOptionSets(); }
|
||||
|
||||
Options::~Options() = default;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ using namespace lldb_private;
|
|||
|
||||
Property::Property(const PropertyDefinition &definition)
|
||||
: m_name(definition.name), m_description(definition.description),
|
||||
m_value_sp(), m_is_global(definition.global) {
|
||||
m_is_global(definition.global) {
|
||||
switch (definition.type) {
|
||||
case OptionValue::eTypeInvalid:
|
||||
case OptionValue::eTypeProperties:
|
||||
|
|
Loading…
Reference in New Issue