[lldb/Interpreter][NFC] Remove explicit default initialization of members and base...
authorTatyana Krasnukha <tatyana@synopsys.com>
Fri, 19 Feb 2021 20:42:42 +0000 (23:42 +0300)
committerTatyana Krasnukha <tatyana@synopsys.com>
Sun, 28 Feb 2021 16:23:18 +0000 (19:23 +0300)
According to clang-tidy's readability-redundant-member-init.

29 files changed:
lldb/include/lldb/Interpreter/OptionGroupPlatform.h
lldb/include/lldb/Interpreter/OptionValueArch.h
lldb/include/lldb/Interpreter/OptionValueBoolean.h
lldb/include/lldb/Interpreter/OptionValueChar.h
lldb/include/lldb/Interpreter/OptionValueDictionary.h
lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
lldb/include/lldb/Interpreter/OptionValueFormat.h
lldb/include/lldb/Interpreter/OptionValueLanguage.h
lldb/include/lldb/Interpreter/OptionValuePathMappings.h
lldb/include/lldb/Interpreter/OptionValueRegex.h
lldb/include/lldb/Interpreter/OptionValueSInt64.h
lldb/include/lldb/Interpreter/OptionValueString.h
lldb/include/lldb/Interpreter/OptionValueUInt64.h
lldb/include/lldb/Interpreter/OptionValueUUID.h
lldb/include/lldb/Interpreter/Options.h
lldb/source/Interpreter/CommandAlias.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/OptionGroupFile.cpp
lldb/source/Interpreter/OptionGroupOutputFile.cpp
lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
lldb/source/Interpreter/OptionGroupVariable.cpp
lldb/source/Interpreter/OptionValueEnumeration.cpp
lldb/source/Interpreter/OptionValueFileColonLine.cpp
lldb/source/Interpreter/OptionValueFileSpec.cpp
lldb/source/Interpreter/OptionValueFormatEntity.cpp
lldb/source/Interpreter/OptionValueProperties.cpp
lldb/source/Interpreter/Options.cpp
lldb/source/Interpreter/Property.cpp

index 99945e5..fed2791 100644 (file)
@@ -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;
 
index d079b38..22f75a6 100644 (file)
@@ -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 &current_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;
 
index d0eb436..6ae464b 100644 (file)
@@ -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;
 
index f3fd281..78f91df 100644 (file)
@@ -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;
 
index e645f32..f153898 100644 (file)
@@ -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;
 
index b2dc11b..73c8058 100644 (file)
@@ -21,7 +21,7 @@ public:
   OptionValueFileSpecList() = default;
 
   OptionValueFileSpecList(const FileSpecList &current_value)
-      : OptionValue(), m_current_value(current_value) {}
+      : m_current_value(current_value) {}
 
   ~OptionValueFileSpecList() override = default;
 
index eb80f09..aa5ec59 100644 (file)
@@ -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;
 
index bfe953a..44f5eaa 100644 (file)
@@ -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;
 
index e8af4bb..3f23246 100644 (file)
@@ -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;
 
index d858958..fbfb789 100644 (file)
@@ -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;
index 625193f..54295cb 100644 (file)
@@ -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;
 
index 4d78cbb..948eef7 100644 (file)
@@ -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])
index bee8ff5..bc21b1a 100644 (file)
@@ -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;
 
index 1673078..2d1d8bd 100644 (file)
@@ -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;
 
index 9738cce..0d86fac 100644 (file)
@@ -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;
 
index a5e0339..f0f577b 100644 (file)
@@ -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) {
index f0a6baa..b0ff634 100644 (file)
@@ -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");
index 9d27de4..22effff 100644 (file)
@@ -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);
index 8be4b18..25f3a9b 100644 (file)
@@ -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;
index 1f30508..6a626bd 100644 (file)
@@ -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'
 
index e768feb..654cc8f 100644 (file)
@@ -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);
index 2451a3e..20a521b 100644 (file)
@@ -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,
index 8fcd8db..d216a5c 100644 (file)
@@ -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);
 }
 
index dac557c..6d5d82d 100644 (file)
@@ -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);
index a03fd55..8d43371 100644 (file)
@@ -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 &current_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) {}
 
index 509a217..00d5892 100644 (file)
@@ -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);
index 6c4e77f..22447a8 100644 (file)
 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) {
index 5d3864d..f39ef20 100644 (file)
@@ -25,7 +25,7 @@ using namespace lldb;
 using namespace lldb_private;
 
 // Options
-Options::Options() : m_getopt_table() { BuildValidOptionSets(); }
+Options::Options() { BuildValidOptionSets(); }
 
 Options::~Options() = default;
 
index a024976..55400a2 100644 (file)
@@ -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: