summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/compileroptionsbuilder.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-07-07 10:51:41 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-07-07 14:41:36 +0000
commit08f0d37c174ad8f41c51fb9b89d6b364277624c4 (patch)
tree5cf34c5cd543d8bfe37b2561c55e6692d5205fe1 /src/plugins/cpptools/compileroptionsbuilder.cpp
parent73f0ac37886567f0f36be0f4ff415e3cef0cec79 (diff)
downloadqt-creator-08f0d37c174ad8f41c51fb9b89d6b364277624c4.tar.gz
ClangStaticAnalyzer: Undefine clang version macros for MSVC Kits
This fixes parsing of Qt 5.7.0 headers with a MSVC Kit. Re-produce with: 1) Open qt-essential-includes.pro or the *.qbs and configure it with a Qt 5.7.0 MSVC2013 Kit. 2) Run the analyzer. Errors during analyzing occur in qtypetraits.h [1] because * Q_COMPILER_UNICODE_STRINGS is defined in qcompilerdetection.h because... * Q_CC_CLANG is defined because... * __clang* is defined. Undefine the __clang* macros so the "right" compiler will be detected. [1] In file included from D:\dev\creator\creator-4.1\src\plugins\clangstaticanalyzer\unit-tests\qt-essential-includes\main.cpp:1: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include/QtCore\QtCore:4: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include/QtCore/qabstractanimation.h:43: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qobject.h:46: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qobjectdefs.h:48: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qnamespace.h:43: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qglobal.h:1139: In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypeinfo.h:41: D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypetraits.h(251,19) : error: redefinition of 'QtPrivate::is_integral<unsigned short>' template<> struct is_integral<char16_t> : true_type { }; ^~~~~~~~~~~~~~~~~~~~~ D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypetraits.h(235,19) : note: previous definition is here template<> struct is_integral<unsigned short> : true_type { }; Change-Id: I10da2a1daa6f5ea2828f7ea4bcf594050a585b61 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
0 files changed, 0 insertions, 0 deletions