As we don't want to run the application, we should check how it was
built in order to know the word width.
Change-Id: I3bcd86a4653a049d660a9f23f8faf823f3ed52a0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
For some reason, clang 3.8.0 on Windows does not enable exceptions anymore,
which leads to parse errors in MSVC headers (reported upstream [1]).
With this change, we can finally parse main/mainwindow.cpp of a Qt Widgets
Application for a MSVC2015 Kit and libclang 3.8.0 without any error.
[1] https://llvm.org/bugs/show_bug.cgi?id=27324
Change-Id: I532ad4852a06318baf083d363378bc577b3c4309
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This applies the following change for the clang code model, too.
commit d13d179524
Clang Static Analyzer: Workaround analyzing MSVC2015 projects with clang 3.8.0 II
Change-Id: Ia229d7e8b24c2e1c0a83d9a53c623ea1f79c4a06
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Infer the version from the _MSC_FULL_VER macro, so it cannot get out of sync
with that.
Adapt the analyzer to do the same.
Based on
commit daf08d8702
Clang Static Analyzer: Workaround analyzing MSVC2015 projects with clang 3.8.0
Change-Id: I9d34abdbe2c83fe271eadd8d051caad43aca6772
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
We will need the id in a follow-up change to match the corresponding project
part.
Change-Id: Id7686503f96fb238c9fa9857e7fde5cf94b0bcc7
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
As for the analyzer, this makes us independent of the default triple and will
most likely reduce the maintenance - e.g. the target implies certain internal
command line arguments, we will profit from added ones.
This fixes parsing of mingw headers with the clang code model.
Change-Id: I722b981125a80fac5f62a7af40a83ecdd7bbf811
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
clang 3.8.0 predefines language feature macros (__cpp_*), but clang 3.6.2 and
MSVC2015 do not. Plus, there is a mismatch between Q_COMPILER_CONSTEXPR and
Q_DECL_CONSTEXPR if those language feature macros are defined. The latter is
fixed for Qt 5.8.0 [1]. Together, this leads to the following error:
In file included from D:\work\testprojects\qt-widgets-app\mainwindow.cpp:1:
In file included from D:/work/testprojects/qt-widgets-app/mainwindow.h:4:
In file included from D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include/QtWidgets\QMainWindow:1:
In file included from D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include/QtWidgets/qmainwindow.h:37:
In file included from D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtWidgets/qwidget.h:41:
In file included from D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtGui/qpalette.h:38:
In file included from D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtGui/qcolor.h:40:
D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtGui/qrgba64.h(72,13) : error: constexpr function never produces a constant expression [-Winvalid-constexpr]
QRgba64 fromRgba64(quint64 c)
^
D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtGui/qrgba64.h(77,17) : note: non-constexpr constructor 'QRgba64' cannot be used in a constant expression
QRgba64 rgba64;
^
D:/usr/qt-5.6.0-msvc2015_32/5.6/msvc2015/include\QtGui/qrgba64.h(42,7) : note: declared here
class QRgba64 {
^
1 error generated.
[1] https://codereview.qt-project.org/#/c/149027
Task-number: QTCREATORBUG-15940
Change-Id: I54e22d15981e7ff83fff8184db616641429e2178
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Clang 3.8.0 does not detect the MSVC2015 build environment properly. Running
$ clang.exe -v -fsyntax-only empty.cpp
shows
-fms-compatibility-version=18 (=MSVC2013)
instead of the expected
-fms-compatibility-version=19 (=MSVC2015)
Workaround this by setting the version explicitly for MSVC2015 toolchains. This
fixes parse issues with char16_t and friends.
We do not explicitly check for the clang version since clang 3.6.2 is broken
for MSVC2015 anyway and we do not know whether clang 3.8.1 will come with a
fix.
Task-number: QTCREATORBUG-15940
Change-Id: Ibe61af25f6d74f134cc9f9681db5a4d19ac67417
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
The default target of clang.exe might be unfavorable since it depends on
e.g. the tool chain used to build clang.exe:
default target
clang build with msvc: i686-pc-windows-msvc
clang build with mingw: i686-pc-windows-gnu
The correct target is important since it not only has implications on
the built-in macros and include paths, but also on parsing options. For
example, the msvc target silently adds the following parsing options
-fms-extensions
-fms-compatibility
-fms-compatibility-version=17.00
-fdelayed-template-parsing
...as can be seen by the output of
$ clang.exe -### empty.cpp
Change-Id: Icd8aaf11016e59f37025cbf1c97da81511ff249b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
If a run finished Application Output pane still handled the respective tab
as running.
Change-Id: I0bc7e1f61b68e700a875538bdd1c63c18bec8df3
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.
Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.
Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.
Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.
Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.
Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This is the first mechanical step to execute on the 'shared pool of
debugger/analyzer views' idea.
Future steps would be providing infrastructure for the view pool,
making all analyzer/debugger views use the pool and then re-extract
a sensible base for a 'analyzer-and/or-debugger' tool plugin interface.
Change-Id: I1bb392e6dd3084fc56937956bee1d6fd9530335d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
...at the end.
For cases where msvc parses/compiles fine but clang not, the issues pane was
not always shown in the end.
Task-number: QCE-62
Change-Id: Iab979b664e37dc7b35c2418566a7af74a4907829
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Remove unneeded function arguments, Qt 5 connects etc.
Change-Id: I95faf80e7b5ccc574e2457b841f7913bc2aa05d3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
When moving the files within the merge commit, git for some reason does not recognize the files as moved, so we move them before actually doing the merge.
Change-Id: I5a8ba6b027734c8ff38a7f2a5dc51a30a0fc17a8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>