[Lldb-commits] [lldb] fd14646 - [LLDB] Applying clang-tidy modernize-use-override over LLDB
Shafik Yaghmour via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 22 13:29:54 PDT 2022
Author: Shafik Yaghmour
Date: 2022-04-22T13:29:47-07:00
New Revision: fd1464604367f2259614b66c886db16598b5be6b
URL: https://github.com/llvm/llvm-project/commit/fd1464604367f2259614b66c886db16598b5be6b
DIFF: https://github.com/llvm/llvm-project/commit/fd1464604367f2259614b66c886db16598b5be6b.diff
LOG: [LLDB] Applying clang-tidy modernize-use-override over LLDB
Applied clang-tidy modernize-use-override over LLDB and added it to the LLDB .clang-tidy config.
Differential Revision: https://reviews.llvm.org/D123340
Added:
Modified:
lldb/.clang-tidy
lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/unittests/API/SBCommandInterpreterTest.cpp
lldb/unittests/Interpreter/TestCommandPaths.cpp
lldb/unittests/Interpreter/TestOptionValue.cpp
lldb/unittests/Target/RemoteAwarePlatformTest.cpp
Removed:
################################################################################
diff --git a/lldb/.clang-tidy b/lldb/.clang-tidy
index 2cde63668d048..499170a49c07a 100644
--- a/lldb/.clang-tidy
+++ b/lldb/.clang-tidy
@@ -1,4 +1,4 @@
-Checks: '-readability-identifier-naming,modernize-use-default-member-init,modernize-use-equals-default'
+Checks: '-readability-identifier-naming,modernize-use-default-member-init,modernize-use-equals-default,modernize-use-override'
InheritParentConfig: true
CheckOptions:
- key: modernize-use-default-member-init.IgnoreMacros
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
index 160740da31b4f..9ef3c3671abf6 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
@@ -240,7 +240,7 @@ class CompleteTagDeclsScope : public ClangASTImporter::NewDeclListener {
m_delegate->SetImportListener(this);
}
- virtual ~CompleteTagDeclsScope() {
+ ~CompleteTagDeclsScope() override {
ClangASTImporter::ASTContextMetadataSP to_context_md =
importer.GetContextMetadata(m_dst_ctx);
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
index 180ac3ea7f1b2..b3eafecedd76e 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
@@ -193,7 +193,7 @@ class PlatformDarwinKernelProperties : public Properties {
m_collection_sp->Initialize(g_platformdarwinkernel_properties);
}
- virtual ~PlatformDarwinKernelProperties() = default;
+ ~PlatformDarwinKernelProperties() override = default;
FileSpecList GetKextDirectories() const {
const uint32_t idx = ePropertyKextDirectories;
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index f58adcafcd018..b77cf8012b5ea 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -74,7 +74,7 @@ class PluginProperties : public Properties {
m_collection_sp->Initialize(g_processkdp_properties);
}
- virtual ~PluginProperties() = default;
+ ~PluginProperties() override = default;
uint64_t GetPacketTimeout() {
const uint32_t idx = ePropertyKDPPacketTimeout;
@@ -880,7 +880,7 @@ class CommandObjectProcessKDPPacketSend : public CommandObjectParsed {
m_option_group.Finalize();
}
- ~CommandObjectProcessKDPPacketSend() = default;
+ ~CommandObjectProcessKDPPacketSend() override = default;
bool DoExecute(Args &command, CommandReturnObject &result) override {
const size_t argc = command.GetArgumentCount();
@@ -981,7 +981,7 @@ class CommandObjectProcessKDPPacket : public CommandObjectMultiword {
CommandObjectSP(new CommandObjectProcessKDPPacketSend(interpreter)));
}
- ~CommandObjectProcessKDPPacket() = default;
+ ~CommandObjectProcessKDPPacket() override = default;
};
class CommandObjectMultiwordProcessKDP : public CommandObjectMultiword {
@@ -995,7 +995,7 @@ class CommandObjectMultiwordProcessKDP : public CommandObjectMultiword {
interpreter)));
}
- ~CommandObjectMultiwordProcessKDP() = default;
+ ~CommandObjectMultiwordProcessKDP() override = default;
};
CommandObject *ProcessKDP::GetPluginCommandObject() {
diff --git a/lldb/unittests/API/SBCommandInterpreterTest.cpp b/lldb/unittests/API/SBCommandInterpreterTest.cpp
index d117c08c0bf46..0ddfa51fb6a70 100644
--- a/lldb/unittests/API/SBCommandInterpreterTest.cpp
+++ b/lldb/unittests/API/SBCommandInterpreterTest.cpp
@@ -34,7 +34,7 @@ class DummyCommand : public SBCommandPluginInterface {
DummyCommand(const char *message) : m_message(message) {}
bool DoExecute(SBDebugger dbg, char **command,
- SBCommandReturnObject &result) {
+ SBCommandReturnObject &result) override {
result.PutCString(m_message.c_str());
result.SetStatus(eReturnStatusSuccessFinishResult);
return result.Succeeded();
diff --git a/lldb/unittests/Interpreter/TestCommandPaths.cpp b/lldb/unittests/Interpreter/TestCommandPaths.cpp
index 13bb4e54b5ba3..227a0ec60833b 100644
--- a/lldb/unittests/Interpreter/TestCommandPaths.cpp
+++ b/lldb/unittests/Interpreter/TestCommandPaths.cpp
@@ -51,7 +51,7 @@ class CommandObjectLeaf : public CommandObjectParsed {
}
protected:
- virtual bool DoExecute(Args &command, CommandReturnObject &result) {
+ bool DoExecute(Args &command, CommandReturnObject &result) override {
result.SetStatus(eReturnStatusSuccessFinishResult);
result.AppendMessage("I did nothing");
return true;
diff --git a/lldb/unittests/Interpreter/TestOptionValue.cpp b/lldb/unittests/Interpreter/TestOptionValue.cpp
index 7f383424368be..88c91a55a5579 100644
--- a/lldb/unittests/Interpreter/TestOptionValue.cpp
+++ b/lldb/unittests/Interpreter/TestOptionValue.cpp
@@ -111,7 +111,7 @@ class TestProperties : public OptionValueProperties {
}
private:
- lldb::OptionValueSP Clone() const {
+ lldb::OptionValueSP Clone() const override {
return std::make_shared<TestProperties>(*this);
}
diff --git a/lldb/unittests/Target/RemoteAwarePlatformTest.cpp b/lldb/unittests/Target/RemoteAwarePlatformTest.cpp
index 4d84f596f2e50..c36bd35c819dd 100644
--- a/lldb/unittests/Target/RemoteAwarePlatformTest.cpp
+++ b/lldb/unittests/Target/RemoteAwarePlatformTest.cpp
@@ -37,7 +37,8 @@ class RemoteAwarePlatformTester : public RemoteAwarePlatform {
const FileSpecList *));
Status ResolveRemoteExecutable(
const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
- const FileSpecList *module_search_paths_ptr) /*override*/ {
+ const FileSpecList *module_search_paths_ptr) /*override*/
+ { // NOLINT(modernize-use-override)
auto pair = ResolveRemoteExecutable(module_spec, module_search_paths_ptr);
exe_module_sp = pair.second;
return pair.first;
More information about the lldb-commits
mailing list