From fd2433e139f78658e059cf911af8ae735fcda57c Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 2 Jul 2021 11:27:37 -0700 Subject: [PATCH] [lldb] Replace default bodies of special member functions with = default; Replace default bodies of special member functions with = default; $ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix , https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html Differential revision: https://reviews.llvm.org/D104041 --- lldb/.clang-tidy | 2 +- lldb/include/lldb/Core/EmulateInstruction.h | 2 +- lldb/include/lldb/Core/Opcode.h | 2 +- lldb/include/lldb/Core/StreamBuffer.h | 2 +- lldb/include/lldb/Core/ThreadSafeValue.h | 6 +- .../lldb/Core/UserSettingsController.h | 4 +- .../DataFormatters/DumpValueObjectOptions.h | 2 +- .../include/lldb/DataFormatters/TypeSummary.h | 2 +- .../lldb/DataFormatters/TypeSynthetic.h | 2 +- .../lldb/DataFormatters/ValueObjectPrinter.h | 2 +- lldb/include/lldb/Expression/Expression.h | 2 +- .../lldb/Expression/ExpressionParser.h | 2 +- .../Expression/ExpressionTypeSystemHelper.h | 2 +- lldb/include/lldb/Expression/Materializer.h | 2 +- lldb/include/lldb/Host/FileCache.h | 2 +- lldb/include/lldb/Host/HostInfoBase.h | 4 +- .../include/lldb/Host/HostNativeProcessBase.h | 2 +- lldb/include/lldb/Host/HostNativeThreadBase.h | 6 +- lldb/include/lldb/Host/MainLoopBase.h | 4 +- lldb/include/lldb/Host/ProcessLauncher.h | 2 +- lldb/include/lldb/Host/ProcessRunLock.h | 2 +- lldb/include/lldb/Host/Terminal.h | 2 +- .../lldb/Host/common/NativeProcessProtocol.h | 4 +- .../lldb/Host/common/NativeThreadProtocol.h | 2 +- .../lldb/Interpreter/CommandInterpreter.h | 6 +- lldb/include/lldb/Interpreter/OptionValue.h | 2 +- lldb/include/lldb/Interpreter/Options.h | 2 +- .../lldb/Interpreter/ScriptInterpreter.h | 68 +++++++++---------- lldb/include/lldb/Symbol/CompactUnwindInfo.h | 4 +- lldb/include/lldb/Symbol/DeclVendor.h | 2 +- lldb/include/lldb/Symbol/Function.h | 2 +- lldb/include/lldb/Symbol/ObjectFile.h | 4 +- lldb/include/lldb/Symbol/SymbolFile.h | 2 +- lldb/include/lldb/Symbol/TaggedASTType.h | 2 +- lldb/include/lldb/Symbol/Type.h | 4 +- .../lldb/Target/ExecutionContextScope.h | 2 +- .../Target/InstrumentationRuntimeStopInfo.h | 2 +- lldb/include/lldb/Target/Process.h | 4 +- lldb/include/lldb/Target/RegisterCheckpoint.h | 2 +- .../lldb/Target/StackFrameRecognizer.h | 6 +- lldb/include/lldb/Target/StopInfo.h | 2 +- lldb/include/lldb/Target/ThreadCollection.h | 2 +- lldb/include/lldb/Target/ThreadPlanStack.h | 4 +- lldb/include/lldb/Target/UnixSignals.h | 2 +- lldb/include/lldb/Target/Unwind.h | 2 +- lldb/include/lldb/Utility/Baton.h | 4 +- lldb/include/lldb/Utility/DataBuffer.h | 2 +- lldb/include/lldb/Utility/Event.h | 2 +- .../lldb/Utility/ReproducerInstrumentation.h | 4 +- lldb/include/lldb/Utility/StreamTee.h | 2 +- .../lldb/Utility/TraceGDBRemotePackets.h | 2 +- lldb/include/lldb/Utility/UserID.h | 2 +- lldb/include/lldb/Utility/VMRange.h | 4 +- lldb/include/lldb/lldb-private-types.h | 2 +- lldb/source/Breakpoint/BreakpointList.cpp | 2 +- .../BreakpointLocationCollection.cpp | 2 +- lldb/source/Breakpoint/BreakpointResolver.cpp | 2 +- lldb/source/Breakpoint/BreakpointSiteList.cpp | 2 +- lldb/source/Breakpoint/Stoppoint.cpp | 4 +- lldb/source/Breakpoint/WatchpointList.cpp | 2 +- lldb/source/Commands/CommandObjectGUI.cpp | 2 +- lldb/source/Commands/CommandObjectHelp.h | 2 +- .../source/Commands/CommandObjectLanguage.cpp | 2 +- .../source/Commands/CommandObjectPlatform.cpp | 2 +- lldb/source/Commands/CommandObjectQuit.cpp | 2 +- .../Commands/CommandObjectRegexCommand.cpp | 2 +- lldb/source/Commands/CommandObjectScript.cpp | 2 +- lldb/source/Commands/CommandObjectTarget.cpp | 4 +- lldb/source/Commands/CommandObjectVersion.cpp | 2 +- lldb/source/Core/AddressRange.cpp | 2 +- lldb/source/Core/AddressResolver.cpp | 4 +- lldb/source/Core/AddressResolverFileLine.cpp | 2 +- lldb/source/Core/FileLineResolver.cpp | 2 +- lldb/source/Core/ModuleChild.cpp | 2 +- lldb/source/Core/PluginManager.cpp | 2 +- lldb/source/Core/SourceManager.cpp | 2 +- lldb/source/Core/StreamFile.cpp | 2 +- lldb/source/Core/ValueObject.cpp | 4 +- lldb/source/Core/ValueObjectCast.cpp | 2 +- lldb/source/Core/ValueObjectChild.cpp | 2 +- lldb/source/Core/ValueObjectConstResult.cpp | 2 +- .../Core/ValueObjectConstResultCast.cpp | 2 +- .../Core/ValueObjectConstResultChild.cpp | 2 +- lldb/source/Core/ValueObjectMemory.cpp | 2 +- lldb/source/Core/ValueObjectRegister.cpp | 4 +- lldb/source/Core/ValueObjectVariable.cpp | 2 +- lldb/source/DataFormatters/TypeFormat.cpp | 6 +- lldb/source/DataFormatters/TypeSummary.cpp | 2 +- lldb/source/DataFormatters/TypeSynthetic.cpp | 2 +- lldb/source/Expression/DWARFExpression.cpp | 2 +- lldb/source/Expression/ExpressionVariable.cpp | 4 +- lldb/source/Expression/IRExecutionUnit.cpp | 2 +- lldb/source/Expression/IRInterpreter.cpp | 2 +- lldb/source/Expression/UserExpression.cpp | 2 +- .../Host/common/HostNativeThreadBase.cpp | 3 - lldb/source/Host/common/HostProcess.cpp | 2 +- .../Host/common/NativeRegisterContext.cpp | 2 +- lldb/source/Host/common/PseudoTerminal.cpp | 2 +- lldb/source/Host/common/SocketAddress.cpp | 2 +- lldb/source/Host/common/Terminal.cpp | 6 +- lldb/source/Host/common/XML.cpp | 8 +-- lldb/source/Host/macosx/cfcpp/CFCBundle.cpp | 2 +- lldb/source/Host/macosx/cfcpp/CFCData.cpp | 2 +- .../Host/macosx/cfcpp/CFCMutableArray.cpp | 2 +- .../macosx/cfcpp/CFCMutableDictionary.cpp | 2 +- .../Host/macosx/cfcpp/CFCMutableSet.cpp | 2 +- lldb/source/Host/macosx/cfcpp/CFCString.cpp | 2 +- lldb/source/Host/posix/HostProcessPosix.cpp | 2 +- lldb/source/Host/posix/HostThreadPosix.cpp | 4 +- .../Initialization/SystemInitializer.cpp | 4 +- .../SystemInitializerCommon.cpp | 2 +- lldb/source/Interpreter/OptionGroupFile.cpp | 2 +- .../Interpreter/OptionValueFileColonLine.cpp | 8 +-- .../DynamicLoaderDarwinKernel.cpp | 2 +- .../Darwin-Kernel/DynamicLoaderDarwinKernel.h | 4 +- .../Hexagon-DYLD/HexagonDYLDRendezvous.h | 2 +- .../MacOSX-DYLD/DynamicLoaderDarwin.cpp | 2 +- .../MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h | 4 +- .../DynamicLoader/POSIX-DYLD/DYLDRendezvous.h | 2 +- .../Windows-DYLD/DynamicLoaderWindowsDYLD.cpp | 2 +- .../Clang/ASTResultSynthesizer.cpp | 2 +- .../Clang/ASTStructExtractor.cpp | 2 +- .../ExpressionParser/Clang/ASTUtils.cpp | 6 +- .../Clang/ClangASTImporter.cpp | 2 +- .../ExpressionParser/Clang/ClangASTImporter.h | 2 +- .../ExpressionParser/Clang/ClangDeclVendor.h | 2 +- .../Clang/ClangExpressionDeclMap.h | 4 +- .../Clang/ClangExpressionHelper.h | 2 +- .../Clang/ClangExpressionParser.cpp | 2 +- .../Clang/ClangExpressionVariable.h | 2 +- .../Clang/ClangFunctionCaller.cpp | 2 +- .../Clang/ClangModulesDeclVendor.cpp | 2 +- .../Clang/ClangUserExpression.cpp | 2 +- .../Clang/ClangUtilityFunction.cpp | 2 +- .../Clang/ClangUtilityFunction.h | 4 +- .../Clang/CppModuleConfiguration.h | 2 +- .../ExpressionParser/Clang/IRForTarget.cpp | 2 +- .../Instruction/ARM/EmulateInstructionARM.h | 4 +- .../Instruction/ARM/EmulationStateARM.cpp | 2 +- .../Language/CPlusPlus/CPlusPlusNameParser.h | 2 +- .../AppleObjCClassDescriptorV2.h | 2 +- .../AppleObjCRuntime/AppleObjCRuntime.cpp | 2 +- .../AppleObjCRuntime/AppleObjCRuntimeV1.h | 2 +- .../AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 2 +- .../AppleObjCTrampolineHandler.cpp | 2 +- .../AppleObjCTrampolineHandler.h | 2 +- ...pleThreadPlanStepThroughObjCTrampoline.cpp | 2 +- .../ObjC/ObjCLanguageRuntime.cpp | 7 +- .../RenderScriptExpressionOpts.cpp | 2 +- .../RenderScriptRuntime.cpp | 2 +- .../RenderScriptRuntime/RenderScriptRuntime.h | 2 +- .../BSD-Archive/ObjectContainerBSDArchive.cpp | 4 +- .../ObjectContainerUniversalMachO.cpp | 2 +- .../Plugins/ObjectFile/ELF/ObjectFileELF.h | 2 +- .../Plugins/ObjectFile/JIT/ObjectFileJIT.cpp | 2 +- .../ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 2 +- .../Python/OperatingSystemPython.cpp | 2 +- .../Plugins/Platform/Android/AdbClient.cpp | 6 +- .../PlatformAndroidRemoteGDBServer.cpp | 2 +- .../MacOSX/PlatformAppleSimulator.cpp | 2 +- .../Platform/MacOSX/PlatformDarwin.cpp | 2 +- .../Platform/MacOSX/PlatformDarwinKernel.cpp | 4 +- .../MacOSX/PlatformRemoteDarwinDevice.cpp | 2 +- .../Plugins/Platform/POSIX/PlatformPOSIX.cpp | 2 +- .../gdb-server/PlatformRemoteGDBServer.cpp | 2 +- .../Process/MacOSX-Kernel/ProcessKDP.cpp | 8 +-- .../MacOSX-Kernel/RegisterContextKDP_arm.cpp | 2 +- .../RegisterContextKDP_arm64.cpp | 2 +- .../MacOSX-Kernel/RegisterContextKDP_i386.cpp | 2 +- .../RegisterContextKDP_x86_64.cpp | 2 +- .../Plugins/Process/Utility/HistoryUnwind.cpp | 2 +- .../Utility/RegisterContextDarwin_arm.cpp | 2 +- .../Utility/RegisterContextDarwin_arm64.cpp | 2 +- .../Utility/RegisterContextDarwin_i386.cpp | 2 +- .../Utility/RegisterContextDarwin_x86_64.cpp | 2 +- .../RegisterContextFreeBSD_powerpc.cpp | 6 +- .../Utility/RegisterContextMach_arm.cpp | 2 +- .../Utility/RegisterContextMach_i386.cpp | 2 +- .../Utility/RegisterContextMach_x86_64.cpp | 2 +- .../Process/Utility/RegisterContextMemory.cpp | 2 +- .../Utility/RegisterContextPOSIX_arm.cpp | 2 +- .../Utility/RegisterContextPOSIX_arm64.cpp | 2 +- .../Utility/RegisterContextPOSIX_mips64.cpp | 2 +- .../Utility/RegisterContextPOSIX_powerpc.cpp | 2 +- .../Utility/RegisterContextPOSIX_s390x.cpp | 2 +- .../Utility/RegisterContextPOSIX_x86.cpp | 2 +- .../Utility/RegisterContextThreadMemory.cpp | 2 +- .../Process/Utility/RegisterInfoInterface.h | 2 +- .../elf-core/RegisterContextPOSIXCore_arm.cpp | 2 +- .../RegisterContextPOSIXCore_arm64.cpp | 2 +- .../RegisterContextPOSIXCore_mips64.cpp | 2 +- .../RegisterContextPOSIXCore_powerpc.cpp | 2 +- .../RegisterContextPOSIXCore_s390x.cpp | 2 +- .../GDBRemoteCommunicationHistory.cpp | 2 +- .../GDBRemoteCommunicationServer.cpp | 2 +- .../GDBRemoteCommunicationServerCommon.cpp | 3 +- .../GDBRemoteCommunicationServerPlatform.cpp | 3 +- .../gdb-remote/GDBRemoteRegisterContext.cpp | 2 +- .../Process/gdb-remote/ProcessGDBRemote.cpp | 16 ++--- .../Process/minidump/ProcessMinidump.cpp | 4 +- .../Process/minidump/ThreadMinidump.cpp | 2 +- .../Lua/ScriptInterpreterLua.cpp | 2 +- .../None/ScriptInterpreterNone.cpp | 2 +- .../Python/PythonDataObjects.h | 4 +- .../Python/ScriptInterpreterPython.cpp | 10 +-- .../Python/ScriptInterpreterPythonImpl.h | 2 +- .../DarwinLog/StructuredDataDarwinLog.cpp | 4 +- .../SymbolFile/Breakpad/SymbolFileBreakpad.h | 2 +- .../Plugins/SymbolFile/DWARF/DWARFASTParser.h | 2 +- .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 +- .../SymbolFile/DWARF/DWARFAttribute.cpp | 2 +- .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.h | 2 +- .../Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 2 +- .../SymbolFile/DWARF/DWARFDeclContext.h | 2 +- .../Plugins/SymbolFile/DWARF/NameToDIE.h | 2 +- .../SymbolFile/DWARF/SymbolFileDWARF.cpp | 2 +- .../DWARF/SymbolFileDWARFDebugMap.cpp | 2 +- .../DWARF/SymbolFileDWARFDebugMap.h | 2 +- .../SymbolFile/DWARF/UniqueDWARFASTType.h | 6 +- .../NativePDB/SymbolFileNativePDB.cpp | 2 +- .../Plugins/SymbolFile/PDB/PDBASTParser.cpp | 2 +- .../Plugins/SymbolFile/PDB/SymbolFilePDB.cpp | 2 +- .../MacOSX/AppleGetItemInfoHandler.cpp | 2 +- .../MacOSX/AppleGetItemInfoHandler.h | 2 +- .../MacOSX/AppleGetPendingItemsHandler.cpp | 2 +- .../MacOSX/AppleGetPendingItemsHandler.h | 4 +- .../MacOSX/AppleGetQueuesHandler.cpp | 2 +- .../MacOSX/AppleGetQueuesHandler.h | 4 +- .../MacOSX/AppleGetThreadItemInfoHandler.cpp | 2 +- .../MacOSX/AppleGetThreadItemInfoHandler.h | 2 +- .../MacOSX/SystemRuntimeMacOSX.h | 12 ++-- .../x86/x86AssemblyInspectionEngine.h | 2 +- lldb/source/Symbol/ArmUnwindInfo.cpp | 2 +- lldb/source/Symbol/Block.cpp | 2 +- lldb/source/Symbol/CompactUnwindInfo.cpp | 2 +- lldb/source/Symbol/FuncUnwinders.cpp | 2 +- lldb/source/Symbol/Function.cpp | 6 +- lldb/source/Symbol/LineTable.cpp | 4 +- lldb/source/Symbol/SymbolContext.cpp | 6 +- lldb/source/Symbol/Symtab.cpp | 2 +- lldb/source/Symbol/TypeList.cpp | 2 +- lldb/source/Symbol/TypeMap.cpp | 2 +- lldb/source/Symbol/TypeSystem.cpp | 4 +- lldb/source/Symbol/UnwindTable.cpp | 2 +- lldb/source/Symbol/Variable.cpp | 2 +- lldb/source/Symbol/VariableList.cpp | 2 +- lldb/source/Target/JITLoaderList.cpp | 2 +- lldb/source/Target/Language.cpp | 4 +- lldb/source/Target/Memory.cpp | 6 +- lldb/source/Target/QueueItem.cpp | 2 +- lldb/source/Target/StructuredDataPlugin.cpp | 4 +- lldb/source/Target/ThreadPlanBase.cpp | 2 +- .../Target/ThreadPlanCallUserExpression.cpp | 2 +- .../Target/ThreadPlanStepOverBreakpoint.cpp | 2 +- lldb/source/Utility/ArchSpec.cpp | 2 +- lldb/source/Utility/Args.cpp | 2 +- lldb/source/Utility/DataBufferLLVM.cpp | 2 +- lldb/source/Utility/Event.cpp | 2 +- lldb/source/Utility/GDBRemote.cpp | 2 +- lldb/source/Utility/Stream.cpp | 2 +- lldb/source/Utility/StreamString.cpp | 2 +- lldb/source/Utility/StringExtractor.cpp | 2 +- lldb/source/Utility/StringList.cpp | 2 +- .../Utility/TildeExpressionResolver.cpp | 2 +- 264 files changed, 378 insertions(+), 398 deletions(-) diff --git a/lldb/.clang-tidy b/lldb/.clang-tidy index e1f34ca5aa39..2cde63668d04 100644 --- a/lldb/.clang-tidy +++ b/lldb/.clang-tidy @@ -1,4 +1,4 @@ -Checks: '-readability-identifier-naming,modernize-use-default-member-init' +Checks: '-readability-identifier-naming,modernize-use-default-member-init,modernize-use-equals-default' InheritParentConfig: true CheckOptions: - key: modernize-use-default-member-init.IgnoreMacros diff --git a/lldb/include/lldb/Core/EmulateInstruction.h b/lldb/include/lldb/Core/EmulateInstruction.h index b3e837d78a44..f50fee095a8b 100644 --- a/lldb/include/lldb/Core/EmulateInstruction.h +++ b/lldb/include/lldb/Core/EmulateInstruction.h @@ -237,7 +237,7 @@ public: uint32_t isa; } info; - Context() {} + Context() = default; void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset) { info_type = eInfoTypeRegisterPlusOffset; diff --git a/lldb/include/lldb/Core/Opcode.h b/lldb/include/lldb/Core/Opcode.h index 9ecf4d084842..70f2dbdf639f 100644 --- a/lldb/include/lldb/Core/Opcode.h +++ b/lldb/include/lldb/Core/Opcode.h @@ -38,7 +38,7 @@ public: eTypeBytes }; - Opcode() {} + Opcode() = default; Opcode(uint8_t inst, lldb::ByteOrder order) : m_byte_order(order), m_type(eType8) { diff --git a/lldb/include/lldb/Core/StreamBuffer.h b/lldb/include/lldb/Core/StreamBuffer.h index c086c723ec21..2e61a214302b 100644 --- a/lldb/include/lldb/Core/StreamBuffer.h +++ b/lldb/include/lldb/Core/StreamBuffer.h @@ -23,7 +23,7 @@ public: StreamBuffer(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order) : Stream(flags, addr_size, byte_order), m_packet() {} - ~StreamBuffer() override {} + ~StreamBuffer() override = default; void Flush() override { // Nothing to do when flushing a buffer based stream... diff --git a/lldb/include/lldb/Core/ThreadSafeValue.h b/lldb/include/lldb/Core/ThreadSafeValue.h index 38b8034fad53..51820ec9cd9d 100644 --- a/lldb/include/lldb/Core/ThreadSafeValue.h +++ b/lldb/include/lldb/Core/ThreadSafeValue.h @@ -17,12 +17,10 @@ namespace lldb_private { template class ThreadSafeValue { public: - // Constructors and Destructors - ThreadSafeValue() : m_value(), m_mutex() {} - + ThreadSafeValue() = default; ThreadSafeValue(const T &value) : m_value(value), m_mutex() {} - ~ThreadSafeValue() {} + ~ThreadSafeValue() = default; T GetValue() const { T value; diff --git a/lldb/include/lldb/Core/UserSettingsController.h b/lldb/include/lldb/Core/UserSettingsController.h index 8fcd95be0f44..35555f08c351 100644 --- a/lldb/include/lldb/Core/UserSettingsController.h +++ b/lldb/include/lldb/Core/UserSettingsController.h @@ -32,12 +32,12 @@ namespace lldb_private { class Properties { public: - Properties() : m_collection_sp() {} + Properties() = default; Properties(const lldb::OptionValuePropertiesSP &collection_sp) : m_collection_sp(collection_sp) {} - virtual ~Properties() {} + virtual ~Properties() = default; virtual lldb::OptionValuePropertiesSP GetValueProperties() const { // This function is virtual in case subclasses want to lazily implement diff --git a/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h b/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h index 5c3176dfc594..cef43f45b8e4 100644 --- a/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h +++ b/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h @@ -39,7 +39,7 @@ public: size_t m_base_element = 0; size_t m_stride = 0; - PointerAsArraySettings() {} + PointerAsArraySettings() = default; PointerAsArraySettings(size_t elem_count, size_t base_elem = 0, size_t stride = 1) diff --git a/lldb/include/lldb/DataFormatters/TypeSummary.h b/lldb/include/lldb/DataFormatters/TypeSummary.h index 4c60aa6f09ef..30bc8cbf3feb 100644 --- a/lldb/include/lldb/DataFormatters/TypeSummary.h +++ b/lldb/include/lldb/DataFormatters/TypeSummary.h @@ -52,7 +52,7 @@ public: class Flags { public: - Flags() {} + Flags() = default; Flags(const Flags &other) : m_flags(other.m_flags) {} diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h index 96b34c9f3020..24322bd51a0c 100644 --- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h +++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h @@ -133,7 +133,7 @@ class SyntheticChildren { public: class Flags { public: - Flags() {} + Flags() = default; Flags(const Flags &other) : m_flags(other.m_flags) {} diff --git a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h index f1301d8595b1..833cd5eea356 100644 --- a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h +++ b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h @@ -27,7 +27,7 @@ public: ValueObjectPrinter(ValueObject *valobj, Stream *s, const DumpValueObjectOptions &options); - ~ValueObjectPrinter() {} + ~ValueObjectPrinter() = default; bool PrintValueObject(); diff --git a/lldb/include/lldb/Expression/Expression.h b/lldb/include/lldb/Expression/Expression.h index aaac889e6ed2..b4207de958e9 100644 --- a/lldb/include/lldb/Expression/Expression.h +++ b/lldb/include/lldb/Expression/Expression.h @@ -39,7 +39,7 @@ public: Expression(ExecutionContextScope &exe_scope); /// Destructor - virtual ~Expression() {} + virtual ~Expression() = default; /// Return the string that the parser should parse. Must be a full /// translation unit. diff --git a/lldb/include/lldb/Expression/ExpressionParser.h b/lldb/include/lldb/Expression/ExpressionParser.h index 71d2410ea7c3..ab5223c91553 100644 --- a/lldb/include/lldb/Expression/ExpressionParser.h +++ b/lldb/include/lldb/Expression/ExpressionParser.h @@ -41,7 +41,7 @@ public: : m_expr(expr), m_generate_debug_info(generate_debug_info) {} /// Destructor - virtual ~ExpressionParser(){}; + virtual ~ExpressionParser() = default; /// Attempts to find possible command line completions for the given /// expression. diff --git a/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h b/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h index 1bba30ad8620..2ba675db8662 100644 --- a/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h +++ b/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h @@ -36,7 +36,7 @@ public: ExpressionTypeSystemHelper(LLVMCastKind kind) : m_kind(kind) {} - ~ExpressionTypeSystemHelper() {} + ~ExpressionTypeSystemHelper() = default; protected: LLVMCastKind m_kind; diff --git a/lldb/include/lldb/Expression/Materializer.h b/lldb/include/lldb/Expression/Materializer.h index f60e0fbe513f..25cf22a8b5b0 100644 --- a/lldb/include/lldb/Expression/Materializer.h +++ b/lldb/include/lldb/Expression/Materializer.h @@ -90,7 +90,7 @@ public: class Entity { public: - Entity() {} + Entity() = default; virtual ~Entity() = default; diff --git a/lldb/include/lldb/Host/FileCache.h b/lldb/include/lldb/Host/FileCache.h index 52baa643c091..1bf5f0ca80e2 100644 --- a/lldb/include/lldb/Host/FileCache.h +++ b/lldb/include/lldb/Host/FileCache.h @@ -21,7 +21,7 @@ namespace lldb_private { class FileCache { private: - FileCache() {} + FileCache() = default; typedef std::map FDToFileMap; diff --git a/lldb/include/lldb/Host/HostInfoBase.h b/lldb/include/lldb/Host/HostInfoBase.h index f5c84ac6b7c6..eeed881101d0 100644 --- a/lldb/include/lldb/Host/HostInfoBase.h +++ b/lldb/include/lldb/Host/HostInfoBase.h @@ -33,8 +33,8 @@ struct SharedCacheImageInfo { class HostInfoBase { private: // Static class, unconstructable. - HostInfoBase() {} - ~HostInfoBase() {} + HostInfoBase() = default; + ~HostInfoBase() = default; public: /// A helper function for determining the liblldb location. It receives a diff --git a/lldb/include/lldb/Host/HostNativeProcessBase.h b/lldb/include/lldb/Host/HostNativeProcessBase.h index 642c63443c20..5469f8a50e26 100644 --- a/lldb/include/lldb/Host/HostNativeProcessBase.h +++ b/lldb/include/lldb/Host/HostNativeProcessBase.h @@ -27,7 +27,7 @@ public: HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {} explicit HostNativeProcessBase(lldb::process_t process) : m_process(process) {} - virtual ~HostNativeProcessBase() {} + virtual ~HostNativeProcessBase() = default; virtual Status Terminate() = 0; virtual Status GetMainModule(FileSpec &file_spec) const = 0; diff --git a/lldb/include/lldb/Host/HostNativeThreadBase.h b/lldb/include/lldb/Host/HostNativeThreadBase.h index c6007300344b..bfd70d745593 100644 --- a/lldb/include/lldb/Host/HostNativeThreadBase.h +++ b/lldb/include/lldb/Host/HostNativeThreadBase.h @@ -27,9 +27,9 @@ class HostNativeThreadBase { const HostNativeThreadBase &operator=(const HostNativeThreadBase &) = delete; public: - HostNativeThreadBase(); + HostNativeThreadBase() = default; explicit HostNativeThreadBase(lldb::thread_t thread); - virtual ~HostNativeThreadBase() {} + virtual ~HostNativeThreadBase() = default; virtual Status Join(lldb::thread_result_t *result) = 0; virtual Status Cancel() = 0; @@ -45,7 +45,7 @@ protected: static lldb::thread_result_t THREAD_ROUTINE ThreadCreateTrampoline(lldb::thread_arg_t arg); - lldb::thread_t m_thread; + lldb::thread_t m_thread = LLDB_INVALID_HOST_THREAD; lldb::thread_result_t m_result = 0; }; } diff --git a/lldb/include/lldb/Host/MainLoopBase.h b/lldb/include/lldb/Host/MainLoopBase.h index fa8cc77a94ba..67857b26ac70 100644 --- a/lldb/include/lldb/Host/MainLoopBase.h +++ b/lldb/include/lldb/Host/MainLoopBase.h @@ -33,8 +33,8 @@ private: class ReadHandle; public: - MainLoopBase() {} - virtual ~MainLoopBase() {} + MainLoopBase() = default; + virtual ~MainLoopBase() = default; typedef std::unique_ptr ReadHandleUP; diff --git a/lldb/include/lldb/Host/ProcessLauncher.h b/lldb/include/lldb/Host/ProcessLauncher.h index 9467b2c009b7..33dbfd72d1e5 100644 --- a/lldb/include/lldb/Host/ProcessLauncher.h +++ b/lldb/include/lldb/Host/ProcessLauncher.h @@ -17,7 +17,7 @@ class HostProcess; class ProcessLauncher { public: - virtual ~ProcessLauncher() {} + virtual ~ProcessLauncher() = default; virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Status &error) = 0; }; diff --git a/lldb/include/lldb/Host/ProcessRunLock.h b/lldb/include/lldb/Host/ProcessRunLock.h index fc3cbab3b112..b5b5328b4a33 100644 --- a/lldb/include/lldb/Host/ProcessRunLock.h +++ b/lldb/include/lldb/Host/ProcessRunLock.h @@ -35,7 +35,7 @@ public: class ProcessRunLocker { public: - ProcessRunLocker() {} + ProcessRunLocker() = default; ~ProcessRunLocker() { Unlock(); } diff --git a/lldb/include/lldb/Host/Terminal.h b/lldb/include/lldb/Host/Terminal.h index 172b27787b7d..ca91d6b59720 100644 --- a/lldb/include/lldb/Host/Terminal.h +++ b/lldb/include/lldb/Host/Terminal.h @@ -21,7 +21,7 @@ class Terminal { public: Terminal(int fd = -1) : m_fd(fd) {} - ~Terminal() {} + ~Terminal() = default; bool IsATerminal() const; diff --git a/lldb/include/lldb/Host/common/NativeProcessProtocol.h b/lldb/include/lldb/Host/common/NativeProcessProtocol.h index 0650b7f7cd25..0d835a5201f8 100644 --- a/lldb/include/lldb/Host/common/NativeProcessProtocol.h +++ b/lldb/include/lldb/Host/common/NativeProcessProtocol.h @@ -46,7 +46,7 @@ struct SVR4LibraryInfo { // NativeProcessProtocol class NativeProcessProtocol { public: - virtual ~NativeProcessProtocol() {} + virtual ~NativeProcessProtocol() = default; virtual Status Resume(const ResumeActionList &resume_actions) = 0; @@ -217,7 +217,7 @@ public: // Callbacks for low-level process state changes class NativeDelegate { public: - virtual ~NativeDelegate() {} + virtual ~NativeDelegate() = default; virtual void InitializeDelegate(NativeProcessProtocol *process) = 0; diff --git a/lldb/include/lldb/Host/common/NativeThreadProtocol.h b/lldb/include/lldb/Host/common/NativeThreadProtocol.h index 8d4c03549bb9..5cf26bd95939 100644 --- a/lldb/include/lldb/Host/common/NativeThreadProtocol.h +++ b/lldb/include/lldb/Host/common/NativeThreadProtocol.h @@ -21,7 +21,7 @@ class NativeThreadProtocol { public: NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid); - virtual ~NativeThreadProtocol() {} + virtual ~NativeThreadProtocol() = default; virtual std::string GetName() = 0; diff --git a/lldb/include/lldb/Interpreter/CommandInterpreter.h b/lldb/include/lldb/Interpreter/CommandInterpreter.h index 6430773de1b6..3b3daced3e33 100644 --- a/lldb/include/lldb/Interpreter/CommandInterpreter.h +++ b/lldb/include/lldb/Interpreter/CommandInterpreter.h @@ -33,7 +33,7 @@ class CommandInterpreter; class CommandInterpreterRunResult { public: - CommandInterpreterRunResult() {} + CommandInterpreterRunResult() = default; uint32_t GetNumErrors() const { return m_num_errors; } @@ -100,9 +100,7 @@ public: m_echo_comment_commands(echo_comments), m_print_results(print_results), m_print_errors(print_errors), m_add_to_history(add_to_history) {} - CommandInterpreterRunOptions() - - {} + CommandInterpreterRunOptions() = default; void SetSilent(bool silent) { LazyBool value = silent ? eLazyBoolNo : eLazyBoolYes; diff --git a/lldb/include/lldb/Interpreter/OptionValue.h b/lldb/include/lldb/Interpreter/OptionValue.h index d31c2048aada..99f52b0411b9 100644 --- a/lldb/include/lldb/Interpreter/OptionValue.h +++ b/lldb/include/lldb/Interpreter/OptionValue.h @@ -60,7 +60,7 @@ public: eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue) }; - OptionValue() {} + OptionValue() = default; virtual ~OptionValue() = default; diff --git a/lldb/include/lldb/Interpreter/Options.h b/lldb/include/lldb/Interpreter/Options.h index 9b85ca04bbfe..6bf5c21fe98e 100644 --- a/lldb/include/lldb/Interpreter/Options.h +++ b/lldb/include/lldb/Interpreter/Options.h @@ -254,7 +254,7 @@ public: class OptionGroupOptions : public Options { public: - OptionGroupOptions() {} + OptionGroupOptions() = default; ~OptionGroupOptions() override = default; diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h index 0b8f5f633107..8d1c38abffee 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -37,6 +37,40 @@ private: operator=(const ScriptInterpreterLocker &) = delete; }; +class ExecuteScriptOptions { +public: + ExecuteScriptOptions() = default; + + bool GetEnableIO() const { return m_enable_io; } + + bool GetSetLLDBGlobals() const { return m_set_lldb_globals; } + + // If this is true then any exceptions raised by the script will be + // cleared with PyErr_Clear(). If false then they will be left for + // the caller to clean up + bool GetMaskoutErrors() const { return m_maskout_errors; } + + ExecuteScriptOptions &SetEnableIO(bool enable) { + m_enable_io = enable; + return *this; + } + + ExecuteScriptOptions &SetSetLLDBGlobals(bool set) { + m_set_lldb_globals = set; + return *this; + } + + ExecuteScriptOptions &SetMaskoutErrors(bool maskout) { + m_maskout_errors = maskout; + return *this; + } + +private: + bool m_enable_io = true; + bool m_set_lldb_globals = true; + bool m_maskout_errors = true; +}; + class ScriptInterpreterIORedirect { public: /// Create an IO redirect. If IO is enabled, this will redirects the output @@ -92,40 +126,6 @@ public: ~ScriptInterpreter() override = default; - struct ExecuteScriptOptions { - public: - ExecuteScriptOptions() {} - - bool GetEnableIO() const { return m_enable_io; } - - bool GetSetLLDBGlobals() const { return m_set_lldb_globals; } - - // If this is true then any exceptions raised by the script will be - // cleared with PyErr_Clear(). If false then they will be left for - // the caller to clean up - bool GetMaskoutErrors() const { return m_maskout_errors; } - - ExecuteScriptOptions &SetEnableIO(bool enable) { - m_enable_io = enable; - return *this; - } - - ExecuteScriptOptions &SetSetLLDBGlobals(bool set) { - m_set_lldb_globals = set; - return *this; - } - - ExecuteScriptOptions &SetMaskoutErrors(bool maskout) { - m_maskout_errors = maskout; - return *this; - } - - private: - bool m_enable_io = true; - bool m_set_lldb_globals = true; - bool m_maskout_errors = true; - }; - virtual bool Interrupt() { return false; } virtual bool ExecuteOneLine( diff --git a/lldb/include/lldb/Symbol/CompactUnwindInfo.h b/lldb/include/lldb/Symbol/CompactUnwindInfo.h index a3b477e55efc..ceb501e1c05f 100644 --- a/lldb/include/lldb/Symbol/CompactUnwindInfo.h +++ b/lldb/include/lldb/Symbol/CompactUnwindInfo.h @@ -63,7 +63,7 @@ private: // provides the upper bound of // function addresses that are described - UnwindIndex() {} + UnwindIndex() = default; bool operator<(const CompactUnwindInfo::UnwindIndex &rhs) const { return function_offset < rhs.function_offset; @@ -96,7 +96,7 @@ private: uint32_t personality_array_offset = 0; uint32_t personality_array_count = 0; - UnwindHeader() {} + UnwindHeader() = default; }; void ScanIndex(const lldb::ProcessSP &process_sp); diff --git a/lldb/include/lldb/Symbol/DeclVendor.h b/lldb/include/lldb/Symbol/DeclVendor.h index 67dcaf1734bd..19ab2bb66e2c 100644 --- a/lldb/include/lldb/Symbol/DeclVendor.h +++ b/lldb/include/lldb/Symbol/DeclVendor.h @@ -28,7 +28,7 @@ public: // Constructors and Destructors DeclVendor(DeclVendorKind kind) : m_kind(kind) {} - virtual ~DeclVendor() {} + virtual ~DeclVendor() = default; DeclVendorKind GetKind() const { return m_kind; } diff --git a/lldb/include/lldb/Symbol/Function.h b/lldb/include/lldb/Symbol/Function.h index 6e5077ed4555..b703617773ff 100644 --- a/lldb/include/lldb/Symbol/Function.h +++ b/lldb/include/lldb/Symbol/Function.h @@ -271,7 +271,7 @@ using CallSiteParameterArray = llvm::SmallVector; class CallEdge { public: enum class AddrType : uint8_t { Call, AfterCall }; - virtual ~CallEdge() {} + virtual ~CallEdge() = default; /// Get the callee's definition. /// diff --git a/lldb/include/lldb/Symbol/ObjectFile.h b/lldb/include/lldb/Symbol/ObjectFile.h index dc83565c7db5..74e069b22c67 100644 --- a/lldb/include/lldb/Symbol/ObjectFile.h +++ b/lldb/include/lldb/Symbol/ObjectFile.h @@ -25,9 +25,9 @@ namespace lldb_private { class ObjectFileJITDelegate { public: - ObjectFileJITDelegate() {} + ObjectFileJITDelegate() = default; - virtual ~ObjectFileJITDelegate() {} + virtual ~ObjectFileJITDelegate() = default; virtual lldb::ByteOrder GetByteOrder() const = 0; diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h index 4d43d1ec0bf7..ffdbdc6853f7 100644 --- a/lldb/include/lldb/Symbol/SymbolFile.h +++ b/lldb/include/lldb/Symbol/SymbolFile.h @@ -69,7 +69,7 @@ public: : m_objfile_sp(std::move(objfile_sp)), m_abilities(0), m_calculated_abilities(false) {} - ~SymbolFile() override {} + ~SymbolFile() override = default; /// Get a mask of what this symbol file supports for the object file /// that it was constructed with. diff --git a/lldb/include/lldb/Symbol/TaggedASTType.h b/lldb/include/lldb/Symbol/TaggedASTType.h index f02f99258a3f..fe1a2c659d9f 100644 --- a/lldb/include/lldb/Symbol/TaggedASTType.h +++ b/lldb/include/lldb/Symbol/TaggedASTType.h @@ -27,7 +27,7 @@ public: TaggedASTType() : CompilerType() {} - virtual ~TaggedASTType() {} + virtual ~TaggedASTType() = default; TaggedASTType &operator=(const TaggedASTType &tw) { CompilerType::operator=(tw); diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h index 80f3ec547d84..9e671a565dd1 100644 --- a/lldb/include/lldb/Symbol/Type.h +++ b/lldb/include/lldb/Symbol/Type.h @@ -51,7 +51,7 @@ public: SymbolFileType(SymbolFile &symbol_file, const lldb::TypeSP &type_sp); - ~SymbolFileType() {} + ~SymbolFileType() = default; Type *operator->() { return GetType(); } @@ -239,7 +239,7 @@ class TypeImpl { public: TypeImpl() = default; - ~TypeImpl() {} + ~TypeImpl() = default; TypeImpl(const lldb::TypeSP &type_sp); diff --git a/lldb/include/lldb/Target/ExecutionContextScope.h b/lldb/include/lldb/Target/ExecutionContextScope.h index d7003e9a572e..4f5b08ed618c 100644 --- a/lldb/include/lldb/Target/ExecutionContextScope.h +++ b/lldb/include/lldb/Target/ExecutionContextScope.h @@ -31,7 +31,7 @@ namespace lldb_private { /// context to allow functions that take a execution contexts to be called. class ExecutionContextScope { public: - virtual ~ExecutionContextScope() {} + virtual ~ExecutionContextScope() = default; virtual lldb::TargetSP CalculateTarget() = 0; diff --git a/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h b/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h index 2cbf27d7b343..534516085091 100644 --- a/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h +++ b/lldb/include/lldb/Target/InstrumentationRuntimeStopInfo.h @@ -18,7 +18,7 @@ namespace lldb_private { class InstrumentationRuntimeStopInfo : public StopInfo { public: - ~InstrumentationRuntimeStopInfo() override {} + ~InstrumentationRuntimeStopInfo() override = default; lldb::StopReason GetStopReason() const override { return lldb::eStopReasonInstrumentation; diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index ba51056b1c9e..03b05c8e25d9 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -223,9 +223,7 @@ class ProcessModID { friend bool operator==(const ProcessModID &lhs, const ProcessModID &rhs); public: - ProcessModID() - - {} + ProcessModID() = default; ProcessModID(const ProcessModID &rhs) : m_stop_id(rhs.m_stop_id), m_memory_id(rhs.m_memory_id) {} diff --git a/lldb/include/lldb/Target/RegisterCheckpoint.h b/lldb/include/lldb/Target/RegisterCheckpoint.h index d2bcc614f587..daf20db999b3 100644 --- a/lldb/include/lldb/Target/RegisterCheckpoint.h +++ b/lldb/include/lldb/Target/RegisterCheckpoint.h @@ -34,7 +34,7 @@ public: RegisterCheckpoint(Reason reason) : UserID(0), m_data_sp(), m_reason(reason) {} - ~RegisterCheckpoint() {} + ~RegisterCheckpoint() = default; lldb::DataBufferSP &GetData() { return m_data_sp; } diff --git a/lldb/include/lldb/Target/StackFrameRecognizer.h b/lldb/include/lldb/Target/StackFrameRecognizer.h index baffc890bb06..64be759dc79e 100644 --- a/lldb/include/lldb/Target/StackFrameRecognizer.h +++ b/lldb/include/lldb/Target/StackFrameRecognizer.h @@ -37,7 +37,7 @@ public: return lldb::ValueObjectSP(); } virtual lldb::StackFrameSP GetMostRelevantFrame() { return nullptr; }; - virtual ~RecognizedStackFrame(){}; + virtual ~RecognizedStackFrame() = default; std::string GetStopDescription() { return m_stop_desc; } @@ -63,7 +63,7 @@ public: return ""; } - virtual ~StackFrameRecognizer(){}; + virtual ~StackFrameRecognizer() = default; }; /// \class ScriptedStackFrameRecognizer @@ -80,7 +80,7 @@ class ScriptedStackFrameRecognizer : public StackFrameRecognizer { public: ScriptedStackFrameRecognizer(lldb_private::ScriptInterpreter *interpreter, const char *pclass); - ~ScriptedStackFrameRecognizer() override {} + ~ScriptedStackFrameRecognizer() override = default; std::string GetName() override { return GetPythonClassName(); diff --git a/lldb/include/lldb/Target/StopInfo.h b/lldb/include/lldb/Target/StopInfo.h index 2039b3a6fcf1..0e81e5160846 100644 --- a/lldb/include/lldb/Target/StopInfo.h +++ b/lldb/include/lldb/Target/StopInfo.h @@ -25,7 +25,7 @@ public: // Constructors and Destructors StopInfo(Thread &thread, uint64_t value); - virtual ~StopInfo() {} + virtual ~StopInfo() = default; bool IsValid() const; diff --git a/lldb/include/lldb/Target/ThreadCollection.h b/lldb/include/lldb/Target/ThreadCollection.h index 40dc938976ff..29f5103e7eec 100644 --- a/lldb/include/lldb/Target/ThreadCollection.h +++ b/lldb/include/lldb/Target/ThreadCollection.h @@ -28,7 +28,7 @@ public: ThreadCollection(collection threads); - virtual ~ThreadCollection() {} + virtual ~ThreadCollection() = default; uint32_t GetSize(); diff --git a/lldb/include/lldb/Target/ThreadPlanStack.h b/lldb/include/lldb/Target/ThreadPlanStack.h index a5fcf00242b3..9ba58b1dec41 100644 --- a/lldb/include/lldb/Target/ThreadPlanStack.h +++ b/lldb/include/lldb/Target/ThreadPlanStack.h @@ -33,7 +33,7 @@ class ThreadPlanStack { public: ThreadPlanStack(const Thread &thread, bool make_empty = false); - ~ThreadPlanStack() {} + ~ThreadPlanStack() = default; using PlanStack = std::vector; @@ -115,7 +115,7 @@ private: class ThreadPlanStackMap { public: ThreadPlanStackMap(Process &process) : m_process(process) {} - ~ThreadPlanStackMap() {} + ~ThreadPlanStackMap() = default; // Prune the map using the current_threads list. void Update(ThreadList ¤t_threads, bool delete_missing, diff --git a/lldb/include/lldb/Target/UnixSignals.h b/lldb/include/lldb/Target/UnixSignals.h index cc24b76e4c3f..6fecdda12def 100644 --- a/lldb/include/lldb/Target/UnixSignals.h +++ b/lldb/include/lldb/Target/UnixSignals.h @@ -104,7 +104,7 @@ protected: Signal(const char *name, bool default_suppress, bool default_stop, bool default_notify, const char *description, const char *alias); - ~Signal() {} + ~Signal() = default; }; virtual void Reset(); diff --git a/lldb/include/lldb/Target/Unwind.h b/lldb/include/lldb/Target/Unwind.h index 783b7103e8fe..3faef139b00a 100644 --- a/lldb/include/lldb/Target/Unwind.h +++ b/lldb/include/lldb/Target/Unwind.h @@ -21,7 +21,7 @@ protected: Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {} public: - virtual ~Unwind() {} + virtual ~Unwind() = default; void Clear() { std::lock_guard guard(m_unwind_mutex); diff --git a/lldb/include/lldb/Utility/Baton.h b/lldb/include/lldb/Utility/Baton.h index 010f8da43868..8a2f04163682 100644 --- a/lldb/include/lldb/Utility/Baton.h +++ b/lldb/include/lldb/Utility/Baton.h @@ -34,8 +34,8 @@ namespace lldb_private { /// needed resources in their destructors. class Baton { public: - Baton() {} - virtual ~Baton() {} + Baton() = default; + virtual ~Baton() = default; virtual void *data() = 0; diff --git a/lldb/include/lldb/Utility/DataBuffer.h b/lldb/include/lldb/Utility/DataBuffer.h index b82e6f8fea70..c778299b89ad 100644 --- a/lldb/include/lldb/Utility/DataBuffer.h +++ b/lldb/include/lldb/Utility/DataBuffer.h @@ -48,7 +48,7 @@ public: /// and be downcast to the DataBuffer pure virtual interface. The virtual /// destructor ensures that destructing the base class will destruct the /// class that inherited from it correctly. - virtual ~DataBuffer() {} + virtual ~DataBuffer() = default; /// Get a pointer to the data. /// diff --git a/lldb/include/lldb/Utility/Event.h b/lldb/include/lldb/Utility/Event.h index 27a0874729f6..4e38f98a02f3 100644 --- a/lldb/include/lldb/Utility/Event.h +++ b/lldb/include/lldb/Utility/Event.h @@ -101,7 +101,7 @@ class EventDataReceipt : public EventData { public: EventDataReceipt() : EventData(), m_predicate(false) {} - ~EventDataReceipt() override {} + ~EventDataReceipt() override = default; static ConstString GetFlavorString() { static ConstString g_flavor("Process::ProcessEventData"); diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h index 8812ef6b1d8f..2b2d273a17a8 100644 --- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h +++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h @@ -469,7 +469,7 @@ template <> struct DeserializationHelper<> { /// The replayer interface. struct Replayer { - virtual ~Replayer() {} + virtual ~Replayer() = default; virtual void operator()(Deserializer &deserializer) const = 0; }; @@ -714,7 +714,7 @@ protected: friend llvm::optional_detail::OptionalStorage; friend llvm::Optional; - InstrumentationData() {} + InstrumentationData() = default; InstrumentationData(Serializer &serializer, Registry ®istry) : m_serializer(&serializer), m_deserializer(nullptr), m_registry(®istry) {} diff --git a/lldb/include/lldb/Utility/StreamTee.h b/lldb/include/lldb/Utility/StreamTee.h index cf410cb96842..b5d3b9679e91 100644 --- a/lldb/include/lldb/Utility/StreamTee.h +++ b/lldb/include/lldb/Utility/StreamTee.h @@ -45,7 +45,7 @@ public: m_streams = rhs.m_streams; } - ~StreamTee() override {} + ~StreamTee() override = default; StreamTee &operator=(const StreamTee &rhs) { if (this != &rhs) { diff --git a/lldb/include/lldb/Utility/TraceGDBRemotePackets.h b/lldb/include/lldb/Utility/TraceGDBRemotePackets.h index fbee32ec3e74..1d2448b05f2a 100644 --- a/lldb/include/lldb/Utility/TraceGDBRemotePackets.h +++ b/lldb/include/lldb/Utility/TraceGDBRemotePackets.h @@ -60,7 +60,7 @@ llvm::json::Value toJSON(const TraceStartRequest &packet); /// jLLDBTraceStop gdb-remote packet /// \{ struct TraceStopRequest { - TraceStopRequest() {} + TraceStopRequest() = default; TraceStopRequest(llvm::StringRef type, const std::vector &tids); diff --git a/lldb/include/lldb/Utility/UserID.h b/lldb/include/lldb/Utility/UserID.h index 9fc6985a5a99..19e0052fc51c 100644 --- a/lldb/include/lldb/Utility/UserID.h +++ b/lldb/include/lldb/Utility/UserID.h @@ -33,7 +33,7 @@ struct UserID { UserID(lldb::user_id_t uid = LLDB_INVALID_UID) : m_uid(uid) {} /// Destructor. - ~UserID() {} + ~UserID() = default; /// Clears the object state. /// diff --git a/lldb/include/lldb/Utility/VMRange.h b/lldb/include/lldb/Utility/VMRange.h index 3c7ac61cdd70..095092c1a381 100644 --- a/lldb/include/lldb/Utility/VMRange.h +++ b/lldb/include/lldb/Utility/VMRange.h @@ -26,13 +26,13 @@ public: typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; - VMRange() {} + VMRange() = default; VMRange(lldb::addr_t start_addr, lldb::addr_t end_addr) : m_base_addr(start_addr), m_byte_size(end_addr > start_addr ? end_addr - start_addr : 0) {} - ~VMRange() {} + ~VMRange() = default; void Clear() { m_base_addr = 0; diff --git a/lldb/include/lldb/lldb-private-types.h b/lldb/include/lldb/lldb-private-types.h index c7e652650da7..73d618d7069c 100644 --- a/lldb/include/lldb/lldb-private-types.h +++ b/lldb/include/lldb/lldb-private-types.h @@ -100,7 +100,7 @@ struct OptionEnumValueElement { using OptionEnumValues = llvm::ArrayRef; struct OptionValidator { - virtual ~OptionValidator() {} + virtual ~OptionValidator() = default; virtual bool IsValid(Platform &platform, const ExecutionContext &target) const = 0; virtual const char *ShortConditionString() const = 0; diff --git a/lldb/source/Breakpoint/BreakpointList.cpp b/lldb/source/Breakpoint/BreakpointList.cpp index a962703b9518..a00f6bed6181 100644 --- a/lldb/source/Breakpoint/BreakpointList.cpp +++ b/lldb/source/Breakpoint/BreakpointList.cpp @@ -26,7 +26,7 @@ BreakpointList::BreakpointList(bool is_internal) : m_mutex(), m_breakpoints(), m_next_break_id(0), m_is_internal(is_internal) {} -BreakpointList::~BreakpointList() {} +BreakpointList::~BreakpointList() = default; break_id_t BreakpointList::Add(BreakpointSP &bp_sp, bool notify) { std::lock_guard guard(m_mutex); diff --git a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp index f7e7995fcaee..6c55629b5aad 100644 --- a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp +++ b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp @@ -21,7 +21,7 @@ BreakpointLocationCollection::BreakpointLocationCollection() : m_break_loc_collection(), m_collection_mutex() {} // Destructor -BreakpointLocationCollection::~BreakpointLocationCollection() {} +BreakpointLocationCollection::~BreakpointLocationCollection() = default; void BreakpointLocationCollection::Add(const BreakpointLocationSP &bp_loc) { std::lock_guard guard(m_collection_mutex); diff --git a/lldb/source/Breakpoint/BreakpointResolver.cpp b/lldb/source/Breakpoint/BreakpointResolver.cpp index 6ddb4c588ff9..d3d57a282d09 100644 --- a/lldb/source/Breakpoint/BreakpointResolver.cpp +++ b/lldb/source/Breakpoint/BreakpointResolver.cpp @@ -65,7 +65,7 @@ BreakpointResolver::BreakpointResolver(const BreakpointSP &bkpt, lldb::addr_t offset) : m_breakpoint(bkpt), m_offset(offset), SubclassID(resolverTy) {} -BreakpointResolver::~BreakpointResolver() {} +BreakpointResolver::~BreakpointResolver() = default; BreakpointResolverSP BreakpointResolver::CreateFromStructuredData( const StructuredData::Dictionary &resolver_dict, Status &error) { diff --git a/lldb/source/Breakpoint/BreakpointSiteList.cpp b/lldb/source/Breakpoint/BreakpointSiteList.cpp index 873ba6236a72..c6966145e42b 100644 --- a/lldb/source/Breakpoint/BreakpointSiteList.cpp +++ b/lldb/source/Breakpoint/BreakpointSiteList.cpp @@ -16,7 +16,7 @@ using namespace lldb_private; BreakpointSiteList::BreakpointSiteList() : m_mutex(), m_bp_site_list() {} -BreakpointSiteList::~BreakpointSiteList() {} +BreakpointSiteList::~BreakpointSiteList() = default; // Add breakpoint site to the list. However, if the element already exists in // the list, then we don't add it, and return LLDB_INVALID_BREAK_ID. diff --git a/lldb/source/Breakpoint/Stoppoint.cpp b/lldb/source/Breakpoint/Stoppoint.cpp index b2c4a7eeb253..94e97cd4542f 100644 --- a/lldb/source/Breakpoint/Stoppoint.cpp +++ b/lldb/source/Breakpoint/Stoppoint.cpp @@ -14,10 +14,10 @@ using namespace lldb; using namespace lldb_private; // Stoppoint constructor -Stoppoint::Stoppoint() {} +Stoppoint::Stoppoint() = default; // Destructor -Stoppoint::~Stoppoint() {} +Stoppoint::~Stoppoint() = default; break_id_t Stoppoint::GetID() const { return m_bid; } diff --git a/lldb/source/Breakpoint/WatchpointList.cpp b/lldb/source/Breakpoint/WatchpointList.cpp index 8599c3cf30fa..100c1e51ac5a 100644 --- a/lldb/source/Breakpoint/WatchpointList.cpp +++ b/lldb/source/Breakpoint/WatchpointList.cpp @@ -14,7 +14,7 @@ using namespace lldb_private; WatchpointList::WatchpointList() : m_watchpoints(), m_mutex() {} -WatchpointList::~WatchpointList() {} +WatchpointList::~WatchpointList() = default; // Add a watchpoint to the list. lldb::watch_id_t WatchpointList::Add(const WatchpointSP &wp_sp, bool notify) { diff --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp index 98624172b56a..86c47a2f0634 100644 --- a/lldb/source/Commands/CommandObjectGUI.cpp +++ b/lldb/source/Commands/CommandObjectGUI.cpp @@ -22,7 +22,7 @@ CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "gui", "Switch into the curses based GUI mode.", "gui") {} -CommandObjectGUI::~CommandObjectGUI() {} +CommandObjectGUI::~CommandObjectGUI() = default; bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { #if LLDB_ENABLE_CURSES diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h index 8f45db55666e..c924dda7c6d4 100644 --- a/lldb/source/Commands/CommandObjectHelp.h +++ b/lldb/source/Commands/CommandObjectHelp.h @@ -34,7 +34,7 @@ public: public: CommandOptions() : Options() {} - ~CommandOptions() override {} + ~CommandOptions() override = default; Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override { diff --git a/lldb/source/Commands/CommandObjectLanguage.cpp b/lldb/source/Commands/CommandObjectLanguage.cpp index e6d22ec4ae40..925db599e4ab 100644 --- a/lldb/source/Commands/CommandObjectLanguage.cpp +++ b/lldb/source/Commands/CommandObjectLanguage.cpp @@ -23,4 +23,4 @@ CommandObjectLanguage::CommandObjectLanguage(CommandInterpreter &interpreter) LanguageRuntime::InitializeCommands(this); } -CommandObjectLanguage::~CommandObjectLanguage() {} +CommandObjectLanguage::~CommandObjectLanguage() = default; diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index fab1ddc9e99e..bf23c4552aa8 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -60,7 +60,7 @@ static mode_t ParsePermissionString(llvm::StringRef permissions) { class OptionPermissions : public OptionGroup { public: - OptionPermissions() {} + OptionPermissions() = default; ~OptionPermissions() override = default; diff --git a/lldb/source/Commands/CommandObjectQuit.cpp b/lldb/source/Commands/CommandObjectQuit.cpp index 6ac04290f603..c6e2e21de6b6 100644 --- a/lldb/source/Commands/CommandObjectQuit.cpp +++ b/lldb/source/Commands/CommandObjectQuit.cpp @@ -22,7 +22,7 @@ CommandObjectQuit::CommandObjectQuit(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "quit", "Quit the LLDB debugger.", "quit [exit-code]") {} -CommandObjectQuit::~CommandObjectQuit() {} +CommandObjectQuit::~CommandObjectQuit() = default; // returns true if there is at least one alive process is_a_detach will be true // if all alive processes will be detached when you quit and false if at least diff --git a/lldb/source/Commands/CommandObjectRegexCommand.cpp b/lldb/source/Commands/CommandObjectRegexCommand.cpp index dcd05a12cd6a..be0f84d8142c 100644 --- a/lldb/source/Commands/CommandObjectRegexCommand.cpp +++ b/lldb/source/Commands/CommandObjectRegexCommand.cpp @@ -23,7 +23,7 @@ CommandObjectRegexCommand::CommandObjectRegexCommand( m_entries(), m_is_removable(is_removable) {} // Destructor -CommandObjectRegexCommand::~CommandObjectRegexCommand() {} +CommandObjectRegexCommand::~CommandObjectRegexCommand() = default; bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command, CommandReturnObject &result) { diff --git a/lldb/source/Commands/CommandObjectScript.cpp b/lldb/source/Commands/CommandObjectScript.cpp index 13e11ec61535..f53d6540bc04 100644 --- a/lldb/source/Commands/CommandObjectScript.cpp +++ b/lldb/source/Commands/CommandObjectScript.cpp @@ -84,7 +84,7 @@ CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter) "results. Start the interactive interpreter if no code is supplied.", "script [--language --] []") {} -CommandObjectScript::~CommandObjectScript() {} +CommandObjectScript::~CommandObjectScript() = default; bool CommandObjectScript::DoExecute(llvm::StringRef command, CommandReturnObject &result) { diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 84670707941d..b25514b1ffbc 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -158,9 +158,9 @@ static constexpr OptionEnumValueElement g_dependents_enumaration[] = { class OptionGroupDependents : public OptionGroup { public: - OptionGroupDependents() {} + OptionGroupDependents() = default; - ~OptionGroupDependents() override {} + ~OptionGroupDependents() override = default; llvm::ArrayRef GetDefinitions() override { return llvm::makeArrayRef(g_target_dependents_options); diff --git a/lldb/source/Commands/CommandObjectVersion.cpp b/lldb/source/Commands/CommandObjectVersion.cpp index 648a912601c0..20c2d25b745c 100644 --- a/lldb/source/Commands/CommandObjectVersion.cpp +++ b/lldb/source/Commands/CommandObjectVersion.cpp @@ -20,7 +20,7 @@ CommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "version", "Show the LLDB debugger version.", "version") {} -CommandObjectVersion::~CommandObjectVersion() {} +CommandObjectVersion::~CommandObjectVersion() = default; bool CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) { if (args.GetArgumentCount() == 0) { diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp index f55e17251887..af6e31a67da3 100644 --- a/lldb/source/Core/AddressRange.cpp +++ b/lldb/source/Core/AddressRange.cpp @@ -41,7 +41,7 @@ AddressRange::AddressRange(const lldb::SectionSP §ion, addr_t offset, AddressRange::AddressRange(const Address &so_addr, addr_t byte_size) : m_base_addr(so_addr), m_byte_size(byte_size) {} -AddressRange::~AddressRange() {} +AddressRange::~AddressRange() = default; bool AddressRange::Contains(const Address &addr) const { SectionSP range_sect_sp = GetBaseAddress().GetSection(); diff --git a/lldb/source/Core/AddressResolver.cpp b/lldb/source/Core/AddressResolver.cpp index 16b849b721de..87b0abd34e52 100644 --- a/lldb/source/Core/AddressResolver.cpp +++ b/lldb/source/Core/AddressResolver.cpp @@ -17,9 +17,9 @@ class ModuleList; using namespace lldb_private; // AddressResolver: -AddressResolver::AddressResolver() {} +AddressResolver::AddressResolver() = default; -AddressResolver::~AddressResolver() {} +AddressResolver::~AddressResolver() = default; void AddressResolver::ResolveAddressInModules(SearchFilter &filter, ModuleList &modules) { diff --git a/lldb/source/Core/AddressResolverFileLine.cpp b/lldb/source/Core/AddressResolverFileLine.cpp index 635479291c50..fb61a6100b0e 100644 --- a/lldb/source/Core/AddressResolverFileLine.cpp +++ b/lldb/source/Core/AddressResolverFileLine.cpp @@ -32,7 +32,7 @@ AddressResolverFileLine::AddressResolverFileLine( SourceLocationSpec location_spec) : AddressResolver(), m_src_location_spec(location_spec) {} -AddressResolverFileLine::~AddressResolverFileLine() {} +AddressResolverFileLine::~AddressResolverFileLine() = default; Searcher::CallbackReturn AddressResolverFileLine::SearchCallback(SearchFilter &filter, diff --git a/lldb/source/Core/FileLineResolver.cpp b/lldb/source/Core/FileLineResolver.cpp index 37435f9e9047..2cf7007165bc 100644 --- a/lldb/source/Core/FileLineResolver.cpp +++ b/lldb/source/Core/FileLineResolver.cpp @@ -29,7 +29,7 @@ FileLineResolver::FileLineResolver(const FileSpec &file_spec, uint32_t line_no, : Searcher(), m_file_spec(file_spec), m_line_number(line_no), m_inlines(check_inlines) {} -FileLineResolver::~FileLineResolver() {} +FileLineResolver::~FileLineResolver() = default; Searcher::CallbackReturn FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context, diff --git a/lldb/source/Core/ModuleChild.cpp b/lldb/source/Core/ModuleChild.cpp index 6e04bb4589e3..7aaa8f2ac250 100644 --- a/lldb/source/Core/ModuleChild.cpp +++ b/lldb/source/Core/ModuleChild.cpp @@ -13,7 +13,7 @@ using namespace lldb_private; ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp) : m_module_wp(module_sp) {} -ModuleChild::~ModuleChild() {} +ModuleChild::~ModuleChild() = default; const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) { if (this != &rhs) diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index f03f2ca38e08..207d38938d08 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -38,7 +38,7 @@ typedef bool (*PluginInitCallback)(); typedef void (*PluginTermCallback)(); struct PluginInfo { - PluginInfo() {} + PluginInfo() = default; llvm::sys::DynamicLibrary library; PluginInitCallback plugin_init_callback = nullptr; diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index 3d51d42897c2..9c1112979c54 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -61,7 +61,7 @@ SourceManager::SourceManager(const DebuggerSP &debugger_sp) m_debugger_wp(debugger_sp) {} // Destructor -SourceManager::~SourceManager() {} +SourceManager::~SourceManager() = default; SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) { if (!file_spec) diff --git a/lldb/source/Core/StreamFile.cpp b/lldb/source/Core/StreamFile.cpp index d736dfd48ebf..2f922fe11440 100644 --- a/lldb/source/Core/StreamFile.cpp +++ b/lldb/source/Core/StreamFile.cpp @@ -43,7 +43,7 @@ StreamFile::StreamFile(const char *path, File::OpenOptions options, } } -StreamFile::~StreamFile() {} +StreamFile::~StreamFile() = default; void StreamFile::Flush() { m_file_sp->Flush(); } diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index bbcce0dbf20a..9c1ba99da1d0 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -106,7 +106,7 @@ ValueObject::ValueObject(ExecutionContextScope *exe_scope, } // Destructor -ValueObject::~ValueObject() {} +ValueObject::~ValueObject() = default; bool ValueObject::UpdateValueIfNeeded(bool update_format) { @@ -2839,7 +2839,7 @@ ValueObject::EvaluationPoint::EvaluationPoint( const ValueObject::EvaluationPoint &rhs) : m_mod_id(), m_exe_ctx_ref(rhs.m_exe_ctx_ref), m_needs_update(true) {} -ValueObject::EvaluationPoint::~EvaluationPoint() {} +ValueObject::EvaluationPoint::~EvaluationPoint() = default; // This function checks the EvaluationPoint against the current process state. // If the current state matches the evaluation point, or the evaluation point diff --git a/lldb/source/Core/ValueObjectCast.cpp b/lldb/source/Core/ValueObjectCast.cpp index 7b6d3591faf4..9f803912d0ca 100644 --- a/lldb/source/Core/ValueObjectCast.cpp +++ b/lldb/source/Core/ValueObjectCast.cpp @@ -36,7 +36,7 @@ ValueObjectCast::ValueObjectCast(ValueObject &parent, ConstString name, m_value.SetCompilerType(cast_type); } -ValueObjectCast::~ValueObjectCast() {} +ValueObjectCast::~ValueObjectCast() = default; CompilerType ValueObjectCast::GetCompilerTypeImpl() { return m_cast_type; } diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index b26a0aa7e58b..a2beeb0bcdeb 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -43,7 +43,7 @@ ValueObjectChild::ValueObjectChild( SetLanguageFlags(language_flags); } -ValueObjectChild::~ValueObjectChild() {} +ValueObjectChild::~ValueObjectChild() = default; lldb::ValueType ValueObjectChild::GetValueType() const { return m_parent->GetValueType(); diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp index a32e533245b4..174b9359d52d 100644 --- a/lldb/source/Core/ValueObjectConstResult.cpp +++ b/lldb/source/Core/ValueObjectConstResult.cpp @@ -193,7 +193,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope, m_error = m_value.GetValueAsData(&exe_ctx, m_data, module); } -ValueObjectConstResult::~ValueObjectConstResult() {} +ValueObjectConstResult::~ValueObjectConstResult() = default; CompilerType ValueObjectConstResult::GetCompilerTypeImpl() { return m_value.GetCompilerType(); diff --git a/lldb/source/Core/ValueObjectConstResultCast.cpp b/lldb/source/Core/ValueObjectConstResultCast.cpp index 53ec9db45540..e70d055ac57c 100644 --- a/lldb/source/Core/ValueObjectConstResultCast.cpp +++ b/lldb/source/Core/ValueObjectConstResultCast.cpp @@ -27,7 +27,7 @@ ValueObjectConstResultCast::ValueObjectConstResultCast( m_name = name; } -ValueObjectConstResultCast::~ValueObjectConstResultCast() {} +ValueObjectConstResultCast::~ValueObjectConstResultCast() = default; lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) { return m_impl.Dereference(error); diff --git a/lldb/source/Core/ValueObjectConstResultChild.cpp b/lldb/source/Core/ValueObjectConstResultChild.cpp index 13c8393d8081..0fd81410ae54 100644 --- a/lldb/source/Core/ValueObjectConstResultChild.cpp +++ b/lldb/source/Core/ValueObjectConstResultChild.cpp @@ -34,7 +34,7 @@ ValueObjectConstResultChild::ValueObjectConstResultChild( m_name = name; } -ValueObjectConstResultChild::~ValueObjectConstResultChild() {} +ValueObjectConstResultChild::~ValueObjectConstResultChild() = default; lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) { return m_impl.Dereference(error); diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp index badc22e2cdcc..af039ee4040b 100644 --- a/lldb/source/Core/ValueObjectMemory.cpp +++ b/lldb/source/Core/ValueObjectMemory.cpp @@ -106,7 +106,7 @@ ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope, } } -ValueObjectMemory::~ValueObjectMemory() {} +ValueObjectMemory::~ValueObjectMemory() = default; CompilerType ValueObjectMemory::GetCompilerTypeImpl() { if (m_type_sp) diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp index 38bbe26461d0..089fd7667080 100644 --- a/lldb/source/Core/ValueObjectRegister.cpp +++ b/lldb/source/Core/ValueObjectRegister.cpp @@ -60,7 +60,7 @@ ValueObjectRegisterSet::ValueObjectRegisterSet(ExecutionContextScope *exe_scope, } } -ValueObjectRegisterSet::~ValueObjectRegisterSet() {} +ValueObjectRegisterSet::~ValueObjectRegisterSet() = default; CompilerType ValueObjectRegisterSet::GetCompilerTypeImpl() { return CompilerType(); @@ -193,7 +193,7 @@ ValueObjectRegister::ValueObjectRegister(ExecutionContextScope *exe_scope, ConstructObject(reg_num); } -ValueObjectRegister::~ValueObjectRegister() {} +ValueObjectRegister::~ValueObjectRegister() = default; CompilerType ValueObjectRegister::GetCompilerTypeImpl() { if (!m_compiler_type.IsValid()) { diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 87e4db59d6ff..8e89503a8a76 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -63,7 +63,7 @@ ValueObjectVariable::ValueObjectVariable(ExecutionContextScope *exe_scope, m_name = var_sp->GetName(); } -ValueObjectVariable::~ValueObjectVariable() {} +ValueObjectVariable::~ValueObjectVariable() = default; CompilerType ValueObjectVariable::GetCompilerTypeImpl() { Type *var_type = m_variable_sp->GetType(); diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp index 9078a6f48f84..9c5046687013 100644 --- a/lldb/source/DataFormatters/TypeFormat.cpp +++ b/lldb/source/DataFormatters/TypeFormat.cpp @@ -29,13 +29,13 @@ using namespace lldb_private; TypeFormatImpl::TypeFormatImpl(const Flags &flags) : m_flags(flags) {} -TypeFormatImpl::~TypeFormatImpl() {} +TypeFormatImpl::~TypeFormatImpl() = default; TypeFormatImpl_Format::TypeFormatImpl_Format(lldb::Format f, const TypeFormatImpl::Flags &flags) : TypeFormatImpl(flags), m_format(f) {} -TypeFormatImpl_Format::~TypeFormatImpl_Format() {} +TypeFormatImpl_Format::~TypeFormatImpl_Format() = default; bool TypeFormatImpl_Format::FormatObject(ValueObject *valobj, std::string &dest) const { @@ -134,7 +134,7 @@ TypeFormatImpl_EnumType::TypeFormatImpl_EnumType( ConstString type_name, const TypeFormatImpl::Flags &flags) : TypeFormatImpl(flags), m_enum_type(type_name), m_types() {} -TypeFormatImpl_EnumType::~TypeFormatImpl_EnumType() {} +TypeFormatImpl_EnumType::~TypeFormatImpl_EnumType() = default; bool TypeFormatImpl_EnumType::FormatObject(ValueObject *valobj, std::string &dest) const { diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index 341bbc147448..c09ed31d0338 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -26,7 +26,7 @@ using namespace lldb; using namespace lldb_private; -TypeSummaryOptions::TypeSummaryOptions() {} +TypeSummaryOptions::TypeSummaryOptions() = default; lldb::LanguageType TypeSummaryOptions::GetLanguage() const { return m_lang; } diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp index ba806ca7cfbc..2cca5d65f470 100644 --- a/lldb/source/DataFormatters/TypeSynthetic.cpp +++ b/lldb/source/DataFormatters/TypeSynthetic.cpp @@ -143,7 +143,7 @@ ScriptedSyntheticChildren::FrontEnd::FrontEnd(std::string pclass, m_python_class.c_str(), backend.GetSP()); } -ScriptedSyntheticChildren::FrontEnd::~FrontEnd() {} +ScriptedSyntheticChildren::FrontEnd::~FrontEnd() = default; lldb::ValueObjectSP ScriptedSyntheticChildren::FrontEnd::GetChildAtIndex(size_t idx) { diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index fd26071b9a3b..a10546c1deae 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -67,7 +67,7 @@ DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp, } // Destructor -DWARFExpression::~DWARFExpression() {} +DWARFExpression::~DWARFExpression() = default; bool DWARFExpression::IsValid() const { return m_data.GetByteSize() > 0; } diff --git a/lldb/source/Expression/ExpressionVariable.cpp b/lldb/source/Expression/ExpressionVariable.cpp index 8b3dda7b2fe1..565a3d1a8161 100644 --- a/lldb/source/Expression/ExpressionVariable.cpp +++ b/lldb/source/Expression/ExpressionVariable.cpp @@ -13,7 +13,7 @@ using namespace lldb_private; -ExpressionVariable::~ExpressionVariable() {} +ExpressionVariable::~ExpressionVariable() = default; uint8_t *ExpressionVariable::GetValueBytes() { llvm::Optional byte_size = m_frozen_sp->GetByteSize(); @@ -28,7 +28,7 @@ uint8_t *ExpressionVariable::GetValueBytes() { return nullptr; } -PersistentExpressionState::~PersistentExpressionState() {} +PersistentExpressionState::~PersistentExpressionState() = default; lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) { SymbolMap::iterator si = m_symbol_map.find(name.GetCString()); diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index b19c1d787093..63184ba477a6 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -496,7 +496,7 @@ IRExecutionUnit::~IRExecutionUnit() { IRExecutionUnit::MemoryManager::MemoryManager(IRExecutionUnit &parent) : m_default_mm_up(new llvm::SectionMemoryManager()), m_parent(parent) {} -IRExecutionUnit::MemoryManager::~MemoryManager() {} +IRExecutionUnit::MemoryManager::~MemoryManager() = default; lldb::SectionType IRExecutionUnit::GetSectionTypeFromSectionName( const llvm::StringRef &name, IRExecutionUnit::AllocationKind alloc_kind) { diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 81d8a8d5070d..788520d1f32b 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -122,7 +122,7 @@ public: m_stack_pointer = stack_frame_top; } - ~InterpreterStackFrame() {} + ~InterpreterStackFrame() = default; void Jump(const BasicBlock *bb) { m_prev_bb = m_bb; diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index bf44f1ba47e2..eac89c24bc1e 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -57,7 +57,7 @@ UserExpression::UserExpression(ExecutionContextScope &exe_scope, m_expr_prefix(std::string(prefix)), m_language(language), m_desired_type(desired_type), m_options(options) {} -UserExpression::~UserExpression() {} +UserExpression::~UserExpression() = default; void UserExpression::InstallContext(ExecutionContext &exe_ctx) { m_jit_process_wp = exe_ctx.GetProcessSP(); diff --git a/lldb/source/Host/common/HostNativeThreadBase.cpp b/lldb/source/Host/common/HostNativeThreadBase.cpp index 331b2671e88c..b15160b143ca 100644 --- a/lldb/source/Host/common/HostNativeThreadBase.cpp +++ b/lldb/source/Host/common/HostNativeThreadBase.cpp @@ -17,9 +17,6 @@ using namespace lldb; using namespace lldb_private; -HostNativeThreadBase::HostNativeThreadBase() - : m_thread(LLDB_INVALID_HOST_THREAD) {} - HostNativeThreadBase::HostNativeThreadBase(thread_t thread) : m_thread(thread), m_result(0) {} diff --git a/lldb/source/Host/common/HostProcess.cpp b/lldb/source/Host/common/HostProcess.cpp index 256a73bb6716..06dd192013ba 100644 --- a/lldb/source/Host/common/HostProcess.cpp +++ b/lldb/source/Host/common/HostProcess.cpp @@ -18,7 +18,7 @@ HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {} HostProcess::HostProcess(lldb::process_t process) : m_native_process(new HostNativeProcess(process)) {} -HostProcess::~HostProcess() {} +HostProcess::~HostProcess() = default; Status HostProcess::Terminate() { return m_native_process->Terminate(); } diff --git a/lldb/source/Host/common/NativeRegisterContext.cpp b/lldb/source/Host/common/NativeRegisterContext.cpp index c534c7ac724b..04d10aba4e63 100644 --- a/lldb/source/Host/common/NativeRegisterContext.cpp +++ b/lldb/source/Host/common/NativeRegisterContext.cpp @@ -22,7 +22,7 @@ NativeRegisterContext::NativeRegisterContext(NativeThreadProtocol &thread) : m_thread(thread) {} // Destructor -NativeRegisterContext::~NativeRegisterContext() {} +NativeRegisterContext::~NativeRegisterContext() = default; // FIXME revisit invalidation, process stop ids, etc. Right now we don't // support caching in NativeRegisterContext. We can do this later by utilizing diff --git a/lldb/source/Host/common/PseudoTerminal.cpp b/lldb/source/Host/common/PseudoTerminal.cpp index 6533d659ce31..dce4c5185c7b 100644 --- a/lldb/source/Host/common/PseudoTerminal.cpp +++ b/lldb/source/Host/common/PseudoTerminal.cpp @@ -29,7 +29,7 @@ int posix_openpt(int flags); using namespace lldb_private; // PseudoTerminal constructor -PseudoTerminal::PseudoTerminal() {} +PseudoTerminal::PseudoTerminal() = default; // Destructor // diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp index 25f95b7394e0..3f47d32d4652 100644 --- a/lldb/source/Host/common/SocketAddress.cpp +++ b/lldb/source/Host/common/SocketAddress.cpp @@ -93,7 +93,7 @@ SocketAddress::SocketAddress(const struct addrinfo *addr_info) { } // Destructor -SocketAddress::~SocketAddress() {} +SocketAddress::~SocketAddress() = default; void SocketAddress::Clear() { memset(&m_socket_addr, 0, sizeof(m_socket_addr)); diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp index e59b2198f506..2301abe9afb1 100644 --- a/lldb/source/Host/common/Terminal.cpp +++ b/lldb/source/Host/common/Terminal.cpp @@ -92,7 +92,7 @@ TerminalState::TerminalState() } // Destructor -TerminalState::~TerminalState() {} +TerminalState::~TerminalState() = default; void TerminalState::Clear() { m_tty.Clear(); @@ -190,10 +190,10 @@ bool TerminalState::ProcessGroupIsValid() const { } // Constructor -TerminalStateSwitcher::TerminalStateSwitcher() {} +TerminalStateSwitcher::TerminalStateSwitcher() = default; // Destructor -TerminalStateSwitcher::~TerminalStateSwitcher() {} +TerminalStateSwitcher::~TerminalStateSwitcher() = default; // Returns the number of states that this switcher contains uint32_t TerminalStateSwitcher::GetNumberOfStates() const { diff --git a/lldb/source/Host/common/XML.cpp b/lldb/source/Host/common/XML.cpp index dd40f1acc3fb..c3225d3f4433 100644 --- a/lldb/source/Host/common/XML.cpp +++ b/lldb/source/Host/common/XML.cpp @@ -17,7 +17,7 @@ using namespace lldb_private; #pragma mark-- XMLDocument -XMLDocument::XMLDocument() {} +XMLDocument::XMLDocument() = default; XMLDocument::~XMLDocument() { Clear(); } @@ -91,11 +91,11 @@ bool XMLDocument::XMLEnabled() { #pragma mark-- XMLNode -XMLNode::XMLNode() {} +XMLNode::XMLNode() = default; XMLNode::XMLNode(XMLNodeImpl node) : m_node(node) {} -XMLNode::~XMLNode() {} +XMLNode::~XMLNode() = default; void XMLNode::Clear() { m_node = nullptr; } @@ -398,7 +398,7 @@ ApplePropertyList::ApplePropertyList(const char *path) ParseFile(path); } -ApplePropertyList::~ApplePropertyList() {} +ApplePropertyList::~ApplePropertyList() = default; llvm::StringRef ApplePropertyList::GetErrors() const { return m_xml_doc.GetErrors(); diff --git a/lldb/source/Host/macosx/cfcpp/CFCBundle.cpp b/lldb/source/Host/macosx/cfcpp/CFCBundle.cpp index 1c268fa112de..9c13028803de 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCBundle.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCBundle.cpp @@ -19,7 +19,7 @@ CFCBundle::CFCBundle(CFURLRef url) : CFCReleaser(url ? CFBundleCreate(NULL, url) : NULL) {} // Destructor -CFCBundle::~CFCBundle() {} +CFCBundle::~CFCBundle() = default; // Set the path for a bundle by supplying a bool CFCBundle::SetPath(const char *path) { diff --git a/lldb/source/Host/macosx/cfcpp/CFCData.cpp b/lldb/source/Host/macosx/cfcpp/CFCData.cpp index bfa213b860e2..65b45aa0154a 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCData.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCData.cpp @@ -24,7 +24,7 @@ CFCData &CFCData::operator=(const CFCData &rhs) } // Destructor -CFCData::~CFCData() {} +CFCData::~CFCData() = default; CFIndex CFCData::GetLength() const { CFDataRef data = get(); diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp index 64e90bdcce6c..126e1f6f5f32 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableArray.cpp @@ -29,7 +29,7 @@ CFCMutableArray &CFCMutableArray::operator=(const CFCMutableArray &rhs) { } // Destructor -CFCMutableArray::~CFCMutableArray() {} +CFCMutableArray::~CFCMutableArray() = default; CFIndex CFCMutableArray::GetCount() const { CFMutableArrayRef array = get(); diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp index 37391ccb970a..ce003e349e0b 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp @@ -25,7 +25,7 @@ operator=(const CFCMutableDictionary &rhs) { } // Destructor -CFCMutableDictionary::~CFCMutableDictionary() {} +CFCMutableDictionary::~CFCMutableDictionary() = default; CFIndex CFCMutableDictionary::GetCount() const { CFMutableDictionaryRef dict = get(); diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp index 0852c8cfdff5..ee5f6203f4f4 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp @@ -25,7 +25,7 @@ const CFCMutableSet &CFCMutableSet::operator=(const CFCMutableSet &rhs) { } // Destructor -CFCMutableSet::~CFCMutableSet() {} +CFCMutableSet::~CFCMutableSet() = default; CFIndex CFCMutableSet::GetCount() const { CFMutableSetRef set = get(); diff --git a/lldb/source/Host/macosx/cfcpp/CFCString.cpp b/lldb/source/Host/macosx/cfcpp/CFCString.cpp index ae018cf5ae31..86498a19cdd3 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCString.cpp +++ b/lldb/source/Host/macosx/cfcpp/CFCString.cpp @@ -32,7 +32,7 @@ CFCString::CFCString(const char *cstr, CFStringEncoding cstr_encoding) } // Destructor -CFCString::~CFCString() {} +CFCString::~CFCString() = default; const char *CFCString::GetFileSystemRepresentation(std::string &s) { return CFCString::FileSystemRepresentation(get(), s); diff --git a/lldb/source/Host/posix/HostProcessPosix.cpp b/lldb/source/Host/posix/HostProcessPosix.cpp index 8fd3a44e9426..f0142ec946b7 100644 --- a/lldb/source/Host/posix/HostProcessPosix.cpp +++ b/lldb/source/Host/posix/HostProcessPosix.cpp @@ -28,7 +28,7 @@ HostProcessPosix::HostProcessPosix() HostProcessPosix::HostProcessPosix(lldb::process_t process) : HostNativeProcessBase(process) {} -HostProcessPosix::~HostProcessPosix() {} +HostProcessPosix::~HostProcessPosix() = default; Status HostProcessPosix::Signal(int signo) const { if (m_process == kInvalidPosixProcess) { diff --git a/lldb/source/Host/posix/HostThreadPosix.cpp b/lldb/source/Host/posix/HostThreadPosix.cpp index fcb8805e7d7c..4250e07e51cc 100644 --- a/lldb/source/Host/posix/HostThreadPosix.cpp +++ b/lldb/source/Host/posix/HostThreadPosix.cpp @@ -15,12 +15,12 @@ using namespace lldb; using namespace lldb_private; -HostThreadPosix::HostThreadPosix() {} +HostThreadPosix::HostThreadPosix() = default; HostThreadPosix::HostThreadPosix(lldb::thread_t thread) : HostNativeThreadBase(thread) {} -HostThreadPosix::~HostThreadPosix() {} +HostThreadPosix::~HostThreadPosix() = default; Status HostThreadPosix::Join(lldb::thread_result_t *result) { Status error; diff --git a/lldb/source/Initialization/SystemInitializer.cpp b/lldb/source/Initialization/SystemInitializer.cpp index fc460c32650d..823a905ebc4b 100644 --- a/lldb/source/Initialization/SystemInitializer.cpp +++ b/lldb/source/Initialization/SystemInitializer.cpp @@ -10,6 +10,6 @@ using namespace lldb_private; -SystemInitializer::SystemInitializer() {} +SystemInitializer::SystemInitializer() = default; -SystemInitializer::~SystemInitializer() {} +SystemInitializer::~SystemInitializer() = default; diff --git a/lldb/source/Initialization/SystemInitializerCommon.cpp b/lldb/source/Initialization/SystemInitializerCommon.cpp index f6012ed425fe..84c5a472332a 100644 --- a/lldb/source/Initialization/SystemInitializerCommon.cpp +++ b/lldb/source/Initialization/SystemInitializerCommon.cpp @@ -38,7 +38,7 @@ SystemInitializerCommon::SystemInitializerCommon( HostInfo::SharedLibraryDirectoryHelper *helper) : m_shlib_dir_helper(helper) {} -SystemInitializerCommon::~SystemInitializerCommon() {} +SystemInitializerCommon::~SystemInitializerCommon() = default; /// Initialize the FileSystem based on the current reproducer mode. static llvm::Error InitializeFileSystem() { diff --git a/lldb/source/Interpreter/OptionGroupFile.cpp b/lldb/source/Interpreter/OptionGroupFile.cpp index 25f3a9b9e3fe..12ade1855829 100644 --- a/lldb/source/Interpreter/OptionGroupFile.cpp +++ b/lldb/source/Interpreter/OptionGroupFile.cpp @@ -59,7 +59,7 @@ OptionGroupFileList::OptionGroupFileList( m_option_definition.usage_text = usage_text; } -OptionGroupFileList::~OptionGroupFileList() {} +OptionGroupFileList::~OptionGroupFileList() = default; Status OptionGroupFileList::SetOptionValue(uint32_t option_idx, diff --git a/lldb/source/Interpreter/OptionValueFileColonLine.cpp b/lldb/source/Interpreter/OptionValueFileColonLine.cpp index e1d673ed213b..fb0b516c8616 100644 --- a/lldb/source/Interpreter/OptionValueFileColonLine.cpp +++ b/lldb/source/Interpreter/OptionValueFileColonLine.cpp @@ -21,9 +21,7 @@ using namespace lldb_private; // I set the completer to "source file" which isn't quite right, but we can // only usefully complete in the file name part of it so it should be good // enough. -OptionValueFileColonLine::OptionValueFileColonLine() - -{} +OptionValueFileColonLine::OptionValueFileColonLine() = default; OptionValueFileColonLine::OptionValueFileColonLine(llvm::StringRef input) : m_line_number(LLDB_INVALID_LINE_NUMBER), @@ -91,8 +89,8 @@ Status OptionValueFileColonLine::SetValueFromString(llvm::StringRef value, llvm::StringRef middle_piece; std::tie(file_name, middle_piece) = left_of_last_piece.rsplit(':'); - if (middle_piece.empty() || !llvm::to_integer(middle_piece, - m_line_number)) { + if (middle_piece.empty() || + !llvm::to_integer(middle_piece, m_line_number)) { // The middle piece was empty or not an integer, so there were only two // legit pieces; our original division was right. Reassign the file // name and pull out the line number: diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index c3ff9d8e9ce7..07b3da01e145 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -107,7 +107,7 @@ public: m_collection_sp->Initialize(g_dynamicloaderdarwinkernel_properties); } - ~DynamicLoaderDarwinKernelProperties() override {} + ~DynamicLoaderDarwinKernelProperties() override = default; bool GetLoadKexts() const { const uint32_t idx = ePropertyLoadKexts; diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h index 1fa78bf77f37..225d06992aca 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h @@ -214,9 +214,7 @@ protected: uint32_t entry_count = 0; lldb::addr_t image_infos_addr = LLDB_INVALID_ADDRESS; - OSKextLoadedKextSummaryHeader() - - {} + OSKextLoadedKextSummaryHeader() = default; uint32_t GetSize() { switch (version) { diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h index 01542bcc4b53..c34e02ed5678 100644 --- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h +++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.h @@ -41,7 +41,7 @@ class HexagonDYLDRendezvous { uint64_t state = 0; lldb::addr_t ldbase = 0; - Rendezvous() {} + Rendezvous() = default; }; public: diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp index eed0339a058d..95bd3988aaf7 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp @@ -60,7 +60,7 @@ DynamicLoaderDarwin::DynamicLoaderDarwin(Process *process) m_dyld_image_infos_stop_id(UINT32_MAX), m_dyld(), m_mutex() {} // Destructor -DynamicLoaderDarwin::~DynamicLoaderDarwin() {} +DynamicLoaderDarwin::~DynamicLoaderDarwin() = default; /// Called after attaching a process. /// diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h index 190898c01091..4b337d1f2d73 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h @@ -106,9 +106,7 @@ protected: bool libSystemInitialized = false; // Version >= 2 lldb::addr_t dyldImageLoadAddress = LLDB_INVALID_ADDRESS; // Version >= 2 - DYLDAllImageInfos() - - {} + DYLDAllImageInfos() = default; void Clear() { version = 0; diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h index 3cc58dd805b8..5775f5a730cd 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h @@ -44,7 +44,7 @@ class DYLDRendezvous { uint64_t state = 0; lldb::addr_t ldbase = 0; - Rendezvous() {} + Rendezvous() = default; }; public: diff --git a/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp index f0a01ed4ba6e..54dfa3e9d6f2 100644 --- a/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp @@ -28,7 +28,7 @@ LLDB_PLUGIN_DEFINE(DynamicLoaderWindowsDYLD) DynamicLoaderWindowsDYLD::DynamicLoaderWindowsDYLD(Process *process) : DynamicLoader(process) {} -DynamicLoaderWindowsDYLD::~DynamicLoaderWindowsDYLD() {} +DynamicLoaderWindowsDYLD::~DynamicLoaderWindowsDYLD() = default; void DynamicLoaderWindowsDYLD::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp index 1ab8dafcbab4..85e2fcfc838c 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp @@ -43,7 +43,7 @@ ASTResultSynthesizer::ASTResultSynthesizer(ASTConsumer *passthrough, m_passthrough_sema = dyn_cast(passthrough); } -ASTResultSynthesizer::~ASTResultSynthesizer() {} +ASTResultSynthesizer::~ASTResultSynthesizer() = default; void ASTResultSynthesizer::Initialize(ASTContext &Context) { m_ast_context = &Context; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp index 81e3b277d79f..a2722db5d24a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp @@ -38,7 +38,7 @@ ASTStructExtractor::ASTStructExtractor(ASTConsumer *passthrough, m_passthrough_sema = dyn_cast(passthrough); } -ASTStructExtractor::~ASTStructExtractor() {} +ASTStructExtractor::~ASTStructExtractor() = default; void ASTStructExtractor::Initialize(ASTContext &Context) { m_ast_context = &Context; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.cpp index 1e438ed9d73e..a95fce1c5aa9 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.cpp @@ -8,17 +8,17 @@ #include "ASTUtils.h" -lldb_private::ExternalASTSourceWrapper::~ExternalASTSourceWrapper() {} +lldb_private::ExternalASTSourceWrapper::~ExternalASTSourceWrapper() = default; void lldb_private::ExternalASTSourceWrapper::PrintStats() { m_Source->PrintStats(); } -lldb_private::ASTConsumerForwarder::~ASTConsumerForwarder() {} +lldb_private::ASTConsumerForwarder::~ASTConsumerForwarder() = default; void lldb_private::ASTConsumerForwarder::PrintStats() { m_c->PrintStats(); } -lldb_private::SemaSourceWithPriorities::~SemaSourceWithPriorities() {} +lldb_private::SemaSourceWithPriorities::~SemaSourceWithPriorities() = default; void lldb_private::SemaSourceWithPriorities::PrintStats() { for (size_t i = 0; i < Sources.size(); ++i) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp index d3f471301d1b..94647b0ef978 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp @@ -184,7 +184,7 @@ private: } public: - DeclContextOverride() {} + DeclContextOverride() = default; void OverrideAllDeclsFromContainingFunction(clang::Decl *decl) { for (DeclContext *decl_context = decl->getLexicalDeclContext(); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h index df2096aa50b0..4f589d34aa48 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h @@ -216,7 +216,7 @@ public: void ForgetSource(clang::ASTContext *dst_ctx, clang::ASTContext *src_ctx); struct DeclOrigin { - DeclOrigin() {} + DeclOrigin() = default; DeclOrigin(clang::ASTContext *_ctx, clang::Decl *_decl) : ctx(_ctx), decl(_decl) { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h index bf52bec4b1fa..6313117c08d6 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h @@ -22,7 +22,7 @@ class ClangDeclVendor : public DeclVendor { public: ClangDeclVendor(DeclVendorKind kind) : DeclVendor(kind) {} - virtual ~ClangDeclVendor() {} + virtual ~ClangDeclVendor() = default; using DeclVendor::FindDecls; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h index 93060bd6b587..e39dc587bc43 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h @@ -251,7 +251,7 @@ public: lldb::ByteOrder byte_order = lldb::eByteOrderInvalid; size_t address_byte_size = 0; - TargetInfo() {} + TargetInfo() = default; bool IsValid() { return (byte_order != lldb::eByteOrderInvalid && address_byte_size != 0); @@ -308,7 +308,7 @@ private: /// The following values should not live beyond parsing class ParserVars { public: - ParserVars() {} + ParserVars() = default; Target *GetTarget() { if (m_exe_ctx.GetTargetPtr()) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h index e33e5df22236..37bcaf000cfc 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h @@ -38,7 +38,7 @@ public: ExpressionTypeSystemHelper::LLVMCastKind::eKindClangHelper) {} /// Destructor - virtual ~ClangExpressionHelper() {} + virtual ~ClangExpressionHelper() = default; /// Return the object that the parser should use when resolving external /// values. May be NULL if everything should be self-contained. diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index af44face09ed..0b5e1ab059d2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -725,7 +725,7 @@ ClangExpressionParser::ClangExpressionParser( m_compiler->getCodeGenOpts(), *m_llvm_context)); } -ClangExpressionParser::~ClangExpressionParser() {} +ClangExpressionParser::~ClangExpressionParser() = default; namespace { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h index d8a77b94ebdc..7bb68e78373f 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h @@ -157,7 +157,7 @@ public: /// The following values are valid if the variable is used by JIT code struct JITVars { - JITVars() {} + JITVars() = default; lldb::offset_t m_alignment = 0; ///< The required alignment of the variable, in bytes diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp index 0c9ad2021035..2cfa9a4c9ccf 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp @@ -59,7 +59,7 @@ ClangFunctionCaller::ClangFunctionCaller(ExecutionContextScope &exe_scope, } // Destructor -ClangFunctionCaller::~ClangFunctionCaller() {} +ClangFunctionCaller::~ClangFunctionCaller() = default; unsigned diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index 65f8a9dcdb00..336058a5abb9 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -176,7 +176,7 @@ void StoringDiagnosticConsumer::EndSourceFile() { ClangModulesDeclVendor::ClangModulesDeclVendor() : ClangDeclVendor(eClangModuleDeclVendor) {} -ClangModulesDeclVendor::~ClangModulesDeclVendor() {} +ClangModulesDeclVendor::~ClangModulesDeclVendor() = default; ClangModulesDeclVendorImpl::ClangModulesDeclVendorImpl( llvm::IntrusiveRefCntPtr diagnostics_engine, diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp index 7db813d06a1c..1b205b13113b 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -90,7 +90,7 @@ ClangUserExpression::ClangUserExpression( } } -ClangUserExpression::~ClangUserExpression() {} +ClangUserExpression::~ClangUserExpression() = default; void ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Status &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp index 39c6ad247403..a78116352c2e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp @@ -65,7 +65,7 @@ ClangUtilityFunction::ClangUtilityFunction(ExecutionContextScope &exe_scope, } } -ClangUtilityFunction::~ClangUtilityFunction() {} +ClangUtilityFunction::~ClangUtilityFunction() = default; /// Install the utility function into a process /// diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h index 785f86e95711..b8a154b3baed 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h @@ -74,9 +74,9 @@ public: private: class ClangUtilityFunctionHelper : public ClangExpressionHelper { public: - ClangUtilityFunctionHelper() {} + ClangUtilityFunctionHelper() = default; - ~ClangUtilityFunctionHelper() override {} + ~ClangUtilityFunctionHelper() override = default; /// Return the object that the parser should use when resolving external /// values. May be NULL if everything should be self-contained. diff --git a/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h b/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h index b984db43fa6d..425106bba0a3 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h @@ -59,7 +59,7 @@ public: /// Creates a configuration by analyzing the given list of used source files. explicit CppModuleConfiguration(const FileSpecList &support_files); /// Creates an empty and invalid configuration. - CppModuleConfiguration() {} + CppModuleConfiguration() = default; /// Returns true iff this is a valid configuration that can be used to /// load and compile modules. diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index bb69471841fe..15d160787ea4 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -46,7 +46,7 @@ typedef SmallVector InstrList; IRForTarget::FunctionValueCache::FunctionValueCache(Maker const &maker) : m_maker(maker), m_values() {} -IRForTarget::FunctionValueCache::~FunctionValueCache() {} +IRForTarget::FunctionValueCache::~FunctionValueCache() = default; llvm::Value * IRForTarget::FunctionValueCache::GetValue(llvm::Function *function) { diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h index 5c80bbe0fea9..dfd7c926dabf 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h @@ -19,8 +19,8 @@ namespace lldb_private { // ITSession - Keep track of the IT Block progression. class ITSession { public: - ITSession() {} - ~ITSession() {} + ITSession() = default; + ~ITSession() = default; // InitIT - Initializes ITCounter/ITState. bool InitIT(uint32_t bits7_0); diff --git a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp index cc030670a8c7..569482c7b23b 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp @@ -24,7 +24,7 @@ EmulationStateARM::EmulationStateARM() : m_vfp_regs(), m_memory() { ClearPseudoRegisters(); } -EmulationStateARM::~EmulationStateARM() {} +EmulationStateARM::~EmulationStateARM() = default; bool EmulationStateARM::LoadPseudoRegistersFromFrame(StackFrame &frame) { RegisterContext *reg_ctx = frame.GetRegisterContext().get(); diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h index 6fe6b12725b0..426434c48608 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h @@ -69,7 +69,7 @@ private: size_t begin_index = 0; size_t end_index = 0; - Range() {} + Range() = default; Range(size_t begin, size_t end) : begin_index(begin), end_index(end) { assert(end >= begin); } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h index 60374498c896..7ba957940ae7 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h @@ -84,7 +84,7 @@ private: lldb::addr_t m_data_ptr = 0; uint8_t m_flags = 0; - objc_class_t() {} + objc_class_t() = default; void Clear() { m_isa = 0; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp index 973a5570c06e..88e86c51fe44 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -48,7 +48,7 @@ LLDB_PLUGIN_DEFINE(AppleObjCRuntime) char AppleObjCRuntime::ID = 0; -AppleObjCRuntime::~AppleObjCRuntime() {} +AppleObjCRuntime::~AppleObjCRuntime() = default; AppleObjCRuntime::AppleObjCRuntime(Process *process) : ObjCLanguageRuntime(process), m_read_objc_library(false), diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h index 5683679a8f12..12ee2cc53639 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -126,7 +126,7 @@ protected: class HashTableSignature { public: - HashTableSignature() {} + HashTableSignature() = default; bool NeedsUpdate(uint32_t count, uint32_t num_buckets, lldb::addr_t buckets_ptr) { diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 2ea7640ed737..10512a97ad69 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1383,7 +1383,7 @@ private: lldb::addr_t m_invalid_key = 0; }; -AppleObjCRuntimeV2::HashTableSignature::HashTableSignature() {} +AppleObjCRuntimeV2::HashTableSignature::HashTableSignature() = default; void AppleObjCRuntimeV2::HashTableSignature::UpdateSignature( const RemoteNXMapTable &hash_table) { diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp index 0abe41c3101a..aa6306bef8b9 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -285,7 +285,7 @@ AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::VTableRegion( SetUpRegion(); } -AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler() {} +AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler() = default; void AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::SetUpRegion() { // The header looks like: diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h index 3fae5255c8ff..546b500b4529 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -76,7 +76,7 @@ private: class VTableRegion { public: - VTableRegion() {} + VTableRegion() = default; VTableRegion(AppleObjCVTables *owner, lldb::addr_t header_addr); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp index fe31cfc28c6e..1dc8034c537a 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp @@ -40,7 +40,7 @@ AppleThreadPlanStepThroughObjCTrampoline:: // Destructor AppleThreadPlanStepThroughObjCTrampoline:: - ~AppleThreadPlanStepThroughObjCTrampoline() {} + ~AppleThreadPlanStepThroughObjCTrampoline() = default; void AppleThreadPlanStepThroughObjCTrampoline::DidPush() { // Setting up the memory space for the called function text might require diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp index 2ccf9b33f9d8..65bf3e6af626 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp @@ -32,7 +32,7 @@ using namespace lldb_private; char ObjCLanguageRuntime::ID = 0; // Destructor -ObjCLanguageRuntime::~ObjCLanguageRuntime() {} +ObjCLanguageRuntime::~ObjCLanguageRuntime() = default; ObjCLanguageRuntime::ObjCLanguageRuntime(Process *process) : LanguageRuntime(process), m_impl_cache(), @@ -305,7 +305,7 @@ ObjCLanguageRuntime::EncodingToType::RealizeType(const char *name, return CompilerType(); } -ObjCLanguageRuntime::EncodingToType::~EncodingToType() {} +ObjCLanguageRuntime::EncodingToType::~EncodingToType() = default; ObjCLanguageRuntime::EncodingToTypeSP ObjCLanguageRuntime::GetEncodingToType() { return nullptr; @@ -363,7 +363,8 @@ void ObjCLanguageRuntime::ObjCExceptionPrecondition::AddClassName( m_class_names.insert(class_name); } -ObjCLanguageRuntime::ObjCExceptionPrecondition::ObjCExceptionPrecondition() {} +ObjCLanguageRuntime::ObjCExceptionPrecondition::ObjCExceptionPrecondition() = + default; bool ObjCLanguageRuntime::ObjCExceptionPrecondition::EvaluatePrecondition( StoppointCallbackContext &context) { diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp index 6858c7134d33..08a752eaa888 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp @@ -185,7 +185,7 @@ RSIRPasses::RSIRPasses(Process *process) { EarlyPasses->add(new RenderScriptRuntimeModulePass(process)); } -RSIRPasses::~RSIRPasses() {} +RSIRPasses::~RSIRPasses() = default; } // namespace lldb_renderscript } // namespace lldb_private diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 7280e66617f0..10ff5aa72b52 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -61,7 +61,7 @@ namespace { template class empirical_type { public: // Ctor. Contents is invalid when constructed. - empirical_type() {} + empirical_type() = default; // Return true and copy contents to out if valid, else return false. bool get(type_t &out) const { diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 982d24dc8a7a..2785c3b08125 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -46,7 +46,7 @@ typedef std::shared_ptr RSScriptGroupDescriptorSP; struct RSCoordinate { uint32_t x = 0, y = 0, z = 0; - RSCoordinate(){}; + RSCoordinate() = default; bool operator==(const lldb_renderscript::RSCoordinate &rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 000ed78a7707..7ff917518b64 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -140,7 +140,7 @@ ObjectContainerBSDArchive::Archive::Archive(const lldb_private::ArchSpec &arch, : m_arch(arch), m_modification_time(time), m_file_offset(file_offset), m_objects(), m_data(data) {} -ObjectContainerBSDArchive::Archive::~Archive() {} +ObjectContainerBSDArchive::Archive::~Archive() = default; size_t ObjectContainerBSDArchive::Archive::ParseObjects() { DataExtractor &data = m_data; @@ -373,7 +373,7 @@ void ObjectContainerBSDArchive::SetArchive(Archive::shared_ptr &archive_sp) { m_archive_sp = archive_sp; } -ObjectContainerBSDArchive::~ObjectContainerBSDArchive() {} +ObjectContainerBSDArchive::~ObjectContainerBSDArchive() = default; bool ObjectContainerBSDArchive::ParseHeader() { if (m_archive_sp.get() == nullptr) { diff --git a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp index bb56379ed1e4..d0a493d4511c 100644 --- a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp +++ b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp @@ -79,7 +79,7 @@ ObjectContainerUniversalMachO::ObjectContainerUniversalMachO( memset(&m_header, 0, sizeof(m_header)); } -ObjectContainerUniversalMachO::~ObjectContainerUniversalMachO() {} +ObjectContainerUniversalMachO::~ObjectContainerUniversalMachO() = default; bool ObjectContainerUniversalMachO::ParseHeader() { bool success = ParseHeader(m_data, m_header, m_fat_archs); diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index 8563af9d4eef..e678c2f5f011 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -28,7 +28,7 @@ struct ELFNote { std::string n_name; - ELFNote() {} + ELFNote() = default; /// Parse an ELFNote entry from the given DataExtractor starting at position /// \p offset. diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp index 93c2c9f945fe..f93ac9261afd 100644 --- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -100,7 +100,7 @@ ObjectFileJIT::ObjectFileJIT(const lldb::ModuleSP &module_sp, } } -ObjectFileJIT::~ObjectFileJIT() {} +ObjectFileJIT::~ObjectFileJIT() = default; bool ObjectFileJIT::ParseHeader() { // JIT code is never in a file, nor is it required to have any header diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 050cb0d49247..9eb1c25d2403 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -263,7 +263,7 @@ ObjectFilePECOFF::ObjectFilePECOFF(const lldb::ModuleSP &module_sp, ::memset(&m_coff_header, 0, sizeof(m_coff_header)); } -ObjectFilePECOFF::~ObjectFilePECOFF() {} +ObjectFilePECOFF::~ObjectFilePECOFF() = default; bool ObjectFilePECOFF::ParseHeader() { ModuleSP module_sp(GetModule()); diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index 4350010f0296..a117ce0f074e 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -115,7 +115,7 @@ OperatingSystemPython::OperatingSystemPython(lldb_private::Process *process, } } -OperatingSystemPython::~OperatingSystemPython() {} +OperatingSystemPython::~OperatingSystemPython() = default; DynamicRegisterInfo *OperatingSystemPython::GetDynamicRegisterInfo() { if (m_register_info_up == nullptr) { diff --git a/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/lldb/source/Plugins/Platform/Android/AdbClient.cpp index a4f9c763a472..ed2d56fb3fd8 100644 --- a/lldb/source/Plugins/Platform/Android/AdbClient.cpp +++ b/lldb/source/Plugins/Platform/Android/AdbClient.cpp @@ -118,11 +118,11 @@ Status AdbClient::CreateByDeviceID(const std::string &device_id, return error; } -AdbClient::AdbClient() {} +AdbClient::AdbClient() = default; AdbClient::AdbClient(const std::string &device_id) : m_device_id(device_id) {} -AdbClient::~AdbClient() {} +AdbClient::~AdbClient() = default; void AdbClient::SetDeviceID(const std::string &device_id) { m_device_id = device_id; @@ -583,7 +583,7 @@ AdbClient::SyncService::executeCommand(const std::function &cmd) { return error; } -AdbClient::SyncService::~SyncService() {} +AdbClient::SyncService::~SyncService() = default; Status AdbClient::SyncService::SendSyncRequest(const char *request_id, const uint32_t data_len, diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp index 6dd5306a93e8..77690b4efabd 100644 --- a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp +++ b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp @@ -73,7 +73,7 @@ static Status FindUnusedPort(uint16_t &port) { return error; } -PlatformAndroidRemoteGDBServer::PlatformAndroidRemoteGDBServer() {} +PlatformAndroidRemoteGDBServer::PlatformAndroidRemoteGDBServer() = default; PlatformAndroidRemoteGDBServer::~PlatformAndroidRemoteGDBServer() { for (const auto &it : m_port_forwards) diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp index afbffc2ef0a3..925a3d110b1d 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp @@ -50,7 +50,7 @@ PlatformAppleSimulator::PlatformAppleSimulator( /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformAppleSimulator::~PlatformAppleSimulator() {} +PlatformAppleSimulator::~PlatformAppleSimulator() = default; lldb_private::Status PlatformAppleSimulator::LaunchProcess( lldb_private::ProcessLaunchInfo &launch_info) { diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 7ddf4d496acb..51ff2a6ce12d 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -54,7 +54,7 @@ PlatformDarwin::PlatformDarwin(bool is_host) : PlatformPOSIX(is_host) {} /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformDarwin::~PlatformDarwin() {} +PlatformDarwin::~PlatformDarwin() = default; lldb_private::Status PlatformDarwin::PutFile(const lldb_private::FileSpec &source, diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp index 1c68f2624b6f..ee8850f8cb5e 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -197,7 +197,7 @@ public: m_collection_sp->Initialize(g_platformdarwinkernel_properties); } - virtual ~PlatformDarwinKernelProperties() {} + virtual ~PlatformDarwinKernelProperties() = default; FileSpecList GetKextDirectories() const { const uint32_t idx = ePropertyKextDirectories; @@ -250,7 +250,7 @@ PlatformDarwinKernel::PlatformDarwinKernel( /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformDarwinKernel::~PlatformDarwinKernel() {} +PlatformDarwinKernel::~PlatformDarwinKernel() = default; void PlatformDarwinKernel::GetStatus(Stream &strm) { Platform::GetStatus(strm); diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp index 86b5a3e2e3e6..79cbd1c1f91a 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp @@ -45,7 +45,7 @@ PlatformRemoteDarwinDevice::PlatformRemoteDarwinDevice() /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformRemoteDarwinDevice::~PlatformRemoteDarwinDevice() {} +PlatformRemoteDarwinDevice::~PlatformRemoteDarwinDevice() = default; void PlatformRemoteDarwinDevice::GetStatus(Stream &strm) { Platform::GetStatus(strm); diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp index 3e5f1451ef5f..7353132cd96f 100644 --- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -46,7 +46,7 @@ PlatformPOSIX::PlatformPOSIX(bool is_host) /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformPOSIX::~PlatformPOSIX() {} +PlatformPOSIX::~PlatformPOSIX() = default; lldb_private::OptionGroupOptions *PlatformPOSIX::GetConnectionOptions( lldb_private::CommandInterpreter &interpreter) { diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp index 7fce11cb147c..69c94c36cf0b 100644 --- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp +++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp @@ -212,7 +212,7 @@ PlatformRemoteGDBServer::PlatformRemoteGDBServer() /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. -PlatformRemoteGDBServer::~PlatformRemoteGDBServer() {} +PlatformRemoteGDBServer::~PlatformRemoteGDBServer() = default; bool PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) { diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 19e5c01ee288..47b2f8d4f5c6 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -73,7 +73,7 @@ public: m_collection_sp->Initialize(g_processkdp_properties); } - virtual ~PluginProperties() {} + virtual ~PluginProperties() = default; uint64_t GetPacketTimeout() { const uint32_t idx = ePropertyKDPPacketTimeout; @@ -902,7 +902,7 @@ public: m_option_group.Finalize(); } - ~CommandObjectProcessKDPPacketSend() {} + ~CommandObjectProcessKDPPacketSend() = default; bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -1003,7 +1003,7 @@ public: CommandObjectSP(new CommandObjectProcessKDPPacketSend(interpreter))); } - ~CommandObjectProcessKDPPacket() {} + ~CommandObjectProcessKDPPacket() = default; }; class CommandObjectMultiwordProcessKDP : public CommandObjectMultiword { @@ -1017,7 +1017,7 @@ public: interpreter))); } - ~CommandObjectMultiwordProcessKDP() {} + ~CommandObjectMultiwordProcessKDP() = default; }; CommandObject *ProcessKDP::GetPluginCommandObject() { diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp index 81b602a2b7a2..64f0caac75fd 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp @@ -19,7 +19,7 @@ RegisterContextKDP_arm::RegisterContextKDP_arm(ThreadKDP &thread, : RegisterContextDarwin_arm(thread, concrete_frame_idx), m_kdp_thread(thread) {} -RegisterContextKDP_arm::~RegisterContextKDP_arm() {} +RegisterContextKDP_arm::~RegisterContextKDP_arm() = default; int RegisterContextKDP_arm::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { ProcessSP process_sp(CalculateProcess()); diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp index c5e710968c39..c56356d3bf40 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp @@ -19,7 +19,7 @@ RegisterContextKDP_arm64::RegisterContextKDP_arm64(ThreadKDP &thread, : RegisterContextDarwin_arm64(thread, concrete_frame_idx), m_kdp_thread(thread) {} -RegisterContextKDP_arm64::~RegisterContextKDP_arm64() {} +RegisterContextKDP_arm64::~RegisterContextKDP_arm64() = default; int RegisterContextKDP_arm64::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { ProcessSP process_sp(CalculateProcess()); diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp index aa46e4668045..61dfeae6ddf4 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp @@ -18,7 +18,7 @@ RegisterContextKDP_i386::RegisterContextKDP_i386(ThreadKDP &thread, : RegisterContextDarwin_i386(thread, concrete_frame_idx), m_kdp_thread(thread) {} -RegisterContextKDP_i386::~RegisterContextKDP_i386() {} +RegisterContextKDP_i386::~RegisterContextKDP_i386() = default; int RegisterContextKDP_i386::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { ProcessSP process_sp(CalculateProcess()); diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp index 565dd1c73f6c..9c47c22608bf 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp @@ -18,7 +18,7 @@ RegisterContextKDP_x86_64::RegisterContextKDP_x86_64( : RegisterContextDarwin_x86_64(thread, concrete_frame_idx), m_kdp_thread(thread) {} -RegisterContextKDP_x86_64::~RegisterContextKDP_x86_64() {} +RegisterContextKDP_x86_64::~RegisterContextKDP_x86_64() = default; int RegisterContextKDP_x86_64::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { diff --git a/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp b/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp index 9b9522955de9..7749dc6f5d51 100644 --- a/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp +++ b/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp @@ -30,7 +30,7 @@ HistoryUnwind::HistoryUnwind(Thread &thread, std::vector pcs, // Destructor -HistoryUnwind::~HistoryUnwind() {} +HistoryUnwind::~HistoryUnwind() = default; void HistoryUnwind::DoClear() { std::lock_guard guard(m_unwind_mutex); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp index eef4541e7edd..7e38091738e3 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp @@ -922,7 +922,7 @@ RegisterContextDarwin_arm::RegisterContextDarwin_arm( } } -RegisterContextDarwin_arm::~RegisterContextDarwin_arm() {} +RegisterContextDarwin_arm::~RegisterContextDarwin_arm() = default; void RegisterContextDarwin_arm::InvalidateAllRegisters() { InvalidateAllRegisterStates(); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp index 9fc275276699..b98b2f35c23e 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -104,7 +104,7 @@ RegisterContextDarwin_arm64::RegisterContextDarwin_arm64( } } -RegisterContextDarwin_arm64::~RegisterContextDarwin_arm64() {} +RegisterContextDarwin_arm64::~RegisterContextDarwin_arm64() = default; void RegisterContextDarwin_arm64::InvalidateAllRegisters() { InvalidateAllRegisterStates(); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp index 07420a9096f9..95f8132a990c 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -405,7 +405,7 @@ RegisterContextDarwin_i386::RegisterContextDarwin_i386( } } -RegisterContextDarwin_i386::~RegisterContextDarwin_i386() {} +RegisterContextDarwin_i386::~RegisterContextDarwin_i386() = default; void RegisterContextDarwin_i386::InvalidateAllRegisters() { InvalidateAllRegisterStates(); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp index 39e2c6bbe812..03e5ea424e39 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -467,7 +467,7 @@ RegisterContextDarwin_x86_64::RegisterContextDarwin_x86_64( } } -RegisterContextDarwin_x86_64::~RegisterContextDarwin_x86_64() {} +RegisterContextDarwin_x86_64::~RegisterContextDarwin_x86_64() = default; void RegisterContextDarwin_x86_64::InvalidateAllRegisters() { InvalidateAllRegisterStates(); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp index 9fe6255d698e..2991bd3c5f2c 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp @@ -178,7 +178,7 @@ RegisterContextFreeBSD_powerpc::RegisterContextFreeBSD_powerpc( const ArchSpec &target_arch) : RegisterInfoInterface(target_arch) {} -RegisterContextFreeBSD_powerpc::~RegisterContextFreeBSD_powerpc() {} +RegisterContextFreeBSD_powerpc::~RegisterContextFreeBSD_powerpc() = default; size_t RegisterContextFreeBSD_powerpc::GetGPRSize() const { // This is an 'abstract' base, so no GPR struct. @@ -197,7 +197,7 @@ RegisterContextFreeBSD_powerpc32::RegisterContextFreeBSD_powerpc32( const ArchSpec &target_arch) : RegisterContextFreeBSD_powerpc(target_arch) {} -RegisterContextFreeBSD_powerpc32::~RegisterContextFreeBSD_powerpc32() {} +RegisterContextFreeBSD_powerpc32::~RegisterContextFreeBSD_powerpc32() = default; size_t RegisterContextFreeBSD_powerpc32::GetGPRSize() const { return sizeof(GPR32); @@ -217,7 +217,7 @@ RegisterContextFreeBSD_powerpc64::RegisterContextFreeBSD_powerpc64( const ArchSpec &target_arch) : RegisterContextFreeBSD_powerpc(target_arch) {} -RegisterContextFreeBSD_powerpc64::~RegisterContextFreeBSD_powerpc64() {} +RegisterContextFreeBSD_powerpc64::~RegisterContextFreeBSD_powerpc64() = default; size_t RegisterContextFreeBSD_powerpc64::GetGPRSize() const { return sizeof(GPR64); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp index 1394cb7f00a1..067d1c3705e4 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.cpp @@ -21,7 +21,7 @@ RegisterContextMach_arm::RegisterContextMach_arm(Thread &thread, uint32_t concrete_frame_idx) : RegisterContextDarwin_arm(thread, concrete_frame_idx) {} -RegisterContextMach_arm::~RegisterContextMach_arm() {} +RegisterContextMach_arm::~RegisterContextMach_arm() = default; int RegisterContextMach_arm::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { mach_msg_type_number_t count = GPRWordCount; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp index b97166b6eebe..fe5cecef1b0c 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp @@ -19,7 +19,7 @@ RegisterContextMach_i386::RegisterContextMach_i386(Thread &thread, uint32_t concrete_frame_idx) : RegisterContextDarwin_i386(thread, concrete_frame_idx) {} -RegisterContextMach_i386::~RegisterContextMach_i386() {} +RegisterContextMach_i386::~RegisterContextMach_i386() = default; int RegisterContextMach_i386::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { mach_msg_type_number_t count = GPRWordCount; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp index 8933f136789f..a3d8c4f649d2 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp @@ -19,7 +19,7 @@ RegisterContextMach_x86_64::RegisterContextMach_x86_64( Thread &thread, uint32_t concrete_frame_idx) : RegisterContextDarwin_x86_64(thread, concrete_frame_idx) {} -RegisterContextMach_x86_64::~RegisterContextMach_x86_64() {} +RegisterContextMach_x86_64::~RegisterContextMach_x86_64() = default; int RegisterContextMach_x86_64::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) { diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp index f2d230b54053..c55ffebb03e7 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp @@ -39,7 +39,7 @@ RegisterContextMemory::RegisterContextMemory(Thread &thread, } // Destructor -RegisterContextMemory::~RegisterContextMemory() {} +RegisterContextMemory::~RegisterContextMemory() = default; void RegisterContextMemory::InvalidateAllRegisters() { if (m_reg_data_addr != LLDB_INVALID_ADDRESS) diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp index 92553a8f958e..684176bccdf0 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp @@ -45,7 +45,7 @@ RegisterContextPOSIX_arm::RegisterContextPOSIX_arm( : lldb_private::RegisterContext(thread, 0), m_register_info_up(std::move(register_info)) {} -RegisterContextPOSIX_arm::~RegisterContextPOSIX_arm() {} +RegisterContextPOSIX_arm::~RegisterContextPOSIX_arm() = default; void RegisterContextPOSIX_arm::Invalidate() {} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp index 38926f0abea3..676e450c4846 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp @@ -53,7 +53,7 @@ RegisterContextPOSIX_arm64::RegisterContextPOSIX_arm64( : lldb_private::RegisterContext(thread, 0), m_register_info_up(std::move(register_info)) {} -RegisterContextPOSIX_arm64::~RegisterContextPOSIX_arm64() {} +RegisterContextPOSIX_arm64::~RegisterContextPOSIX_arm64() = default; void RegisterContextPOSIX_arm64::Invalidate() {} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp index e40542f724fc..9e05737d8e62 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp @@ -58,7 +58,7 @@ RegisterContextPOSIX_mips64::RegisterContextPOSIX_mips64( m_registers_count[msa_registers_count])); } -RegisterContextPOSIX_mips64::~RegisterContextPOSIX_mips64() {} +RegisterContextPOSIX_mips64::~RegisterContextPOSIX_mips64() = default; void RegisterContextPOSIX_mips64::Invalidate() {} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp index 5c6855d75367..cffd2865e385 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp @@ -95,7 +95,7 @@ RegisterContextPOSIX_powerpc::RegisterContextPOSIX_powerpc( m_register_info_up.reset(register_info); } -RegisterContextPOSIX_powerpc::~RegisterContextPOSIX_powerpc() {} +RegisterContextPOSIX_powerpc::~RegisterContextPOSIX_powerpc() = default; void RegisterContextPOSIX_powerpc::Invalidate() {} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp index df5c33f6bb3a..21c8160e5b41 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp @@ -98,7 +98,7 @@ RegisterContextPOSIX_s390x::RegisterContextPOSIX_s390x( } } -RegisterContextPOSIX_s390x::~RegisterContextPOSIX_s390x() {} +RegisterContextPOSIX_s390x::~RegisterContextPOSIX_s390x() = default; void RegisterContextPOSIX_s390x::Invalidate() {} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp index 19e68f68284f..67e03ff1ea39 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp @@ -448,7 +448,7 @@ RegisterContextPOSIX_x86::RegisterContextPOSIX_x86( m_fpr_type = eNotValid; } -RegisterContextPOSIX_x86::~RegisterContextPOSIX_x86() {} +RegisterContextPOSIX_x86::~RegisterContextPOSIX_x86() = default; RegisterContextPOSIX_x86::FPRType RegisterContextPOSIX_x86::GetFPRType() { if (m_fpr_type == eNotValid) { diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp index 31e2944084ed..4866cbd235e8 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp @@ -22,7 +22,7 @@ RegisterContextThreadMemory::RegisterContextThreadMemory( : RegisterContext(thread, 0), m_thread_wp(thread.shared_from_this()), m_reg_ctx_sp(), m_register_data_addr(register_data_addr), m_stop_id(0) {} -RegisterContextThreadMemory::~RegisterContextThreadMemory() {} +RegisterContextThreadMemory::~RegisterContextThreadMemory() = default; void RegisterContextThreadMemory::UpdateRegisterContext() { ThreadSP thread_sp(m_thread_wp.lock()); diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h b/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h index 88c2ae7c5010..c05438338c88 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h @@ -22,7 +22,7 @@ class RegisterInfoInterface { public: RegisterInfoInterface(const lldb_private::ArchSpec &target_arch) : m_target_arch(target_arch) {} - virtual ~RegisterInfoInterface() {} + virtual ~RegisterInfoInterface() = default; virtual size_t GetGPRSize() const = 0; diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp index 2f71f175a00d..f0aee04b5f62 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp @@ -25,7 +25,7 @@ RegisterContextCorePOSIX_arm::RegisterContextCorePOSIX_arm( m_gpr.SetByteOrder(gpregset.GetByteOrder()); } -RegisterContextCorePOSIX_arm::~RegisterContextCorePOSIX_arm() {} +RegisterContextCorePOSIX_arm::~RegisterContextCorePOSIX_arm() = default; bool RegisterContextCorePOSIX_arm::ReadGPR() { return true; } diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp index 34fd16da3888..e56aa88b57d9 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp @@ -62,7 +62,7 @@ RegisterContextCorePOSIX_arm64::RegisterContextCorePOSIX_arm64( ConfigureRegisterContext(); } -RegisterContextCorePOSIX_arm64::~RegisterContextCorePOSIX_arm64() {} +RegisterContextCorePOSIX_arm64::~RegisterContextCorePOSIX_arm64() = default; bool RegisterContextCorePOSIX_arm64::ReadGPR() { return true; } diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp index b5b83d899a44..5b1eb8b5437d 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp @@ -32,7 +32,7 @@ RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64( m_fpr.SetByteOrder(fpregset.GetByteOrder()); } -RegisterContextCorePOSIX_mips64::~RegisterContextCorePOSIX_mips64() {} +RegisterContextCorePOSIX_mips64::~RegisterContextCorePOSIX_mips64() = default; bool RegisterContextCorePOSIX_mips64::ReadGPR() { return true; } diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp index e15cd47cd7da..8380731692a3 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp @@ -39,7 +39,7 @@ RegisterContextCorePOSIX_powerpc::RegisterContextCorePOSIX_powerpc( m_vec.SetByteOrder(vregset.GetByteOrder()); } -RegisterContextCorePOSIX_powerpc::~RegisterContextCorePOSIX_powerpc() {} +RegisterContextCorePOSIX_powerpc::~RegisterContextCorePOSIX_powerpc() = default; bool RegisterContextCorePOSIX_powerpc::ReadGPR() { return true; } diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp index c3aa92c9f86c..f1cd6897616d 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp @@ -33,7 +33,7 @@ RegisterContextCorePOSIX_s390x::RegisterContextCorePOSIX_s390x( m_fpr.SetByteOrder(fpregset.GetByteOrder()); } -RegisterContextCorePOSIX_s390x::~RegisterContextCorePOSIX_s390x() {} +RegisterContextCorePOSIX_s390x::~RegisterContextCorePOSIX_s390x() = default; bool RegisterContextCorePOSIX_s390x::ReadGPR() { return true; } diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp index 9aca9e1e3345..d92c97e81659 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp @@ -24,7 +24,7 @@ GDBRemoteCommunicationHistory::GDBRemoteCommunicationHistory(uint32_t size) m_packets.resize(size); } -GDBRemoteCommunicationHistory::~GDBRemoteCommunicationHistory() {} +GDBRemoteCommunicationHistory::~GDBRemoteCommunicationHistory() = default; void GDBRemoteCommunicationHistory::AddPacket(char packet_char, GDBRemotePacket::Type type, diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 8b7231aa183e..11cac9fa3a4d 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -33,7 +33,7 @@ GDBRemoteCommunicationServer::GDBRemoteCommunicationServer( bool &quit) { return this->Handle_QErrorStringEnable(packet); }); } -GDBRemoteCommunicationServer::~GDBRemoteCommunicationServer() {} +GDBRemoteCommunicationServer::~GDBRemoteCommunicationServer() = default; void GDBRemoteCommunicationServer::RegisterPacketHandler( StringExtractorGDBRemote::ServerPacketType packet_type, diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 5ea7b09fe07f..b2b802552720 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -168,7 +168,8 @@ GDBRemoteCommunicationServerCommon::GDBRemoteCommunicationServerCommon( } // Destructor -GDBRemoteCommunicationServerCommon::~GDBRemoteCommunicationServerCommon() {} +GDBRemoteCommunicationServerCommon::~GDBRemoteCommunicationServerCommon() = + default; GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerCommon::Handle_qHostInfo( diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp index b7b648939456..7c2f80dc76b8 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -153,7 +153,8 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( } // Destructor -GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() {} +GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() = + default; Status GDBRemoteCommunicationServerPlatform::LaunchGDBServer( const lldb_private::Args &args, std::string hostname, lldb::pid_t &pid, diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index 1f50194e82f4..d1ae85a14267 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -50,7 +50,7 @@ GDBRemoteRegisterContext::GDBRemoteRegisterContext( } // Destructor -GDBRemoteRegisterContext::~GDBRemoteRegisterContext() {} +GDBRemoteRegisterContext::~GDBRemoteRegisterContext() = default; void GDBRemoteRegisterContext::InvalidateAllRegisters() { SetAllRegisterValid(false); diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index b86e31c63e9f..0bcfcb5f6d8f 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -135,7 +135,7 @@ public: m_collection_sp->Initialize(g_processgdbremote_properties); } - ~PluginProperties() override {} + ~PluginProperties() override = default; uint64_t GetPacketTimeout() { const uint32_t idx = ePropertyPacketTimeout; @@ -5178,7 +5178,7 @@ public: m_option_group.Finalize(); } - ~CommandObjectProcessGDBRemoteSpeedTest() override {} + ~CommandObjectProcessGDBRemoteSpeedTest() override = default; Options *GetOptions() override { return &m_option_group; } @@ -5229,7 +5229,7 @@ public: : CommandObjectParsed(interpreter, "process plugin packet history", "Dumps the packet history buffer. ", nullptr) {} - ~CommandObjectProcessGDBRemotePacketHistory() override {} + ~CommandObjectProcessGDBRemotePacketHistory() override = default; bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5260,7 +5260,7 @@ public: "Maximum size that lldb will try to read/write one one chunk.", nullptr) {} - ~CommandObjectProcessGDBRemotePacketXferSize() override {} + ~CommandObjectProcessGDBRemotePacketXferSize() override = default; bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5301,7 +5301,7 @@ public: "stripped from the result.", nullptr) {} - ~CommandObjectProcessGDBRemotePacketSend() override {} + ~CommandObjectProcessGDBRemotePacketSend() override = default; bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5351,7 +5351,7 @@ public: "encoded into a valid 'qRcmd' packet, sent and the " "response will be printed.") {} - ~CommandObjectProcessGDBRemotePacketMonitor() override {} + ~CommandObjectProcessGDBRemotePacketMonitor() override = default; bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override { @@ -5414,7 +5414,7 @@ public: interpreter))); } - ~CommandObjectProcessGDBRemotePacket() override {} + ~CommandObjectProcessGDBRemotePacket() override = default; }; class CommandObjectMultiwordProcessGDBRemote : public CommandObjectMultiword { @@ -5429,7 +5429,7 @@ public: CommandObjectSP(new CommandObjectProcessGDBRemotePacket(interpreter))); } - ~CommandObjectMultiwordProcessGDBRemote() override {} + ~CommandObjectMultiwordProcessGDBRemote() override = default; }; CommandObject *ProcessGDBRemote::GetPluginCommandObject() { diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp index 5cb39cb95335..385557422758 100644 --- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp @@ -871,7 +871,7 @@ public: m_option_group.Finalize(); } - ~CommandObjectProcessMinidumpDump() override {} + ~CommandObjectProcessMinidumpDump() override = default; Options *GetOptions() override { return &m_option_group; } @@ -1000,7 +1000,7 @@ public: CommandObjectSP(new CommandObjectProcessMinidumpDump(interpreter))); } - ~CommandObjectMultiwordProcessMinidump() override {} + ~CommandObjectMultiwordProcessMinidump() override = default; }; CommandObject *ProcessMinidump::GetPluginCommandObject() { diff --git a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp index e146a1a1af92..1fbc52815238 100644 --- a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp @@ -38,7 +38,7 @@ ThreadMinidump::ThreadMinidump(Process &process, const minidump::Thread &td, : Thread(process, td.ThreadId), m_thread_reg_ctx_sp(), m_gpregset_data(gpregset_data) {} -ThreadMinidump::~ThreadMinidump() {} +ThreadMinidump::~ThreadMinidump() = default; void ThreadMinidump::RefreshStateAfterStop() {} diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp index e6d850d73f7c..fe3dcb38f0cc 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp @@ -134,7 +134,7 @@ ScriptInterpreterLua::ScriptInterpreterLua(Debugger &debugger) : ScriptInterpreter(debugger, eScriptLanguageLua), m_lua(std::make_unique()) {} -ScriptInterpreterLua::~ScriptInterpreterLua() {} +ScriptInterpreterLua::~ScriptInterpreterLua() = default; bool ScriptInterpreterLua::ExecuteOneLine(llvm::StringRef command, CommandReturnObject *result, diff --git a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp index d9c32cc132d4..f8a385240bd9 100644 --- a/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp @@ -25,7 +25,7 @@ LLDB_PLUGIN_DEFINE(ScriptInterpreterNone) ScriptInterpreterNone::ScriptInterpreterNone(Debugger &debugger) : ScriptInterpreter(debugger, eScriptLanguageNone) {} -ScriptInterpreterNone::~ScriptInterpreterNone() {} +ScriptInterpreterNone::~ScriptInterpreterNone() = default; bool ScriptInterpreterNone::ExecuteOneLine(llvm::StringRef command, CommandReturnObject *, diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 6ca0e754c9d4..4577253227cd 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -229,7 +229,7 @@ struct PythonFormat< class PythonObject { public: - PythonObject() {} + PythonObject() = default; PythonObject(PyRefType type, PyObject *py_obj) { m_py_obj = py_obj; @@ -421,7 +421,7 @@ public: Py_DECREF(py_obj); } - TypedPythonObject() {} + TypedPythonObject() = default; }; class PythonBytes : public TypedPythonObject { diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 9a593088eebf..86549b0a0953 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1358,7 +1358,7 @@ Status ScriptInterpreterPythonImpl::ExportFunctionDefinitionToInterpreter( Status error = ExecuteMultipleLines( function_def_string.c_str(), - ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false)); + ExecuteScriptOptions().SetEnableIO(false)); return error; } @@ -2767,7 +2767,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule( directory.c_str(), directory.c_str()); bool syspath_retval = ExecuteMultipleLines(command_stream.GetData(), - ScriptInterpreter::ExecuteScriptOptions() + ExecuteScriptOptions() .SetEnableIO(false) .SetSetLLDBGlobals(false)) .Success(); @@ -2855,7 +2855,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule( (ExecuteOneLineWithReturn( command_stream.GetData(), ScriptInterpreterPythonImpl::eScriptReturnTypeBool, &does_contain, - ScriptInterpreter::ExecuteScriptOptions() + ExecuteScriptOptions() .SetEnableIO(false) .SetSetLLDBGlobals(false)) && does_contain); @@ -2877,7 +2877,7 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule( command_stream.Printf("import %s", module_name.c_str()); error = ExecuteMultipleLines(command_stream.GetData(), - ScriptInterpreter::ExecuteScriptOptions() + ExecuteScriptOptions() .SetEnableIO(false) .SetSetLLDBGlobals(false)); if (error.Fail()) @@ -3055,7 +3055,7 @@ bool ScriptInterpreterPythonImpl::GetDocumentationForItem(const char *item, if (ExecuteOneLineWithReturn( command, ScriptInterpreter::eScriptReturnTypeCharStrOrNone, &result_ptr, - ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false))) { + ExecuteScriptOptions().SetEnableIO(false))) { if (result_ptr) dest.assign(result_ptr); return true; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h index 9eb6efc59638..e0056f109837 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -418,7 +418,7 @@ public: : IOHandler(debugger, IOHandler::Type::PythonInterpreter), m_python(python) {} - ~IOHandlerPythonInterpreter() override {} + ~IOHandlerPythonInterpreter() override = default; ConstString GetControlSequence(char ch) override { if (ch == 'd') diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp index 3f94954d7b68..87edf7789f0d 100644 --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -126,7 +126,7 @@ public: m_collection_sp->Initialize(g_darwinlog_properties); } - ~StructuredDataDarwinLogProperties() override {} + ~StructuredDataDarwinLogProperties() override = default; bool GetEnableOnStartup() const { const uint32_t idx = ePropertyEnableOnStartup; @@ -181,7 +181,7 @@ using FilterRuleSP = std::shared_ptr; class FilterRule { public: - virtual ~FilterRule() {} + virtual ~FilterRule() = default; using OperationCreationFunc = std::functionIsAlive() && diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h index c275800b87e6..fe025268a0dd 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h @@ -55,9 +55,7 @@ public: from libBacktraceRecording */ uint64_t count = 0; /* the number of pending items included in the buffer */ - GetPendingItemsReturnInfo() - - {} + GetPendingItemsReturnInfo() = default; }; /// Get the list of pending items for a given queue via a call to diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp index 5ce9991cf244..f471871dde28 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp @@ -99,7 +99,7 @@ AppleGetQueuesHandler::AppleGetQueuesHandler(Process *process) m_get_queues_return_buffer_addr(LLDB_INVALID_ADDRESS), m_get_queues_retbuffer_mutex() {} -AppleGetQueuesHandler::~AppleGetQueuesHandler() {} +AppleGetQueuesHandler::~AppleGetQueuesHandler() = default; void AppleGetQueuesHandler::Detach() { diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h index 996e7b4b8566..b33e6186146d 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h @@ -52,9 +52,7 @@ public: libBacktraceRecording */ uint64_t count = 0; /* the number of queues included in the queues buffer */ - GetQueuesReturnInfo() - - {} + GetQueuesReturnInfo() = default; }; /// Get the list of queues that exist (with any active or pending items) via diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp index 9f6564a12b43..7837dca147dc 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp @@ -107,7 +107,7 @@ AppleGetThreadItemInfoHandler::AppleGetThreadItemInfoHandler(Process *process) m_get_thread_item_info_return_buffer_addr(LLDB_INVALID_ADDRESS), m_get_thread_item_info_retbuffer_mutex() {} -AppleGetThreadItemInfoHandler::~AppleGetThreadItemInfoHandler() {} +AppleGetThreadItemInfoHandler::~AppleGetThreadItemInfoHandler() = default; void AppleGetThreadItemInfoHandler::Detach() { diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h index 9229e540a384..9b2005f2b903 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h @@ -52,7 +52,7 @@ public: lldb::addr_t item_buffer_size = 0; /* the size of the item buffer from libBacktraceRecording */ - GetThreadItemInfoReturnInfo() {} + GetThreadItemInfoReturnInfo() = default; }; /// Get the information about a work item by calling diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h index c822c7beb4bf..877a2ad2b5cf 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h @@ -113,7 +113,7 @@ private: uint16_t item_info_version = 0; uint16_t item_info_data_offset = 0; - libBacktraceRecording_info() {} + libBacktraceRecording_info() = default; }; // A structure which reflects the data recorded in the @@ -190,9 +190,7 @@ private: uint16_t vo_activity_ids_array = UINT16_MAX; uint16_t vo_activity_ids_array_entry_size = UINT16_MAX; - LibdispatchVoucherOffsets() - - {} + LibdispatchVoucherOffsets() = default; bool IsValid() { return vo_version != UINT16_MAX; } }; @@ -203,7 +201,7 @@ private: uint64_t dti_voucher_index = UINT64_MAX; uint64_t dti_qos_class_index = UINT64_MAX; - LibdispatchTSDIndexes() {} + LibdispatchTSDIndexes() = default; bool IsValid() { return dti_version != UINT16_MAX; } }; @@ -214,9 +212,7 @@ private: uint16_t plo_pthread_tsd_base_address_offset = UINT16_MAX; uint16_t plo_pthread_tsd_entry_size = UINT16_MAX; - LibpthreadOffsets() - - {} + LibpthreadOffsets() = default; bool IsValid() { return plo_version != UINT16_MAX; } }; diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h index ceb2047f7091..487748812968 100644 --- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h +++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h @@ -47,7 +47,7 @@ public: struct lldb_reg_info { const char *name = nullptr; uint32_t lldb_regnum = LLDB_INVALID_REGNUM; - lldb_reg_info() {} + lldb_reg_info() = default; }; void Initialize(std::vector ®_info); diff --git a/lldb/source/Symbol/ArmUnwindInfo.cpp b/lldb/source/Symbol/ArmUnwindInfo.cpp index f2887035e5cf..07852485f44e 100644 --- a/lldb/source/Symbol/ArmUnwindInfo.cpp +++ b/lldb/source/Symbol/ArmUnwindInfo.cpp @@ -68,7 +68,7 @@ ArmUnwindInfo::ArmUnwindInfo(ObjectFile &objfile, SectionSP &arm_exidx, llvm::sort(m_exidx_entries.begin(), m_exidx_entries.end()); } -ArmUnwindInfo::~ArmUnwindInfo() {} +ArmUnwindInfo::~ArmUnwindInfo() = default; // Read a byte from the unwind instruction stream with the given offset. Custom // function is required because have to red in order of significance within diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp index afcdf3e21e19..fc246ac8575d 100644 --- a/lldb/source/Symbol/Block.cpp +++ b/lldb/source/Symbol/Block.cpp @@ -25,7 +25,7 @@ Block::Block(lldb::user_id_t uid) m_inlineInfoSP(), m_variable_list_sp(), m_parsed_block_info(false), m_parsed_block_variables(false), m_parsed_child_blocks(false) {} -Block::~Block() {} +Block::~Block() = default; void Block::GetDescription(Stream *s, Function *function, lldb::DescriptionLevel level, Target *target) const { diff --git a/lldb/source/Symbol/CompactUnwindInfo.cpp b/lldb/source/Symbol/CompactUnwindInfo.cpp index 1bb7cd1fc05b..830fe5546c1c 100644 --- a/lldb/source/Symbol/CompactUnwindInfo.cpp +++ b/lldb/source/Symbol/CompactUnwindInfo.cpp @@ -167,7 +167,7 @@ CompactUnwindInfo::CompactUnwindInfo(ObjectFile &objfile, SectionSP §ion_sp) // destructor -CompactUnwindInfo::~CompactUnwindInfo() {} +CompactUnwindInfo::~CompactUnwindInfo() = default; bool CompactUnwindInfo::GetUnwindPlan(Target &target, Address addr, UnwindPlan &unwind_plan) { diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp index 9a2671a08e86..d67c0a828eb3 100644 --- a/lldb/source/Symbol/FuncUnwinders.cpp +++ b/lldb/source/Symbol/FuncUnwinders.cpp @@ -55,7 +55,7 @@ FuncUnwinders::FuncUnwinders(UnwindTable &unwind_table, AddressRange range) /// destructor -FuncUnwinders::~FuncUnwinders() {} +FuncUnwinders::~FuncUnwinders() = default; UnwindPlanSP FuncUnwinders::GetUnwindPlanAtCallSite(Target &target, Thread &thread) { diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index 0aeb7597cfcf..37479651fb45 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -32,7 +32,7 @@ FunctionInfo::FunctionInfo(const char *name, const Declaration *decl_ptr) FunctionInfo::FunctionInfo(ConstString name, const Declaration *decl_ptr) : m_name(name), m_declaration(decl_ptr) {} -FunctionInfo::~FunctionInfo() {} +FunctionInfo::~FunctionInfo() = default; void FunctionInfo::Dump(Stream *s, bool show_fullpaths) const { if (m_name) @@ -74,7 +74,7 @@ InlineFunctionInfo::InlineFunctionInfo(ConstString name, : FunctionInfo(name, decl_ptr), m_mangled(mangled), m_call_decl(call_decl_ptr) {} -InlineFunctionInfo::~InlineFunctionInfo() {} +InlineFunctionInfo::~InlineFunctionInfo() = default; void InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const { FunctionInfo::Dump(s, show_fullpaths); @@ -238,7 +238,7 @@ Function::Function(CompileUnit *comp_unit, lldb::user_id_t func_uid, assert(comp_unit != nullptr); } -Function::~Function() {} +Function::~Function() = default; void Function::GetStartLineSourceInfo(FileSpec &source_file, uint32_t &line_no) { diff --git a/lldb/source/Symbol/LineTable.cpp b/lldb/source/Symbol/LineTable.cpp index 54dc6ef7f157..cd8d520ada78 100644 --- a/lldb/source/Symbol/LineTable.cpp +++ b/lldb/source/Symbol/LineTable.cpp @@ -34,7 +34,7 @@ LineTable::LineTable(CompileUnit *comp_unit, } // Destructor -LineTable::~LineTable() {} +LineTable::~LineTable() = default; void LineTable::InsertLineEntry(lldb::addr_t file_addr, uint32_t line, uint16_t column, uint16_t file_idx, @@ -58,7 +58,7 @@ void LineTable::InsertLineEntry(lldb::addr_t file_addr, uint32_t line, // Dump (&s, Address::DumpStyleFileAddress); } -LineSequence::LineSequence() {} +LineSequence::LineSequence() = default; void LineTable::LineSequenceImpl::Clear() { m_entries.clear(); } diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp index 7703c9d9aa17..2e8fe1cec30e 100644 --- a/lldb/source/Symbol/SymbolContext.cpp +++ b/lldb/source/Symbol/SymbolContext.cpp @@ -51,7 +51,7 @@ SymbolContext::SymbolContext(SymbolContextScope *sc_scope) sc_scope->CalculateSymbolContext(this); } -SymbolContext::~SymbolContext() {} +SymbolContext::~SymbolContext() = default; void SymbolContext::Clear(bool clear_target) { if (clear_target) @@ -926,7 +926,7 @@ SymbolContextSpecifier::SymbolContextSpecifier(const TargetSP &target_sp) m_start_line(0), m_end_line(0), m_function_spec(), m_class_name(), m_address_range_up(), m_type(eNothingSpecified) {} -SymbolContextSpecifier::~SymbolContextSpecifier() {} +SymbolContextSpecifier::~SymbolContextSpecifier() = default; bool SymbolContextSpecifier::AddLineSpecification(uint32_t line_no, SpecificationType type) { @@ -1186,7 +1186,7 @@ void SymbolContextSpecifier::GetDescription( SymbolContextList::SymbolContextList() : m_symbol_contexts() {} -SymbolContextList::~SymbolContextList() {} +SymbolContextList::~SymbolContextList() = default; void SymbolContextList::Append(const SymbolContext &sc) { m_symbol_contexts.push_back(sc); diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp index 89e75c28cb9b..8b4f1d953af3 100644 --- a/lldb/source/Symbol/Symtab.cpp +++ b/lldb/source/Symbol/Symtab.cpp @@ -40,7 +40,7 @@ Symtab::Symtab(ObjectFile *objfile) lldb::eFunctionNameTypeSelector, UniqueCStringMap())); } -Symtab::~Symtab() {} +Symtab::~Symtab() = default; void Symtab::Reserve(size_t count) { // Clients should grab the mutex from this symbol table and lock it manually diff --git a/lldb/source/Symbol/TypeList.cpp b/lldb/source/Symbol/TypeList.cpp index f0506c7c5bfc..ace715d933ea 100644 --- a/lldb/source/Symbol/TypeList.cpp +++ b/lldb/source/Symbol/TypeList.cpp @@ -22,7 +22,7 @@ using namespace lldb_private; TypeList::TypeList() : m_types() {} // Destructor -TypeList::~TypeList() {} +TypeList::~TypeList() = default; void TypeList::Insert(const TypeSP &type_sp) { // Just push each type on the back for now. We will worry about uniquing diff --git a/lldb/source/Symbol/TypeMap.cpp b/lldb/source/Symbol/TypeMap.cpp index e810d3020073..2cda9b6c27d1 100644 --- a/lldb/source/Symbol/TypeMap.cpp +++ b/lldb/source/Symbol/TypeMap.cpp @@ -22,7 +22,7 @@ using namespace lldb_private; TypeMap::TypeMap() : m_types() {} // Destructor -TypeMap::~TypeMap() {} +TypeMap::~TypeMap() = default; void TypeMap::Insert(const TypeSP &type_sp) { // Just push each type on the back for now. We will worry about uniquing diff --git a/lldb/source/Symbol/TypeSystem.cpp b/lldb/source/Symbol/TypeSystem.cpp index 52ab359bad38..252b06e269d6 100644 --- a/lldb/source/Symbol/TypeSystem.cpp +++ b/lldb/source/Symbol/TypeSystem.cpp @@ -35,7 +35,7 @@ size_t LanguageSet::Size() const { return bitvector.count(); } bool LanguageSet::Empty() const { return bitvector.none(); } bool LanguageSet::operator[](unsigned i) const { return bitvector[i]; } -TypeSystem::~TypeSystem() {} +TypeSystem::~TypeSystem() = default; static lldb::TypeSystemSP CreateInstanceHelper(lldb::LanguageType language, Module *module, Target *target) { @@ -180,7 +180,7 @@ TypeSystem::CreateUtilityFunction(std::string text, std::string name) { TypeSystemMap::TypeSystemMap() : m_mutex(), m_map() {} -TypeSystemMap::~TypeSystemMap() {} +TypeSystemMap::~TypeSystemMap() = default; void TypeSystemMap::Clear() { collection map; diff --git a/lldb/source/Symbol/UnwindTable.cpp b/lldb/source/Symbol/UnwindTable.cpp index 5bc844982267..fe69e41b3638 100644 --- a/lldb/source/Symbol/UnwindTable.cpp +++ b/lldb/source/Symbol/UnwindTable.cpp @@ -83,7 +83,7 @@ void UnwindTable::Initialize() { } } -UnwindTable::~UnwindTable() {} +UnwindTable::~UnwindTable() = default; llvm::Optional UnwindTable::GetAddressRange(const Address &addr, SymbolContext &sc) { diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp index 62b16011fe66..89682fc39141 100644 --- a/lldb/source/Symbol/Variable.cpp +++ b/lldb/source/Symbol/Variable.cpp @@ -49,7 +49,7 @@ Variable::Variable(lldb::user_id_t uid, const char *name, const char *mangled, m_artificial(artificial), m_loc_is_const_data(location_is_constant_data), m_static_member(static_member) {} -Variable::~Variable() {} +Variable::~Variable() = default; lldb::LanguageType Variable::GetLanguage() const { lldb::LanguageType lang = m_mangled.GuessLanguage(); diff --git a/lldb/source/Symbol/VariableList.cpp b/lldb/source/Symbol/VariableList.cpp index f7a441472bc0..b7a396edd701 100644 --- a/lldb/source/Symbol/VariableList.cpp +++ b/lldb/source/Symbol/VariableList.cpp @@ -20,7 +20,7 @@ using namespace lldb_private; VariableList::VariableList() : m_variables() {} // Destructor -VariableList::~VariableList() {} +VariableList::~VariableList() = default; void VariableList::AddVariable(const VariableSP &var_sp) { m_variables.push_back(var_sp); diff --git a/lldb/source/Target/JITLoaderList.cpp b/lldb/source/Target/JITLoaderList.cpp index f5a90d58d588..92e841b5c94d 100644 --- a/lldb/source/Target/JITLoaderList.cpp +++ b/lldb/source/Target/JITLoaderList.cpp @@ -15,7 +15,7 @@ using namespace lldb_private; JITLoaderList::JITLoaderList() : m_jit_loaders_vec(), m_jit_loaders_mutex() {} -JITLoaderList::~JITLoaderList() {} +JITLoaderList::~JITLoaderList() = default; void JITLoaderList::Append(const JITLoaderSP &jit_loader_sp) { std::lock_guard guard(m_jit_loaders_mutex); diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp index 4a2af267b32e..7b35da5028ac 100644 --- a/lldb/source/Target/Language.cpp +++ b/lldb/source/Target/Language.cpp @@ -448,7 +448,7 @@ void Language::GetDefaultExceptionResolverDescription(bool catch_on, catch_on ? "on" : "off", throw_on ? "on" : "off"); } // Constructor -Language::Language() {} +Language::Language() = default; // Destructor -Language::~Language() {} +Language::~Language() = default; diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp index a7ed1a3d97b7..806e92aa4ed5 100644 --- a/lldb/source/Target/Memory.cpp +++ b/lldb/source/Target/Memory.cpp @@ -26,7 +26,7 @@ MemoryCache::MemoryCache(Process &process) m_L2_cache_line_byte_size(process.GetMemoryCacheLineSize()) {} // Destructor -MemoryCache::~MemoryCache() {} +MemoryCache::~MemoryCache() = default; void MemoryCache::Clear(bool clear_invalid_ranges) { std::lock_guard guard(m_mutex); @@ -259,7 +259,7 @@ AllocatedBlock::AllocatedBlock(lldb::addr_t addr, uint32_t byte_size, assert(byte_size > chunk_size); } -AllocatedBlock::~AllocatedBlock() {} +AllocatedBlock::~AllocatedBlock() = default; lldb::addr_t AllocatedBlock::ReserveBlock(uint32_t size) { // We must return something valid for zero bytes. @@ -329,7 +329,7 @@ bool AllocatedBlock::FreeBlock(addr_t addr) { AllocatedMemoryCache::AllocatedMemoryCache(Process &process) : m_process(process), m_mutex(), m_memory_map() {} -AllocatedMemoryCache::~AllocatedMemoryCache() {} +AllocatedMemoryCache::~AllocatedMemoryCache() = default; void AllocatedMemoryCache::Clear() { std::lock_guard guard(m_mutex); diff --git a/lldb/source/Target/QueueItem.cpp b/lldb/source/Target/QueueItem.cpp index 740b2a6771a2..7070812a10b0 100644 --- a/lldb/source/Target/QueueItem.cpp +++ b/lldb/source/Target/QueueItem.cpp @@ -27,7 +27,7 @@ QueueItem::QueueItem(QueueSP queue_sp, ProcessSP process_sp, m_process_wp = process_sp; } -QueueItem::~QueueItem() {} +QueueItem::~QueueItem() = default; QueueItemKind QueueItem::GetKind() { FetchEntireItem(); diff --git a/lldb/source/Target/StructuredDataPlugin.cpp b/lldb/source/Target/StructuredDataPlugin.cpp index bd899d2f7681..20ed26a1a99a 100644 --- a/lldb/source/Target/StructuredDataPlugin.cpp +++ b/lldb/source/Target/StructuredDataPlugin.cpp @@ -23,14 +23,14 @@ public: "Parent for per-plugin structured data commands", "plugin structured-data ") {} - ~CommandStructuredData() override {} + ~CommandStructuredData() override = default; }; } StructuredDataPlugin::StructuredDataPlugin(const ProcessWP &process_wp) : PluginInterface(), m_process_wp(process_wp) {} -StructuredDataPlugin::~StructuredDataPlugin() {} +StructuredDataPlugin::~StructuredDataPlugin() = default; bool StructuredDataPlugin::GetEnabled(ConstString type_name) const { // By default, plugins are always enabled. Plugin authors should override diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp index c5b128ae8ba5..c6c4d97c1655 100644 --- a/lldb/source/Target/ThreadPlanBase.cpp +++ b/lldb/source/Target/ThreadPlanBase.cpp @@ -43,7 +43,7 @@ ThreadPlanBase::ThreadPlanBase(Thread &thread) SetIsMasterPlan(true); } -ThreadPlanBase::~ThreadPlanBase() {} +ThreadPlanBase::~ThreadPlanBase() = default; void ThreadPlanBase::GetDescription(Stream *s, lldb::DescriptionLevel level) { s->Printf("Base thread plan."); diff --git a/lldb/source/Target/ThreadPlanCallUserExpression.cpp b/lldb/source/Target/ThreadPlanCallUserExpression.cpp index 00b01c76d900..9dddd850b6ab 100644 --- a/lldb/source/Target/ThreadPlanCallUserExpression.cpp +++ b/lldb/source/Target/ThreadPlanCallUserExpression.cpp @@ -43,7 +43,7 @@ ThreadPlanCallUserExpression::ThreadPlanCallUserExpression( SetOkayToDiscard(false); } -ThreadPlanCallUserExpression::~ThreadPlanCallUserExpression() {} +ThreadPlanCallUserExpression::~ThreadPlanCallUserExpression() = default; void ThreadPlanCallUserExpression::GetDescription( Stream *s, lldb::DescriptionLevel level) { diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp index 1cb11dc676ba..965a7b3a9960 100644 --- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp +++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp @@ -36,7 +36,7 @@ ThreadPlanStepOverBreakpoint::ThreadPlanStepOverBreakpoint(Thread &thread) m_breakpoint_addr); } -ThreadPlanStepOverBreakpoint::~ThreadPlanStepOverBreakpoint() {} +ThreadPlanStepOverBreakpoint::~ThreadPlanStepOverBreakpoint() = default; void ThreadPlanStepOverBreakpoint::GetDescription( Stream *s, lldb::DescriptionLevel level) { diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp index 0fec2591759f..74a437042345 100644 --- a/lldb/source/Utility/ArchSpec.cpp +++ b/lldb/source/Utility/ArchSpec.cpp @@ -507,7 +507,7 @@ FindArchDefinitionEntry(const ArchDefinition *def, ArchSpec::Core core) { //===----------------------------------------------------------------------===// // Constructors and destructors. -ArchSpec::ArchSpec() {} +ArchSpec::ArchSpec() = default; ArchSpec::ArchSpec(const char *triple_cstr) { if (triple_cstr) diff --git a/lldb/source/Utility/Args.cpp b/lldb/source/Utility/Args.cpp index 505eff2f8e13..0334659ab7dd 100644 --- a/lldb/source/Utility/Args.cpp +++ b/lldb/source/Utility/Args.cpp @@ -194,7 +194,7 @@ Args &Args::operator=(const Args &rhs) { } // Destructor -Args::~Args() {} +Args::~Args() = default; void Args::Dump(Stream &s, const char *label_name) const { if (!label_name) diff --git a/lldb/source/Utility/DataBufferLLVM.cpp b/lldb/source/Utility/DataBufferLLVM.cpp index afd633ae677b..c5aeddd683f4 100644 --- a/lldb/source/Utility/DataBufferLLVM.cpp +++ b/lldb/source/Utility/DataBufferLLVM.cpp @@ -21,7 +21,7 @@ DataBufferLLVM::DataBufferLLVM( "Cannot construct a DataBufferLLVM with a null buffer"); } -DataBufferLLVM::~DataBufferLLVM() {} +DataBufferLLVM::~DataBufferLLVM() = default; uint8_t *DataBufferLLVM::GetBytes() { return reinterpret_cast(Buffer->getBufferStart()); diff --git a/lldb/source/Utility/Event.cpp b/lldb/source/Utility/Event.cpp index 3a4ef4d1e117..4c07293c92df 100644 --- a/lldb/source/Utility/Event.cpp +++ b/lldb/source/Utility/Event.cpp @@ -198,7 +198,7 @@ EventDataStructuredData::EventDataStructuredData( : EventData(), m_process_sp(process_sp), m_object_sp(object_sp), m_plugin_sp(plugin_sp) {} -EventDataStructuredData::~EventDataStructuredData() {} +EventDataStructuredData::~EventDataStructuredData() = default; // EventDataStructuredData member functions diff --git a/lldb/source/Utility/GDBRemote.cpp b/lldb/source/Utility/GDBRemote.cpp index 659ab2e75add..91f94de4dc0d 100644 --- a/lldb/source/Utility/GDBRemote.cpp +++ b/lldb/source/Utility/GDBRemote.cpp @@ -24,7 +24,7 @@ StreamGDBRemote::StreamGDBRemote(uint32_t flags, uint32_t addr_size, ByteOrder byte_order) : StreamString(flags, addr_size, byte_order) {} -StreamGDBRemote::~StreamGDBRemote() {} +StreamGDBRemote::~StreamGDBRemote() = default; int StreamGDBRemote::PutEscapedBytes(const void *s, size_t src_len) { int bytes_written = 0; diff --git a/lldb/source/Utility/Stream.cpp b/lldb/source/Utility/Stream.cpp index effe69dcca52..a1e2de9da4d9 100644 --- a/lldb/source/Utility/Stream.cpp +++ b/lldb/source/Utility/Stream.cpp @@ -32,7 +32,7 @@ Stream::Stream(bool colors) m_forwarder(*this, colors) {} // Destructor -Stream::~Stream() {} +Stream::~Stream() = default; ByteOrder Stream::SetByteOrder(ByteOrder byte_order) { ByteOrder old_byte_order = m_byte_order; diff --git a/lldb/source/Utility/StreamString.cpp b/lldb/source/Utility/StreamString.cpp index 190be588e887..745a85b75765 100644 --- a/lldb/source/Utility/StreamString.cpp +++ b/lldb/source/Utility/StreamString.cpp @@ -17,7 +17,7 @@ StreamString::StreamString(uint32_t flags, uint32_t addr_size, ByteOrder byte_order) : Stream(flags, addr_size, byte_order), m_packet() {} -StreamString::~StreamString() {} +StreamString::~StreamString() = default; void StreamString::Flush() { // Nothing to do when flushing a buffer based stream... diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp index 9ebd2c94eb2f..d082c86f8463 100644 --- a/lldb/source/Utility/StringExtractor.cpp +++ b/lldb/source/Utility/StringExtractor.cpp @@ -40,7 +40,7 @@ StringExtractor::StringExtractor(const char *packet_cstr) } // Destructor -StringExtractor::~StringExtractor() {} +StringExtractor::~StringExtractor() = default; char StringExtractor::GetChar(char fail_value) { if (m_index < m_packet.size()) { diff --git a/lldb/source/Utility/StringList.cpp b/lldb/source/Utility/StringList.cpp index fc097dd9dba5..baff34ae3a5e 100644 --- a/lldb/source/Utility/StringList.cpp +++ b/lldb/source/Utility/StringList.cpp @@ -33,7 +33,7 @@ StringList::StringList(const char **strv, int strc) : m_strings() { } } -StringList::~StringList() {} +StringList::~StringList() = default; void StringList::AppendString(const char *str) { if (str) diff --git a/lldb/source/Utility/TildeExpressionResolver.cpp b/lldb/source/Utility/TildeExpressionResolver.cpp index 29dc7f437044..6311ae062f1f 100644 --- a/lldb/source/Utility/TildeExpressionResolver.cpp +++ b/lldb/source/Utility/TildeExpressionResolver.cpp @@ -27,7 +27,7 @@ using namespace llvm; namespace fs = llvm::sys::fs; namespace path = llvm::sys::path; -TildeExpressionResolver::~TildeExpressionResolver() {} +TildeExpressionResolver::~TildeExpressionResolver() = default; bool StandardTildeExpressionResolver::ResolveExact( StringRef Expr, SmallVectorImpl &Output) {