forked from qt-creator/qt-creator
Clang: Fix include paths order
C++ include paths should come before Clang include
folder. Therefore parse all options for include/c++/v1,
include/c++/{version}, include/g++ and /usr/local/include.
Task-number: QTCREATORBUG-20231
Change-Id: I22c41f07d241e1e564069bb192d4fe637ff05e87
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -191,7 +191,10 @@ static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos)
|
||||
AnalyzeUnits unitsToAnalyze;
|
||||
const CompilerOptionsBuilder::PchUsage pchUsage = CppTools::getPchUsage();
|
||||
for (const FileInfo &fileInfo : fileInfos) {
|
||||
CompilerOptionsBuilder optionsBuilder(*fileInfo.projectPart);
|
||||
CompilerOptionsBuilder optionsBuilder(*fileInfo.projectPart,
|
||||
CppTools::UseSystemHeader::No,
|
||||
QString(CLANG_VERSION),
|
||||
QString(CLANG_RESOURCE_DIR));
|
||||
QStringList arguments = extraClangToolsPrependOptions();
|
||||
arguments.append(optionsBuilder.build(fileInfo.kind, pchUsage));
|
||||
arguments.append(extraClangToolsAppendOptions());
|
||||
|
||||
Reference in New Issue
Block a user