forked from qt-creator/qt-creator
ClangTools: Fix clang-tidy documentationUrl for version 17.0.0
Change-Id: I6fd71fd5a390316a5c523865b6b1e866d8450e2e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -307,12 +307,25 @@ QStringList extraClangToolsAppendOptions()
|
|||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QVersionNumber fixupVersion(const VersionAndSuffix &versionAndSuffix)
|
||||||
|
{
|
||||||
|
// llvm.org only does document releases for the first released version
|
||||||
|
QVersionNumber version = QVersionNumber(versionAndSuffix.first.majorVersion(), 0, 0);
|
||||||
|
|
||||||
|
if (version == QVersionNumber(0))
|
||||||
|
version = QVersionNumber(12);
|
||||||
|
|
||||||
|
// Version 17.0.0 was never released due to a git issue
|
||||||
|
if (version == QVersionNumber(17))
|
||||||
|
version = QVersionNumber(17, 0, 1);
|
||||||
|
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
QString clangTidyDocUrl(const QString &check)
|
QString clangTidyDocUrl(const QString &check)
|
||||||
{
|
{
|
||||||
VersionAndSuffix version = ClangToolsSettings::clangTidyVersion();
|
VersionAndSuffix version = ClangToolsSettings::clangTidyVersion();
|
||||||
version.first = QVersionNumber(version.first.majorVersion(), 0, 0);
|
version.first = fixupVersion(version);
|
||||||
if (version.first == QVersionNumber(0))
|
|
||||||
version.first = QVersionNumber(12);
|
|
||||||
static const char versionedUrlPrefix[]
|
static const char versionedUrlPrefix[]
|
||||||
= "https://releases.llvm.org/%1/tools/clang/tools/extra/docs/";
|
= "https://releases.llvm.org/%1/tools/clang/tools/extra/docs/";
|
||||||
static const char unversionedUrlPrefix[] = "https://clang.llvm.org/extra/";
|
static const char unversionedUrlPrefix[] = "https://clang.llvm.org/extra/";
|
||||||
|
|||||||
Reference in New Issue
Block a user