diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-08 11:28:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-08 11:28:34 +0000 |
commit | 24fd814c326e282c4321965c31f341dad77e270d (patch) | |
tree | 033d63b33c21a3209964ab56005bb9bdd523630d /dev-util/clazy | |
parent | 129160ec854dca4c3fedb5bcfbcb56930371da0f (diff) |
gentoo resync : 08.01.2021
Diffstat (limited to 'dev-util/clazy')
-rw-r--r-- | dev-util/clazy/Manifest | 7 | ||||
-rw-r--r-- | dev-util/clazy/clazy-1.7-r1.ebuild | 43 | ||||
-rw-r--r-- | dev-util/clazy/clazy-1.8.ebuild | 4 | ||||
-rw-r--r-- | dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch | 82 | ||||
-rw-r--r-- | dev-util/clazy/files/clazy-1.7-llvm11-1.patch | 343 | ||||
-rw-r--r-- | dev-util/clazy/files/clazy-1.7-llvm11-2.patch | 28 |
6 files changed, 3 insertions, 504 deletions
diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest index 984366198d8f..d7e8af81318e 100644 --- a/dev-util/clazy/Manifest +++ b/dev-util/clazy/Manifest @@ -1,8 +1,3 @@ -AUX clazy-1.7-gnuinstalldirs.patch 3167 BLAKE2B cc4d56ea57c66b7c8bde5eb9a9afbc491f0ee29f91ebab381150838943150fd92ac46dc099833baf8b75cbeb17bcfb790b2a6b7f2a1c0dc964892f9cf9ab76b8 SHA512 08addfc9fc6749e9afcea078c38d31c7f13247887f638d16c9797d4145d5b0fa363721534104fd9f955dd13a175981634b1c54e209019c37ba5da79b33ab6a45 -AUX clazy-1.7-llvm11-1.patch 17332 BLAKE2B 56f87865f455f020caf84386ed508da657b4a2c541d74a089f3a622bf52f517bf9805ceda3771a5137051ea4353b88d48b07d961f1c6390b46ff6795a7d799a8 SHA512 8e2c9b229677f8373b63d2664c79001c2494f031d9ea9f2f896b68f0f8ea65fe0fd6ccad6254304bbf66aa064c26aceabaf9b2b37c5b787f650b449e04c2a77f -AUX clazy-1.7-llvm11-2.patch 1099 BLAKE2B edfb1cc1fe2cc864115772fc7e81b5e03a850a258c80c89b83970329fcb94864c85a98005b72386ea7c85e9b5bf54767e1260fe628c35b4a4408044de427f0db SHA512 76b8a189be601f40a4aa1beacbd33964e9d60da1361207be49be42e6e2085daa7c18c0ab09d8dcc4d40d3f03a3c45cedddf6c36ae263f54810c76e6d1e8fcbb0 -DIST clazy-1.7.tar.xz 371788 BLAKE2B 281acd0164cf76510e46883fff7269aa77e4b815d6d0ca5a54307165ff8f4355e095b82e0c41cdb0af391f4a15048a8d64b2a2a7b9dabc042b36ba1a380405cc SHA512 3dba993140f3d69aac8d9cf3fa49db990185928647193220b689773bbca70f9fd9ee7fc52022e6029b3c0c81800301a593bd79edee7e1fa6c5884782d390ced6 DIST clazy-1.8.tar.xz 392328 BLAKE2B 9ece9d279b2bd7e4c15ad35d9943636a107abd47cf0ed0b20db305b1684610fb84c6f9c7f606f159f0b5a48b881506796f0addf12246f2e9929a08225fcc5c74 SHA512 c43a393721a5235ddcd653f9c322e0a215f86add3b1ce42f849677c108cd21209693c6e8f225171db88032c75596722109ee01bc53db4af90fe7652f27c1eba5 -EBUILD clazy-1.7-r1.ebuild 1078 BLAKE2B 5c83d2becd0459d44e5c979b55f34a774fc7186d2d1a2079926eb97e897f79e1e94f99e626b89c9bc6c5ce7f83147dd2f9715552f6093c9488ef586100f3817d SHA512 33e99ee100bf49ee03ee947b0ab17cdb0ca4e5cce46568e761ae298d6f46e8a71c997d25ab05352661b54584f89a256751c8b529ff71d20cd11df31e5e50f0e1 -EBUILD clazy-1.8.ebuild 1001 BLAKE2B 92787899c7c66ac533cb68092bc82c385808654933d9a8e68182984580189507142a312f2bd0b261ef870908fbec67b4f928bb731e3702e07d8bfa443ddf386c SHA512 9df9c7e9ed9347527c5e590896ce3e781cfa3f3a814e742b2bc7db05c8ef2cf1c531e9ba2a6ffc6ddf616f746574c7b9cb67ae4a1d1dff6106ee6912e1c3cd81 +EBUILD clazy-1.8.ebuild 1000 BLAKE2B 3c6589a1415df7b2fcf463e5c3d396e49b17b583eb4bc756302a9f008f8167f3012634b0bffccc2822532765970409bd6123715d4c36d17614fbedcdbfca35d1 SHA512 764551bdfaef64651d399ea681dc6330aacf0ac425ecc18118f9f820dcfeaafc86c85fb11744f6ab53fee6c58975c448abfcca8c5163dfda48a01d6b11c8e270 MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/dev-util/clazy/clazy-1.7-r1.ebuild b/dev-util/clazy/clazy-1.7-r1.ebuild deleted file mode 100644 index ffa163aa4fac..000000000000 --- a/dev-util/clazy/clazy-1.7-r1.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" -HOMEPAGE="https://apps.kde.org/en/clazy" -SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" - -LICENSE="LGPL-2+" -SLOT="0" -KEYWORDS="amd64 arm64 x86" -IUSE="" - -RDEPEND=" - >=sys-devel/clang-5.0:= - >=sys-devel/llvm-5.0:= -" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${P}-gnuinstalldirs.patch - "${FILESDIR}"/${P}-llvm11-{1,2}.patch -) - -src_prepare() { - cmake_src_prepare - - sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION/d' \ - -i CMakeLists.txt || die -} - -src_configure() { - # this package requires both llvm and clang of the same version. - # clang pulls in the equivalent llvm version, but not vice versa. - # so, we must find llvm based on the installed clang version. - # bug #681568 - local clang_version=$(best_version "sys-devel/clang") - export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" - cmake_src_configure -} diff --git a/dev-util/clazy/clazy-1.8.ebuild b/dev-util/clazy/clazy-1.8.ebuild index 3c4620309b42..9cba0ac13609 100644 --- a/dev-util/clazy/clazy-1.8.ebuild +++ b/dev-util/clazy/clazy-1.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -12,7 +12,7 @@ S="${WORKDIR}" LICENSE="LGPL-2+" SLOT="0" -KEYWORDS="amd64 arm64 ~x86" +KEYWORDS="amd64 arm64 x86" IUSE="" RDEPEND=" diff --git a/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch b/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch deleted file mode 100644 index c58093a2db25..000000000000 --- a/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 111c6971cd791f336eaaa8ef142c8212a7e65a3a Mon Sep 17 00:00:00 2001 -From: Andreas Sturmlechner <asturm@gentoo.org> -Date: Tue, 30 Jun 2020 12:56:56 +0200 -Subject: [PATCH] Use more GNUInstallDirs (doc, man) - ---- - CMakeLists.txt | 21 ++++++++------------- - docs/man/CMakeLists.txt | 2 +- - 2 files changed, 9 insertions(+), 14 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c55103b..2532a8d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,7 +15,7 @@ endif() - - include(FeatureSummary) - include(GenerateExportHeader) --include("GNUInstallDirs") -+include(GNUInstallDirs) - - # Version setup - set(CLAZY_VERSION_MAJOR "1") -@@ -184,8 +184,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) - -- set(SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR} CACHE STRING "Share directory name") -- - if(NOT WIN32) - if(APPLE) - find_program(READLINK_CMD greadlink) -@@ -200,27 +198,24 @@ if (NOT CLAZY_BUILD_WITH_CLANG) - configure_file(${CMAKE_CURRENT_LIST_DIR}/clazy.cmake ${CMAKE_BINARY_DIR}/clazy @ONLY) - install(PROGRAMS ${CMAKE_BINARY_DIR}/clazy DESTINATION bin) - else() -- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION bin) -+ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(MSVC) -- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION bin) -+ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - endif() - - # Install the explanation README's -- set(DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/clazy) -- - include(${CMAKE_CURRENT_LIST_DIR}/readmes.cmake) - -- install(FILES ${README_LEVEL0_FILES} DESTINATION ${DOC_INSTALL_DIR}/level0) -- install(FILES ${README_LEVEL1_FILES} DESTINATION ${DOC_INSTALL_DIR}/level1) -- install(FILES ${README_LEVEL2_FILES} DESTINATION ${DOC_INSTALL_DIR}/level2) -- install(FILES ${README_manuallevel_FILES} DESTINATION ${DOC_INSTALL_DIR}/manuallevel) -+ install(FILES ${README_LEVEL0_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level0) -+ install(FILES ${README_LEVEL1_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level1) -+ install(FILES ${README_LEVEL2_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level2) -+ install(FILES ${README_manuallevel_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/manuallevel) - - # Install more doc files -- install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${DOC_INSTALL_DIR}) -+ install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${CMAKE_INSTALL_DOCDIR}) - - # Build docs -- set(MAN_INSTALL_DIR "${SHARE_INSTALL_DIR}/man/man1") - add_subdirectory(docs) - - # rpath -diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt -index 5d86813..d9b3937 100644 ---- a/docs/man/CMakeLists.txt -+++ b/docs/man/CMakeLists.txt -@@ -14,6 +14,6 @@ if(UNIX) - ) - add_custom_target(man ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clazy.1) - -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${MAN_INSTALL_DIR}) -+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - endif() - endif() --- -2.27.0 - diff --git a/dev-util/clazy/files/clazy-1.7-llvm11-1.patch b/dev-util/clazy/files/clazy-1.7-llvm11-1.patch deleted file mode 100644 index 7b25b340a5c2..000000000000 --- a/dev-util/clazy/files/clazy-1.7-llvm11-1.patch +++ /dev/null @@ -1,343 +0,0 @@ -From 30d6a2b64f5a05722fdc5d8e3754dbf13425cd62 Mon Sep 17 00:00:00 2001 -From: Egor Gabov <egor.gabov@waveaccess.ru> -Date: Thu, 4 Jun 2020 17:10:21 +0300 -Subject: [PATCH] updated for compatibility with LLVM 10 - -In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. -In this commit all implicit conversion from llvm::StringRef to -std::string are changed by explicit. -Also included header file clang/Basic/FileManager.h in src/MiniDumper -because without this header, class clang::FileEntry in incomplete class ---- - src/FixItExporter.cpp | 5 +++-- - src/MiniAstDumper.cpp | 1 + - src/Utils.cpp | 2 +- - src/checkbase.cpp | 2 +- - src/checks/detachingbase.cpp | 2 +- - src/checks/level0/qenums.cpp | 2 +- - src/checks/level0/qt-macros.cpp | 4 ++-- - src/checks/level0/unused-non-trivial-variable.cpp | 2 +- - src/checks/level1/detaching-temporary.cpp | 2 +- - src/checks/level1/non-pod-global-static.cpp | 2 +- - src/checks/level1/qproperty-without-notify.cpp | 2 +- - src/checks/level2/missing-typeinfo.cpp | 2 +- - src/checks/level2/old-style-connect.cpp | 6 +++--- - src/checks/level2/rule-of-three.cpp | 2 +- - src/checks/manuallevel/ifndef-define-typo.cpp | 6 +++--- - src/checks/manuallevel/qproperty-type-mismatch.cpp | 2 +- - src/checks/manuallevel/qrequiredresult-candidates.cpp | 2 +- - src/checks/manuallevel/qt-keywords.cpp | 4 ++-- - src/checks/manuallevel/reserve-candidates.cpp | 3 ++- - 19 files changed, 28 insertions(+), 25 deletions(-) - -diff --git a/src/FixItExporter.cpp b/src/FixItExporter.cpp -index f3af2e5..44240cf 100644 ---- a/src/FixItExporter.cpp -+++ b/src/FixItExporter.cpp -@@ -68,7 +68,7 @@ void FixItExporter::BeginSourceFile(const LangOptions &LangOpts, const Preproces - - const auto id = SourceMgr.getMainFileID(); - const auto entry = SourceMgr.getFileEntryForID(id); -- getTuDiag().MainSourceFile = entry->getName(); -+ getTuDiag().MainSourceFile = static_cast<std::string>(entry->getName()); - } - - bool FixItExporter::IncludeInDiagnosticCounts() const -@@ -89,7 +89,8 @@ tooling::Diagnostic FixItExporter::ConvertDiagnostic(const Diagnostic &Info) - // TODO: This returns an empty string: DiagEngine->getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()); - // HACK: capture it at the end of the message: Message text [check-name] - -- std::string checkName = DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()); -+ std::string checkName = -+ static_cast<std::string>(DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID())); - std::string messageText; - - if (checkName.empty()) { -diff --git a/src/MiniAstDumper.cpp b/src/MiniAstDumper.cpp -index 4766174..6124e6e 100644 ---- a/src/MiniAstDumper.cpp -+++ b/src/MiniAstDumper.cpp -@@ -24,6 +24,7 @@ - - #include <clang/Frontend/CompilerInstance.h> - #include <clang/Frontend/FrontendPluginRegistry.h> -+#include <clang/Basic/FileManager.h> - - using namespace clang; - using namespace std; -diff --git a/src/Utils.cpp b/src/Utils.cpp -index 001ced9..b0812fe 100644 ---- a/src/Utils.cpp -+++ b/src/Utils.cpp -@@ -878,7 +878,7 @@ string Utils::filenameForLoc(SourceLocation loc, const clang::SourceManager &sm) - if (loc.isMacroID()) - loc = sm.getExpansionLoc(loc); - -- const string filename = sm.getFilename(loc); -+ const string filename = static_cast<std::string>(sm.getFilename(loc)); - auto splitted = clazy::splitString(filename, '/'); - if (splitted.empty()) - return {}; -diff --git a/src/checkbase.cpp b/src/checkbase.cpp -index 8b40e19..22a426c 100644 ---- a/src/checkbase.cpp -+++ b/src/checkbase.cpp -@@ -188,7 +188,7 @@ bool CheckBase::shouldIgnoreFile(SourceLocation loc) const - if (!loc.isValid()) - return true; - -- string filename = sm().getFilename(loc); -+ string filename = static_cast<std::string>(sm().getFilename(loc)); - - return clazy::any_of(m_filesToIgnore, [filename](const std::string &ignored) { - return clazy::contains(filename, ignored); -diff --git a/src/checks/detachingbase.cpp b/src/checks/detachingbase.cpp -index 70311f4..1b094ee 100644 ---- a/src/checks/detachingbase.cpp -+++ b/src/checks/detachingbase.cpp -@@ -57,7 +57,7 @@ bool DetachingBase::isDetachingMethod(CXXMethodDecl *method, DetachingMethodType - - const std::unordered_map<string, std::vector<StringRef>> &methodsByType = detachingMethodType == DetachingMethod ? clazy::detachingMethods() - : clazy::detachingMethodsWithConstCounterParts(); -- auto it = methodsByType.find(className); -+ auto it = methodsByType.find(static_cast<std::string>(className)); - if (it != methodsByType.cend()) { - const auto &methods = it->second; - if (clazy::contains(methods, clazy::name(method))) -diff --git a/src/checks/level0/qenums.cpp b/src/checks/level0/qenums.cpp -index 00075b5..db8910f 100644 ---- a/src/checks/level0/qenums.cpp -+++ b/src/checks/level0/qenums.cpp -@@ -59,7 +59,7 @@ void QEnums::VisitMacroExpands(const Token &MacroNameTok, const SourceRange &ran - // We simply check if :: is present because it's very cumbersome to to check for different classes when dealing with the pre-processor - - CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); -- string text = Lexer::getSourceText(crange, sm(), lo()); -+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); - if (clazy::contains(text, "::")) - return; - } -diff --git a/src/checks/level0/qt-macros.cpp b/src/checks/level0/qt-macros.cpp -index d3a587c..ab8e9f5 100644 ---- a/src/checks/level0/qt-macros.cpp -+++ b/src/checks/level0/qt-macros.cpp -@@ -44,7 +44,7 @@ void QtMacros::VisitMacroDefined(const Token &MacroNameTok) - return; - - IdentifierInfo *ii = MacroNameTok.getIdentifierInfo(); -- if (ii && clazy::startsWith(ii->getName(), "Q_OS_")) -+ if (ii && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_")) - m_OSMacroExists = true; - } - -@@ -58,7 +58,7 @@ void QtMacros::checkIfDef(const Token ¯oNameTok, SourceLocation Loc) - if (preProcessorVisitor && preProcessorVisitor->qtVersion() < 51204 && ii->getName() == "Q_OS_WINDOWS") { - // Q_OS_WINDOWS was introduced in 5.12.4 - emitWarning(Loc, "Q_OS_WINDOWS was only introduced in Qt 5.12.4, use Q_OS_WIN instead"); -- } else if (!m_OSMacroExists && clazy::startsWith(ii->getName(), "Q_OS_")) { -+ } else if (!m_OSMacroExists && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_")) { - emitWarning(Loc, "Include qglobal.h before testing Q_OS_ macros"); - } - } -diff --git a/src/checks/level0/unused-non-trivial-variable.cpp b/src/checks/level0/unused-non-trivial-variable.cpp -index 4e4b830..93815f2 100644 ---- a/src/checks/level0/unused-non-trivial-variable.cpp -+++ b/src/checks/level0/unused-non-trivial-variable.cpp -@@ -91,7 +91,7 @@ bool UnusedNonTrivialVariable::isUninterestingType(const CXXRecordDecl *record) - static const vector<StringRef> blacklistedTemplates = { "QScopedPointer", "QSetValueOnDestroy", "QScopedValueRollback" }; - StringRef className = clazy::name(record); - for (StringRef templateName : blacklistedTemplates) { -- if (clazy::startsWith(className, templateName)) -+ if (clazy::startsWith(static_cast<std::string>(className), static_cast<std::string>(templateName))) - return true; - } - -diff --git a/src/checks/level1/detaching-temporary.cpp b/src/checks/level1/detaching-temporary.cpp -index fedfc81..60c7553 100644 ---- a/src/checks/level1/detaching-temporary.cpp -+++ b/src/checks/level1/detaching-temporary.cpp -@@ -140,7 +140,7 @@ void DetachingTemporary::VisitStmt(clang::Stmt *stm) - StringRef className = clazy::name(classDecl); - - const std::unordered_map<string, std::vector<StringRef>> &methodsByType = clazy::detachingMethods(); -- auto it = methodsByType.find(className); -+ auto it = methodsByType.find(static_cast<std::string>(className)); - auto it2 = m_writeMethodsByType.find(className); - - std::vector<StringRef> allowedFunctions; -diff --git a/src/checks/level1/non-pod-global-static.cpp b/src/checks/level1/non-pod-global-static.cpp -index 5879bff..433b5c5 100644 ---- a/src/checks/level1/non-pod-global-static.cpp -+++ b/src/checks/level1/non-pod-global-static.cpp -@@ -74,7 +74,7 @@ void NonPodGlobalStatic::VisitStmt(clang::Stmt *stm) - const SourceLocation declStart = clazy::getLocStart(varDecl); - - if (declStart.isMacroID()) { -- auto macroName = Lexer::getImmediateMacroName(declStart, sm(), lo()); -+ auto macroName = static_cast<std::string>(Lexer::getImmediateMacroName(declStart, sm(), lo())); - if (clazy::startsWithAny(macroName, { "Q_IMPORT_PLUGIN", "Q_CONSTRUCTOR_FUNCTION", "Q_DESTRUCTOR_FUNCTION"})) // Don't warn on these - return; - } -diff --git a/src/checks/level1/qproperty-without-notify.cpp b/src/checks/level1/qproperty-without-notify.cpp -index e1d6db4..3af9fee 100644 ---- a/src/checks/level1/qproperty-without-notify.cpp -+++ b/src/checks/level1/qproperty-without-notify.cpp -@@ -69,7 +69,7 @@ void QPropertyWithoutNotify::VisitMacroExpands(const clang::Token &MacroNameTok, - return; - CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); - -- string text = Lexer::getSourceText(crange, sm(), lo()); -+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); - if (text.back() == ')') - text.pop_back(); - -diff --git a/src/checks/level2/missing-typeinfo.cpp b/src/checks/level2/missing-typeinfo.cpp -index 98df2cd..03b44e0 100644 ---- a/src/checks/level2/missing-typeinfo.cpp -+++ b/src/checks/level2/missing-typeinfo.cpp -@@ -74,7 +74,7 @@ void MissingTypeInfo::VisitDecl(clang::Decl *decl) - if (sm().isInSystemHeader(clazy::getLocStart(record))) - return; - -- std::string typeName = clazy::name(record); -+ std::string typeName = static_cast<std::string>(clazy::name(record)); - if (typeName == "QPair") // QPair doesn't use Q_DECLARE_TYPEINFO, but rather a explicit QTypeInfo. - return; - -diff --git a/src/checks/level2/old-style-connect.cpp b/src/checks/level2/old-style-connect.cpp -index 0fe68c1..396cb70 100644 ---- a/src/checks/level2/old-style-connect.cpp -+++ b/src/checks/level2/old-style-connect.cpp -@@ -274,7 +274,7 @@ void OldStyleConnect::VisitMacroExpands(const Token ¯oNameTok, const SourceR - return; - - auto charRange = Lexer::getAsCharRange(range, sm(), lo()); -- const string text = Lexer::getSourceText(charRange, sm(), lo()); -+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo())); - - static regex rx(R"(Q_PRIVATE_SLOT\s*\((.*)\s*,\s*.*\s+(.*)\(.*)"); - smatch match; -@@ -293,7 +293,7 @@ string OldStyleConnect::signalOrSlotNameFromMacro(SourceLocation macroLoc) - CharSourceRange expansionRange = clazy::getImmediateExpansionRange(macroLoc, sm()); - SourceRange range = SourceRange(expansionRange.getBegin(), expansionRange.getEnd()); - auto charRange = Lexer::getAsCharRange(range, sm(), lo()); -- const string text = Lexer::getSourceText(charRange, sm(), lo()); -+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo())); - - static regex rx(R"(\s*(SIGNAL|SLOT)\s*\(\s*(.+)\s*\(.*)"); - -@@ -315,7 +315,7 @@ bool OldStyleConnect::isSignalOrSlot(SourceLocation loc, string ¯oName) cons - if (!loc.isMacroID() || loc.isInvalid()) - return false; - -- macroName = Lexer::getImmediateMacroName(loc, sm(), lo()); -+ macroName = static_cast<std::string>(Lexer::getImmediateMacroName(loc, sm(), lo())); - return macroName == "SIGNAL" || macroName == "SLOT"; - } - -diff --git a/src/checks/level2/rule-of-three.cpp b/src/checks/level2/rule-of-three.cpp -index 8db55d5..7583fcc 100644 ---- a/src/checks/level2/rule-of-three.cpp -+++ b/src/checks/level2/rule-of-three.cpp -@@ -140,7 +140,7 @@ void RuleOfThree::VisitDecl(clang::Decl *decl) - - const string className = record->getNameAsString(); - const string classQualifiedName = record->getQualifiedNameAsString(); -- const string filename = sm().getFilename(recordStart); -+ const string filename = static_cast<std::string>(sm().getFilename(recordStart)); - if (clazy::endsWith(className, "Private") && clazy::endsWithAny(filename, { ".cpp", ".cxx", "_p.h" })) - return; // Lots of RAII classes fall into this category. And even Private (d-pointer) classes, warning in that case would just be noise - -diff --git a/src/checks/manuallevel/ifndef-define-typo.cpp b/src/checks/manuallevel/ifndef-define-typo.cpp -index edb6cdf..e9c50a4 100644 ---- a/src/checks/manuallevel/ifndef-define-typo.cpp -+++ b/src/checks/manuallevel/ifndef-define-typo.cpp -@@ -44,7 +44,7 @@ void IfndefDefineTypo::VisitMacroDefined(const Token ¯oNameTok) - { - if (!m_lastIfndef.empty()) { - if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { -- maybeWarn(ii->getName(), macroNameTok.getLocation()); -+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation()); - } - } - } -@@ -53,7 +53,7 @@ void IfndefDefineTypo::VisitDefined(const Token ¯oNameTok, const SourceRange - { - if (!m_lastIfndef.empty()) { - if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { -- maybeWarn(ii->getName(), macroNameTok.getLocation()); -+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation()); - } - } - } -@@ -66,7 +66,7 @@ void IfndefDefineTypo::VisitIfdef(SourceLocation, const Token &) - void IfndefDefineTypo::VisitIfndef(SourceLocation, const Token ¯oNameTok) - { - if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) -- m_lastIfndef = ii->getName(); -+ m_lastIfndef = static_cast<std::string>(ii->getName()); - } - - void IfndefDefineTypo::VisitIf(SourceLocation, SourceRange, PPCallbacks::ConditionValueKind) -diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp -index f91159c..952d9f1 100644 ---- a/src/checks/manuallevel/qproperty-type-mismatch.cpp -+++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp -@@ -237,7 +237,7 @@ void QPropertyTypeMismatch::VisitMacroExpands(const clang::Token &MacroNameTok, - - CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); - -- string text = Lexer::getSourceText(crange, sm(), lo()); -+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); - if (!text.empty() && text.back() == ')') - text.pop_back(); - -diff --git a/src/checks/manuallevel/qrequiredresult-candidates.cpp b/src/checks/manuallevel/qrequiredresult-candidates.cpp -index 912dbaa..6375bd7 100644 ---- a/src/checks/manuallevel/qrequiredresult-candidates.cpp -+++ b/src/checks/manuallevel/qrequiredresult-candidates.cpp -@@ -65,7 +65,7 @@ void QRequiredResultCandidates::VisitDecl(clang::Decl *decl) - - - if (returnClass == classDecl) { -- const std::string methodName = clazy::name(method); -+ const std::string methodName = static_cast<std::string>(clazy::name(method)); - if (methodName.empty()) // fixes assert - return; - -diff --git a/src/checks/manuallevel/qt-keywords.cpp b/src/checks/manuallevel/qt-keywords.cpp -index e792e95..b60752c 100644 ---- a/src/checks/manuallevel/qt-keywords.cpp -+++ b/src/checks/manuallevel/qt-keywords.cpp -@@ -59,12 +59,12 @@ void QtKeywords::VisitMacroExpands(const Token ¯oNameTok, const SourceRange - } - - static const vector<StringRef> keywords = { "foreach", "signals", "slots", "emit" }; -- std::string name = ii->getName(); -+ std::string name = static_cast<std::string>(ii->getName()); - if (!clazy::contains(keywords, name)) - return; - - // Make sure the macro is Qt's. It must be defined in Qt's headers, not 3rdparty -- std::string qtheader = sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc())); -+ std::string qtheader = static_cast<std::string>(sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc()))); - if (!clazy::endsWith(qtheader, "qglobal.h") && !clazy::endsWith(qtheader, "qobjectdefs.h")) - return; - -diff --git a/src/checks/manuallevel/reserve-candidates.cpp b/src/checks/manuallevel/reserve-candidates.cpp -index 389cac5..92e4491 100644 ---- a/src/checks/manuallevel/reserve-candidates.cpp -+++ b/src/checks/manuallevel/reserve-candidates.cpp -@@ -78,7 +78,8 @@ static bool isCandidateMethod(CXXMethodDecl *methodDecl) - if (!classDecl) - return false; - -- if (!clazy::equalsAny(clazy::name(methodDecl), { "append", "push_back", "push", "operator<<", "operator+=" })) -+ if (!clazy::equalsAny(static_cast<std::string>(clazy::name(methodDecl)), -+ { "append", "push_back", "push", "operator<<", "operator+=" })) - return false; - - if (!clazy::isAReserveClass(classDecl)) --- -GitLab - diff --git a/dev-util/clazy/files/clazy-1.7-llvm11-2.patch b/dev-util/clazy/files/clazy-1.7-llvm11-2.patch deleted file mode 100644 index 4556f257bf3b..000000000000 --- a/dev-util/clazy/files/clazy-1.7-llvm11-2.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 25aa102cc49def9573ffbed88155589cd60a2e8f Mon Sep 17 00:00:00 2001 -From: Egor Gabov <egor.gabov@waveaccess.ru> -Date: Fri, 5 Jun 2020 16:52:53 +0300 -Subject: [PATCH] updated for compatibility with LLVM 10 (clazy-standalone) - -In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. -In this commit all implicit conversion from llvm::StringRef to -std::string are changed by explicit. ---- - src/checks/manuallevel/jnisignatures.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/checks/manuallevel/jnisignatures.cpp b/src/checks/manuallevel/jnisignatures.cpp -index 81e61d4..5d4fe20 100644 ---- a/src/checks/manuallevel/jnisignatures.cpp -+++ b/src/checks/manuallevel/jnisignatures.cpp -@@ -103,7 +103,7 @@ void JniSignatures::checkFunctionCall(Stmt *stm) - return; - } - -- const std::string name = clazy::name(funDecl); -+ const std::string name = static_cast<std::string>(clazy::name(funDecl)); - - if (name == "callObjectMethod" || name == "callMethod") { - checkArgAt(callExpr, 0, methodNameRegex, "Invalid method name"); --- -GitLab - |