summaryrefslogtreecommitdiff
path: root/dev-util/clazy/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /dev-util/clazy/files
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'dev-util/clazy/files')
-rw-r--r--dev-util/clazy/files/clazy-1.9-llvm12.patch88
-rw-r--r--dev-util/clazy/files/clazy-1.9-llvm13.patch31
2 files changed, 0 insertions, 119 deletions
diff --git a/dev-util/clazy/files/clazy-1.9-llvm12.patch b/dev-util/clazy/files/clazy-1.9-llvm12.patch
deleted file mode 100644
index 3862f40ad981..000000000000
--- a/dev-util/clazy/files/clazy-1.9-llvm12.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 2592a6e3393ebc75e16c91e606ad2015a16295c3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20Sch=C3=A4rf?= <c.schaerf@t-online.de>
-Date: Sat, 23 Jan 2021 15:34:10 +0100
-Subject: [PATCH] Fix build with Clang 12
-
-Required due to Clang changes https://github.com/llvm/llvm-project/commit/b3eff6b7bb31e7ef059a3d238de138849839fbbd and https://github.com/llvm/llvm-project/commit/d758f79e5d381bd4f5122193a9538d89c907c812
----
- src/SourceCompatibilityHelpers.h | 26 ++++++++++++++++++++++++++
- src/SuppressionManager.cpp | 5 ++---
- 2 files changed, 28 insertions(+), 3 deletions(-)
-
-diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h
-index 4db141ab..1737d5a5 100644
---- a/src/SourceCompatibilityHelpers.h
-+++ b/src/SourceCompatibilityHelpers.h
-@@ -29,6 +29,7 @@
- #include <clang/Basic/SourceLocation.h>
- #include <clang/Basic/SourceManager.h>
- #include <clang/Frontend/FrontendDiagnostic.h>
-+#include <clang/Lex/Lexer.h>
- #include <clang/Tooling/Core/Diagnostic.h>
-
- #if defined(CLAZY_USES_BOOST_REGEX)
-@@ -103,6 +104,31 @@ inline clang::tooling::Replacements& DiagnosticFix(clang::tooling::Diagnostic &d
- #endif
- }
-
-+inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *invalid)
-+{
-+#if LLVM_VERSION_MAJOR >= 12
-+ auto buffer = sm.getBufferOrNone(id);
-+ *invalid = !buffer.hasValue();
-+ return buffer;
-+#else
-+ return sm.getBuffer(id, invalid);
-+#endif
-+}
-+
-+#if LLVM_VERSION_MAJOR >= 12
-+inline clang::Lexer getLexer(clang::FileID id, llvm::Optional<llvm::MemoryBufferRef> inputFile,
-+ const clang::SourceManager &sm, const clang::LangOptions &lo)
-+{
-+ return clang::Lexer(id, inputFile.getValue(), sm, lo);
-+}
-+#else
-+inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile,
-+ const clang::SourceManager &sm, const clang::LangOptions &lo)
-+{
-+ return clang::Lexer(id, inputFile, sm, lo);
-+}
-+#endif
-+
- }
-
- #endif
-diff --git a/src/SuppressionManager.cpp b/src/SuppressionManager.cpp
-index 9d774ea6..9881388d 100644
---- a/src/SuppressionManager.cpp
-+++ b/src/SuppressionManager.cpp
-@@ -24,7 +24,6 @@
- #include "clazy_stl.h"
-
- #include <clang/Basic/SourceManager.h>
--#include <clang/Lex/Lexer.h>
- #include <clang/Basic/SourceLocation.h>
- #include <clang/Basic/TokenKinds.h>
- #include <clang/Lex/Token.h>
-@@ -84,7 +83,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager &sm, const cla
- Suppressions &suppressions = (*it).second;
-
- bool invalid = false;
-- auto buffer = sm.getBuffer(id, &invalid);
-+ auto buffer = clazy::getBuffer(sm, id, &invalid);
- if (invalid) {
- llvm::errs() << "SuppressionManager::parseFile: Invalid buffer ";
- if (buffer)
-@@ -92,7 +91,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager &sm, const cla
- return;
- }
-
-- Lexer lexer(id, buffer, sm, lo);
-+ auto lexer = clazy::getLexer(id, buffer, sm, lo);
- lexer.SetCommentRetentionState(true);
-
- Token token;
---
-GitLab
-
diff --git a/dev-util/clazy/files/clazy-1.9-llvm13.patch b/dev-util/clazy/files/clazy-1.9-llvm13.patch
deleted file mode 100644
index 9bbac8f7624d..000000000000
--- a/dev-util/clazy/files/clazy-1.9-llvm13.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0bf4e428c76270f4534a0a8df3cf6912157f22ab Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
-Date: Sat, 17 Apr 2021 20:57:10 +0200
-Subject: [PATCH] Fix build with LLVM 13
-
----
- src/ClazyStandaloneMain.cpp | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp
-index 41c4fcf9..7b4cf5d3 100644
---- a/src/ClazyStandaloneMain.cpp
-+++ b/src/ClazyStandaloneMain.cpp
-@@ -158,7 +158,13 @@ llvm::IntrusiveRefCntPtr<vfs::FileSystem> getVfsFromFile(const std::string &over
-
- int main(int argc, const char **argv)
- {
-- CommonOptionsParser optionsParser(argc, argv, s_clazyCategory, cl::ZeroOrMore);
-+ auto expectedParser = CommonOptionsParser::create(argc, argv, s_clazyCategory, cl::ZeroOrMore);
-+ if (!expectedParser) {
-+ llvm::errs() << expectedParser.takeError();
-+ return 1;
-+ }
-+
-+ auto &optionsParser = expectedParser.get();
- // llvm::errs() << optionsParser.getSourcePathList().size() << "\n";
-
- if (s_supportedChecks.getValue()) {
---
-GitLab
-