Skip to content

Commit 8cdcd41

Browse files
committed
[lldb/Interpreter][NFC] Remove explicit default initialization of members and base classes
According to clang-tidy's readability-redundant-member-init.
1 parent 54d03a4 commit 8cdcd41

29 files changed

+46
-79
lines changed

lldb/include/lldb/Interpreter/OptionGroupPlatform.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ namespace lldb_private {
2121
class OptionGroupPlatform : public OptionGroup {
2222
public:
2323
OptionGroupPlatform(bool include_platform_option)
24-
: OptionGroup(), m_platform_name(), m_sdk_sysroot(),
25-
m_include_platform_option(include_platform_option) {}
24+
: m_include_platform_option(include_platform_option) {}
2625

2726
~OptionGroupPlatform() override = default;
2827

lldb/include/lldb/Interpreter/OptionValueArch.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ class OptionValueArch : public OptionValue {
1919
public:
2020
OptionValueArch() = default;
2121

22-
OptionValueArch(const char *triple)
23-
: OptionValue(), m_current_value(triple), m_default_value() {
22+
OptionValueArch(const char *triple) : m_current_value(triple) {
2423
m_default_value = m_current_value;
2524
}
2625

2726
OptionValueArch(const ArchSpec &value)
28-
: OptionValue(), m_current_value(value), m_default_value(value) {}
27+
: m_current_value(value), m_default_value(value) {}
2928

3029
OptionValueArch(const ArchSpec &current_value, const ArchSpec &default_value)
31-
: OptionValue(), m_current_value(current_value),
32-
m_default_value(default_value) {}
30+
: m_current_value(current_value), m_default_value(default_value) {}
3331

3432
~OptionValueArch() override = default;
3533

lldb/include/lldb/Interpreter/OptionValueBoolean.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ namespace lldb_private {
1616
class OptionValueBoolean : public OptionValue {
1717
public:
1818
OptionValueBoolean(bool value)
19-
: OptionValue(), m_current_value(value), m_default_value(value) {}
19+
: m_current_value(value), m_default_value(value) {}
2020
OptionValueBoolean(bool current_value, bool default_value)
21-
: OptionValue(), m_current_value(current_value),
22-
m_default_value(default_value) {}
21+
: m_current_value(current_value), m_default_value(default_value) {}
2322

2423
~OptionValueBoolean() override = default;
2524

lldb/include/lldb/Interpreter/OptionValueChar.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ namespace lldb_private {
1616
class OptionValueChar : public OptionValue {
1717
public:
1818
OptionValueChar(char value)
19-
: OptionValue(), m_current_value(value), m_default_value(value) {}
19+
: m_current_value(value), m_default_value(value) {}
2020

2121
OptionValueChar(char current_value, char default_value)
22-
: OptionValue(), m_current_value(current_value),
23-
m_default_value(default_value) {}
22+
: m_current_value(current_value), m_default_value(default_value) {}
2423

2524
~OptionValueChar() override = default;
2625

lldb/include/lldb/Interpreter/OptionValueDictionary.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class OptionValueDictionary : public OptionValue {
1919
public:
2020
OptionValueDictionary(uint32_t type_mask = UINT32_MAX,
2121
bool raw_value_dump = true)
22-
: OptionValue(), m_type_mask(type_mask), m_values(),
23-
m_raw_value_dump(raw_value_dump) {}
22+
: m_type_mask(type_mask), m_raw_value_dump(raw_value_dump) {}
2423

2524
~OptionValueDictionary() override = default;
2625

lldb/include/lldb/Interpreter/OptionValueFileSpecList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class OptionValueFileSpecList : public OptionValue {
2121
OptionValueFileSpecList() = default;
2222

2323
OptionValueFileSpecList(const FileSpecList &current_value)
24-
: OptionValue(), m_current_value(current_value) {}
24+
: m_current_value(current_value) {}
2525

2626
~OptionValueFileSpecList() override = default;
2727

lldb/include/lldb/Interpreter/OptionValueFormat.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ namespace lldb_private {
1616
class OptionValueFormat : public OptionValue {
1717
public:
1818
OptionValueFormat(lldb::Format value)
19-
: OptionValue(), m_current_value(value), m_default_value(value) {}
19+
: m_current_value(value), m_default_value(value) {}
2020

2121
OptionValueFormat(lldb::Format current_value, lldb::Format default_value)
22-
: OptionValue(), m_current_value(current_value),
23-
m_default_value(default_value) {}
22+
: m_current_value(current_value), m_default_value(default_value) {}
2423

2524
~OptionValueFormat() override = default;
2625

lldb/include/lldb/Interpreter/OptionValueLanguage.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ namespace lldb_private {
1818
class OptionValueLanguage : public OptionValue {
1919
public:
2020
OptionValueLanguage(lldb::LanguageType value)
21-
: OptionValue(), m_current_value(value), m_default_value(value) {}
21+
: m_current_value(value), m_default_value(value) {}
2222

2323
OptionValueLanguage(lldb::LanguageType current_value,
2424
lldb::LanguageType default_value)
25-
: OptionValue(), m_current_value(current_value),
26-
m_default_value(default_value) {}
25+
: m_current_value(current_value), m_default_value(default_value) {}
2726

2827
~OptionValueLanguage() override = default;
2928

lldb/include/lldb/Interpreter/OptionValuePathMappings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace lldb_private {
1717
class OptionValuePathMappings : public OptionValue {
1818
public:
1919
OptionValuePathMappings(bool notify_changes)
20-
: OptionValue(), m_path_mappings(), m_notify_changes(notify_changes) {}
20+
: m_notify_changes(notify_changes) {}
2121

2222
~OptionValuePathMappings() override = default;
2323

lldb/include/lldb/Interpreter/OptionValueRegex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace lldb_private {
1717
class OptionValueRegex : public OptionValue {
1818
public:
1919
OptionValueRegex(const char *value = nullptr)
20-
: OptionValue(), m_regex(llvm::StringRef::withNullAsEmpty(value)),
20+
: m_regex(llvm::StringRef::withNullAsEmpty(value)),
2121
m_default_regex_str(llvm::StringRef::withNullAsEmpty(value).str()) {}
2222

2323
~OptionValueRegex() override = default;

lldb/include/lldb/Interpreter/OptionValueSInt64.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,10 @@ class OptionValueSInt64 : public OptionValue {
1919
OptionValueSInt64() = default;
2020

2121
OptionValueSInt64(int64_t value)
22-
: OptionValue(), m_current_value(value), m_default_value(value),
23-
m_min_value(INT64_MIN), m_max_value(INT64_MAX) {}
22+
: m_current_value(value), m_default_value(value) {}
2423

2524
OptionValueSInt64(int64_t current_value, int64_t default_value)
26-
: OptionValue(), m_current_value(current_value),
27-
m_default_value(default_value), m_min_value(INT64_MIN),
28-
m_max_value(INT64_MAX) {}
25+
: m_current_value(current_value), m_default_value(default_value) {}
2926

3027
OptionValueSInt64(const OptionValueSInt64 &rhs) = default;
3128

lldb/include/lldb/Interpreter/OptionValueString.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,16 @@ class OptionValueString : public OptionValue {
2626
OptionValueString() = default;
2727

2828
OptionValueString(ValidatorCallback validator, void *baton = nullptr)
29-
: OptionValue(), m_current_value(), m_default_value(), m_options(),
30-
m_validator(validator), m_validator_baton(baton) {}
29+
: m_validator(validator), m_validator_baton(baton) {}
3130

32-
OptionValueString(const char *value)
33-
: OptionValue(), m_current_value(), m_default_value(), m_options(),
34-
m_validator(), m_validator_baton() {
31+
OptionValueString(const char *value) {
3532
if (value && value[0]) {
3633
m_current_value.assign(value);
3734
m_default_value.assign(value);
3835
}
3936
}
4037

41-
OptionValueString(const char *current_value, const char *default_value)
42-
: OptionValue(), m_current_value(), m_default_value(), m_options(),
43-
m_validator(), m_validator_baton() {
38+
OptionValueString(const char *current_value, const char *default_value) {
4439
if (current_value && current_value[0])
4540
m_current_value.assign(current_value);
4641
if (default_value && default_value[0])
@@ -49,8 +44,7 @@ class OptionValueString : public OptionValue {
4944

5045
OptionValueString(const char *value, ValidatorCallback validator,
5146
void *baton = nullptr)
52-
: OptionValue(), m_current_value(), m_default_value(), m_options(),
53-
m_validator(validator), m_validator_baton(baton) {
47+
: m_validator(validator), m_validator_baton(baton) {
5448
if (value && value[0]) {
5549
m_current_value.assign(value);
5650
m_default_value.assign(value);
@@ -59,8 +53,7 @@ class OptionValueString : public OptionValue {
5953

6054
OptionValueString(const char *current_value, const char *default_value,
6155
ValidatorCallback validator, void *baton = nullptr)
62-
: OptionValue(), m_current_value(), m_default_value(), m_options(),
63-
m_validator(validator), m_validator_baton(baton) {
56+
: m_validator(validator), m_validator_baton(baton) {
6457
if (current_value && current_value[0])
6558
m_current_value.assign(current_value);
6659
if (default_value && default_value[0])

lldb/include/lldb/Interpreter/OptionValueUInt64.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ class OptionValueUInt64 : public OptionValue {
1919
OptionValueUInt64() = default;
2020

2121
OptionValueUInt64(uint64_t value)
22-
: OptionValue(), m_current_value(value), m_default_value(value) {}
22+
: m_current_value(value), m_default_value(value) {}
2323

2424
OptionValueUInt64(uint64_t current_value, uint64_t default_value)
25-
: OptionValue(), m_current_value(current_value),
26-
m_default_value(default_value) {}
25+
: m_current_value(current_value), m_default_value(default_value) {}
2726

2827
~OptionValueUInt64() override = default;
2928

lldb/include/lldb/Interpreter/OptionValueUUID.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class OptionValueUUID : public OptionValue {
1818
public:
1919
OptionValueUUID() = default;
2020

21-
OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
21+
OptionValueUUID(const UUID &uuid) : m_uuid(uuid) {}
2222

2323
~OptionValueUUID() override = default;
2424

lldb/include/lldb/Interpreter/Options.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ class OptionGroup {
254254

255255
class OptionGroupOptions : public Options {
256256
public:
257-
OptionGroupOptions()
258-
: Options(), m_option_defs(), m_option_infos(), m_did_finalize(false) {}
257+
OptionGroupOptions() : m_did_finalize(false) {}
259258

260259
~OptionGroupOptions() override = default;
261260

lldb/source/Interpreter/CommandAlias.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CommandAlias::CommandAlias(CommandInterpreter &interpreter,
8080
llvm::StringRef help, llvm::StringRef syntax,
8181
uint32_t flags)
8282
: CommandObject(interpreter, name, help, syntax, flags),
83-
m_underlying_command_sp(), m_option_string(std::string(options_args)),
83+
m_option_string(std::string(options_args)),
8484
m_option_args_sp(new OptionArgVector),
8585
m_is_dashdash_alias(eLazyBoolCalculate), m_did_set_help(false),
8686
m_did_set_help_long(false) {

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
122122
IOHandlerDelegate(IOHandlerDelegate::Completion::LLDBCommand),
123123
m_debugger(debugger), m_synchronous_execution(true),
124124
m_skip_lldbinit_files(false), m_skip_app_init_files(false),
125-
m_command_io_handler_sp(), m_comment_char('#'),
126-
m_batch_command_mode(false), m_truncation_warning(eNoTruncation),
127-
m_command_source_depth(0), m_result(), m_transcript_stream() {
125+
m_comment_char('#'), m_batch_command_mode(false),
126+
m_truncation_warning(eNoTruncation), m_command_source_depth(0) {
128127
SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit");
129128
SetEventName(eBroadcastBitResetPrompt, "reset-prompt");
130129
SetEventName(eBroadcastBitQuitCommandReceived, "quit");

lldb/source/Interpreter/CommandObject.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ CommandObject::CommandObject(CommandInterpreter &interpreter,
4242
llvm::StringRef name, llvm::StringRef help,
4343
llvm::StringRef syntax, uint32_t flags)
4444
: m_interpreter(interpreter), m_cmd_name(std::string(name)),
45-
m_cmd_help_short(), m_cmd_help_long(), m_cmd_syntax(), m_flags(flags),
46-
m_arguments(), m_deprecated_command_override_callback(nullptr),
45+
m_flags(flags), m_deprecated_command_override_callback(nullptr),
4746
m_command_override_callback(nullptr), m_command_override_baton(nullptr) {
4847
m_cmd_help_short = std::string(help);
4948
m_cmd_syntax = std::string(syntax);

lldb/source/Interpreter/OptionGroupFile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ OptionGroupFile::OptionGroupFile(uint32_t usage_mask, bool required,
1717
const char *long_option, int short_option,
1818
uint32_t completion_type,
1919
lldb::CommandArgumentType argument_type,
20-
const char *usage_text)
21-
: m_file() {
20+
const char *usage_text) {
2221
m_option_definition.usage_mask = usage_mask;
2322
m_option_definition.required = required;
2423
m_option_definition.long_option = long_option;

lldb/source/Interpreter/OptionGroupOutputFile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
using namespace lldb;
1414
using namespace lldb_private;
1515

16-
OptionGroupOutputFile::OptionGroupOutputFile()
17-
: m_file(), m_append(false, false) {}
16+
OptionGroupOutputFile::OptionGroupOutputFile() : m_append(false, false) {}
1817

1918
static const uint32_t SHORT_OPTION_APND = 0x61706e64; // 'apnd'
2019

lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OptionGroupPythonClassWithDict::OptionGroupPythonClassWithDict
1818
bool is_class,
1919
int class_option,
2020
int key_option,
21-
int value_option) : OptionGroup(), m_is_class(is_class) {
21+
int value_option) : m_is_class(is_class) {
2222
m_key_usage_text.assign("The key for a key/value pair passed to the "
2323
"implementation of a ");
2424
m_key_usage_text.append(class_use);

lldb/source/Interpreter/OptionGroupVariable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ static Status ValidateSummaryString(const char *str, void *) {
6767
}
6868

6969
OptionGroupVariable::OptionGroupVariable(bool show_frame_options)
70-
: OptionGroup(), include_frame_options(show_frame_options),
71-
summary(ValidateNamedSummary), summary_string(ValidateSummaryString) {}
70+
: include_frame_options(show_frame_options), summary(ValidateNamedSummary),
71+
summary_string(ValidateSummaryString) {}
7272

7373
Status
7474
OptionGroupVariable::SetOptionValue(uint32_t option_idx,

lldb/source/Interpreter/OptionValueEnumeration.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ using namespace lldb_private;
1515

1616
OptionValueEnumeration::OptionValueEnumeration(
1717
const OptionEnumValues &enumerators, enum_type value)
18-
: OptionValue(), m_current_value(value), m_default_value(value),
19-
m_enumerations() {
18+
: m_current_value(value), m_default_value(value) {
2019
SetEnumerations(enumerators);
2120
}
2221

lldb/source/Interpreter/OptionValueFileColonLine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ using namespace lldb_private;
2222
// only usefully complete in the file name part of it so it should be good
2323
// enough.
2424
OptionValueFileColonLine::OptionValueFileColonLine()
25-
: OptionValue(), m_file_spec(), m_line_number(LLDB_INVALID_LINE_NUMBER),
25+
: m_line_number(LLDB_INVALID_LINE_NUMBER),
2626
m_column_number(LLDB_INVALID_COLUMN_NUMBER),
2727
m_completion_mask(CommandCompletions::eSourceFileCompletion) {}
2828

2929
OptionValueFileColonLine::OptionValueFileColonLine(llvm::StringRef input)
30-
: OptionValue(), m_file_spec(), m_line_number(LLDB_INVALID_LINE_NUMBER),
30+
: m_line_number(LLDB_INVALID_LINE_NUMBER),
3131
m_column_number(LLDB_INVALID_COLUMN_NUMBER),
3232
m_completion_mask(CommandCompletions::eSourceFileCompletion) {
3333
SetValueFromString(input, eVarSetOperationAssign);

lldb/source/Interpreter/OptionValueFileSpec.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,18 @@ using namespace lldb;
1919
using namespace lldb_private;
2020

2121
OptionValueFileSpec::OptionValueFileSpec(bool resolve)
22-
: OptionValue(), m_current_value(), m_default_value(), m_data_sp(),
23-
m_data_mod_time(),
24-
m_completion_mask(CommandCompletions::eDiskFileCompletion),
22+
: m_completion_mask(CommandCompletions::eDiskFileCompletion),
2523
m_resolve(resolve) {}
2624

2725
OptionValueFileSpec::OptionValueFileSpec(const FileSpec &value, bool resolve)
28-
: OptionValue(), m_current_value(value), m_default_value(value),
29-
m_data_sp(), m_data_mod_time(),
26+
: m_current_value(value), m_default_value(value),
3027
m_completion_mask(CommandCompletions::eDiskFileCompletion),
3128
m_resolve(resolve) {}
3229

3330
OptionValueFileSpec::OptionValueFileSpec(const FileSpec &current_value,
3431
const FileSpec &default_value,
3532
bool resolve)
36-
: OptionValue(), m_current_value(current_value),
37-
m_default_value(default_value), m_data_sp(), m_data_mod_time(),
33+
: m_current_value(current_value), m_default_value(default_value),
3834
m_completion_mask(CommandCompletions::eDiskFileCompletion),
3935
m_resolve(resolve) {}
4036

lldb/source/Interpreter/OptionValueFormatEntity.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
using namespace lldb;
1616
using namespace lldb_private;
1717

18-
OptionValueFormatEntity::OptionValueFormatEntity(const char *default_format)
19-
: OptionValue(), m_current_format(), m_default_format(), m_current_entry(),
20-
m_default_entry() {
18+
OptionValueFormatEntity::OptionValueFormatEntity(const char *default_format) {
2119
if (default_format && default_format[0]) {
2220
llvm::StringRef default_format_str(default_format);
2321
Status error = FormatEntity::Parse(default_format_str, m_default_entry);

lldb/source/Interpreter/OptionValueProperties.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
using namespace lldb;
2121
using namespace lldb_private;
2222

23-
OptionValueProperties::OptionValueProperties(ConstString name)
24-
: OptionValue(), m_name(name), m_properties(), m_name_to_index() {}
23+
OptionValueProperties::OptionValueProperties(ConstString name) : m_name(name) {}
2524

2625
OptionValueProperties::OptionValueProperties(
2726
const OptionValueProperties &global_properties)
2827
: OptionValue(global_properties),
29-
std::enable_shared_from_this<OptionValueProperties>(),
3028
m_name(global_properties.m_name),
3129
m_properties(global_properties.m_properties),
3230
m_name_to_index(global_properties.m_name_to_index) {

lldb/source/Interpreter/Options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace lldb;
2525
using namespace lldb_private;
2626

2727
// Options
28-
Options::Options() : m_getopt_table() { BuildValidOptionSets(); }
28+
Options::Options() { BuildValidOptionSets(); }
2929

3030
Options::~Options() = default;
3131

lldb/source/Interpreter/Property.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace lldb_private;
2222

2323
Property::Property(const PropertyDefinition &definition)
2424
: m_name(definition.name), m_description(definition.description),
25-
m_value_sp(), m_is_global(definition.global) {
25+
m_is_global(definition.global) {
2626
switch (definition.type) {
2727
case OptionValue::eTypeInvalid:
2828
case OptionValue::eTypeProperties:

0 commit comments

Comments
 (0)