From efe7c56e625f82afb6e5e2247c20d1bb796897e4 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Fri, 24 Aug 2018 11:37:28 +0200 Subject: 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 --- src/plugins/cpptools/compileroptionsbuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp') diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index d63aaa0951..25b64f58e1 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -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() -- cgit v1.2.1