1 |
commit: a478a7675801c0a67cf3ea519ed7f752e114837f |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 7 16:57:04 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 7 17:30:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a478a767 |
7 |
|
8 |
dev-util/clazy: Drop 1.7-r1 |
9 |
|
10 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
dev-util/clazy/Manifest | 1 - |
14 |
dev-util/clazy/clazy-1.7-r1.ebuild | 43 --- |
15 |
.../clazy/files/clazy-1.7-gnuinstalldirs.patch | 82 ----- |
16 |
dev-util/clazy/files/clazy-1.7-llvm11-1.patch | 343 --------------------- |
17 |
dev-util/clazy/files/clazy-1.7-llvm11-2.patch | 28 -- |
18 |
5 files changed, 497 deletions(-) |
19 |
|
20 |
diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest |
21 |
index fe8cc3259b0..6de4bbca805 100644 |
22 |
--- a/dev-util/clazy/Manifest |
23 |
+++ b/dev-util/clazy/Manifest |
24 |
@@ -1,2 +1 @@ |
25 |
-DIST clazy-1.7.tar.xz 371788 BLAKE2B 281acd0164cf76510e46883fff7269aa77e4b815d6d0ca5a54307165ff8f4355e095b82e0c41cdb0af391f4a15048a8d64b2a2a7b9dabc042b36ba1a380405cc SHA512 3dba993140f3d69aac8d9cf3fa49db990185928647193220b689773bbca70f9fd9ee7fc52022e6029b3c0c81800301a593bd79edee7e1fa6c5884782d390ced6 |
26 |
DIST clazy-1.8.tar.xz 392328 BLAKE2B 9ece9d279b2bd7e4c15ad35d9943636a107abd47cf0ed0b20db305b1684610fb84c6f9c7f606f159f0b5a48b881506796f0addf12246f2e9929a08225fcc5c74 SHA512 c43a393721a5235ddcd653f9c322e0a215f86add3b1ce42f849677c108cd21209693c6e8f225171db88032c75596722109ee01bc53db4af90fe7652f27c1eba5 |
27 |
|
28 |
diff --git a/dev-util/clazy/clazy-1.7-r1.ebuild b/dev-util/clazy/clazy-1.7-r1.ebuild |
29 |
deleted file mode 100644 |
30 |
index ffa163aa4fa..00000000000 |
31 |
--- a/dev-util/clazy/clazy-1.7-r1.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,43 +0,0 @@ |
34 |
-# Copyright 1999-2020 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=7 |
38 |
- |
39 |
-inherit cmake |
40 |
- |
41 |
-DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" |
42 |
-HOMEPAGE="https://apps.kde.org/en/clazy" |
43 |
-SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" |
44 |
- |
45 |
-LICENSE="LGPL-2+" |
46 |
-SLOT="0" |
47 |
-KEYWORDS="amd64 arm64 x86" |
48 |
-IUSE="" |
49 |
- |
50 |
-RDEPEND=" |
51 |
- >=sys-devel/clang-5.0:= |
52 |
- >=sys-devel/llvm-5.0:= |
53 |
-" |
54 |
-DEPEND="${RDEPEND}" |
55 |
- |
56 |
-PATCHES=( |
57 |
- "${FILESDIR}"/${P}-gnuinstalldirs.patch |
58 |
- "${FILESDIR}"/${P}-llvm11-{1,2}.patch |
59 |
-) |
60 |
- |
61 |
-src_prepare() { |
62 |
- cmake_src_prepare |
63 |
- |
64 |
- sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION/d' \ |
65 |
- -i CMakeLists.txt || die |
66 |
-} |
67 |
- |
68 |
-src_configure() { |
69 |
- # this package requires both llvm and clang of the same version. |
70 |
- # clang pulls in the equivalent llvm version, but not vice versa. |
71 |
- # so, we must find llvm based on the installed clang version. |
72 |
- # bug #681568 |
73 |
- local clang_version=$(best_version "sys-devel/clang") |
74 |
- export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" |
75 |
- cmake_src_configure |
76 |
-} |
77 |
|
78 |
diff --git a/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch b/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch |
79 |
deleted file mode 100644 |
80 |
index c58093a2db2..00000000000 |
81 |
--- a/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch |
82 |
+++ /dev/null |
83 |
@@ -1,82 +0,0 @@ |
84 |
-From 111c6971cd791f336eaaa8ef142c8212a7e65a3a Mon Sep 17 00:00:00 2001 |
85 |
-From: Andreas Sturmlechner <asturm@g.o> |
86 |
-Date: Tue, 30 Jun 2020 12:56:56 +0200 |
87 |
-Subject: [PATCH] Use more GNUInstallDirs (doc, man) |
88 |
- |
89 |
---- |
90 |
- CMakeLists.txt | 21 ++++++++------------- |
91 |
- docs/man/CMakeLists.txt | 2 +- |
92 |
- 2 files changed, 9 insertions(+), 14 deletions(-) |
93 |
- |
94 |
-diff --git a/CMakeLists.txt b/CMakeLists.txt |
95 |
-index c55103b..2532a8d 100644 |
96 |
---- a/CMakeLists.txt |
97 |
-+++ b/CMakeLists.txt |
98 |
-@@ -15,7 +15,7 @@ endif() |
99 |
- |
100 |
- include(FeatureSummary) |
101 |
- include(GenerateExportHeader) |
102 |
--include("GNUInstallDirs") |
103 |
-+include(GNUInstallDirs) |
104 |
- |
105 |
- # Version setup |
106 |
- set(CLAZY_VERSION_MAJOR "1") |
107 |
-@@ -184,8 +184,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG) |
108 |
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
109 |
- ) |
110 |
- |
111 |
-- set(SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR} CACHE STRING "Share directory name") |
112 |
-- |
113 |
- if(NOT WIN32) |
114 |
- if(APPLE) |
115 |
- find_program(READLINK_CMD greadlink) |
116 |
-@@ -200,27 +198,24 @@ if (NOT CLAZY_BUILD_WITH_CLANG) |
117 |
- configure_file(${CMAKE_CURRENT_LIST_DIR}/clazy.cmake ${CMAKE_BINARY_DIR}/clazy @ONLY) |
118 |
- install(PROGRAMS ${CMAKE_BINARY_DIR}/clazy DESTINATION bin) |
119 |
- else() |
120 |
-- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION bin) |
121 |
-+ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION ${CMAKE_INSTALL_BINDIR}) |
122 |
- if(MSVC) |
123 |
-- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION bin) |
124 |
-+ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION ${CMAKE_INSTALL_BINDIR}) |
125 |
- endif() |
126 |
- endif() |
127 |
- |
128 |
- # Install the explanation README's |
129 |
-- set(DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/clazy) |
130 |
-- |
131 |
- include(${CMAKE_CURRENT_LIST_DIR}/readmes.cmake) |
132 |
- |
133 |
-- install(FILES ${README_LEVEL0_FILES} DESTINATION ${DOC_INSTALL_DIR}/level0) |
134 |
-- install(FILES ${README_LEVEL1_FILES} DESTINATION ${DOC_INSTALL_DIR}/level1) |
135 |
-- install(FILES ${README_LEVEL2_FILES} DESTINATION ${DOC_INSTALL_DIR}/level2) |
136 |
-- install(FILES ${README_manuallevel_FILES} DESTINATION ${DOC_INSTALL_DIR}/manuallevel) |
137 |
-+ install(FILES ${README_LEVEL0_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level0) |
138 |
-+ install(FILES ${README_LEVEL1_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level1) |
139 |
-+ install(FILES ${README_LEVEL2_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level2) |
140 |
-+ install(FILES ${README_manuallevel_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/manuallevel) |
141 |
- |
142 |
- # Install more doc files |
143 |
-- install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${DOC_INSTALL_DIR}) |
144 |
-+ install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${CMAKE_INSTALL_DOCDIR}) |
145 |
- |
146 |
- # Build docs |
147 |
-- set(MAN_INSTALL_DIR "${SHARE_INSTALL_DIR}/man/man1") |
148 |
- add_subdirectory(docs) |
149 |
- |
150 |
- # rpath |
151 |
-diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt |
152 |
-index 5d86813..d9b3937 100644 |
153 |
---- a/docs/man/CMakeLists.txt |
154 |
-+++ b/docs/man/CMakeLists.txt |
155 |
-@@ -14,6 +14,6 @@ if(UNIX) |
156 |
- ) |
157 |
- add_custom_target(man ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clazy.1) |
158 |
- |
159 |
-- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${MAN_INSTALL_DIR}) |
160 |
-+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) |
161 |
- endif() |
162 |
- endif() |
163 |
--- |
164 |
-2.27.0 |
165 |
- |
166 |
|
167 |
diff --git a/dev-util/clazy/files/clazy-1.7-llvm11-1.patch b/dev-util/clazy/files/clazy-1.7-llvm11-1.patch |
168 |
deleted file mode 100644 |
169 |
index 7b25b340a5c..00000000000 |
170 |
--- a/dev-util/clazy/files/clazy-1.7-llvm11-1.patch |
171 |
+++ /dev/null |
172 |
@@ -1,343 +0,0 @@ |
173 |
-From 30d6a2b64f5a05722fdc5d8e3754dbf13425cd62 Mon Sep 17 00:00:00 2001 |
174 |
-From: Egor Gabov <egor.gabov@××××××××××.ru> |
175 |
-Date: Thu, 4 Jun 2020 17:10:21 +0300 |
176 |
-Subject: [PATCH] updated for compatibility with LLVM 10 |
177 |
- |
178 |
-In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. |
179 |
-In this commit all implicit conversion from llvm::StringRef to |
180 |
-std::string are changed by explicit. |
181 |
-Also included header file clang/Basic/FileManager.h in src/MiniDumper |
182 |
-because without this header, class clang::FileEntry in incomplete class |
183 |
---- |
184 |
- src/FixItExporter.cpp | 5 +++-- |
185 |
- src/MiniAstDumper.cpp | 1 + |
186 |
- src/Utils.cpp | 2 +- |
187 |
- src/checkbase.cpp | 2 +- |
188 |
- src/checks/detachingbase.cpp | 2 +- |
189 |
- src/checks/level0/qenums.cpp | 2 +- |
190 |
- src/checks/level0/qt-macros.cpp | 4 ++-- |
191 |
- src/checks/level0/unused-non-trivial-variable.cpp | 2 +- |
192 |
- src/checks/level1/detaching-temporary.cpp | 2 +- |
193 |
- src/checks/level1/non-pod-global-static.cpp | 2 +- |
194 |
- src/checks/level1/qproperty-without-notify.cpp | 2 +- |
195 |
- src/checks/level2/missing-typeinfo.cpp | 2 +- |
196 |
- src/checks/level2/old-style-connect.cpp | 6 +++--- |
197 |
- src/checks/level2/rule-of-three.cpp | 2 +- |
198 |
- src/checks/manuallevel/ifndef-define-typo.cpp | 6 +++--- |
199 |
- src/checks/manuallevel/qproperty-type-mismatch.cpp | 2 +- |
200 |
- src/checks/manuallevel/qrequiredresult-candidates.cpp | 2 +- |
201 |
- src/checks/manuallevel/qt-keywords.cpp | 4 ++-- |
202 |
- src/checks/manuallevel/reserve-candidates.cpp | 3 ++- |
203 |
- 19 files changed, 28 insertions(+), 25 deletions(-) |
204 |
- |
205 |
-diff --git a/src/FixItExporter.cpp b/src/FixItExporter.cpp |
206 |
-index f3af2e5..44240cf 100644 |
207 |
---- a/src/FixItExporter.cpp |
208 |
-+++ b/src/FixItExporter.cpp |
209 |
-@@ -68,7 +68,7 @@ void FixItExporter::BeginSourceFile(const LangOptions &LangOpts, const Preproces |
210 |
- |
211 |
- const auto id = SourceMgr.getMainFileID(); |
212 |
- const auto entry = SourceMgr.getFileEntryForID(id); |
213 |
-- getTuDiag().MainSourceFile = entry->getName(); |
214 |
-+ getTuDiag().MainSourceFile = static_cast<std::string>(entry->getName()); |
215 |
- } |
216 |
- |
217 |
- bool FixItExporter::IncludeInDiagnosticCounts() const |
218 |
-@@ -89,7 +89,8 @@ tooling::Diagnostic FixItExporter::ConvertDiagnostic(const Diagnostic &Info) |
219 |
- // TODO: This returns an empty string: DiagEngine->getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()); |
220 |
- // HACK: capture it at the end of the message: Message text [check-name] |
221 |
- |
222 |
-- std::string checkName = DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()); |
223 |
-+ std::string checkName = |
224 |
-+ static_cast<std::string>(DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID())); |
225 |
- std::string messageText; |
226 |
- |
227 |
- if (checkName.empty()) { |
228 |
-diff --git a/src/MiniAstDumper.cpp b/src/MiniAstDumper.cpp |
229 |
-index 4766174..6124e6e 100644 |
230 |
---- a/src/MiniAstDumper.cpp |
231 |
-+++ b/src/MiniAstDumper.cpp |
232 |
-@@ -24,6 +24,7 @@ |
233 |
- |
234 |
- #include <clang/Frontend/CompilerInstance.h> |
235 |
- #include <clang/Frontend/FrontendPluginRegistry.h> |
236 |
-+#include <clang/Basic/FileManager.h> |
237 |
- |
238 |
- using namespace clang; |
239 |
- using namespace std; |
240 |
-diff --git a/src/Utils.cpp b/src/Utils.cpp |
241 |
-index 001ced9..b0812fe 100644 |
242 |
---- a/src/Utils.cpp |
243 |
-+++ b/src/Utils.cpp |
244 |
-@@ -878,7 +878,7 @@ string Utils::filenameForLoc(SourceLocation loc, const clang::SourceManager &sm) |
245 |
- if (loc.isMacroID()) |
246 |
- loc = sm.getExpansionLoc(loc); |
247 |
- |
248 |
-- const string filename = sm.getFilename(loc); |
249 |
-+ const string filename = static_cast<std::string>(sm.getFilename(loc)); |
250 |
- auto splitted = clazy::splitString(filename, '/'); |
251 |
- if (splitted.empty()) |
252 |
- return {}; |
253 |
-diff --git a/src/checkbase.cpp b/src/checkbase.cpp |
254 |
-index 8b40e19..22a426c 100644 |
255 |
---- a/src/checkbase.cpp |
256 |
-+++ b/src/checkbase.cpp |
257 |
-@@ -188,7 +188,7 @@ bool CheckBase::shouldIgnoreFile(SourceLocation loc) const |
258 |
- if (!loc.isValid()) |
259 |
- return true; |
260 |
- |
261 |
-- string filename = sm().getFilename(loc); |
262 |
-+ string filename = static_cast<std::string>(sm().getFilename(loc)); |
263 |
- |
264 |
- return clazy::any_of(m_filesToIgnore, [filename](const std::string &ignored) { |
265 |
- return clazy::contains(filename, ignored); |
266 |
-diff --git a/src/checks/detachingbase.cpp b/src/checks/detachingbase.cpp |
267 |
-index 70311f4..1b094ee 100644 |
268 |
---- a/src/checks/detachingbase.cpp |
269 |
-+++ b/src/checks/detachingbase.cpp |
270 |
-@@ -57,7 +57,7 @@ bool DetachingBase::isDetachingMethod(CXXMethodDecl *method, DetachingMethodType |
271 |
- |
272 |
- const std::unordered_map<string, std::vector<StringRef>> &methodsByType = detachingMethodType == DetachingMethod ? clazy::detachingMethods() |
273 |
- : clazy::detachingMethodsWithConstCounterParts(); |
274 |
-- auto it = methodsByType.find(className); |
275 |
-+ auto it = methodsByType.find(static_cast<std::string>(className)); |
276 |
- if (it != methodsByType.cend()) { |
277 |
- const auto &methods = it->second; |
278 |
- if (clazy::contains(methods, clazy::name(method))) |
279 |
-diff --git a/src/checks/level0/qenums.cpp b/src/checks/level0/qenums.cpp |
280 |
-index 00075b5..db8910f 100644 |
281 |
---- a/src/checks/level0/qenums.cpp |
282 |
-+++ b/src/checks/level0/qenums.cpp |
283 |
-@@ -59,7 +59,7 @@ void QEnums::VisitMacroExpands(const Token &MacroNameTok, const SourceRange &ran |
284 |
- // We simply check if :: is present because it's very cumbersome to to check for different classes when dealing with the pre-processor |
285 |
- |
286 |
- CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
287 |
-- string text = Lexer::getSourceText(crange, sm(), lo()); |
288 |
-+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); |
289 |
- if (clazy::contains(text, "::")) |
290 |
- return; |
291 |
- } |
292 |
-diff --git a/src/checks/level0/qt-macros.cpp b/src/checks/level0/qt-macros.cpp |
293 |
-index d3a587c..ab8e9f5 100644 |
294 |
---- a/src/checks/level0/qt-macros.cpp |
295 |
-+++ b/src/checks/level0/qt-macros.cpp |
296 |
-@@ -44,7 +44,7 @@ void QtMacros::VisitMacroDefined(const Token &MacroNameTok) |
297 |
- return; |
298 |
- |
299 |
- IdentifierInfo *ii = MacroNameTok.getIdentifierInfo(); |
300 |
-- if (ii && clazy::startsWith(ii->getName(), "Q_OS_")) |
301 |
-+ if (ii && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_")) |
302 |
- m_OSMacroExists = true; |
303 |
- } |
304 |
- |
305 |
-@@ -58,7 +58,7 @@ void QtMacros::checkIfDef(const Token ¯oNameTok, SourceLocation Loc) |
306 |
- if (preProcessorVisitor && preProcessorVisitor->qtVersion() < 51204 && ii->getName() == "Q_OS_WINDOWS") { |
307 |
- // Q_OS_WINDOWS was introduced in 5.12.4 |
308 |
- emitWarning(Loc, "Q_OS_WINDOWS was only introduced in Qt 5.12.4, use Q_OS_WIN instead"); |
309 |
-- } else if (!m_OSMacroExists && clazy::startsWith(ii->getName(), "Q_OS_")) { |
310 |
-+ } else if (!m_OSMacroExists && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_")) { |
311 |
- emitWarning(Loc, "Include qglobal.h before testing Q_OS_ macros"); |
312 |
- } |
313 |
- } |
314 |
-diff --git a/src/checks/level0/unused-non-trivial-variable.cpp b/src/checks/level0/unused-non-trivial-variable.cpp |
315 |
-index 4e4b830..93815f2 100644 |
316 |
---- a/src/checks/level0/unused-non-trivial-variable.cpp |
317 |
-+++ b/src/checks/level0/unused-non-trivial-variable.cpp |
318 |
-@@ -91,7 +91,7 @@ bool UnusedNonTrivialVariable::isUninterestingType(const CXXRecordDecl *record) |
319 |
- static const vector<StringRef> blacklistedTemplates = { "QScopedPointer", "QSetValueOnDestroy", "QScopedValueRollback" }; |
320 |
- StringRef className = clazy::name(record); |
321 |
- for (StringRef templateName : blacklistedTemplates) { |
322 |
-- if (clazy::startsWith(className, templateName)) |
323 |
-+ if (clazy::startsWith(static_cast<std::string>(className), static_cast<std::string>(templateName))) |
324 |
- return true; |
325 |
- } |
326 |
- |
327 |
-diff --git a/src/checks/level1/detaching-temporary.cpp b/src/checks/level1/detaching-temporary.cpp |
328 |
-index fedfc81..60c7553 100644 |
329 |
---- a/src/checks/level1/detaching-temporary.cpp |
330 |
-+++ b/src/checks/level1/detaching-temporary.cpp |
331 |
-@@ -140,7 +140,7 @@ void DetachingTemporary::VisitStmt(clang::Stmt *stm) |
332 |
- StringRef className = clazy::name(classDecl); |
333 |
- |
334 |
- const std::unordered_map<string, std::vector<StringRef>> &methodsByType = clazy::detachingMethods(); |
335 |
-- auto it = methodsByType.find(className); |
336 |
-+ auto it = methodsByType.find(static_cast<std::string>(className)); |
337 |
- auto it2 = m_writeMethodsByType.find(className); |
338 |
- |
339 |
- std::vector<StringRef> allowedFunctions; |
340 |
-diff --git a/src/checks/level1/non-pod-global-static.cpp b/src/checks/level1/non-pod-global-static.cpp |
341 |
-index 5879bff..433b5c5 100644 |
342 |
---- a/src/checks/level1/non-pod-global-static.cpp |
343 |
-+++ b/src/checks/level1/non-pod-global-static.cpp |
344 |
-@@ -74,7 +74,7 @@ void NonPodGlobalStatic::VisitStmt(clang::Stmt *stm) |
345 |
- const SourceLocation declStart = clazy::getLocStart(varDecl); |
346 |
- |
347 |
- if (declStart.isMacroID()) { |
348 |
-- auto macroName = Lexer::getImmediateMacroName(declStart, sm(), lo()); |
349 |
-+ auto macroName = static_cast<std::string>(Lexer::getImmediateMacroName(declStart, sm(), lo())); |
350 |
- if (clazy::startsWithAny(macroName, { "Q_IMPORT_PLUGIN", "Q_CONSTRUCTOR_FUNCTION", "Q_DESTRUCTOR_FUNCTION"})) // Don't warn on these |
351 |
- return; |
352 |
- } |
353 |
-diff --git a/src/checks/level1/qproperty-without-notify.cpp b/src/checks/level1/qproperty-without-notify.cpp |
354 |
-index e1d6db4..3af9fee 100644 |
355 |
---- a/src/checks/level1/qproperty-without-notify.cpp |
356 |
-+++ b/src/checks/level1/qproperty-without-notify.cpp |
357 |
-@@ -69,7 +69,7 @@ void QPropertyWithoutNotify::VisitMacroExpands(const clang::Token &MacroNameTok, |
358 |
- return; |
359 |
- CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
360 |
- |
361 |
-- string text = Lexer::getSourceText(crange, sm(), lo()); |
362 |
-+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); |
363 |
- if (text.back() == ')') |
364 |
- text.pop_back(); |
365 |
- |
366 |
-diff --git a/src/checks/level2/missing-typeinfo.cpp b/src/checks/level2/missing-typeinfo.cpp |
367 |
-index 98df2cd..03b44e0 100644 |
368 |
---- a/src/checks/level2/missing-typeinfo.cpp |
369 |
-+++ b/src/checks/level2/missing-typeinfo.cpp |
370 |
-@@ -74,7 +74,7 @@ void MissingTypeInfo::VisitDecl(clang::Decl *decl) |
371 |
- if (sm().isInSystemHeader(clazy::getLocStart(record))) |
372 |
- return; |
373 |
- |
374 |
-- std::string typeName = clazy::name(record); |
375 |
-+ std::string typeName = static_cast<std::string>(clazy::name(record)); |
376 |
- if (typeName == "QPair") // QPair doesn't use Q_DECLARE_TYPEINFO, but rather a explicit QTypeInfo. |
377 |
- return; |
378 |
- |
379 |
-diff --git a/src/checks/level2/old-style-connect.cpp b/src/checks/level2/old-style-connect.cpp |
380 |
-index 0fe68c1..396cb70 100644 |
381 |
---- a/src/checks/level2/old-style-connect.cpp |
382 |
-+++ b/src/checks/level2/old-style-connect.cpp |
383 |
-@@ -274,7 +274,7 @@ void OldStyleConnect::VisitMacroExpands(const Token ¯oNameTok, const SourceR |
384 |
- return; |
385 |
- |
386 |
- auto charRange = Lexer::getAsCharRange(range, sm(), lo()); |
387 |
-- const string text = Lexer::getSourceText(charRange, sm(), lo()); |
388 |
-+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo())); |
389 |
- |
390 |
- static regex rx(R"(Q_PRIVATE_SLOT\s*\((.*)\s*,\s*.*\s+(.*)\(.*)"); |
391 |
- smatch match; |
392 |
-@@ -293,7 +293,7 @@ string OldStyleConnect::signalOrSlotNameFromMacro(SourceLocation macroLoc) |
393 |
- CharSourceRange expansionRange = clazy::getImmediateExpansionRange(macroLoc, sm()); |
394 |
- SourceRange range = SourceRange(expansionRange.getBegin(), expansionRange.getEnd()); |
395 |
- auto charRange = Lexer::getAsCharRange(range, sm(), lo()); |
396 |
-- const string text = Lexer::getSourceText(charRange, sm(), lo()); |
397 |
-+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo())); |
398 |
- |
399 |
- static regex rx(R"(\s*(SIGNAL|SLOT)\s*\(\s*(.+)\s*\(.*)"); |
400 |
- |
401 |
-@@ -315,7 +315,7 @@ bool OldStyleConnect::isSignalOrSlot(SourceLocation loc, string ¯oName) cons |
402 |
- if (!loc.isMacroID() || loc.isInvalid()) |
403 |
- return false; |
404 |
- |
405 |
-- macroName = Lexer::getImmediateMacroName(loc, sm(), lo()); |
406 |
-+ macroName = static_cast<std::string>(Lexer::getImmediateMacroName(loc, sm(), lo())); |
407 |
- return macroName == "SIGNAL" || macroName == "SLOT"; |
408 |
- } |
409 |
- |
410 |
-diff --git a/src/checks/level2/rule-of-three.cpp b/src/checks/level2/rule-of-three.cpp |
411 |
-index 8db55d5..7583fcc 100644 |
412 |
---- a/src/checks/level2/rule-of-three.cpp |
413 |
-+++ b/src/checks/level2/rule-of-three.cpp |
414 |
-@@ -140,7 +140,7 @@ void RuleOfThree::VisitDecl(clang::Decl *decl) |
415 |
- |
416 |
- const string className = record->getNameAsString(); |
417 |
- const string classQualifiedName = record->getQualifiedNameAsString(); |
418 |
-- const string filename = sm().getFilename(recordStart); |
419 |
-+ const string filename = static_cast<std::string>(sm().getFilename(recordStart)); |
420 |
- if (clazy::endsWith(className, "Private") && clazy::endsWithAny(filename, { ".cpp", ".cxx", "_p.h" })) |
421 |
- return; // Lots of RAII classes fall into this category. And even Private (d-pointer) classes, warning in that case would just be noise |
422 |
- |
423 |
-diff --git a/src/checks/manuallevel/ifndef-define-typo.cpp b/src/checks/manuallevel/ifndef-define-typo.cpp |
424 |
-index edb6cdf..e9c50a4 100644 |
425 |
---- a/src/checks/manuallevel/ifndef-define-typo.cpp |
426 |
-+++ b/src/checks/manuallevel/ifndef-define-typo.cpp |
427 |
-@@ -44,7 +44,7 @@ void IfndefDefineTypo::VisitMacroDefined(const Token ¯oNameTok) |
428 |
- { |
429 |
- if (!m_lastIfndef.empty()) { |
430 |
- if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { |
431 |
-- maybeWarn(ii->getName(), macroNameTok.getLocation()); |
432 |
-+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation()); |
433 |
- } |
434 |
- } |
435 |
- } |
436 |
-@@ -53,7 +53,7 @@ void IfndefDefineTypo::VisitDefined(const Token ¯oNameTok, const SourceRange |
437 |
- { |
438 |
- if (!m_lastIfndef.empty()) { |
439 |
- if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { |
440 |
-- maybeWarn(ii->getName(), macroNameTok.getLocation()); |
441 |
-+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation()); |
442 |
- } |
443 |
- } |
444 |
- } |
445 |
-@@ -66,7 +66,7 @@ void IfndefDefineTypo::VisitIfdef(SourceLocation, const Token &) |
446 |
- void IfndefDefineTypo::VisitIfndef(SourceLocation, const Token ¯oNameTok) |
447 |
- { |
448 |
- if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) |
449 |
-- m_lastIfndef = ii->getName(); |
450 |
-+ m_lastIfndef = static_cast<std::string>(ii->getName()); |
451 |
- } |
452 |
- |
453 |
- void IfndefDefineTypo::VisitIf(SourceLocation, SourceRange, PPCallbacks::ConditionValueKind) |
454 |
-diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp |
455 |
-index f91159c..952d9f1 100644 |
456 |
---- a/src/checks/manuallevel/qproperty-type-mismatch.cpp |
457 |
-+++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp |
458 |
-@@ -237,7 +237,7 @@ void QPropertyTypeMismatch::VisitMacroExpands(const clang::Token &MacroNameTok, |
459 |
- |
460 |
- CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
461 |
- |
462 |
-- string text = Lexer::getSourceText(crange, sm(), lo()); |
463 |
-+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo())); |
464 |
- if (!text.empty() && text.back() == ')') |
465 |
- text.pop_back(); |
466 |
- |
467 |
-diff --git a/src/checks/manuallevel/qrequiredresult-candidates.cpp b/src/checks/manuallevel/qrequiredresult-candidates.cpp |
468 |
-index 912dbaa..6375bd7 100644 |
469 |
---- a/src/checks/manuallevel/qrequiredresult-candidates.cpp |
470 |
-+++ b/src/checks/manuallevel/qrequiredresult-candidates.cpp |
471 |
-@@ -65,7 +65,7 @@ void QRequiredResultCandidates::VisitDecl(clang::Decl *decl) |
472 |
- |
473 |
- |
474 |
- if (returnClass == classDecl) { |
475 |
-- const std::string methodName = clazy::name(method); |
476 |
-+ const std::string methodName = static_cast<std::string>(clazy::name(method)); |
477 |
- if (methodName.empty()) // fixes assert |
478 |
- return; |
479 |
- |
480 |
-diff --git a/src/checks/manuallevel/qt-keywords.cpp b/src/checks/manuallevel/qt-keywords.cpp |
481 |
-index e792e95..b60752c 100644 |
482 |
---- a/src/checks/manuallevel/qt-keywords.cpp |
483 |
-+++ b/src/checks/manuallevel/qt-keywords.cpp |
484 |
-@@ -59,12 +59,12 @@ void QtKeywords::VisitMacroExpands(const Token ¯oNameTok, const SourceRange |
485 |
- } |
486 |
- |
487 |
- static const vector<StringRef> keywords = { "foreach", "signals", "slots", "emit" }; |
488 |
-- std::string name = ii->getName(); |
489 |
-+ std::string name = static_cast<std::string>(ii->getName()); |
490 |
- if (!clazy::contains(keywords, name)) |
491 |
- return; |
492 |
- |
493 |
- // Make sure the macro is Qt's. It must be defined in Qt's headers, not 3rdparty |
494 |
-- std::string qtheader = sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc())); |
495 |
-+ std::string qtheader = static_cast<std::string>(sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc()))); |
496 |
- if (!clazy::endsWith(qtheader, "qglobal.h") && !clazy::endsWith(qtheader, "qobjectdefs.h")) |
497 |
- return; |
498 |
- |
499 |
-diff --git a/src/checks/manuallevel/reserve-candidates.cpp b/src/checks/manuallevel/reserve-candidates.cpp |
500 |
-index 389cac5..92e4491 100644 |
501 |
---- a/src/checks/manuallevel/reserve-candidates.cpp |
502 |
-+++ b/src/checks/manuallevel/reserve-candidates.cpp |
503 |
-@@ -78,7 +78,8 @@ static bool isCandidateMethod(CXXMethodDecl *methodDecl) |
504 |
- if (!classDecl) |
505 |
- return false; |
506 |
- |
507 |
-- if (!clazy::equalsAny(clazy::name(methodDecl), { "append", "push_back", "push", "operator<<", "operator+=" })) |
508 |
-+ if (!clazy::equalsAny(static_cast<std::string>(clazy::name(methodDecl)), |
509 |
-+ { "append", "push_back", "push", "operator<<", "operator+=" })) |
510 |
- return false; |
511 |
- |
512 |
- if (!clazy::isAReserveClass(classDecl)) |
513 |
--- |
514 |
-GitLab |
515 |
- |
516 |
|
517 |
diff --git a/dev-util/clazy/files/clazy-1.7-llvm11-2.patch b/dev-util/clazy/files/clazy-1.7-llvm11-2.patch |
518 |
deleted file mode 100644 |
519 |
index 4556f257bf3..00000000000 |
520 |
--- a/dev-util/clazy/files/clazy-1.7-llvm11-2.patch |
521 |
+++ /dev/null |
522 |
@@ -1,28 +0,0 @@ |
523 |
-From 25aa102cc49def9573ffbed88155589cd60a2e8f Mon Sep 17 00:00:00 2001 |
524 |
-From: Egor Gabov <egor.gabov@××××××××××.ru> |
525 |
-Date: Fri, 5 Jun 2020 16:52:53 +0300 |
526 |
-Subject: [PATCH] updated for compatibility with LLVM 10 (clazy-standalone) |
527 |
- |
528 |
-In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. |
529 |
-In this commit all implicit conversion from llvm::StringRef to |
530 |
-std::string are changed by explicit. |
531 |
---- |
532 |
- src/checks/manuallevel/jnisignatures.cpp | 2 +- |
533 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
534 |
- |
535 |
-diff --git a/src/checks/manuallevel/jnisignatures.cpp b/src/checks/manuallevel/jnisignatures.cpp |
536 |
-index 81e61d4..5d4fe20 100644 |
537 |
---- a/src/checks/manuallevel/jnisignatures.cpp |
538 |
-+++ b/src/checks/manuallevel/jnisignatures.cpp |
539 |
-@@ -103,7 +103,7 @@ void JniSignatures::checkFunctionCall(Stmt *stm) |
540 |
- return; |
541 |
- } |
542 |
- |
543 |
-- const std::string name = clazy::name(funDecl); |
544 |
-+ const std::string name = static_cast<std::string>(clazy::name(funDecl)); |
545 |
- |
546 |
- if (name == "callObjectMethod" || name == "callMethod") { |
547 |
- checkArgAt(callExpr, 0, methodNameRegex, "Invalid method name"); |
548 |
--- |
549 |
-GitLab |
550 |
- |