Commit Graph

24 Commits

Author SHA1 Message Date
Nikolai Kosjar
0c38e3aea7 Clang: Clean up CompilerOptionsBuilder
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>
2018-12-03 12:58:31 +00:00
Alessandro Portale
c4b07bf730 ClangTools: Modernize
modernize-use-nullptr
modernize-use-override
modernize-use-equals-default

Change-Id: I14a840c6f2972f57763cdfd4bb4483df1ec261d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-11-08 11:40:57 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Marco Bubke
77b5907c57 Don't remove __cplusplus
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>
2018-10-10 12:25:30 +00:00
Ivan Donchevskii
eeece5b5ad Clang: Skip built-in includes when exporting the compilation database
We don't want to have compiler-specific paths there.

Change-Id: If26434ea3760d4f2ca4c25bbcf0340f4ea781072
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-17 13:13:16 +00:00
Ivan Donchevskii
1b4f5c0670 Clang: Fix include paths order
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>
2018-08-27 11:35:02 +00:00
hjk
263cf4c608 ProjectExplorer: Remove RunWorker::setDisplayName
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.

Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:02:22 +00:00
Ivan Donchevskii
81d5d99db8 ClangTools: Do not spam the warning pane with long messages
The user does not usually need the whole command line.

Task-number: QTCREATORBUG-20707
Change-Id: I30cd395cd85eb0a3dd19b9d5f1b34a1c7a4b95a5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-20 09:50:21 +00:00
Orgad Shaneh
9e27c865f5 Clang: Fix usage of QString args
Change-Id: I49f1a79b9dfd27d896b296d65d375a05879bdc8f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-18 18:04:21 +00:00
Ivan Donchevskii
62e776aa8e Clang: Provide include directory only for libclang
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>
2018-08-08 14:07:13 +00:00
Ivan Donchevskii
344cbb3a1b Clang: Move clang paths helper functions to Core plugin
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>
2018-08-06 12:38:52 +00:00
Robert Loehning
aaec887b15 ClangTools: Remove HTML from translated string
Change-Id: I74ab16ebebd00354a0821853f5a061e97b0c4f8b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-07-31 10:39:45 +00:00
Robert Loehning
0471ea1f94 ClangTools: Use proper argument for toolName
Change-Id: I9f258e97b5ef1bfd06909d2f12b644c145501a54
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-07-25 08:08:48 +00:00
Ivan Donchevskii
75cda95039 Clang: Add option 'Build before analysis' to project settings
Diagnostic configuration Id was already there but
not the checkbox whether to build project or not.

Change-Id: Icb5fc15bda5eed5e375cd90df1a96060b30bf57e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-15 12:14:44 +00:00
Nikolai Kosjar
bb6c02a443 ClangTools: Remove dead code
Change-Id: I5db111402902e81099489dc5ab4b0b929c574969
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:21 +00:00
Nikolai Kosjar
b81e5cb3b2 ClangTools: Remove temporary dirs
...when a new run is triggered instead of on Qt Creator shutdown.

There is no reason to keep them around for longer than needed.

Change-Id: Ida7698843cc2f8822ffd662679cf5da2c4ece05c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:03 +00:00
Ivan Donchevskii
87678e9a07 ClangTools: Remove huge "log files" after we've read them
Serialized diagnostics consume quite a lot of space.
Remove these files after they are read by QtC.

Change-Id: I4b257e44ee182484726ebd808069198443992016
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-05 09:00:08 +00:00
Ivan Donchevskii
3737b6a124 CppTools: Split diagnostic settings and selection
Now selection is only consists of combobox and
a "Manage" button to diagnostic configurations.
Diagnostic configurations are moved to the modal dialog
which is shown by clicking the mentioned "Manage" button.

Change-Id: I607fb923c97e8730448548708f3aaf32ce1983c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 07:02:53 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Nikolai Kosjar
1bc605d050 ClangTools: Prompt for files to analyze
If the run button is clicked, the user is prompted to select the files
for analysis.

Change-Id: I21e4ee6b7c14392a8c1a901ac7aa1c9c16e30f0d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 10:48:53 +00:00
Ivan Donchevskii
97fc02b247 ClangTools: Add settings for build project dependency
All Clang tools get support for running project build
before themselves or skipping that step.
Before this change static analyzer always ran it and
ClangTidy+Clazy tool always skipped.

Change-Id: Idb9fbc27f0589472abb0f9d207857eb79c0079fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-08 11:29:19 +00:00
Ivan Donchevskii
52ac74b61c ClangTools: Remove clang executable settings
We use custom clang executable and it does not make
sense anymore to give a choice of changing it.

Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-04 09:58:37 +00:00
Ivan Donchevskii
219e23332e ClangTools: Add tool that runs clang-tidy and clazy
... over the whole project.
Generate and read serialized files to get diagnostics.

Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-26 13:02:19 +00:00
Ivan Donchevskii
e9c462391e ClangTools: Split generic part from static analyzer tool
To reuse it for other clang-based tools.

Change-Id: I6c0d8e9eee543fa08faf3bf93c9fac33e43c6820
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-13 12:34:53 +00:00