From 54d03a4985bc9a0a84c4dff835ec6ed0f607582f Mon Sep 17 00:00:00 2001 From: Tatyana Krasnukha Date: Thu, 18 Feb 2021 12:32:22 +0300 Subject: [PATCH] [lldb/Interpreter][NFC] Replace default constructors/destructors bodies with "=default" --- lldb/include/lldb/Interpreter/CommandHistory.h | 4 ++-- lldb/include/lldb/Interpreter/CommandObject.h | 2 +- lldb/include/lldb/Interpreter/CommandReturnObject.h | 2 +- .../lldb/Interpreter/OptionGroupArchitecture.h | 4 ++-- lldb/include/lldb/Interpreter/OptionGroupBoolean.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupFile.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupFormat.h | 3 +-- lldb/include/lldb/Interpreter/OptionGroupOutputFile.h | 3 +-- .../lldb/Interpreter/OptionGroupPythonClassWithDict.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupString.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupUInt64.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupUUID.h | 4 ++-- .../lldb/Interpreter/OptionGroupValueObjectDisplay.h | 4 ++-- lldb/include/lldb/Interpreter/OptionGroupVariable.h | 2 +- lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h | 4 ++-- lldb/include/lldb/Interpreter/OptionValueArch.h | 4 ++-- lldb/include/lldb/Interpreter/OptionValueArgs.h | 2 +- lldb/include/lldb/Interpreter/OptionValueArray.h | 2 +- lldb/include/lldb/Interpreter/OptionValueBoolean.h | 2 +- lldb/include/lldb/Interpreter/OptionValueChar.h | 2 +- lldb/include/lldb/Interpreter/OptionValueDictionary.h | 2 +- .../include/lldb/Interpreter/OptionValueEnumeration.h | 2 +- .../lldb/Interpreter/OptionValueFileColonLine.h | 2 +- lldb/include/lldb/Interpreter/OptionValueFileSpec.h | 2 +- .../lldb/Interpreter/OptionValueFileSpecList.h | 4 ++-- lldb/include/lldb/Interpreter/OptionValueFormat.h | 2 +- .../lldb/Interpreter/OptionValueFormatEntity.h | 2 +- lldb/include/lldb/Interpreter/OptionValueLanguage.h | 2 +- .../lldb/Interpreter/OptionValuePathMappings.h | 2 +- lldb/include/lldb/Interpreter/OptionValueProperties.h | 3 +-- lldb/include/lldb/Interpreter/OptionValueSInt64.h | 19 +++++++------------ lldb/include/lldb/Interpreter/OptionValueString.h | 8 +++----- lldb/include/lldb/Interpreter/OptionValueUInt64.h | 8 ++++---- lldb/include/lldb/Interpreter/OptionValueUUID.h | 4 ++-- lldb/include/lldb/Interpreter/ScriptInterpreter.h | 2 +- lldb/source/Interpreter/CommandHistory.cpp | 4 ---- lldb/source/Interpreter/CommandObject.cpp | 2 -- lldb/source/Interpreter/CommandReturnObject.cpp | 2 -- lldb/source/Interpreter/OptionGroupArchitecture.cpp | 4 ---- lldb/source/Interpreter/OptionGroupBoolean.cpp | 2 -- lldb/source/Interpreter/OptionGroupFile.cpp | 2 -- lldb/source/Interpreter/OptionGroupFormat.cpp | 2 -- lldb/source/Interpreter/OptionGroupOutputFile.cpp | 2 -- .../Interpreter/OptionGroupPythonClassWithDict.cpp | 2 -- lldb/source/Interpreter/OptionGroupString.cpp | 2 -- lldb/source/Interpreter/OptionGroupUInt64.cpp | 2 -- lldb/source/Interpreter/OptionGroupUUID.cpp | 4 ---- .../Interpreter/OptionGroupValueObjectDisplay.cpp | 4 ---- lldb/source/Interpreter/OptionGroupVariable.cpp | 2 -- lldb/source/Interpreter/OptionGroupWatchpoint.cpp | 4 ---- lldb/source/Interpreter/OptionValueEnumeration.cpp | 2 -- lldb/source/Interpreter/Options.cpp | 2 +- lldb/source/Interpreter/ScriptInterpreter.cpp | 2 -- 53 files changed, 55 insertions(+), 109 deletions(-) diff --git a/lldb/include/lldb/Interpreter/CommandHistory.h b/lldb/include/lldb/Interpreter/CommandHistory.h index fbb4224..12c170b 100644 --- a/lldb/include/lldb/Interpreter/CommandHistory.h +++ b/lldb/include/lldb/Interpreter/CommandHistory.h @@ -20,9 +20,9 @@ namespace lldb_private { class CommandHistory { public: - CommandHistory(); + CommandHistory() = default; - ~CommandHistory(); + ~CommandHistory() = default; size_t GetSize() const; diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h index d5ad969..8bc5d3e 100644 --- a/lldb/include/lldb/Interpreter/CommandObject.h +++ b/lldb/include/lldb/Interpreter/CommandObject.h @@ -113,7 +113,7 @@ public: llvm::StringRef help = "", llvm::StringRef syntax = "", uint32_t flags = 0); - virtual ~CommandObject(); + virtual ~CommandObject() = default; static const char * GetArgumentTypeAsCString(const lldb::CommandArgumentType arg_type); diff --git a/lldb/include/lldb/Interpreter/CommandReturnObject.h b/lldb/include/lldb/Interpreter/CommandReturnObject.h index 06b6485..c638b4b 100644 --- a/lldb/include/lldb/Interpreter/CommandReturnObject.h +++ b/lldb/include/lldb/Interpreter/CommandReturnObject.h @@ -26,7 +26,7 @@ class CommandReturnObject { public: CommandReturnObject(bool colors); - ~CommandReturnObject(); + ~CommandReturnObject() = default; llvm::StringRef GetOutputData() { lldb::StreamSP stream_sp(m_out_stream.GetStreamAtIndex(eStreamStringIndex)); diff --git a/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h b/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h index 1eadf45..4655a68 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h +++ b/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h @@ -18,9 +18,9 @@ namespace lldb_private { class OptionGroupArchitecture : public OptionGroup { public: - OptionGroupArchitecture(); + OptionGroupArchitecture() = default; - ~OptionGroupArchitecture() override; + ~OptionGroupArchitecture() override = default; llvm::ArrayRef GetDefinitions() override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupBoolean.h b/lldb/include/lldb/Interpreter/OptionGroupBoolean.h index 5411e99..9e2dad5 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupBoolean.h +++ b/lldb/include/lldb/Interpreter/OptionGroupBoolean.h @@ -25,7 +25,7 @@ public: const char *usage_text, bool default_value, bool no_argument_toggle_default); - ~OptionGroupBoolean() override; + ~OptionGroupBoolean() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::ArrayRef(&m_option_definition, 1); diff --git a/lldb/include/lldb/Interpreter/OptionGroupFile.h b/lldb/include/lldb/Interpreter/OptionGroupFile.h index 22b0eb4..1e4eb35 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupFile.h +++ b/lldb/include/lldb/Interpreter/OptionGroupFile.h @@ -24,7 +24,7 @@ public: lldb::CommandArgumentType argument_type, const char *usage_text); - ~OptionGroupFile() override; + ~OptionGroupFile() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::ArrayRef(&m_option_definition, 1); diff --git a/lldb/include/lldb/Interpreter/OptionGroupFormat.h b/lldb/include/lldb/Interpreter/OptionGroupFormat.h index 62c6f97..2d445b8 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupFormat.h +++ b/lldb/include/lldb/Interpreter/OptionGroupFormat.h @@ -32,13 +32,12 @@ public: uint64_t default_count = UINT64_MAX); // Pass UINT64_MAX to disable the "--count" option - ~OptionGroupFormat() override; + ~OptionGroupFormat() override = default; llvm::ArrayRef GetDefinitions() override; Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override; - Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete; void OptionParsingStarting(ExecutionContext *execution_context) override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h b/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h index a71998f..3902247 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h +++ b/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h @@ -20,13 +20,12 @@ class OptionGroupOutputFile : public OptionGroup { public: OptionGroupOutputFile(); - ~OptionGroupOutputFile() override; + ~OptionGroupOutputFile() override = default; llvm::ArrayRef GetDefinitions() override; Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override; - Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete; void OptionParsingStarting(ExecutionContext *execution_context) override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h b/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h index 695a5b9..7ad4bc0 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h +++ b/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h @@ -29,7 +29,7 @@ public: int key_option = 'k', int value_option = 'v'); - ~OptionGroupPythonClassWithDict() override; + ~OptionGroupPythonClassWithDict() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::ArrayRef(m_option_definition); diff --git a/lldb/include/lldb/Interpreter/OptionGroupString.h b/lldb/include/lldb/Interpreter/OptionGroupString.h index de1ef0b..aa02256 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupString.h +++ b/lldb/include/lldb/Interpreter/OptionGroupString.h @@ -22,7 +22,7 @@ public: lldb::CommandArgumentType argument_type, const char *usage_text, const char *default_value); - ~OptionGroupString() override; + ~OptionGroupString() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::ArrayRef(&m_option_definition, 1); diff --git a/lldb/include/lldb/Interpreter/OptionGroupUInt64.h b/lldb/include/lldb/Interpreter/OptionGroupUInt64.h index 1e21f56..7105917 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupUInt64.h +++ b/lldb/include/lldb/Interpreter/OptionGroupUInt64.h @@ -23,7 +23,7 @@ public: lldb::CommandArgumentType argument_type, const char *usage_text, uint64_t default_value); - ~OptionGroupUInt64() override; + ~OptionGroupUInt64() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::ArrayRef(&m_option_definition, 1); diff --git a/lldb/include/lldb/Interpreter/OptionGroupUUID.h b/lldb/include/lldb/Interpreter/OptionGroupUUID.h index b93d99d..4ca2a94 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupUUID.h +++ b/lldb/include/lldb/Interpreter/OptionGroupUUID.h @@ -18,9 +18,9 @@ namespace lldb_private { class OptionGroupUUID : public OptionGroup { public: - OptionGroupUUID(); + OptionGroupUUID() = default; - ~OptionGroupUUID() override; + ~OptionGroupUUID() override = default; llvm::ArrayRef GetDefinitions() override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h b/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h index 07879e5d..56452f4 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h +++ b/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h @@ -18,9 +18,9 @@ namespace lldb_private { class OptionGroupValueObjectDisplay : public OptionGroup { public: - OptionGroupValueObjectDisplay(); + OptionGroupValueObjectDisplay() = default; - ~OptionGroupValueObjectDisplay() override; + ~OptionGroupValueObjectDisplay() override = default; llvm::ArrayRef GetDefinitions() override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupVariable.h b/lldb/include/lldb/Interpreter/OptionGroupVariable.h index 4ba1e09..c9f1283 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupVariable.h +++ b/lldb/include/lldb/Interpreter/OptionGroupVariable.h @@ -20,7 +20,7 @@ class OptionGroupVariable : public OptionGroup { public: OptionGroupVariable(bool show_frame_options); - ~OptionGroupVariable() override; + ~OptionGroupVariable() override = default; llvm::ArrayRef GetDefinitions() override; diff --git a/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h b/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h index 054af4f..3381804 100644 --- a/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h +++ b/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h @@ -17,9 +17,9 @@ namespace lldb_private { class OptionGroupWatchpoint : public OptionGroup { public: - OptionGroupWatchpoint(); + OptionGroupWatchpoint() = default; - ~OptionGroupWatchpoint() override; + ~OptionGroupWatchpoint() override = default; static bool IsWatchSizeSupported(uint32_t watch_size); diff --git a/lldb/include/lldb/Interpreter/OptionValueArch.h b/lldb/include/lldb/Interpreter/OptionValueArch.h index 5047db7..d079b38 100644 --- a/lldb/include/lldb/Interpreter/OptionValueArch.h +++ b/lldb/include/lldb/Interpreter/OptionValueArch.h @@ -17,7 +17,7 @@ namespace lldb_private { class OptionValueArch : public OptionValue { public: - OptionValueArch() : OptionValue(), m_current_value(), m_default_value() {} + OptionValueArch() = default; OptionValueArch(const char *triple) : OptionValue(), m_current_value(triple), m_default_value() { @@ -31,7 +31,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueArch() override {} + ~OptionValueArch() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueArgs.h b/lldb/include/lldb/Interpreter/OptionValueArgs.h index 25f7fdd..2ef6ca5 100644 --- a/lldb/include/lldb/Interpreter/OptionValueArgs.h +++ b/lldb/include/lldb/Interpreter/OptionValueArgs.h @@ -19,7 +19,7 @@ public: : OptionValueArray( OptionValue::ConvertTypeToMask(OptionValue::eTypeString)) {} - ~OptionValueArgs() override {} + ~OptionValueArgs() override = default; size_t GetArgs(Args &args); diff --git a/lldb/include/lldb/Interpreter/OptionValueArray.h b/lldb/include/lldb/Interpreter/OptionValueArray.h index 14bc284..44bde8e 100644 --- a/lldb/include/lldb/Interpreter/OptionValueArray.h +++ b/lldb/include/lldb/Interpreter/OptionValueArray.h @@ -20,7 +20,7 @@ public: OptionValueArray(uint32_t type_mask = UINT32_MAX, bool raw_value_dump = false) : m_type_mask(type_mask), m_values(), m_raw_value_dump(raw_value_dump) {} - ~OptionValueArray() override {} + ~OptionValueArray() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueBoolean.h b/lldb/include/lldb/Interpreter/OptionValueBoolean.h index 6b58eb9..d0eb436 100644 --- a/lldb/include/lldb/Interpreter/OptionValueBoolean.h +++ b/lldb/include/lldb/Interpreter/OptionValueBoolean.h @@ -21,7 +21,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueBoolean() override {} + ~OptionValueBoolean() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueChar.h b/lldb/include/lldb/Interpreter/OptionValueChar.h index b5b39b77..f3fd281 100644 --- a/lldb/include/lldb/Interpreter/OptionValueChar.h +++ b/lldb/include/lldb/Interpreter/OptionValueChar.h @@ -22,7 +22,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueChar() override {} + ~OptionValueChar() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueDictionary.h b/lldb/include/lldb/Interpreter/OptionValueDictionary.h index dab1c3e..e645f32 100644 --- a/lldb/include/lldb/Interpreter/OptionValueDictionary.h +++ b/lldb/include/lldb/Interpreter/OptionValueDictionary.h @@ -22,7 +22,7 @@ public: : OptionValue(), m_type_mask(type_mask), m_values(), m_raw_value_dump(raw_value_dump) {} - ~OptionValueDictionary() override {} + ~OptionValueDictionary() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueEnumeration.h b/lldb/include/lldb/Interpreter/OptionValueEnumeration.h index 5ef6fa5..0fe7019 100644 --- a/lldb/include/lldb/Interpreter/OptionValueEnumeration.h +++ b/lldb/include/lldb/Interpreter/OptionValueEnumeration.h @@ -31,7 +31,7 @@ public: OptionValueEnumeration(const OptionEnumValues &enumerators, enum_type value); - ~OptionValueEnumeration() override; + ~OptionValueEnumeration() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueFileColonLine.h b/lldb/include/lldb/Interpreter/OptionValueFileColonLine.h index b3bb1f0..86fd0d5 100644 --- a/lldb/include/lldb/Interpreter/OptionValueFileColonLine.h +++ b/lldb/include/lldb/Interpreter/OptionValueFileColonLine.h @@ -21,7 +21,7 @@ public: OptionValueFileColonLine(); OptionValueFileColonLine(const llvm::StringRef input); - ~OptionValueFileColonLine() override {} + ~OptionValueFileColonLine() override = default; OptionValue::Type GetType() const override { return eTypeFileLineColumn; } diff --git a/lldb/include/lldb/Interpreter/OptionValueFileSpec.h b/lldb/include/lldb/Interpreter/OptionValueFileSpec.h index a718586..4168e4b 100644 --- a/lldb/include/lldb/Interpreter/OptionValueFileSpec.h +++ b/lldb/include/lldb/Interpreter/OptionValueFileSpec.h @@ -25,7 +25,7 @@ public: OptionValueFileSpec(const FileSpec ¤t_value, const FileSpec &default_value, bool resolve = true); - ~OptionValueFileSpec() override {} + ~OptionValueFileSpec() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h b/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h index dcf926f..b2dc11b 100644 --- a/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h +++ b/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h @@ -18,12 +18,12 @@ namespace lldb_private { class OptionValueFileSpecList : public OptionValue { public: - OptionValueFileSpecList() : OptionValue(), m_current_value() {} + OptionValueFileSpecList() = default; OptionValueFileSpecList(const FileSpecList ¤t_value) : OptionValue(), m_current_value(current_value) {} - ~OptionValueFileSpecList() override {} + ~OptionValueFileSpecList() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueFormat.h b/lldb/include/lldb/Interpreter/OptionValueFormat.h index 9241ba6b..eb80f09 100644 --- a/lldb/include/lldb/Interpreter/OptionValueFormat.h +++ b/lldb/include/lldb/Interpreter/OptionValueFormat.h @@ -22,7 +22,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueFormat() override {} + ~OptionValueFormat() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h b/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h index a29b7f4..4100ee2 100644 --- a/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h +++ b/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h @@ -18,7 +18,7 @@ class OptionValueFormatEntity : public OptionValue { public: OptionValueFormatEntity(const char *default_format); - ~OptionValueFormatEntity() override {} + ~OptionValueFormatEntity() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueLanguage.h b/lldb/include/lldb/Interpreter/OptionValueLanguage.h index bf86f3c..bfe953a 100644 --- a/lldb/include/lldb/Interpreter/OptionValueLanguage.h +++ b/lldb/include/lldb/Interpreter/OptionValueLanguage.h @@ -25,7 +25,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueLanguage() override {} + ~OptionValueLanguage() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValuePathMappings.h b/lldb/include/lldb/Interpreter/OptionValuePathMappings.h index 8f58d5d..e8af4bb 100644 --- a/lldb/include/lldb/Interpreter/OptionValuePathMappings.h +++ b/lldb/include/lldb/Interpreter/OptionValuePathMappings.h @@ -19,7 +19,7 @@ public: OptionValuePathMappings(bool notify_changes) : OptionValue(), m_path_mappings(), m_notify_changes(notify_changes) {} - ~OptionValuePathMappings() override {} + ~OptionValuePathMappings() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/OptionValueProperties.h b/lldb/include/lldb/Interpreter/OptionValueProperties.h index d60afde..d17f123 100644 --- a/lldb/include/lldb/Interpreter/OptionValueProperties.h +++ b/lldb/include/lldb/Interpreter/OptionValueProperties.h @@ -23,8 +23,7 @@ class OptionValueProperties : public OptionValue, public std::enable_shared_from_this { public: - OptionValueProperties() - : OptionValue(), m_name(), m_properties(), m_name_to_index() {} + OptionValueProperties() = default; OptionValueProperties(ConstString name); diff --git a/lldb/include/lldb/Interpreter/OptionValueSInt64.h b/lldb/include/lldb/Interpreter/OptionValueSInt64.h index 2faea04..625193f 100644 --- a/lldb/include/lldb/Interpreter/OptionValueSInt64.h +++ b/lldb/include/lldb/Interpreter/OptionValueSInt64.h @@ -16,9 +16,7 @@ namespace lldb_private { class OptionValueSInt64 : public OptionValue { public: - OptionValueSInt64() - : OptionValue(), m_current_value(0), m_default_value(0), - m_min_value(INT64_MIN), m_max_value(INT64_MAX) {} + OptionValueSInt64() = default; OptionValueSInt64(int64_t value) : OptionValue(), m_current_value(value), m_default_value(value), @@ -29,12 +27,9 @@ public: m_default_value(default_value), m_min_value(INT64_MIN), m_max_value(INT64_MAX) {} - OptionValueSInt64(const OptionValueSInt64 &rhs) - : OptionValue(rhs), m_current_value(rhs.m_current_value), - m_default_value(rhs.m_default_value), m_min_value(rhs.m_min_value), - m_max_value(rhs.m_max_value) {} + OptionValueSInt64(const OptionValueSInt64 &rhs) = default; - ~OptionValueSInt64() override {} + ~OptionValueSInt64() override = default; // Virtual subclass pure virtual overrides @@ -90,10 +85,10 @@ public: int64_t GetMaximumValue() const { return m_max_value; } protected: - int64_t m_current_value; - int64_t m_default_value; - int64_t m_min_value; - int64_t m_max_value; + int64_t m_current_value = 0; + int64_t m_default_value = 0; + int64_t m_min_value = INT64_MIN; + int64_t m_max_value = INT64_MAX; }; } // namespace lldb_private diff --git a/lldb/include/lldb/Interpreter/OptionValueString.h b/lldb/include/lldb/Interpreter/OptionValueString.h index c592ff1..4d78cbb 100644 --- a/lldb/include/lldb/Interpreter/OptionValueString.h +++ b/lldb/include/lldb/Interpreter/OptionValueString.h @@ -23,9 +23,7 @@ public: enum Options { eOptionEncodeCharacterEscapeSequences = (1u << 0) }; - OptionValueString() - : OptionValue(), m_current_value(), m_default_value(), m_options(), - m_validator(), m_validator_baton() {} + OptionValueString() = default; OptionValueString(ValidatorCallback validator, void *baton = nullptr) : OptionValue(), m_current_value(), m_default_value(), m_options(), @@ -125,8 +123,8 @@ protected: std::string m_current_value; std::string m_default_value; Flags m_options; - ValidatorCallback m_validator; - void *m_validator_baton; + ValidatorCallback m_validator = nullptr; + void *m_validator_baton = nullptr; }; } // namespace lldb_private diff --git a/lldb/include/lldb/Interpreter/OptionValueUInt64.h b/lldb/include/lldb/Interpreter/OptionValueUInt64.h index 4716233..bee8ff5 100644 --- a/lldb/include/lldb/Interpreter/OptionValueUInt64.h +++ b/lldb/include/lldb/Interpreter/OptionValueUInt64.h @@ -16,7 +16,7 @@ namespace lldb_private { class OptionValueUInt64 : public OptionValue { public: - OptionValueUInt64() : OptionValue(), m_current_value(0), m_default_value(0) {} + OptionValueUInt64() = default; OptionValueUInt64(uint64_t value) : OptionValue(), m_current_value(value), m_default_value(value) {} @@ -25,7 +25,7 @@ public: : OptionValue(), m_current_value(current_value), m_default_value(default_value) {} - ~OptionValueUInt64() override {} + ~OptionValueUInt64() override = default; // Decode a uint64_t from "value_cstr" return a OptionValueUInt64 object // inside of a lldb::OptionValueSP object if all goes well. If the string @@ -68,8 +68,8 @@ public: void SetDefaultValue(uint64_t value) { m_default_value = value; } protected: - uint64_t m_current_value; - uint64_t m_default_value; + uint64_t m_current_value = 0; + uint64_t m_default_value = 0; }; } // namespace lldb_private diff --git a/lldb/include/lldb/Interpreter/OptionValueUUID.h b/lldb/include/lldb/Interpreter/OptionValueUUID.h index 822dc00..1673078 100644 --- a/lldb/include/lldb/Interpreter/OptionValueUUID.h +++ b/lldb/include/lldb/Interpreter/OptionValueUUID.h @@ -16,11 +16,11 @@ namespace lldb_private { class OptionValueUUID : public OptionValue { public: - OptionValueUUID() : OptionValue(), m_uuid() {} + OptionValueUUID() = default; OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {} - ~OptionValueUUID() override {} + ~OptionValueUUID() override = default; // Virtual subclass pure virtual overrides diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h index 4abd1ca..275d61a 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -85,7 +85,7 @@ public: ScriptInterpreter(Debugger &debugger, lldb::ScriptLanguage script_lang); - ~ScriptInterpreter() override; + ~ScriptInterpreter() override = default; struct ExecuteScriptOptions { public: diff --git a/lldb/source/Interpreter/CommandHistory.cpp b/lldb/source/Interpreter/CommandHistory.cpp index 9c7919e..ffdcbbf 100644 --- a/lldb/source/Interpreter/CommandHistory.cpp +++ b/lldb/source/Interpreter/CommandHistory.cpp @@ -13,10 +13,6 @@ using namespace lldb; using namespace lldb_private; -CommandHistory::CommandHistory() : m_mutex(), m_history() {} - -CommandHistory::~CommandHistory() {} - size_t CommandHistory::GetSize() const { std::lock_guard guard(m_mutex); return m_history.size(); diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 71adf8c..9d27de4 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -49,8 +49,6 @@ CommandObject::CommandObject(CommandInterpreter &interpreter, m_cmd_syntax = std::string(syntax); } -CommandObject::~CommandObject() {} - Debugger &CommandObject::GetDebugger() { return m_interpreter.GetDebugger(); } llvm::StringRef CommandObject::GetHelp() { return m_cmd_help_short; } diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp index 441a8e0..77d94bd 100644 --- a/lldb/source/Interpreter/CommandReturnObject.cpp +++ b/lldb/source/Interpreter/CommandReturnObject.cpp @@ -45,8 +45,6 @@ CommandReturnObject::CommandReturnObject(bool colors) m_status(eReturnStatusStarted), m_did_change_process_state(false), m_interactive(true) {} -CommandReturnObject::~CommandReturnObject() {} - void CommandReturnObject::AppendErrorWithFormat(const char *format, ...) { if (!format) return; diff --git a/lldb/source/Interpreter/OptionGroupArchitecture.cpp b/lldb/source/Interpreter/OptionGroupArchitecture.cpp index baca1c6..00541b7 100644 --- a/lldb/source/Interpreter/OptionGroupArchitecture.cpp +++ b/lldb/source/Interpreter/OptionGroupArchitecture.cpp @@ -13,10 +13,6 @@ using namespace lldb; using namespace lldb_private; -OptionGroupArchitecture::OptionGroupArchitecture() : m_arch_str() {} - -OptionGroupArchitecture::~OptionGroupArchitecture() {} - static constexpr OptionDefinition g_option_table[] = { {LLDB_OPT_SET_1, false, "arch", 'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeArchitecture, diff --git a/lldb/source/Interpreter/OptionGroupBoolean.cpp b/lldb/source/Interpreter/OptionGroupBoolean.cpp index 3482e78..3f73893 100644 --- a/lldb/source/Interpreter/OptionGroupBoolean.cpp +++ b/lldb/source/Interpreter/OptionGroupBoolean.cpp @@ -33,8 +33,6 @@ OptionGroupBoolean::OptionGroupBoolean(uint32_t usage_mask, bool required, m_option_definition.usage_text = usage_text; } -OptionGroupBoolean::~OptionGroupBoolean() {} - Status OptionGroupBoolean::SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) { diff --git a/lldb/source/Interpreter/OptionGroupFile.cpp b/lldb/source/Interpreter/OptionGroupFile.cpp index 9d9be5b6..8be4b18 100644 --- a/lldb/source/Interpreter/OptionGroupFile.cpp +++ b/lldb/source/Interpreter/OptionGroupFile.cpp @@ -31,8 +31,6 @@ OptionGroupFile::OptionGroupFile(uint32_t usage_mask, bool required, m_option_definition.usage_text = usage_text; } -OptionGroupFile::~OptionGroupFile() {} - Status OptionGroupFile::SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) { diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp index 0052f72..1cc5e70 100644 --- a/lldb/source/Interpreter/OptionGroupFormat.cpp +++ b/lldb/source/Interpreter/OptionGroupFormat.cpp @@ -24,8 +24,6 @@ OptionGroupFormat::OptionGroupFormat(lldb::Format default_format, m_count(default_count, default_count), m_prev_gdb_format('x'), m_prev_gdb_size('w') {} -OptionGroupFormat::~OptionGroupFormat() {} - static constexpr OptionDefinition g_option_table[] = { {LLDB_OPT_SET_1, false, "format", 'f', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFormat, diff --git a/lldb/source/Interpreter/OptionGroupOutputFile.cpp b/lldb/source/Interpreter/OptionGroupOutputFile.cpp index 65105c3..1f305083 100644 --- a/lldb/source/Interpreter/OptionGroupOutputFile.cpp +++ b/lldb/source/Interpreter/OptionGroupOutputFile.cpp @@ -16,8 +16,6 @@ using namespace lldb_private; OptionGroupOutputFile::OptionGroupOutputFile() : m_file(), m_append(false, false) {} -OptionGroupOutputFile::~OptionGroupOutputFile() {} - static const uint32_t SHORT_OPTION_APND = 0x61706e64; // 'apnd' static constexpr OptionDefinition g_option_table[] = { diff --git a/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp b/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp index 217dab2..e768feb 100644 --- a/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp +++ b/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp @@ -81,8 +81,6 @@ OptionGroupPythonClassWithDict::OptionGroupPythonClassWithDict } -OptionGroupPythonClassWithDict::~OptionGroupPythonClassWithDict() {} - Status OptionGroupPythonClassWithDict::SetOptionValue( uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Interpreter/OptionGroupString.cpp b/lldb/source/Interpreter/OptionGroupString.cpp index c9f78eb..75faaac 100644 --- a/lldb/source/Interpreter/OptionGroupString.cpp +++ b/lldb/source/Interpreter/OptionGroupString.cpp @@ -32,8 +32,6 @@ OptionGroupString::OptionGroupString(uint32_t usage_mask, bool required, m_option_definition.usage_text = usage_text; } -OptionGroupString::~OptionGroupString() {} - Status OptionGroupString::SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) { diff --git a/lldb/source/Interpreter/OptionGroupUInt64.cpp b/lldb/source/Interpreter/OptionGroupUInt64.cpp index 309855d..486941a 100644 --- a/lldb/source/Interpreter/OptionGroupUInt64.cpp +++ b/lldb/source/Interpreter/OptionGroupUInt64.cpp @@ -32,8 +32,6 @@ OptionGroupUInt64::OptionGroupUInt64(uint32_t usage_mask, bool required, m_option_definition.usage_text = usage_text; } -OptionGroupUInt64::~OptionGroupUInt64() {} - Status OptionGroupUInt64::SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) { diff --git a/lldb/source/Interpreter/OptionGroupUUID.cpp b/lldb/source/Interpreter/OptionGroupUUID.cpp index dc6f413..5b4c24a 100644 --- a/lldb/source/Interpreter/OptionGroupUUID.cpp +++ b/lldb/source/Interpreter/OptionGroupUUID.cpp @@ -13,10 +13,6 @@ using namespace lldb; using namespace lldb_private; -OptionGroupUUID::OptionGroupUUID() : m_uuid() {} - -OptionGroupUUID::~OptionGroupUUID() {} - static constexpr OptionDefinition g_option_table[] = { {LLDB_OPT_SET_1, false, "uuid", 'u', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeModuleUUID, "A module UUID value."}, diff --git a/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp b/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp index e0401f8..04861b5 100644 --- a/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp +++ b/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp @@ -19,10 +19,6 @@ using namespace lldb; using namespace lldb_private; -OptionGroupValueObjectDisplay::OptionGroupValueObjectDisplay() {} - -OptionGroupValueObjectDisplay::~OptionGroupValueObjectDisplay() {} - static const OptionDefinition g_option_table[] = { {LLDB_OPT_SET_1, false, "dynamic-type", 'd', OptionParser::eRequiredArgument, nullptr, GetDynamicValueTypes(), 0, diff --git a/lldb/source/Interpreter/OptionGroupVariable.cpp b/lldb/source/Interpreter/OptionGroupVariable.cpp index 9f57dbb..2451a3e 100644 --- a/lldb/source/Interpreter/OptionGroupVariable.cpp +++ b/lldb/source/Interpreter/OptionGroupVariable.cpp @@ -70,8 +70,6 @@ OptionGroupVariable::OptionGroupVariable(bool show_frame_options) : OptionGroup(), include_frame_options(show_frame_options), summary(ValidateNamedSummary), summary_string(ValidateSummaryString) {} -OptionGroupVariable::~OptionGroupVariable() {} - Status OptionGroupVariable::SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp index 07013b5..eb9842a 100644 --- a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp +++ b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp @@ -74,10 +74,6 @@ bool OptionGroupWatchpoint::IsWatchSizeSupported(uint32_t watch_size) { return false; } -OptionGroupWatchpoint::OptionGroupWatchpoint() : OptionGroup() {} - -OptionGroupWatchpoint::~OptionGroupWatchpoint() {} - Status OptionGroupWatchpoint::SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Interpreter/OptionValueEnumeration.cpp b/lldb/source/Interpreter/OptionValueEnumeration.cpp index 9a1e08d..8fcd8db 100644 --- a/lldb/source/Interpreter/OptionValueEnumeration.cpp +++ b/lldb/source/Interpreter/OptionValueEnumeration.cpp @@ -20,8 +20,6 @@ OptionValueEnumeration::OptionValueEnumeration( SetEnumerations(enumerators); } -OptionValueEnumeration::~OptionValueEnumeration() {} - void OptionValueEnumeration::DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) { if (dump_mask & eDumpOptionType) diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp index 9ecc9e2..5d3864d 100644 --- a/lldb/source/Interpreter/Options.cpp +++ b/lldb/source/Interpreter/Options.cpp @@ -27,7 +27,7 @@ using namespace lldb_private; // Options Options::Options() : m_getopt_table() { BuildValidOptionSets(); } -Options::~Options() {} +Options::~Options() = default; void Options::NotifyOptionParsingStarting(ExecutionContext *execution_context) { m_seen_options.clear(); diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 013ed6a..2c55d08 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -30,8 +30,6 @@ ScriptInterpreter::ScriptInterpreter(Debugger &debugger, lldb::ScriptLanguage script_lang) : m_debugger(debugger), m_script_lang(script_lang) {} -ScriptInterpreter::~ScriptInterpreter() {} - void ScriptInterpreter::CollectDataForBreakpointCommandCallback( std::vector &bp_options_vec, CommandReturnObject &result) { -- 2.7.4