aboutsummaryrefslogtreecommitdiffstats
path: root/dist/clang/patches/240_Link-clang-tools.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dist/clang/patches/240_Link-clang-tools.patch')
-rw-r--r--dist/clang/patches/240_Link-clang-tools.patch129
1 files changed, 0 insertions, 129 deletions
diff --git a/dist/clang/patches/240_Link-clang-tools.patch b/dist/clang/patches/240_Link-clang-tools.patch
deleted file mode 100644
index 72335be26e..0000000000
--- a/dist/clang/patches/240_Link-clang-tools.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-diff --git a/tools/clang/tools/driver/CMakeLists.txt b/tools/clang/tools/driver/CMakeLists.txt
-index 901b6d62e4..178e7a1882 100644
---- a/tools/clang/tools/driver/CMakeLists.txt
-+++ b/tools/clang/tools/driver/CMakeLists.txt
-@@ -43,6 +43,9 @@ target_link_libraries(clang
- clangDriver
- clangFrontend
- clangFrontendTool
-+ clangTidyPlugin
-+ clangIncludeFixerPlugin
-+ clazyPlugin
- )
-
- if(WIN32 AND NOT CYGWIN)
-diff --git a/tools/clang/tools/driver/driver.cpp b/tools/clang/tools/driver/driver.cpp
-index 9f37c428ff..475c5f84c0 100644
---- a/tools/clang/tools/driver/driver.cpp
-+++ b/tools/clang/tools/driver/driver.cpp
-@@ -517,3 +517,18 @@ int main(int argc_, const char **argv_) {
- // failing command.
- return Res;
- }
-+
-+// This anchor is used to force the linker to link the clang-tidy plugin.
-+extern volatile int ClangTidyPluginAnchorSource;
-+static int LLVM_ATTRIBUTE_UNUSED ClangTidyPluginAnchorDestination =
-+ ClangTidyPluginAnchorSource;
-+
-+// This anchor is used to force the linker to link the clang-include-fixer
-+// plugin.
-+extern volatile int ClangIncludeFixerPluginAnchorSource;
-+static int LLVM_ATTRIBUTE_UNUSED ClangIncludeFixerPluginAnchorDestination =
-+ ClangIncludeFixerPluginAnchorSource;
-+
-+// This anchor is used to force the linker to link the clazy plugin.
-+extern volatile int ClazyPluginAnchorSource;
-+static int LLVM_ATTRIBUTE_UNUSED ClazyPluginAnchorDestination = ClazyPluginAnchorSource;
-diff --git a/tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp b/tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp
-index ac0bceb1..305bd78a 100644
---- a/tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp
-+++ b/tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp
-@@ -44,9 +44,6 @@ static const char EndVarName[] = "endVar";
- static const char DerefByValueResultName[] = "derefByValueResult";
- static const char DerefByRefResultName[] = "derefByRefResult";
-
--// shared matchers
--static const TypeMatcher AnyType = anything();
--
- static const StatementMatcher IntegerComparisonMatcher =
- expr(ignoringParenImpCasts(
- declRefExpr(to(varDecl(hasType(isInteger())).bind(ConditionVarName)))));
-@@ -173,6 +170,8 @@ StatementMatcher makeIteratorLoopMatcher() {
- qualType(unless(hasCanonicalType(rValueReferenceType())))
- .bind(DerefByRefResultName)))))));
-
-+ static const TypeMatcher AnyType = anything();
-+
- return forStmt(
- unless(isInTemplateInstantiation()),
- hasLoopInit(anyOf(declStmt(declCountIs(2),
-diff --git a/tools/clang/tools/extra/clang-tidy/plugin/CMakeLists.txt b/tools/clang/tools/extra/clang-tidy/plugin/CMakeLists.txt
-index 5c888327..832e2090 100644
---- a/tools/clang/tools/extra/clang-tidy/plugin/CMakeLists.txt
-+++ b/tools/clang/tools/extra/clang-tidy/plugin/CMakeLists.txt
-@@ -10,9 +10,11 @@ add_clang_library(clangTidyPlugin
- clangTidy
- clangTidyAndroidModule
- clangTidyBoostModule
-+ clangTidyBugproneModule
- clangTidyCERTModule
- clangTidyCppCoreGuidelinesModule
- clangTidyGoogleModule
-+ clangTidyHICPPModule
- clangTidyLLVMModule
- clangTidyMiscModule
- clangTidyModernizeModule
-diff --git a/tools/clang/tools/extra/clang-tidy/plugin/ClangTidyPlugin.cpp b/tools/clang/tools/extra/clang-tidy/plugin/ClangTidyPlugin.cpp
-index 1e6346c2..7028c40c 100644
---- a/tools/clang/tools/extra/clang-tidy/plugin/ClangTidyPlugin.cpp
-+++ b/tools/clang/tools/extra/clang-tidy/plugin/ClangTidyPlugin.cpp
-@@ -83,6 +83,16 @@ extern volatile int CERTModuleAnchorSource;
- static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
- CERTModuleAnchorSource;
-
-+// 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 BugproneModule.
-+extern volatile int BugproneModuleAnchorSource;
-+static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
-+ BugproneModuleAnchorSource;
-+
- // This anchor is used to force the linker to link the LLVMModule.
- extern volatile int LLVMModuleAnchorSource;
- static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
-@@ -98,6 +108,11 @@ extern volatile int GoogleModuleAnchorSource;
- static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
- GoogleModuleAnchorSource;
-
-+// 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 MiscModule.
- extern volatile int MiscModuleAnchorSource;
- static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =
-@@ -111,7 +126,7 @@ 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 PerformanceModule.
- extern volatile int PerformanceModuleAnchorSource;
-@@ -123,5 +138,10 @@ extern volatile int ReadabilityModuleAnchorSource;
- static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
- ReadabilityModuleAnchorSource;
-
-+// This anchor is used to force the linker to link the HICPPModule.
-+extern volatile int HICPPModuleAnchorSource;
-+static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
-+ HICPPModuleAnchorSource;
-+
- } // namespace tidy
- } // namespace clang