summaryrefslogtreecommitdiff
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2018-07-31 15:23:49 +0000
committerJonas Toth <jonas.toth@gmail.com>2018-07-31 15:23:49 +0000
commit86c98b21299a116d0f9b4e478a0b3d0268579ee7 (patch)
tree4c96b47a0f0c5efc9d9f09721892a3be2827337a /clang-tools-extra
parent566be6150a4d4fe2005e40202f6f5a285a900b96 (diff)
[clang-tidy] add all clang-tidy modules to plugin
Summary: This patch addresses PR38359 and adds all existing clang-tidy modules to the plugin that can be used together with libclang. Reviewers: alexfh, aaron.ballman, hokein, ilya-biryukov Reviewed By: alexfh Subscribers: srhines, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D50060
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/clang-tidy/plugin/CMakeLists.txt6
-rw-r--r--clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp50
2 files changed, 45 insertions, 11 deletions
diff --git a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt
index 1979383c686..3540b2be712 100644
--- a/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/plugin/CMakeLists.txt
@@ -8,12 +8,15 @@ add_clang_library(clangTidyPlugin
clangFrontend
clangSema
clangTidy
- clangTidyAndroidModule
clangTidyAbseilModule
+ clangTidyAndroidModule
clangTidyBoostModule
+ clangTidyBugproneModule
clangTidyCERTModule
clangTidyCppCoreGuidelinesModule
+ clangTidyFuchsiaModule
clangTidyGoogleModule
+ clangTidyHICPPModule
clangTidyLLVMModule
clangTidyMiscModule
clangTidyModernizeModule
@@ -22,5 +25,6 @@ add_clang_library(clangTidyPlugin
clangTidyPerformanceModule
clangTidyPortabilityModule
clangTidyReadabilityModule
+ clangTidyZirconModule
clangTooling
)
diff --git a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
index dc567722171..34556120553 100644
--- a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
+++ b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
@@ -78,26 +78,51 @@ static clang::FrontendPluginRegistry::Add<clang::tidy::ClangTidyPluginAction>
namespace clang {
namespace tidy {
+// This anchor is used to force the linker to link the AbseilModule.
+extern volatile int AbseilModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =
+ AbseilModuleAnchorSource;
+
+// This anchor is used to force the linker to link the AndroidModule.
+extern volatile int AndroidModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
+ AndroidModuleAnchorSource;
+
+// This anchor is used to force the linker to link the BoostModule.
+extern volatile int BoostModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
+ BoostModuleAnchorSource;
+
// This anchor is used to force the linker to link the CERTModule.
extern volatile int CERTModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
CERTModuleAnchorSource;
-// This anchor is used to force the linker to link the LLVMModule.
-extern volatile int LLVMModuleAnchorSource;
-static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
- LLVMModuleAnchorSource;
-
// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
extern volatile int CppCoreGuidelinesModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =
CppCoreGuidelinesModuleAnchorSource;
+// This anchor is used to force the linker to link the FuchsiaModule.
+extern volatile int FuchsiaModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =
+ FuchsiaModuleAnchorSource;
+
// This anchor is used to force the linker to link the GoogleModule.
extern volatile int GoogleModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
GoogleModuleAnchorSource;
+// This anchor is used to force the linker to link the HICPPModule.
+extern volatile int HICPPModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
+ HICPPModuleAnchorSource;
+
+// This anchor is used to force the linker to link the LLVMModule.
+extern volatile int LLVMModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
+ LLVMModuleAnchorSource;
+
// This anchor is used to force the linker to link the MiscModule.
extern volatile int MiscModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =
@@ -111,7 +136,12 @@ static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =
// This anchor is used to force the linker to link the MPIModule.
extern volatile int MPIModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
- MPIModuleAnchorSource;
+ MPIModuleAnchorSource;
+
+// This anchor is used to force the linker to link the ObjCModule.
+extern volatile int ObjCModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
+ ObjCModuleAnchorSource;
// This anchor is used to force the linker to link the PerformanceModule.
extern volatile int PerformanceModuleAnchorSource;
@@ -128,10 +158,10 @@ extern volatile int ReadabilityModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
ReadabilityModuleAnchorSource;
-// This anchor is used to force the linker to link the ObjCModule.
-extern volatile int ObjCModuleAnchorSource;
-static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
- ObjCModuleAnchorSource;
+// This anchor is used to force the linker to link the ZirconModule.
+extern volatile int ZirconModuleAnchorSource;
+static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
+ ZirconModuleAnchorSource;
} // namespace tidy
} // namespace clang