Clang: Do not add -undef to ClangCodeModel arguments with clang-cl

Clang-cl behaves similar to MSVC and the parsing is more proper
without -undef specified.

Change-Id: Iee37fca3401000edb3e77e8a99dcb85ae6e70ab3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-08-24 11:37:28 +02:00
parent 21b2c1d04a
commit efe7c56e62

View File

@@ -620,9 +620,11 @@ void CompilerOptionsBuilder::addWrappedQtHeadersIncludePath(QStringList &list)
void CompilerOptionsBuilder::addGlobalUndef() void CompilerOptionsBuilder::addGlobalUndef()
{ {
// In case of MSVC we need builtin clang defines to correctly handle clang includes // In case of MSVC we need builtin clang defines to correctly handle clang includes
if (m_projectPart.toolchainType != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) if (m_projectPart.toolchainType != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
&& m_projectPart.toolchainType != ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID) {
add("-undef"); add("-undef");
} }
}
void CompilerOptionsBuilder::addProjectConfigFileInclude() void CompilerOptionsBuilder::addProjectConfigFileInclude()
{ {