summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/compileroptionsbuilder.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-07-07 11:45:46 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-07-07 14:41:41 +0000
commit98b66534d5ea028eb1a371bace92ed2bee43caaf (patch)
treec8787187f4b9de2d3619bcb79e484d488cac8674 /src/plugins/cpptools/compileroptionsbuilder.h
parent08f0d37c174ad8f41c51fb9b89d6b364277624c4 (diff)
downloadqt-creator-98b66534d5ea028eb1a371bace92ed2bee43caaf.tar.gz
ClangStaticAnalyzer: Stop passing on toolchain defines for qmake/msvc case
Re-produce with: 1) Open qt-essential-includes.pro and configure it with a Qt 5.7.0 MSVC2013 64 Bit Kit. 2) Run the analyzer. Errors during analyzing occur in winnt.h [1]. This is somehow related to /D__int32=long that we pass on. Removing it helps. It looks like there is no reason anymore to pass on the toolchain defines with clang-3.8 at all. Our unit test projects can be parsed by the analyzer without them. Tested with the following kits: Qt 5.6.0 (mingw39_32) Qt 5.6.0 (msvc2013) Qt 5.6.0 (msvc2013_64) Qt 5.6.0 (msvc2015) Qt 5.6.0 (msvc2015_64) Qt 5.7.0 (mingw53_32) Qt 5.7.0 (msvc2013) Qt 5.7.0 (msvc2013_64) Qt 5.7.0 (msvc2015) Qt 5.7.0 (msvc2015_64) [1] In file included from D:\dev\creator\creator-4.1\src\plugins\clangstaticanalyzer\unit-tests\qt-essential-includes\main.cpp:2: In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include/QtGui\QtGui:32: In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include/QtGui/qopenglcontext.h:60: In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include\QtGui/qopengl.h:49: In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include\QtCore/qt_windows.h:61: In file included from C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h:164: In file included from C:\Program Files (x86)\Windows Kits\8.1\include\shared\windef.h:24: In file included from C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h:182: C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(3077,1) : error: functions that differ only in their return type cannot be overloaded __getcallerseflags ( ^ D:\dev\llvm\3.8\changingLibClang_install\bin\..\lib\clang\3.8.1\include\intrin.h(68,14) : note: previous declaration is here unsigned int __getcallerseflags(void); ~~~~~~~~ ^ 1 error generated. Change-Id: I2de8d0393a575f88dd59dfa71fbfb11f2debc158 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.h')
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.h b/src/plugins/cpptools/compileroptionsbuilder.h
index 4ef43b53da..739db8b5f6 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.h
+++ b/src/plugins/cpptools/compileroptionsbuilder.h
@@ -48,6 +48,7 @@ public:
virtual void enableExceptions();
void addHeaderPathOptions(bool addAsNativePath = false);
void addToolchainAndProjectDefines();
+ void addDefines(const QByteArray &defineDirectives);
virtual void addLanguageOption(ProjectFile::Kind fileKind);
virtual void addOptionsForLanguage(bool checkForBorlandExtensions = true);