forked from qt-creator/qt-creator
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:
@@ -620,8 +620,10 @@ void CompilerOptionsBuilder::addWrappedQtHeadersIncludePath(QStringList &list)
|
||||
void CompilerOptionsBuilder::addGlobalUndef()
|
||||
{
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addProjectConfigFileInclude()
|
||||
|
Reference in New Issue
Block a user