Commit 775661fa authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Ignore clang include directories from the toolchain

Change-Id: I23a91f1511fad81de0abdd8c8d47dc23f0e0ae43
Task-number: QTCREATORBUG-14856
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
parent bde090ae
......@@ -44,6 +44,7 @@
#include <QDir>
#include <QFile>
#include <QLoggingCategory>
#include <QRegExp>
#include <QSet>
#include <QString>
......@@ -147,7 +148,17 @@ private:
bool excludeHeaderPath(const QString &path) const override
{
return path.contains(QLatin1String("lib/gcc/i686-apple-darwin"));
if (path.contains(QLatin1String("lib/gcc/i686-apple-darwin")))
return true;
// We already provide a custom clang include path matching the used libclang version,
// so better ignore the clang include paths from the system as this might lead to an
// unfavorable order with regard to include_next.
static QRegExp clangIncludeDir(QLatin1String(".*/lib/clang/\\d+\\.\\d+\\.\\d+/include"));
if (clangIncludeDir.exactMatch(path))
return true;
return false;
}
void addResourceDirOptions()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment