Commit Graph

13 Commits

Author SHA1 Message Date
Ivan Donchevskii
7fe65851d9 Clang: Extend ClangTool and CommandLineBuilder
We now support source file and not only header files and the file path is
now automatically added to the end. This removes quite some clutter.

Change-Id: I74eabd262e6c7e5f4d523e3a3cd194bd3efe1ef3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-11 15:22:58 +00:00
Ivan Donchevskii
dd778bcb23 Clang: Use full paths in compilation database for symbol collector
We we FilePath and NativeFilePath so that compiler warns us if we mix them
up.

Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-02-07 15:03:39 +00:00
Orgad Shaneh
5e483d04bc Clang: Fix build
This amends commit cf4dbb4bb6.

Change-Id: Ib74fba38348a02f6bb9d254b7a5e9013a2013942
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-09 05:25:40 +00:00
Marco Bubke
507d99f03c UnitTests: Use memory database
Tests get more reliable if the database is not shared between different
tests and the testing is speed up by not accessing the file system.

Change-Id: Ieb3c5495df4f0fae2293111949792774b01bf913
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-23 17:59:20 +00:00
Marco Bubke
d2e15e5f1e Clang: Add file cache
The database is using file path integer ids to handle file paths because
otherwise we would save many redundant data. This patch is improving it
further with the introduction of a database based file path cache. The
entries are now divided in a directory path and file name. This is quite
handy for directory based file watching.

Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 17:36:37 +00:00
Marco Bubke
f49a1d721c Clang: Add symbol storage
Extend file path cache to 64 bit integer.

Change-Id: I5627f13d59a3214f389087038482cbcc8d0eb484
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-08-29 16:37:24 +00:00
Marco Bubke
a31eae4d0a Clang: Add clang query pane
We now support highlighting for an example text and for the query.

Change-Id: I88c415ff871cf3e4c2d4fc83d60a8555bf0ce08a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-20 13:32:39 +00:00
Tim Jenssen
dae4477cd3 Clang: Make file ids unique
Clang file ids are only unique for one query. Because we query in parallel
we have to manage our own unique ids.

Change-Id: I67d57d8b1766cab75ad252a14e57bbf9dc5fdb79
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-03 09:27:05 +00:00
Marco Bubke
f5d68398d5 Clang: Fix canceling of clang query
Every AST unit is created and queried asynchronously, like before, but
we don't wait anymore but use a timer to process new sources. So the server
will not be blocked and can process other messages like cancel.

Change-Id: If0e69466c78f628190f59fd32a03cab1c3a4d0a3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-28 09:15:51 +00:00
Marco Bubke
ada5ea1952 UnitTests: Fix names and disable slow tests by default
Slow and very slow tests have now their own test category. We add SlowTest
for tests which are slower than ~5ms and VerySlowTest if they are slower
than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster
machine than most developers simply try lower values. The aim is that most
developers can execute the tests in under ~2s.

In the long run we should use dependency breaking and data sharing to
reduce the count of the slow tests.

Change-Id: I8578071258d7f89b2052709f3dd526ced811483f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-01-04 12:35:52 +00:00
Marco Bubke
15de02ea0c Clang: Add refactoring support for unsaved content
We need the generated UI header but we don't have a build directory. So we
provide clang with in memory represations of the file.

Change-Id: Ie9db97bbea2222b0203a0457baa1f1fc7ad97213
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-07 11:39:11 +00:00
Tim Jenssen
7f757884c5 Clang: Extend clang query
It's a first step to introduce clang query.

Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:16:04 +00:00
Tim Jenssen
9c7ff5199f Clang: Add clang query
Clang query is mechanism to use AST matcher to search for code. Think
about regular expression but in the context of AST. So you get a semantic
search tool for C++.

Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-15 15:30:33 +00:00