diff --git a/lldb/include/lldb/Core/Architecture.h b/lldb/include/lldb/Core/Architecture.h --- a/lldb/include/lldb/Core/Architecture.h +++ b/lldb/include/lldb/Core/Architecture.h @@ -16,7 +16,7 @@ class Architecture : public PluginInterface { public: Architecture() = default; - virtual ~Architecture() = default; + ~Architecture() override = default; /// This is currently intended to handle cases where a /// program stops at an instruction that won't get executed and it diff --git a/lldb/include/lldb/Core/StreamBuffer.h b/lldb/include/lldb/Core/StreamBuffer.h --- a/lldb/include/lldb/Core/StreamBuffer.h +++ b/lldb/include/lldb/Core/StreamBuffer.h @@ -23,9 +23,9 @@ StreamBuffer(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order) : Stream(flags, addr_size, byte_order), m_packet() {} - virtual ~StreamBuffer() {} + ~StreamBuffer() override {} - virtual void Flush() { + void Flush() override { // Nothing to do when flushing a buffer based stream... } @@ -42,7 +42,7 @@ protected: llvm::SmallVector m_packet; - virtual size_t WriteImpl(const void *s, size_t length) { + size_t WriteImpl(const void *s, size_t length) override { if (s && length) m_packet.append((const char *)s, ((const char *)s) + length); return length; diff --git a/lldb/include/lldb/Core/ValueObjectVariable.h b/lldb/include/lldb/Core/ValueObjectVariable.h --- a/lldb/include/lldb/Core/ValueObjectVariable.h +++ b/lldb/include/lldb/Core/ValueObjectVariable.h @@ -74,7 +74,7 @@ bool SetData(DataExtractor &data, Status &error) override; - virtual lldb::VariableSP GetVariable() override { return m_variable_sp; } + lldb::VariableSP GetVariable() override { return m_variable_sp; } protected: bool UpdateValue() override; diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h --- a/lldb/include/lldb/Target/DynamicLoader.h +++ b/lldb/include/lldb/Target/DynamicLoader.h @@ -84,7 +84,7 @@ /// /// The destructor is virtual since this class is designed to be inherited /// from by the plug-in instance. - virtual ~DynamicLoader() override; + ~DynamicLoader() override; /// Called after attaching a process. /// diff --git a/lldb/include/lldb/Target/StackFrameRecognizer.h b/lldb/include/lldb/Target/StackFrameRecognizer.h --- a/lldb/include/lldb/Target/StackFrameRecognizer.h +++ b/lldb/include/lldb/Target/StackFrameRecognizer.h @@ -73,7 +73,7 @@ public: ScriptedStackFrameRecognizer(lldb_private::ScriptInterpreter *interpreter, const char *pclass); - ~ScriptedStackFrameRecognizer() {} + ~ScriptedStackFrameRecognizer() override {} std::string GetName() override { return GetPythonClassName(); diff --git a/lldb/include/lldb/Target/StructuredDataPlugin.h b/lldb/include/lldb/Target/StructuredDataPlugin.h --- a/lldb/include/lldb/Target/StructuredDataPlugin.h +++ b/lldb/include/lldb/Target/StructuredDataPlugin.h @@ -41,7 +41,7 @@ : public PluginInterface, public std::enable_shared_from_this { public: - virtual ~StructuredDataPlugin(); + ~StructuredDataPlugin() override; lldb::ProcessSP GetProcess() const; diff --git a/lldb/include/lldb/Utility/Baton.h b/lldb/include/lldb/Utility/Baton.h --- a/lldb/include/lldb/Utility/Baton.h +++ b/lldb/include/lldb/Utility/Baton.h @@ -44,7 +44,7 @@ class UntypedBaton : public Baton { public: UntypedBaton(void *Data) : m_data(Data) {} - virtual ~UntypedBaton() { + ~UntypedBaton() override { // The default destructor for an untyped baton does NOT attempt to clean up // anything in m_data. } @@ -63,8 +63,7 @@ const T *getItem() const { return Item.get(); } void *data() override { return Item.get(); } - virtual void GetDescription(Stream *s, - lldb::DescriptionLevel level) const override {} + void GetDescription(Stream *s, lldb::DescriptionLevel level) const override {} protected: std::unique_ptr Item; diff --git a/lldb/include/lldb/Utility/DataBufferLLVM.h b/lldb/include/lldb/Utility/DataBufferLLVM.h --- a/lldb/include/lldb/Utility/DataBufferLLVM.h +++ b/lldb/include/lldb/Utility/DataBufferLLVM.h @@ -25,7 +25,7 @@ class FileSystem; class DataBufferLLVM : public DataBuffer { public: - ~DataBufferLLVM(); + ~DataBufferLLVM() override; uint8_t *GetBytes() override; const uint8_t *GetBytes() const override; diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h --- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h +++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h @@ -34,7 +34,7 @@ StringExtractorGDBRemote(const StringExtractorGDBRemote &rhs) : StringExtractor(rhs), m_validator(rhs.m_validator) {} - virtual ~StringExtractorGDBRemote() {} + ~StringExtractorGDBRemote() override {} bool ValidateResponse() const; diff --git a/lldb/source/API/SBBreakpointOptionCommon.h b/lldb/source/API/SBBreakpointOptionCommon.h --- a/lldb/source/API/SBBreakpointOptionCommon.h +++ b/lldb/source/API/SBBreakpointOptionCommon.h @@ -24,7 +24,7 @@ SBBreakpointCallbackBaton(SBBreakpointHitCallback callback, void *baton); - ~SBBreakpointCallbackBaton(); + ~SBBreakpointCallbackBaton() override; static bool PrivateBreakpointHitCallback(void *baton, lldb_private::StoppointCallbackContext *ctx, diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -94,7 +94,7 @@ m_collection_sp->Initialize(g_properties); } - virtual ~DynamicLoaderDarwinKernelProperties() {} + ~DynamicLoaderDarwinKernelProperties() override {} bool GetLoadKexts() const { const uint32_t idx = ePropertyLoadKexts; diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h @@ -28,7 +28,7 @@ public: DynamicLoaderDarwin(lldb_private::Process *process); - virtual ~DynamicLoaderDarwin() override; + ~DynamicLoaderDarwin() override; /// Called after attaching a process. /// diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h @@ -32,7 +32,7 @@ public: DynamicLoaderMacOS(lldb_private::Process *process); - virtual ~DynamicLoaderMacOS() override; + ~DynamicLoaderMacOS() override; // Static Functions static void Initialize(); diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h @@ -36,7 +36,7 @@ public: DynamicLoaderMacOSXDYLD(lldb_private::Process *process); - virtual ~DynamicLoaderMacOSXDYLD() override; + ~DynamicLoaderMacOSXDYLD() override; // Static Functions static void Initialize(); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h @@ -33,7 +33,7 @@ uint32_t compiler_id) : Diagnostic(message, severity, eDiagnosticOriginClang, compiler_id) {} - virtual ~ClangDiagnostic() = default; + ~ClangDiagnostic() override = default; bool HasFixIts() const override { return !m_fixit_vec.empty(); } diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -153,7 +153,7 @@ } void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, - const clang::Diagnostic &Info) { + const clang::Diagnostic &Info) override { if (m_manager) { llvm::SmallVector diag_str; Info.FormatDiagnostic(diag_str); @@ -719,7 +719,7 @@ } /// Deregisters and destroys this code-completion consumer. - virtual ~CodeComplete() {} + ~CodeComplete() override {} /// \name Code-completion filtering /// Check if the result should be filtered out. diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -914,7 +914,7 @@ std::unique_ptr CPlusPlusLanguage::GetTypeScavenger() { class CPlusPlusTypeScavenger : public Language::ImageListTypeScavenger { public: - virtual CompilerType AdjustForInclusion(CompilerType &candidate) override { + CompilerType AdjustForInclusion(CompilerType &candidate) override { LanguageType lang_type(candidate.GetMinimumLanguage()); if (!Language::LanguageIsC(lang_type) && !Language::LanguageIsCPlusPlus(lang_type)) diff --git a/lldb/source/Plugins/Language/ObjC/NSDictionary.h b/lldb/source/Plugins/Language/ObjC/NSDictionary.h --- a/lldb/source/Plugins/Language/ObjC/NSDictionary.h +++ b/lldb/source/Plugins/Language/ObjC/NSDictionary.h @@ -51,8 +51,8 @@ class Prefix : public Matcher { public: Prefix(ConstString p); - virtual ~Prefix() = default; - virtual bool Match(ConstString class_name) override; + ~Prefix() override = default; + bool Match(ConstString class_name) override; private: ConstString m_prefix; @@ -60,8 +60,8 @@ class Full : public Matcher { public: Full(ConstString n); - virtual ~Full() = default; - virtual bool Match(ConstString class_name) override; + ~Full() override = default; + bool Match(ConstString class_name) override; private: ConstString m_name; diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp --- a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp +++ b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp @@ -994,7 +994,7 @@ class ObjCDebugInfoScavenger : public Language::ImageListTypeScavenger { public: - virtual CompilerType AdjustForInclusion(CompilerType &candidate) override { + CompilerType AdjustForInclusion(CompilerType &candidate) override { LanguageType lang_type(candidate.GetMinimumLanguage()); if (!Language::LanguageIsObjC(lang_type)) return CompilerType(); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -472,8 +472,15 @@ } static constexpr OptionDefinition g_objc_classtable_dump_options[] = { - {LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, - nullptr, {}, 0, eArgTypeNone, + {LLDB_OPT_SET_ALL, + false, + "verbose", + 'v', + OptionParser::eNoArgument, + nullptr, + {}, + 0, + eArgTypeNone, "Print ivar and method information in detail"}}; class CommandObjectObjC_ClassTable_Dump : public CommandObjectParsed { @@ -515,12 +522,13 @@ }; CommandObjectObjC_ClassTable_Dump(CommandInterpreter &interpreter) - : CommandObjectParsed( - interpreter, "dump", "Dump information on Objective-C classes " - "known to the current process.", - "language objc class-table dump", - eCommandRequiresProcess | eCommandProcessMustBeLaunched | - eCommandProcessMustBePaused), + : CommandObjectParsed(interpreter, "dump", + "Dump information on Objective-C classes " + "known to the current process.", + "language objc class-table dump", + eCommandRequiresProcess | + eCommandProcessMustBeLaunched | + eCommandProcessMustBePaused), m_options() { CommandArgumentEntry arg; CommandArgumentData index_arg; @@ -827,7 +835,8 @@ if ($responds == (signed char) 0) *((volatile int *)0) = 'ocgc'; } - })", name); + })", + name); } else { len = ::snprintf(check_function_code, sizeof(check_function_code), R"( extern "C" void *gdb_class_getClass(void *); @@ -847,7 +856,8 @@ if ($responds == (signed char) 0) *((volatile int *)0) = 'ocgc'; } - })", name); + })", + name); } assert(len < (int)sizeof(check_function_code)); @@ -1191,28 +1201,29 @@ if (m_tagged_pointer_obfuscator != LLDB_INVALID_ADDRESS) return m_tagged_pointer_obfuscator; - Process *process = GetProcess(); ModuleSP objc_module_sp(GetObjCModule()); if (!objc_module_sp) return LLDB_INVALID_ADDRESS; - static ConstString g_gdb_objc_obfuscator("objc_debug_taggedpointer_obfuscator"); + static ConstString g_gdb_objc_obfuscator( + "objc_debug_taggedpointer_obfuscator"); const Symbol *symbol = objc_module_sp->FindFirstSymbolWithNameAndType( - g_gdb_objc_obfuscator, lldb::eSymbolTypeAny); + g_gdb_objc_obfuscator, lldb::eSymbolTypeAny); if (symbol) { lldb::addr_t g_gdb_obj_obfuscator_ptr = - symbol->GetLoadAddress(&process->GetTarget()); + symbol->GetLoadAddress(&process->GetTarget()); if (g_gdb_obj_obfuscator_ptr != LLDB_INVALID_ADDRESS) { Status error; - m_tagged_pointer_obfuscator = process->ReadPointerFromMemory( - g_gdb_obj_obfuscator_ptr, error); + m_tagged_pointer_obfuscator = + process->ReadPointerFromMemory(g_gdb_obj_obfuscator_ptr, error); } } - // If we don't have a correct value at this point, there must be no obfuscation. + // If we don't have a correct value at this point, there must be no + // obfuscation. if (m_tagged_pointer_obfuscator == LLDB_INVALID_ADDRESS) m_tagged_pointer_obfuscator = 0; @@ -1377,12 +1388,12 @@ arguments.GetValueAtIndex(0)->GetScalar() = hash_table.GetTableLoadAddress(); arguments.GetValueAtIndex(1)->GetScalar() = class_infos_addr; arguments.GetValueAtIndex(2)->GetScalar() = class_infos_byte_size; - + // Only dump the runtime classes from the expression evaluation if the log is // verbose: Log *type_log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES); bool dump_log = type_log && type_log->GetVerbose(); - + arguments.GetValueAtIndex(3)->GetScalar() = dump_log ? 1 : 0; bool success = false; @@ -1632,7 +1643,7 @@ // verbose: Log *type_log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES); bool dump_log = type_log && type_log->GetVerbose(); - + arguments.GetValueAtIndex(3)->GetScalar() = dump_log ? 1 : 0; bool success = false; @@ -1962,9 +1973,10 @@ const ConstString ivar_name_cs(class_and_ivar.second); const char *ivar_name_cstr = ivar_name_cs.AsCString(); - auto ivar_func = [&ret, ivar_name_cstr]( - const char *name, const char *type, lldb::addr_t offset_addr, - uint64_t size) -> lldb::addr_t { + auto ivar_func = [&ret, + ivar_name_cstr](const char *name, const char *type, + lldb::addr_t offset_addr, + uint64_t size) -> lldb::addr_t { if (!strcmp(name, ivar_name_cstr)) { ret = offset_addr; return true; @@ -2382,9 +2394,9 @@ m_ext_cache[slot] = actual_class_descriptor_sp; } - data_payload = - (((uint64_t)unobfuscated << m_objc_debug_taggedpointer_ext_payload_lshift) >> - m_objc_debug_taggedpointer_ext_payload_rshift); + data_payload = (((uint64_t)unobfuscated + << m_objc_debug_taggedpointer_ext_payload_lshift) >> + m_objc_debug_taggedpointer_ext_payload_rshift); return ClassDescriptorSP( new ClassDescriptorV2Tagged(actual_class_descriptor_sp, data_payload)); @@ -2588,13 +2600,14 @@ #pragma mark Frame recognizers class ObjCExceptionRecognizedStackFrame : public RecognizedStackFrame { - public: +public: ObjCExceptionRecognizedStackFrame(StackFrameSP frame_sp) { ThreadSP thread_sp = frame_sp->GetThread(); ProcessSP process_sp = thread_sp->GetProcess(); const lldb::ABISP &abi = process_sp->GetABI(); - if (!abi) return; + if (!abi) + return; CompilerType voidstar = process_sp->GetTarget() .GetScratchClangASTContext() @@ -2606,7 +2619,8 @@ input_value.SetCompilerType(voidstar); args.PushValue(input_value); - if (!abi->GetArgumentValues(*thread_sp, args)) return; + if (!abi->GetArgumentValues(*thread_sp, args)) + return; addr_t exception_addr = args.GetValueAtIndex(0)->GetScalar().ULongLong(); @@ -2617,7 +2631,7 @@ exception = ValueObjectRecognizerSynthesizedValue::Create( *exception, eValueTypeVariableArgument); exception = exception->GetDynamicValue(eDynamicDontRunTarget); - + m_arguments = ValueObjectListSP(new ValueObjectList()); m_arguments->Append(exception); } @@ -2628,7 +2642,8 @@ }; class ObjCExceptionThrowFrameRecognizer : public StackFrameRecognizer { - lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame) { + lldb::RecognizedStackFrameSP + RecognizeFrame(lldb::StackFrameSP frame) override { return lldb::RecognizedStackFrameSP( new ObjCExceptionRecognizedStackFrame(frame)); }; diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h @@ -34,7 +34,7 @@ RenderScriptRuntimeModulePass(const lldb_private::Process *process) : ModulePass(ID), m_process_ptr(process) {} - bool runOnModule(llvm::Module &module); + bool runOnModule(llvm::Module &module) override; private: const lldb_private::Process *m_process_ptr; diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h @@ -113,7 +113,7 @@ uint32_t GetDependentModules(lldb_private::FileSpecList &files) override; - virtual lldb_private::Address GetEntryPointAddress() override; + lldb_private::Address GetEntryPointAddress() override; lldb_private::Address GetBaseAddress() override; diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h --- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h +++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h @@ -33,7 +33,7 @@ PlatformRemoteGDBServer(); - virtual ~PlatformRemoteGDBServer(); + ~PlatformRemoteGDBServer() override; // lldb_private::PluginInterface functions ConstString GetPluginName() override { return GetPluginNameStatic(); } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -135,7 +135,7 @@ m_collection_sp->Initialize(g_properties); } - virtual ~PluginProperties() {} + ~PluginProperties() override {} uint64_t GetPacketTimeout() { const uint32_t idx = ePropertyPacketTimeout; @@ -5158,7 +5158,7 @@ m_option_group.Finalize(); } - ~CommandObjectProcessGDBRemoteSpeedTest() {} + ~CommandObjectProcessGDBRemoteSpeedTest() override {} Options *GetOptions() override { return &m_option_group; } @@ -5209,7 +5209,7 @@ : CommandObjectParsed(interpreter, "process plugin packet history", "Dumps the packet history buffer. ", NULL) {} - ~CommandObjectProcessGDBRemotePacketHistory() {} + ~CommandObjectProcessGDBRemotePacketHistory() override {} bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5240,7 +5240,7 @@ "Maximum size that lldb will try to read/write one one chunk.", NULL) {} - ~CommandObjectProcessGDBRemotePacketXferSize() {} + ~CommandObjectProcessGDBRemotePacketXferSize() override {} bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5282,7 +5282,7 @@ "stripped from the result.", NULL) {} - ~CommandObjectProcessGDBRemotePacketSend() {} + ~CommandObjectProcessGDBRemotePacketSend() override {} bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); @@ -5333,7 +5333,7 @@ "encoded into a valid 'qRcmd' packet, sent and the " "response will be printed.") {} - ~CommandObjectProcessGDBRemotePacketMonitor() {} + ~CommandObjectProcessGDBRemotePacketMonitor() override {} bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override { @@ -5397,7 +5397,7 @@ interpreter))); } - ~CommandObjectProcessGDBRemotePacket() {} + ~CommandObjectProcessGDBRemotePacket() override {} }; class CommandObjectMultiwordProcessGDBRemote : public CommandObjectMultiword { @@ -5412,7 +5412,7 @@ CommandObjectSP(new CommandObjectProcessGDBRemotePacket(interpreter))); } - ~CommandObjectMultiwordProcessGDBRemote() {} + ~CommandObjectMultiwordProcessGDBRemote() override {} }; CommandObject *ProcessGDBRemote::GetPluginCommandObject() { diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp --- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp +++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp @@ -683,7 +683,7 @@ m_option_group.Finalize(); } - ~CommandObjectProcessMinidumpDump() {} + ~CommandObjectProcessMinidumpDump() override {} Options *GetOptions() override { return &m_option_group; } @@ -813,7 +813,7 @@ CommandObjectSP(new CommandObjectProcessMinidumpDump(interpreter))); } - ~CommandObjectMultiwordProcessMinidump() {} + ~CommandObjectMultiwordProcessMinidump() override {} }; CommandObject *ProcessMinidump::GetPluginCommandObject() { diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h @@ -65,7 +65,7 @@ void ModulesDidLoad(Process &process, ModuleList &module_list) override; - ~StructuredDataDarwinLog(); + ~StructuredDataDarwinLog() override; private: // Private constructors diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -141,7 +141,7 @@ m_collection_sp->Initialize(g_properties); } - virtual ~StructuredDataDarwinLogProperties() {} + ~StructuredDataDarwinLogProperties() override {} bool GetEnableOnStartup() const { const uint32_t idx = ePropertyEnableOnStartup; diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -951,7 +951,7 @@ } void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, - const clang::Diagnostic &info) { + const clang::Diagnostic &info) override { if (m_log) { llvm::SmallVector diag_str(10); info.FormatDiagnostic(diag_str); diff --git a/lldb/source/Symbol/PostfixExpression.cpp b/lldb/source/Symbol/PostfixExpression.cpp --- a/lldb/source/Symbol/PostfixExpression.cpp +++ b/lldb/source/Symbol/PostfixExpression.cpp @@ -124,23 +124,23 @@ using Visitor<>::Dispatch; private: - void Visit(BinaryOpNode &binary, Node *&); + void Visit(BinaryOpNode &binary, Node *&) override; - void Visit(InitialValueNode &val, Node *&); + void Visit(InitialValueNode &val, Node *&) override; - void Visit(IntegerNode &integer, Node *&) { + void Visit(IntegerNode &integer, Node *&) override { m_out_stream.PutHex8(DW_OP_constu); m_out_stream.PutULEB128(integer.GetValue()); ++m_stack_depth; } - void Visit(RegisterNode ®, Node *&); + void Visit(RegisterNode ®, Node *&) override; - void Visit(SymbolNode &symbol, Node *&) { + void Visit(SymbolNode &symbol, Node *&) override { llvm_unreachable("Symbols should have been resolved by now!"); } - void Visit(UnaryOpNode &unary, Node *&); + void Visit(UnaryOpNode &unary, Node *&) override; Stream &m_out_stream; diff --git a/lldb/source/Target/StructuredDataPlugin.cpp b/lldb/source/Target/StructuredDataPlugin.cpp --- a/lldb/source/Target/StructuredDataPlugin.cpp +++ b/lldb/source/Target/StructuredDataPlugin.cpp @@ -23,7 +23,7 @@ "Parent for per-plugin structured data commands", "plugin structured-data ") {} - ~CommandStructuredData() {} + ~CommandStructuredData() override {} }; } diff --git a/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp b/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp --- a/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp +++ b/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp @@ -302,8 +302,8 @@ class MPXTableShow : public lldb::SBCommandPluginInterface { public: - virtual bool DoExecute(lldb::SBDebugger debugger, char **command, - lldb::SBCommandReturnObject &result) { + bool DoExecute(lldb::SBDebugger debugger, char **command, + lldb::SBCommandReturnObject &result) override { if (command) { int arg_c = 0; @@ -347,8 +347,8 @@ class MPXTableSet : public lldb::SBCommandPluginInterface { public: - virtual bool DoExecute(lldb::SBDebugger debugger, char **command, - lldb::SBCommandReturnObject &result) { + bool DoExecute(lldb::SBDebugger debugger, char **command, + lldb::SBCommandReturnObject &result) override { if (command) { int arg_c = 0; diff --git a/lldb/unittests/Editline/EditlineTest.cpp b/lldb/unittests/Editline/EditlineTest.cpp --- a/lldb/unittests/Editline/EditlineTest.cpp +++ b/lldb/unittests/Editline/EditlineTest.cpp @@ -250,7 +250,7 @@ setenv("TERM", "vt100", 1); } - void SetUp() { + void SetUp() override { FileSystem::Initialize(); // Validate the editline adapter. @@ -263,7 +263,7 @@ std::make_shared([&] { _el_adapter.ConsumeAllOutput(); }); } - void TearDown() { + void TearDown() override { _el_adapter.CloseInput(); if (_sp_output_thread) _sp_output_thread->join(); diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp --- a/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp @@ -29,11 +29,11 @@ unsigned stop_reply_called = 0; std::vector structured_data_packets; - void HandleAsyncStdout(llvm::StringRef out) { output += out; } - void HandleAsyncMisc(llvm::StringRef data) { misc_data += data; } - void HandleStopReply() { ++stop_reply_called; } + void HandleAsyncStdout(llvm::StringRef out) override { output += out; } + void HandleAsyncMisc(llvm::StringRef data) override { misc_data += data; } + void HandleStopReply() override { ++stop_reply_called; } - void HandleAsyncStructuredDataPacket(llvm::StringRef data) { + void HandleAsyncStructuredDataPacket(llvm::StringRef data) override { structured_data_packets.push_back(data); } }; diff --git a/lldb/unittests/Symbol/TestClangASTContext.cpp b/lldb/unittests/Symbol/TestClangASTContext.cpp --- a/lldb/unittests/Symbol/TestClangASTContext.cpp +++ b/lldb/unittests/Symbol/TestClangASTContext.cpp @@ -34,12 +34,12 @@ FileSystem::Terminate(); } - virtual void SetUp() override { + void SetUp() override { std::string triple = HostInfo::GetTargetTriple(); m_ast.reset(new ClangASTContext(triple.c_str())); } - virtual void TearDown() override { m_ast.reset(); } + void TearDown() override { m_ast.reset(); } protected: std::unique_ptr m_ast; diff --git a/lldb/unittests/Target/ProcessInstanceInfoTest.cpp b/lldb/unittests/Target/ProcessInstanceInfoTest.cpp --- a/lldb/unittests/Target/ProcessInstanceInfoTest.cpp +++ b/lldb/unittests/Target/ProcessInstanceInfoTest.cpp @@ -16,13 +16,13 @@ /// for odd ones. class DummyUserIDResolver : public UserIDResolver { protected: - llvm::Optional DoGetUserName(id_t uid) { + llvm::Optional DoGetUserName(id_t uid) override { if (uid % 2) return ("user" + llvm::Twine(uid)).str(); return llvm::None; } - llvm::Optional DoGetGroupName(id_t gid) { + llvm::Optional DoGetGroupName(id_t gid) override { if (gid % 2) return ("group" + llvm::Twine(gid)).str(); return llvm::None;