aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-08 08:51:31 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-01-11 08:35:57 +0000
commited37a34372cb46735789c5af53252afb0e5556e5 (patch)
treea0f5d9e8dff331bdbd77145ff5e875bf94bf4984 /sources/shiboken6
parent5ea0fde59719866f6eb86a4fe4e33d7f389802c5 (diff)
shiboken2: Add diagnostic output to clang include search
Change-Id: I6c1063cf94ec790ad34d8edaee8d524b8fb28ed8 Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit ab616250020a1c7a16b058f1041618758a6406ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
index 4f3a927dc..02a66b40e 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
@@ -248,6 +248,7 @@ static QString findClangLibDir()
const QString path = QFile::decodeName(qgetenv(envVar)) + QLatin1String("/lib");
if (QFileInfo::exists(path))
return path;
+ qWarning("%s: %s as pointed to by %s does not exist.", __FUNCTION__, qPrintable(path), envVar);
}
}
const QString llvmConfig =
@@ -258,6 +259,7 @@ static QString findClangLibDir()
const QString path = QFile::decodeName(stdOut.trimmed());
if (QFileInfo::exists(path))
return path;
+ qWarning("%s: %s as returned by llvm-config does not exist.", __FUNCTION__, qPrintable(path));
}
}
return QString();
@@ -270,9 +272,12 @@ static QString findClangBuiltInIncludesDir()
if (!clangPathLibDir.isEmpty()) {
QString candidate;
QVersionNumber lastVersionNumber(1, 0, 0);
- QDir clangDir(clangPathLibDir + QLatin1String("/clang"));
+ const QString clangDirName = clangPathLibDir + QLatin1String("/clang");
+ QDir clangDir(clangDirName);
const QFileInfoList versionDirs =
clangDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
+ if (versionDirs.isEmpty())
+ qWarning("%s: No subdirectories found in %s.", __FUNCTION__, qPrintable(clangDirName));
for (const QFileInfo &fi : versionDirs) {
const QString fileName = fi.fileName();
if (fileName.at(0).isDigit()) {