Merge remote-tracking branch 'origin/4.5'

Conflicts:
	src/plugins/cpptools/clangcompileroptionsbuilder.cpp
	src/plugins/cpptools/clangcompileroptionsbuilder.h
	src/plugins/cpptools/compileroptionsbuilder.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.h
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.h
	src/shared/qbs

Change-Id: I364ababc5d41046d17e999096c4a7187c4e4e010
This commit is contained in:
Eike Ziller
2018-01-09 13:07:57 +01:00
19 changed files with 85 additions and 110 deletions

View File

@@ -473,18 +473,13 @@ bool CompilerOptionsBuilder::excludeDefineDirective(const ProjectExplorer::Macro
bool CompilerOptionsBuilder::excludeHeaderPath(const QString &headerPath) const
{
// A clang tool chain might have another version and passing in the
// intrinsics path from that version will lead to errors (unknown
// intrinsics, unfavorable order with regard to include_next).
if (m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) {
if (headerPath.contains("lib/gcc/i686-apple-darwin"))
return true;
static QRegularExpression clangIncludeDir(
QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z"));
return clangIncludeDir.match(headerPath).hasMatch();
}
return false;
// Always exclude clang system includes (including intrinsics) which do not come with libclang
// that Qt Creator uses for code model.
// For example GCC on macOS uses system clang include path which makes clang code model
// include incorrect system headers.
static QRegularExpression clangIncludeDir(
QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z"));
return clangIncludeDir.match(headerPath).hasMatch();
}
void CompilerOptionsBuilder::addPredefinedHeaderPathsOptions()