The known cases provide enough flags not to require
toolchain defines.
Change-Id: Ia7e08a90eca6ea9474db40683ac1e63236f8643d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Clang has MSVC compatible mode which works with MSVC style command line
flags.
When possible use the same flags (-I, -D, -U, etc.) and in other cases
either replace by MSVC analog (for example use /FI instead of -include)
or pass the argument with '/clang:' prefix (requires
https://reviews.llvm.org/D53457).
Change-Id: I95f33bed5dc8d9493895ed8d4359cdd70fc774b8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Rely on clang to do the "right thing" with them.
Change-Id: I44adf2cd5c61549896da3fc9b7c35c2fb0142060
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We want to use them in the backend processes too so it's nice to share them
in Utils. A concrete size was added too because they should be serialized.
Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...for the code model.
If a diagnostic configuration with potentially expensive checks is
selected in Options/Preferences > C++ > Code Model, show a warning below
the combo box.
Change-Id: I52c5c2e229fd50c0fd82f70154fb5b727726ba31
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The fix for MSVC2013 undefined clang macros to fix some
internal Qt stuff failing in Qt 5.7.
Now we know exactly which MSVC version is used and can
ignore this fix for newer versions.
Fixes: QTCREATORBUG-16439
Fixes: QTCREATORBUG-21685
Change-Id: Ie2844428c39d72d212198ee2dd6841420a464974
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Mostly for clarity, but as a side effect, this reduces the size of
ProjectPart from 168 to 160 bytes.
Change-Id: Iee23c97d581a5233554c05ed2fd7ea07e2e9b45a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Centralize gathering the kit, toolchains and qt version.
Change-Id: I6bd586ac7925e2ee556fd119f1dab096cd500e41
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
According to commit e2e3be09e3 this was
needed for clang 3.8.0 on Windows.
Change-Id: I4f2c2bf31449d9613607e57524c7ff6e4577812a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Tracks application state, and signals when it is changed.
Supports forcing blocked state with reference counting.
Change-Id: Ic173d42446b1b08bd4a1e7c1acf38c68644d30b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...for the qmake project manager.
When parsing the project files, remember whether a file was discovered
by the exact or cumulative parse. Only files that were discovered by the
exact parse are considered "active" and thus part of the build
configuration. The others are not offered for selection.
Fixes: QTCREATORBUG-16016
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I7a28b4de15e048975d7f0cd737dd8c11f744315b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use (and therefore test) the method actually used in production code.
Change-Id: I4317517ef8a1779df4d46af3905790012ee98645
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Also remove the signal CppProjectUpdater::projectInfoUpdated() which is
now unused.
Change-Id: I65afe8f96cd8175edaf8ccb6e5067e4f9cd8d99f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
It makes it easier two get different options.
Task-number: QTCREATORBUG-21693
Change-Id: Ibcfa52d8bbbdf971a38fb6102a6b79e037a9cf02
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
After we moved some of the code to HeaderPathFilter we now use it in
CompilerOptionsBuilder.
Task-number: QTCREATORBUG-21693
Change-Id: Iea3569465bbc135d72bd88f9c23026f2ace33aba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
These are files that are included like headers, and not compiled
themselves, so e.g. adding them to a project should not categorize them
as source files.
Fixes: QTCREATORBUG-21736
Change-Id: I7dafba02896d12160de5eed458b99144df0a5f37
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: hjk <hjk@qt.io>
We went the filtering of the header path outside of the compiler options
builder so merge the PCHs.
Task-number: QTCREATORBUG-21693
Change-Id: Ia1126813a5049e39d7c6e7d60bf449aa17012d02
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We are always interested in currentTabSettings().
Fixes: QTCREATORBUG-21280
Change-Id: I5b739b516eb985074c27410113c244787dd8b52d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
C++ includes must always come first, then clang resource
directory and then everything else.
This prevents both c++ standard headers and intrinsics issues.
Change-Id: Ia21bfa2fe99884c9adf58f7ef6beba1bede1724b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
...for clang code model and clang tools use case.
This means that compiler detection code will see clang now instead of
the toolchain that is configured in the kit. While providing the
toolchain macros worked fine for the general case, it always was
problematic for compiler detection code.
By not providing the toolchain macros we are more close to the real
clang compiler invocation. That is, rely on clang to do the right thing.
Allow to go back to old behavior with QTC_CLANG_USE_TOOLCHAIN_MACROS=1
as this will be useful checking differences for debugging.
Fixes: QTCREATORBUG-19543
Change-Id: I23ffd761d83f35ca1a22269c3ef07a2dc62358bd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...for clarity.
No behavior change.
Change-Id: Id0334bc79b97a8ff53b37089e337530c9a01b1d4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
It makes sense to unify the indenter creation by replacing
the CppCodeStylePreferencesFactory instead of removing it.
We are reusing the same options page but with different
kind of settings.
With this change wizards will no more be confused by missing
factory and will create the proper indenter.
Fixes: QTCREATORBUG-21516
Change-Id: I38964d5fa1f2257617c66a1441db723d239a3237
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
No behavior change.
Sometimes we use "SkipX, sometimes "UseX". Unify to "UseX" as this is
more natural to read.
Change-Id: Ib08bdb4cde93ed55fdb9c855566b10a3933cae37
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
No behavior change.
* Remove virtual from methods that are not overridden
* Move constant member functions that do no access any members into
source file as static functions
* Remove QLatin1String where possible
* Make variable names a bit more consistent
* Other minor stuff
Change-Id: I34a582d5a468489e11365507b283e9aee157664f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
It's used while building so let's also do that in Clang Code Model.
Change-Id: I4e5e3ccc71d14c8d44049672e37380af2592390f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Boost recognizes a misconfigured compiler in rtti emulation mode
(-fno-rtti) as our libclang command line is special. Even worse, it does
not seem to stop instantiating templates and allocating memory
afterwards.
For the former to fix, we need to rework our command line (in master).
The latter can be work arounded by defining
BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING with a value for gcc/clang.
See also
https://www.boost.org/doc/libs/1_64_0/doc/html/BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING.html
Task-number: QTCREATORBUG-19543
Change-Id: Iddb5be2d1f1966018e5ab535a8f7475fe7911284
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We can't stop the clangbackend from processing huge files, but at least
our built-in parser.
Fixes: QTCREATORBUG-21590
Change-Id: I506024495ba0632692f2845c6c204360f4c61b33
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
CppEditor tests (the part which works with ClangCodeModel) showed
that it's possible that QTextCursor might get document reset
to the moment we try to call built-in follow symbol. That means
that the editor widget is closed already.
Check for the document to prevent such behavior.
Change-Id: I2463f4688dc6fca7f701fba243ffc6e43a573b33
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Follow up for 8469e317c9. This column number compensation
is not required anymore.
Fixes: QTCREATORBUG-21384
Change-Id: I94da48533520471170200c592129781e5b4b614c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Take into account paths from MinGW and NDK Clang.
Fixes: QTCREATORBUG-21540
Change-Id: I00906c75dc4ddeb92fe5942a0222285d8ce2eb9d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>