From fd47b37298827c399bc1e40774aeb0372c1d5735 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 17 Jun 2022 15:40:30 +0200 Subject: [PATCH] ProjectExplorer: Do not remove "-Xclang" from command line ... when retrieving built-in header paths. Fixes: QTCREATORBUG-22136 Change-Id: I2e403392b14b4cdea89fc33eb503fff303618d71 Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/projectexplorer/gcctoolchain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 8a3ffe5b53b..fa62339215d 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -442,6 +442,8 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro } else if (a == "-arch") { if (++i < allFlags.length() && !filtered.contains(a)) filtered << a << allFlags.at(i); + } else if (a == "-Xclang") { + filtered << a; } else if ((considerSysroot && (a == "--sysroot" || a == "-isysroot")) || a == "-D" || a == "-U" || a == "-gcc-toolchain" || a == "-target" || a == "-mllvm" || a == "-isystem") {