Author: Shafik Yaghmour Date: 2022-03-31T13:21:49-07:00 New Revision: 24f9a2f53db78df59761f46ceed3bb5e7aa0d331
URL: https://github.com/llvm/llvm-project/commit/24f9a2f53db78df59761f46ceed3bb5e7aa0d331 DIFF: https://github.com/llvm/llvm-project/commit/24f9a2f53db78df59761f46ceed3bb5e7aa0d331.diff LOG: [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB Applied modernize-use-equals-default clang-tidy check over LLDB. This check is already present in the lldb/.clang-tidy config. Differential Revision: https://reviews.llvm.org/D121844 Added: Modified: lldb/source/API/SBMemoryRegionInfoList.cpp lldb/source/API/SBQueue.cpp lldb/source/API/SBValue.cpp lldb/source/API/SBValueList.cpp lldb/source/Commands/CommandObjectBreakpoint.cpp lldb/source/Commands/CommandObjectBreakpointCommand.cpp lldb/source/Commands/CommandObjectCommands.cpp lldb/source/Commands/CommandObjectExpression.cpp lldb/source/Commands/CommandObjectFrame.cpp lldb/source/Commands/CommandObjectLog.cpp lldb/source/Commands/CommandObjectMemory.cpp lldb/source/Commands/CommandObjectMemoryTag.cpp lldb/source/Commands/CommandObjectPlatform.cpp lldb/source/Commands/CommandObjectProcess.cpp lldb/source/Commands/CommandObjectReproducer.cpp lldb/source/Commands/CommandObjectSettings.cpp lldb/source/Commands/CommandObjectSource.cpp lldb/source/Commands/CommandObjectTarget.cpp lldb/source/Commands/CommandObjectType.cpp lldb/source/Commands/CommandObjectWatchpoint.cpp lldb/source/Commands/CommandObjectWatchpointCommand.cpp lldb/source/Core/IOHandlerCursesGUI.cpp lldb/source/Host/macosx/cfcpp/CFCData.cpp lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp lldb/source/Host/macosx/cfcpp/CFCString.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp lldb/source/Plugins/REPL/Clang/ClangREPL.cpp lldb/source/Target/ExecutionContext.cpp lldb/source/Utility/XcodeSDK.cpp lldb/tools/debugserver/source/DNBBreakpoint.cpp lldb/tools/debugserver/source/DNBDataRef.cpp lldb/tools/debugserver/source/MacOSX/CFBundle.cpp lldb/tools/debugserver/source/MacOSX/CFString.cpp lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp lldb/tools/debugserver/source/StdStringExtractor.cpp lldb/tools/debugserver/source/TTYState.cpp lldb/tools/lldb-vscode/IOStream.cpp lldb/tools/lldb-vscode/VSCode.cpp Removed: ################################################################################ diff --git a/lldb/source/API/SBMemoryRegionInfoList.cpp b/lldb/source/API/SBMemoryRegionInfoList.cpp index 39dee86dc3007..f8381d1098a0f 100644 --- a/lldb/source/API/SBMemoryRegionInfoList.cpp +++ b/lldb/source/API/SBMemoryRegionInfoList.cpp @@ -21,8 +21,7 @@ class MemoryRegionInfoListImpl { public: MemoryRegionInfoListImpl() : m_regions() {} - MemoryRegionInfoListImpl(const MemoryRegionInfoListImpl &rhs) - : m_regions(rhs.m_regions) {} + MemoryRegionInfoListImpl(const MemoryRegionInfoListImpl &rhs) = default; MemoryRegionInfoListImpl &operator=(const MemoryRegionInfoListImpl &rhs) { if (this == &rhs) diff --git a/lldb/source/API/SBQueue.cpp b/lldb/source/API/SBQueue.cpp index 1aeede4b1da6f..b97da3ef02edd 100644 --- a/lldb/source/API/SBQueue.cpp +++ b/lldb/source/API/SBQueue.cpp @@ -27,7 +27,7 @@ namespace lldb_private { class QueueImpl { public: - QueueImpl() {} + QueueImpl() = default; QueueImpl(const lldb::QueueSP &queue_sp) { m_queue_wp = queue_sp; } diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 20581cfabdd66..c39e00d645e27 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -69,9 +69,7 @@ class ValueImpl { } } - ValueImpl(const ValueImpl &rhs) - : m_valobj_sp(rhs.m_valobj_sp), m_use_dynamic(rhs.m_use_dynamic), - m_use_synthetic(rhs.m_use_synthetic), m_name(rhs.m_name) {} + ValueImpl(const ValueImpl &rhs) = default; ValueImpl &operator=(const ValueImpl &rhs) { if (this != &rhs) { diff --git a/lldb/source/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp index a67030c506f41..4b36b04c8d350 100644 --- a/lldb/source/API/SBValueList.cpp +++ b/lldb/source/API/SBValueList.cpp @@ -19,9 +19,9 @@ using namespace lldb_private; class ValueListImpl { public: - ValueListImpl() {} + ValueListImpl() = default; - ValueListImpl(const ValueListImpl &rhs) : m_values(rhs.m_values) {} + ValueListImpl(const ValueListImpl &rhs) = default; ValueListImpl &operator=(const ValueListImpl &rhs) { if (this == &rhs) diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index c4e55fdb3b9c0..4515c7ee58eee 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -179,7 +179,7 @@ class lldb_private::BreakpointOptionGroup : public OptionGroup { class BreakpointDummyOptionGroup : public OptionGroup { public: - BreakpointDummyOptionGroup() {} + BreakpointDummyOptionGroup() = default; ~BreakpointDummyOptionGroup() override = default; @@ -252,7 +252,7 @@ class CommandObjectBreakpointSet : public CommandObjectParsed { class CommandOptions : public OptionGroup { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1118,7 +1118,7 @@ class CommandObjectBreakpointList : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1249,7 +1249,7 @@ class CommandObjectBreakpointClear : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1401,7 +1401,7 @@ class CommandObjectBreakpointDelete : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1618,7 +1618,7 @@ class BreakpointNameOptionGroup : public OptionGroup { class BreakpointAccessOptionGroup : public OptionGroup { public: - BreakpointAccessOptionGroup() {} + BreakpointAccessOptionGroup() = default; ~BreakpointAccessOptionGroup() override = default; @@ -2059,7 +2059,7 @@ class CommandObjectBreakpointRead : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -2255,7 +2255,7 @@ class CommandObjectBreakpointWrite : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 637e8b8bd5783..bf0cae51d7333 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -281,7 +281,7 @@ are no syntax errors may indicate that a function was declared but never called. class CommandOptions : public OptionGroup { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -501,7 +501,7 @@ class CommandObjectBreakpointCommandDelete : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 7998c1f3e65e2..51385e0d8e58a 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -206,7 +206,7 @@ class CommandObjectCommandsAlias : public CommandObjectRaw { protected: class CommandOptions : public OptionGroup { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1022,7 +1022,7 @@ a number follows 'f':" class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1267,7 +1267,7 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed { protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1422,7 +1422,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed, protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1880,7 +1880,7 @@ class CommandObjectCommandsContainerAdd : public CommandObjectParsed { protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 9a5791735114a..59c2cdb0938cb 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -24,7 +24,7 @@ using namespace lldb; using namespace lldb_private; -CommandObjectExpression::CommandOptions::CommandOptions() {} +CommandObjectExpression::CommandOptions::CommandOptions() = default; CommandObjectExpression::CommandOptions::~CommandOptions() = default; diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 70881f2d00612..ead0594bca4e4 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -726,7 +726,7 @@ class CommandObjectFrameRecognizerAdd : public CommandObjectParsed { private: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index d432ab244805f..c8df30849628a 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -75,7 +75,7 @@ class CommandObjectLogEnable : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index bb59fee56c516..35f524468b895 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -1186,7 +1186,7 @@ class CommandObjectMemoryWrite : public CommandObjectParsed { public: class OptionGroupWriteMemory : public OptionGroup { public: - OptionGroupWriteMemory() {} + OptionGroupWriteMemory() = default; ~OptionGroupWriteMemory() override = default; diff --git a/lldb/source/Commands/CommandObjectMemoryTag.cpp b/lldb/source/Commands/CommandObjectMemoryTag.cpp index 3ad5774910f70..67461cac5a29e 100644 --- a/lldb/source/Commands/CommandObjectMemoryTag.cpp +++ b/lldb/source/Commands/CommandObjectMemoryTag.cpp @@ -138,7 +138,7 @@ class CommandObjectMemoryTagWrite : public CommandObjectParsed { public: class OptionGroupTagWrite : public OptionGroup { public: - OptionGroupTagWrite() {} + OptionGroupTagWrite() = default; ~OptionGroupTagWrite() override = default; diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index bf586adb2bbd1..774ef6c6191e2 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -600,7 +600,7 @@ class CommandObjectPlatformFRead : public CommandObjectParsed { protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -692,7 +692,7 @@ class CommandObjectPlatformFWrite : public CommandObjectParsed { protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1315,7 +1315,7 @@ class CommandObjectPlatformProcessList : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1679,7 +1679,7 @@ class CommandObjectPlatformShell : public CommandObjectRaw { public: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 41410f5c38cbd..484ef6aa6036b 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -1214,7 +1214,7 @@ class CommandObjectProcessSaveCore : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1317,7 +1317,7 @@ class CommandObjectProcessStatus : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp index f7ff0662b2d1e..31ed02f9259f1 100644 --- a/lldb/source/Commands/CommandObjectReproducer.cpp +++ b/lldb/source/Commands/CommandObjectReproducer.cpp @@ -223,7 +223,7 @@ class CommandObjectReproducerXCrash : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -351,7 +351,7 @@ class CommandObjectReproducerDump : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index db6a7bc164359..e4162e56dc2cd 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -86,7 +86,7 @@ insert-before or insert-after."); class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -329,7 +329,7 @@ class CommandObjectSettingsWrite : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -427,7 +427,7 @@ class CommandObjectSettingsRead : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 79f1ce4e04e40..67286c20cc8ad 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -36,7 +36,7 @@ using namespace lldb_private; class CommandObjectSourceInfo : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -623,7 +623,7 @@ class CommandObjectSourceInfo : public CommandObjectParsed { class CommandObjectSourceList : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -755,7 +755,7 @@ class CommandObjectSourceList : public CommandObjectParsed { SourceInfo(ConstString name, const LineEntry &line_entry) : function(name), line_entry(line_entry) {} - SourceInfo() {} + SourceInfo() = default; bool IsValid() const { return (bool)function && line_entry.IsValid(); } diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 1d33723263282..61944ebd69e24 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -1936,7 +1936,7 @@ class CommandObjectTargetModulesDumpSymtab class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -2841,7 +2841,7 @@ class CommandObjectTargetModulesList : public CommandObjectParsed { public: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -3183,7 +3183,7 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp index f4ecd80fb0210..b79c19bcae850 100644 --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -286,7 +286,7 @@ class CommandObjectTypeSynthAdd : public CommandObjectParsed, private: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -498,7 +498,7 @@ class CommandObjectTypeFormatAdd : public CommandObjectParsed { private: class CommandOptions : public OptionGroup { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -707,7 +707,7 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed { protected: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -872,7 +872,7 @@ class CommandObjectTypeFormatterClear : public CommandObjectParsed { private: class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1815,7 +1815,7 @@ class CommandObjectTypeCategoryDefine : public CommandObjectParsed { class CommandObjectTypeCategoryEnable : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -1992,7 +1992,7 @@ class CommandObjectTypeCategoryDelete : public CommandObjectParsed { class CommandObjectTypeCategoryDisable : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -2405,7 +2405,7 @@ class CommandObjectTypeFilterAdd : public CommandObjectParsed { typedef std::vector<std::string> option_vector; public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -2661,7 +2661,7 @@ class CommandObjectTypeLookup : public CommandObjectRaw { class CommandOptions : public OptionGroup { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 9701553bdda9f..faeca87c53156 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -164,7 +164,7 @@ class CommandObjectWatchpointList : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -454,7 +454,7 @@ class CommandObjectWatchpointDelete : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -577,7 +577,7 @@ class CommandObjectWatchpointIgnore : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; @@ -702,7 +702,7 @@ class CommandObjectWatchpointModify : public CommandObjectParsed { class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index a429e568c61ae..0cc83275d7aec 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -313,7 +313,7 @@ are no syntax errors may indicate that a function was declared but never called. class CommandOptions : public Options { public: - CommandOptions() {} + CommandOptions() = default; ~CommandOptions() override = default; diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index 7fbf382196049..6f416ee8dae77 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -2282,7 +2282,7 @@ class FormAction { class FormDelegate { public: - FormDelegate() {} + FormDelegate() = default; virtual ~FormDelegate() = default; @@ -3644,7 +3644,7 @@ class ProcessLaunchFormDelegate : public FormDelegate { class SearcherDelegate { public: - SearcherDelegate() {} + SearcherDelegate() = default; virtual ~SearcherDelegate() = default; diff --git a/lldb/source/Host/macosx/cfcpp/CFCData.cpp b/lldb/source/Host/macosx/cfcpp/CFCData.cpp index 65b45aa0154a1..ed79e36c8dfb8 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCData.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCData.cpp @@ -12,7 +12,7 @@ CFCData::CFCData(CFDataRef data) : CFCReleaser<CFDataRef>(data) {} // CFCData copy constructor -CFCData::CFCData(const CFCData &rhs) : CFCReleaser<CFDataRef>(rhs) {} +CFCData::CFCData(const CFCData &rhs) = default; // CFCData copy constructor CFCData &CFCData::operator=(const CFCData &rhs) diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp index 126e1f6f5f320..9a5567fc09b63 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp @@ -14,11 +14,10 @@ CFCMutableArray::CFCMutableArray(CFMutableArrayRef s) : CFCReleaser<CFMutableArrayRef>(s) {} // CFCMutableArray copy constructor -CFCMutableArray::CFCMutableArray(const CFCMutableArray &rhs) - : CFCReleaser<CFMutableArrayRef>(rhs) // NOTE: this won't make a copy of the - // array, just add a new reference to - // it -{} +CFCMutableArray::CFCMutableArray(const CFCMutableArray &rhs) = + default; // NOTE: this won't make a copy of the + // array, just add a new reference to + // it // CFCMutableArray copy constructor CFCMutableArray &CFCMutableArray::operator=(const CFCMutableArray &rhs) { diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp index ce003e349e0b2..8b8672c3a886a 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp @@ -13,8 +13,8 @@ CFCMutableDictionary::CFCMutableDictionary(CFMutableDictionaryRef s) : CFCReleaser<CFMutableDictionaryRef>(s) {} // CFCMutableDictionary copy constructor -CFCMutableDictionary::CFCMutableDictionary(const CFCMutableDictionary &rhs) - : CFCReleaser<CFMutableDictionaryRef>(rhs) {} +CFCMutableDictionary::CFCMutableDictionary(const CFCMutableDictionary &rhs) = + default; // CFCMutableDictionary copy constructor const CFCMutableDictionary &CFCMutableDictionary:: diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp index ee5f6203f4f4e..da2ef6c8c998a 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp @@ -14,8 +14,7 @@ CFCMutableSet::CFCMutableSet(CFMutableSetRef s) : CFCReleaser<CFMutableSetRef>(s) {} // CFCMutableSet copy constructor -CFCMutableSet::CFCMutableSet(const CFCMutableSet &rhs) - : CFCReleaser<CFMutableSetRef>(rhs) {} +CFCMutableSet::CFCMutableSet(const CFCMutableSet &rhs) = default; // CFCMutableSet copy constructor const CFCMutableSet &CFCMutableSet::operator=(const CFCMutableSet &rhs) { diff --git a/lldb/source/Host/macosx/cfcpp/CFCString.cpp b/lldb/source/Host/macosx/cfcpp/CFCString.cpp index 86498a19cdd3b..be27916922de3 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCString.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCString.cpp @@ -14,7 +14,7 @@ CFCString::CFCString(CFStringRef s) : CFCReleaser<CFStringRef>(s) {} // CFCString copy constructor -CFCString::CFCString(const CFCString &rhs) : CFCReleaser<CFStringRef>(rhs) {} +CFCString::CFCString(const CFCString &rhs) = default; // CFCString copy constructor CFCString &CFCString::operator=(const CFCString &rhs) { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp index e8e414125d2be..160740da31b4f 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp @@ -806,7 +806,7 @@ void ClangASTImporter::ForgetSource(clang::ASTContext *dst_ast, md->removeOriginsWithContext(src_ast); } -ClangASTImporter::MapCompleter::~MapCompleter() {} +ClangASTImporter::MapCompleter::~MapCompleter() = default; llvm::Expected<Decl *> ClangASTImporter::ASTImporterDelegate::ImportImpl(Decl *From) { diff --git a/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp b/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp index 5060dbb7ddba8..2bd38f81786bb 100644 --- a/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp +++ b/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp @@ -19,7 +19,7 @@ ClangREPL::ClangREPL(lldb::LanguageType language, Target &target) : REPL(eKindClang, target), m_language(language), m_implicit_expr_result_regex("\\$[0-9]+") {} -ClangREPL::~ClangREPL() {} +ClangREPL::~ClangREPL() = default; void ClangREPL::Initialize() { LanguageSet languages; diff --git a/lldb/source/Target/ExecutionContext.cpp b/lldb/source/Target/ExecutionContext.cpp index 977dec68501e7..a5288b81cd177 100644 --- a/lldb/source/Target/ExecutionContext.cpp +++ b/lldb/source/Target/ExecutionContext.cpp @@ -19,9 +19,7 @@ using namespace lldb_private; ExecutionContext::ExecutionContext() : m_target_sp(), m_process_sp(), m_thread_sp(), m_frame_sp() {} -ExecutionContext::ExecutionContext(const ExecutionContext &rhs) - : m_target_sp(rhs.m_target_sp), m_process_sp(rhs.m_process_sp), - m_thread_sp(rhs.m_thread_sp), m_frame_sp(rhs.m_frame_sp) {} +ExecutionContext::ExecutionContext(const ExecutionContext &rhs) = default; ExecutionContext::ExecutionContext(const lldb::TargetSP &target_sp, bool get_process) @@ -414,9 +412,8 @@ ExecutionContextRef::ExecutionContextRef(Target *target, bool adopt_selected) } ExecutionContextRef::ExecutionContextRef(const ExecutionContextRef &rhs) - : m_target_wp(rhs.m_target_wp), m_process_wp(rhs.m_process_wp), - m_thread_wp(rhs.m_thread_wp), m_tid(rhs.m_tid), - m_stack_id(rhs.m_stack_id) {} + + = default; ExecutionContextRef &ExecutionContextRef:: operator=(const ExecutionContextRef &rhs) { diff --git a/lldb/source/Utility/XcodeSDK.cpp b/lldb/source/Utility/XcodeSDK.cpp index 4f64042e3643d..371b86437fa21 100644 --- a/lldb/source/Utility/XcodeSDK.cpp +++ b/lldb/source/Utility/XcodeSDK.cpp @@ -54,10 +54,7 @@ XcodeSDK::XcodeSDK(XcodeSDK::Info info) : m_name(GetName(info.type).str()) { } } -XcodeSDK &XcodeSDK::operator=(const XcodeSDK &other) { - m_name = other.m_name; - return *this; -} +XcodeSDK &XcodeSDK::operator=(const XcodeSDK &other) = default; bool XcodeSDK::operator==(const XcodeSDK &other) { return m_name == other.m_name; diff --git a/lldb/tools/debugserver/source/DNBBreakpoint.cpp b/lldb/tools/debugserver/source/DNBBreakpoint.cpp index 9f402b4f0b1ab..47b38ea4cf7c5 100644 --- a/lldb/tools/debugserver/source/DNBBreakpoint.cpp +++ b/lldb/tools/debugserver/source/DNBBreakpoint.cpp @@ -25,7 +25,7 @@ DNBBreakpoint::DNBBreakpoint(nub_addr_t addr, nub_size_t byte_size, m_is_watchpoint(0), m_watch_read(0), m_watch_write(0), m_hw_index(INVALID_NUB_HW_INDEX) {} -DNBBreakpoint::~DNBBreakpoint() {} +DNBBreakpoint::~DNBBreakpoint() = default; void DNBBreakpoint::Dump() const { if (IsBreakpoint()) { @@ -45,9 +45,9 @@ void DNBBreakpoint::Dump() const { #pragma mark-- DNBBreakpointList -DNBBreakpointList::DNBBreakpointList() {} +DNBBreakpointList::DNBBreakpointList() = default; -DNBBreakpointList::~DNBBreakpointList() {} +DNBBreakpointList::~DNBBreakpointList() = default; DNBBreakpoint *DNBBreakpointList::Add(nub_addr_t addr, nub_size_t length, bool hardware) { diff --git a/lldb/tools/debugserver/source/DNBDataRef.cpp b/lldb/tools/debugserver/source/DNBDataRef.cpp index c6355f167dc4b..13ffd25e1bf2c 100644 --- a/lldb/tools/debugserver/source/DNBDataRef.cpp +++ b/lldb/tools/debugserver/source/DNBDataRef.cpp @@ -32,7 +32,7 @@ DNBDataRef::DNBDataRef(const uint8_t *start, size_t size, bool swap) // Destructor -DNBDataRef::~DNBDataRef() {} +DNBDataRef::~DNBDataRef() = default; // Get8 uint8_t DNBDataRef::Get8(offset_t *offset_ptr) const { diff --git a/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp b/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp index 6971c1f4c328f..5db10fb9ad257 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp +++ b/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp @@ -21,8 +21,7 @@ CFBundle::CFBundle(const char *path) } // CFBundle copy constructor -CFBundle::CFBundle(const CFBundle &rhs) - : CFReleaser<CFBundleRef>(rhs), m_bundle_url(rhs.m_bundle_url) {} +CFBundle::CFBundle(const CFBundle &rhs) = default; // CFBundle copy constructor CFBundle &CFBundle::operator=(const CFBundle &rhs) { @@ -32,7 +31,7 @@ CFBundle &CFBundle::operator=(const CFBundle &rhs) { } // Destructor -CFBundle::~CFBundle() {} +CFBundle::~CFBundle() = default; // Set the path for a bundle by supplying a bool CFBundle::SetPath(const char *path) { diff --git a/lldb/tools/debugserver/source/MacOSX/CFString.cpp b/lldb/tools/debugserver/source/MacOSX/CFString.cpp index 637ba65ae4d1b..fa78ab278871f 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFString.cpp +++ b/lldb/tools/debugserver/source/MacOSX/CFString.cpp @@ -18,7 +18,7 @@ CFString::CFString(CFStringRef s) : CFReleaser<CFStringRef>(s) {} // CFString copy constructor -CFString::CFString(const CFString &rhs) : CFReleaser<CFStringRef>(rhs) {} +CFString::CFString(const CFString &rhs) = default; // CFString copy constructor CFString &CFString::operator=(const CFString &rhs) { @@ -36,7 +36,7 @@ CFString::CFString(const char *cstr, CFStringEncoding cstr_encoding) } // Destructor -CFString::~CFString() {} +CFString::~CFString() = default; const char *CFString::GetFileSystemRepresentation(std::string &s) { return CFString::FileSystemRepresentation(get(), s); diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index 71a33adf3e515..cf3687985173f 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -26,7 +26,7 @@ MachThreadList::MachThreadList() : m_threads(), m_threads_mutex(PTHREAD_MUTEX_RECURSIVE), m_is_64_bit(false) {} -MachThreadList::~MachThreadList() {} +MachThreadList::~MachThreadList() = default; nub_state_t MachThreadList::GetState(nub_thread_t tid) { MachThreadSP thread_sp(GetThreadByID(tid)); diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp index 15f1b5dd05b40..f3aa4d7d980fd 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp @@ -28,7 +28,7 @@ static const vm_size_t kInvalidPageSize = ~0; MachVMMemory::MachVMMemory() : m_page_size(kInvalidPageSize), m_err(0) {} -MachVMMemory::~MachVMMemory() {} +MachVMMemory::~MachVMMemory() = default; nub_size_t MachVMMemory::PageSize(task_t task) { if (m_page_size == kInvalidPageSize) { diff --git a/lldb/tools/debugserver/source/StdStringExtractor.cpp b/lldb/tools/debugserver/source/StdStringExtractor.cpp index 2035394bba1c8..9e27070f49341 100644 --- a/lldb/tools/debugserver/source/StdStringExtractor.cpp +++ b/lldb/tools/debugserver/source/StdStringExtractor.cpp @@ -30,7 +30,7 @@ StdStringExtractor::StdStringExtractor(const char *packet_cstr) } // Destructor -StdStringExtractor::~StdStringExtractor() {} +StdStringExtractor::~StdStringExtractor() = default; char StdStringExtractor::GetChar(char fail_value) { if (m_index < m_packet.size()) { diff --git a/lldb/tools/debugserver/source/TTYState.cpp b/lldb/tools/debugserver/source/TTYState.cpp index 9fe83a3b72e53..d097bc8b9b0f7 100644 --- a/lldb/tools/debugserver/source/TTYState.cpp +++ b/lldb/tools/debugserver/source/TTYState.cpp @@ -18,7 +18,7 @@ TTYState::TTYState() : m_fd(-1), m_tflags(-1), m_ttystateErr(-1), m_processGroup(-1) {} -TTYState::~TTYState() {} +TTYState::~TTYState() = default; bool TTYState::GetTTYState(int fd, bool saveProcessGroup) { if (fd >= 0 && ::isatty(fd)) { @@ -62,7 +62,7 @@ bool TTYState::SetTTYState() const { TTYStateSwitcher::TTYStateSwitcher() : m_currentState(~0) {} -TTYStateSwitcher::~TTYStateSwitcher() {} +TTYStateSwitcher::~TTYStateSwitcher() = default; bool TTYStateSwitcher::GetState(uint32_t idx, int fd, bool saveProcessGroup) { if (ValidStateIndex(idx)) diff --git a/lldb/tools/lldb-vscode/IOStream.cpp b/lldb/tools/lldb-vscode/IOStream.cpp index 4b11b90b4c2e8..6e2a89c5df9e0 100644 --- a/lldb/tools/lldb-vscode/IOStream.cpp +++ b/lldb/tools/lldb-vscode/IOStream.cpp @@ -22,7 +22,7 @@ using namespace lldb_vscode; -StreamDescriptor::StreamDescriptor() {} +StreamDescriptor::StreamDescriptor() = default; StreamDescriptor::StreamDescriptor(StreamDescriptor &&other) { *this = std::move(other); diff --git a/lldb/tools/lldb-vscode/VSCode.cpp b/lldb/tools/lldb-vscode/VSCode.cpp index adc4549f7c25d..6cbdbfa3c24ef 100644 --- a/lldb/tools/lldb-vscode/VSCode.cpp +++ b/lldb/tools/lldb-vscode/VSCode.cpp @@ -58,7 +58,7 @@ VSCode::VSCode() log.reset(new std::ofstream(log_file_path)); } -VSCode::~VSCode() {} +VSCode::~VSCode() = default; int64_t VSCode::GetLineForPC(int64_t sourceReference, lldb::addr_t pc) const { auto pos = source_map.find(sourceReference); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits