| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/cpptools/compileroptionsbuilder.cpp
Change-Id: I522f91de70aff28692d7c3a050e8d52df0b82a76
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: Iaf5af70136bceed52d19622c01d9d7147e5abeea
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
According to commit e2e3be09e36f89f4db92c443ec9f7fb1dab70624 this was
needed for clang 3.8.0 on Windows.
Change-Id: I4f2c2bf31449d9613607e57524c7ff6e4577812a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I350479c0f79869cccdf0edfd6c89d932d8f3215f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| |
| |
| |
| |
| |
| |
| | |
Amends 97828a96af and ef8de6a384.
Change-Id: I9dd7d6a093657ea6f20ff3b5a4d0c968f8293ad7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
qbs/modules/qtc/qtc.qbs
qtcreator.pri
src/plugins/cpptools/compileroptionsbuilder.cpp
Change-Id: I87f47cecbb924064296a002fd9446a0627acad8e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/cpptools/compileroptionsbuilder.cpp
Change-Id: I743ea39480cc5c7b6febcd2e93713d15a3ae6d9c
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...for clarity.
No behavior change.
Change-Id: Id0334bc79b97a8ff53b37089e337530c9a01b1d4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
compileroptionsbuilder.cpp(196): error C2440: 'initializing': cannot
convert from 'const char *' to 'QString'
Change-Id: Ifa5e50ab927c534a855c2f7871d3dce87092b30a
Reviewed-by: Eike Ziller <eike.ziller@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>
|
| |
| |
| |
| |
| | |
Change-Id: I00656b409135ee1a84a0a372f726fdbc7c20d1e6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Take into account paths from MinGW and NDK Clang.
Fixes: QTCREATORBUG-21540
Change-Id: I00906c75dc4ddeb92fe5942a0222285d8ce2eb9d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
| |
Fixes: QTCREATORBUG-21213
Change-Id: I986ab69bc44ece83a3b56f968cc3b6c3126e2c32
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
| |
Extract headers, defines and fileKind from flags in
order to have complete project parts.
Side-effect: better support for MSVC-specific flags.
Change-Id: Iaa1413c91c96c3cf89ddbe76a7a1f0f46c5289c0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
| |
It was checked that pure C header and source files had proper
language version but not another way around.
Change-Id: I1eaf41f342731bdbe30ee73e81144334d0f15d19
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
| |
This trick is needed only for internal purposes.
Change-Id: Ic10c0898519eed663d14c4b1665a0d6b0d47b4a4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: Iaaaea598d020a44bcdc60a8d06ee28a1f28386bb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
For the indexing we need all tool chain macros. Originally it was a fix
because the C++ version of the project part and __cplusplus could be
different but now they should be the same. They will be now removed in the
compiler options builder.
Change-Id: I7ae8721a29632473e76ecedb411a6c9001e5e199
Task-number: QTCREATORBUG-21265
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
| |
... between CppTools::ProjectPart and ProjectExplorer::ToolChain.
Change-Id: I8b448747e454adbed77547460383b8515462cc81
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.
Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.
While at it, add also support for C17/C18 and the upcoming C++2a.
Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
| |
Bonus: minor compiler options builder issues fixed.
Change-Id: Ie25f8fad6729339de05f2bf9b614ceac873e2634
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only place where Yes is used is the compilation DB, which doesn't
need these defines anyway.
Also add -fPIC for Qt compatibility.
This reduces the compile_commands.json file for Qt Creator from 180M to 33M.
Change-Id: Idd3b363c3a143b1d79f97962c4ff9ee61d7767a4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce compilation database project support.
Pass the arguments list for each file directly to
ClangCodeModel via extraCodeModelFlags therefore
introduce a dependency from the ClangCodeModel plugin.
Change-Id: Iea5760d379de1ea246382dce56de0adf7ab5673d
Task-number: QTCREATORBUG-21115
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
| |
Clang include folder should be a part of built-in includes
and always come after user and system includes.
Change-Id: I22961ea3bbb018f41b49f42c6ff7d22eb591ad01
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
| |
We don't want to have compiler-specific paths there.
Change-Id: If26434ea3760d4f2ca4c25bbcf0340f4ea781072
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
| |
System include are those used with -isystem keyword, built-in
includes on the other hand come from compiler and always
follow in the end of the include list (after system includes).
Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
| |
Some other logic in the options builder is based
on the -I usage and also we don't want to lock any files
with ClangCodeModel.
Change-Id: I4338abed26e91ebb0a561d449328ea0954fe44ea
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is the type used by the HeaderPath class, so reflect that in
the name.
I also considered to rename HeaderPath to IncludePath, but
that name is reflected in a lot of users, which would also need
to be adjusted for consistency. That would blow up the patch size
for little value IMHO.
Change-Id: I51421dbd3ab8b2874dc32fc82dc394c9b93ce5e9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.
ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.
Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
| |
Clang-cl behaves similar to MSVC and the parsing is more proper
without -undef specified.
Change-Id: Iee37fca3401000edb3e77e8a99dcb85ae6e70ab3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
C++ include paths should come before Clang include
folder. Therefore parse all options for include/c++/v1,
include/c++/{version}, include/g++ and /usr/local/include.
Task-number: QTCREATORBUG-20231
Change-Id: I22c41f07d241e1e564069bb192d4fe637ff05e87
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
| |
Cover cases like /usr/lib64/clang/6.0.0/include
Change-Id: I015ea3535637376eeab6f737752ad13d33887190
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
System includes suppress warnings and prevent indexing of unwanted symbols.
Using system includes for all includes outside of the project can be
quite advantageous. The rootProjectDirectory() can be extended to be set
in the project settings. An automatic generation could be possible but
could create an unwanted path which includes files outside of the
perceived project.
Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
| |
Change-Id: Iaabdcfc8d1b3463c3f6e5ce47536f9c52556eac0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
| |
Only libclang has issues with the include directory
search therefore undefining include folders makes sense
only for libclang options builder.
Change-Id: Ie3f62f5f3a89503e6e0ab59e18889e92425c3abc
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
These functions require core plugin so they can't go
to utils library. At the same time to use them in
ProjectExplorer plugin there are not too many choices
where to put them without introducing new dependencies.
Change-Id: I3cccccffaae8ac4bbce924fd809b5423da5dc503
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...as this leads to file locking issues on Windows and pointless
diagnostics we currently ignore when opening files from -isystem include
paths.
The usage of -isystem suppressed warnings from system headers and
resulted in a performance boost. Nowadays we can preserve this
performance optimization by making use of the new
CXTranslationUnit_IgnoreWarningsFromIncludedFiles. This flag helps us
also to suppress diagnostics from clang tidy checks, which reported
diagnostics even for -isystem headers.
Change-Id: I33e1f7169e2ff9f17c811565a5324b9da4740701
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Excluding for __cplusplus macro is not required anymore
because we currently determine C and C++ files and do not
set this macro for C-files.
Does not break QTCREATORBUG-12818.
Change-Id: I40d5afcb9ef426a6469fb5134ec7d46438201d86
Reviewed-by: David Schulz <david.schulz@qt.io>
|