forked from qt-creator/qt-creator
ProjectExplorer: Fix handling of -Xclang when filtering compiler flags
Amends fd47b37298
.
Change-Id: Idb78ebb88291d26498a5bfd7301fdc721fc6a6f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -483,6 +483,7 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|
||||
filtered << a << allFlags.at(i);
|
||||
} else if (a == "-Xclang") {
|
||||
filtered << a;
|
||||
continue;
|
||||
} else if ((considerSysroot && (a == "--sysroot" || a == "-isysroot"))
|
||||
|| a == "-D" || a == "-U"
|
||||
|| a == "-gcc-toolchain" || a == "-target" || a == "-mllvm" || a == "-isystem") {
|
||||
@@ -499,6 +500,8 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|
||||
|| a == "-nostdinc" || a == "-nostdinc++") {
|
||||
filtered << a;
|
||||
}
|
||||
if (!filtered.isEmpty() && filtered.last() == "-Xclang")
|
||||
filtered.removeLast();
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
|
Reference in New Issue
Block a user