Commit Graph

5028 Commits

Author SHA1 Message Date
Eike Ziller
a9e4e3608e Merge remote-tracking branch 'origin/4.5'
Change-Id: I0194bdeda71e33fd5bc9cb3eb7a9198ae72815ed
2017-11-07 15:10:36 +01:00
Christian Stenger
d0fe839451 DumperTest: Fix compile failure for gcc4.9
Change-Id: I1d97324a12a4d0974f1930351f337c381851d011
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-07 09:45:41 +00:00
Orgad Shaneh
a6cda6dbe0 Merge remote-tracking branch 'origin/4.5'
Change-Id: I16e3bb9ee3a1e6dc6edf7a65f8a137a25cda4fe3
2017-11-05 16:49:17 +02:00
Orgad Shaneh
38e9a52f6c FuzzyMatcher: Improve tests readability
Change-Id: I4fba4fd741c785a0d4b03f6e308cef3d93d6bf1b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-11-04 16:12:14 +00:00
Orgad Shaneh
4300041d24 FuzzyMatcher: Improve wildcard matching
Make it equivalent to current wildcard implementation, and replace the
current one with FuzzyMatcher.

Change-Id: If83a4a8dfc7c8930bd92b49972647a519886a831
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-11-04 16:12:03 +00:00
Orgad Shaneh
e9b4d3a48a Rename CamelHumpMatcher -> FuzzyMatcher
Change-Id: Ia8a2eeb985bcdd500b4faf9605e5092a52dad372
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-11-02 21:35:03 +00:00
Orgad Shaneh
bacfc28a36 CppTools: Match also function arguments in locator
Useful when there are several overloads for the same function.

Change-Id: I325bda7d2fdf4108f71a61d5473cd55310c51c28
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-02 09:26:17 +00:00
Orgad Shaneh
8a2adfef6c Clang: Remove outdated macro
Minimum version is now 5.0.

Change-Id: Ia75a26d28e676881b8e45832cae02826d176bd5b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-01 07:47:18 +00:00
Orgad Shaneh
0b76a8864c Merge remote-tracking branch 'origin/4.5'
Change-Id: I7bc3615fb4bbafffa9636d731d8840445352b592
2017-10-30 21:44:13 +02:00
Orgad Shaneh
be673acb3e Add CameHumpMatcher autotest to qbs build
Change-Id: Ia019822ecc8d9ab1a19a17a7965fd5e9a4178bc9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-30 19:39:14 +00:00
Orgad Shaneh
92c1659df2 CamelHump: Prefer plain match over camel hump
For example:
Matching "lit" against "LiteralTable" should highlight "Lit" and not "Li"
and "T" from Table.

Change-Id: I8a0a9d0b0b90403745e85b1d3d20deaa551416eb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-10-30 19:38:57 +00:00
Tobias Hunger
bc3d4d86fa GccToolChain: Improve retrieval/caching of compiler data
* Use one template to implement both Caches
* Use shared_ptr to the caches. This is necessary to not crash
  when the toolchains get deleted while the compiler is being run
* Pass language to header path retrieval code and use that information
* Add unit tests for cache used by the toolchain

Change-Id: Ic31e7c4c1ed8158af7f2cdfda8104255efb06aea
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-27 15:11:28 +00:00
Nikolai Kosjar
5ba40cb7fb Clang: Require LLVM/Clang >= 5.0.0
...for the code model parts and declare 5.0 as the supported version for
the clang static analyzer.

Adapt versions and tests, remove code assuming clang <= 5.0.

LLVM/Clang 5 was released on 07 Sep 2017.

Task-number: QTCREATORBUG-18931
Task-number: QTCREATORBUG-18657
Task-number: QTCREATORBUG-17187
Task-number: QTCREATORBUG-14881
Change-Id: I53b00258ca06a1d2e57f9379dacc54b310687295
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-27 14:21:19 +00:00
Marco Bubke
2382824d7b UnitTest: Fix google benchmark
Change-Id: I3ea223c161d49c2f78751c07916398682b70767c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-10-26 11:25:27 +00:00
Orgad Shaneh
1c5d4d9f3b Fix tests compilation
Change-Id: I58cfe84b950e15ad9600aa25fc5e3cacd99626ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-26 06:15:24 +00:00
Eike Ziller
7f626b1182 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
2017-10-25 16:07:21 +02:00
Ivan Donchevskii
81f5c1c8ec Clang: implement globalRename based on clang Index
Has the same limitations as findUsages.

Change-Id: I8de4df2ecbfd8a4f3073666994398dc43af0d73c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-10-25 13:35:48 +00:00
Marco Bubke
68589a3fbc Disable GCC warning for noexcept
GCC >= 6.4 is generating warnings for function signature with noexcept. In
C++ 17 noexcept is part of the function signature. But the warning is
catching cases where a changed signature is not a problem, because it is
a template it self.

Task-number: QTCREATORBUG-18959
Change-Id: Ia6fa79c10e16d8c96a53c849ea15dcec94538fbe
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-24 14:24:08 +00:00
Ivan Donchevskii
050b4dd2f5 Clang: implement findUsages with existing index
Functionality is limited to the abilities of
current index which is not updated and is
generated only at project open.
Search box temporarily doesn't allow to "Search again".

Change-Id: Id1047f27ad0aafc901f06aa51ad38ceab95eaebb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-24 10:46:52 +00:00
David Schulz
2bd1ea30b9 Debugger: port python debug test to python 3
Change-Id: I1e546b8c151f59432292118a0a6b4d913196e79b
Reviewed-by: hjk <hjk@qt.io>
2017-10-24 10:11:09 +00:00
Marco Bubke
b9d268977e Clang: Add usage functions to symbol query
Change-Id: If68a5119c863e616fea40275136d028abcf441f3
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-23 18:13:44 +00:00
Marco Bubke
0a3df84533 Sqlite: Use string view as result value
String view is returning simply the string pointer and the size from the
database. In that way we remove useless copies to an intermediate data
type.

Change-Id: I3354061938c52df585e91054a97c900ae4cd39b3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-23 18:03:32 +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
Ivan Donchevskii
b10f8484c7 CppTools: merge CompilerOptionsBuilder with Clang one
Since it's never used for other compilers.

Change-Id: I9512692d1dc9f9a701ea2453b7d50005478bed5d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-23 12:46:34 +00:00
Nikolai Kosjar
f19facd378 Clang: Add more CLANG-UPGRADE-CHECK markers
Change-Id: I9ee553f29fa7a7f60291e2d7d2a56062dc722b9d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-23 11:02:18 +00:00
Marco Bubke
2a41031273 UnitTests: Add utility functions for test
Having a global temporaryDirPath makes changes much easier.

Change-Id: Iec92bba7b7eca5b0e893ebee9f457734deba8cc8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-21 13:39:31 +00:00
Marco Bubke
ce4d7e9d0e Utils: Fix smallstring move assignment
Before the string was simply swapped with the other string which can lead
to an unexpected behavior for xvalues. Now the destructor of the source is
called and it is default initialized.

foo = std::move(bar);

bar would now hold the value of foo.

Change-Id: Ibea3f18333a168634b7faf2fdaf9b5b52c82d5cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-20 14:36:37 +00:00
Eike Ziller
bb9663529b Merge remote-tracking branch 'origin/4.5'
Change-Id: Ie83666bd18e899dabf5190c360027bf02abecdaf
2017-10-19 13:01:12 +02:00
Christian Stenger
38d307ffb8 Squish: Adapt test to improved compiler detection
QC now finds some more compilers.

Change-Id: Icbf8d29a24c3360d2d7d8ed73011f705dd156aa8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-10-19 10:28:56 +00:00
Nikolai Kosjar
7cbc7af022 Clang: Fix completion after qualification (::)
...and maybe other cases.

Since

    Clang: fix findStartOfName handling
    commit 82d0650b11

the proposal's base position was calculated wrong. As a result, an early
return triggert in CodeAssistantPrivate::displayProposal (call to
newProposal->hasItemsToPropose(prefix, reason)) and no completions were
displayed.

Fix by ensuring that the added code from the mentioned commit is only
called when needed, namely only for function expressions.

Task-number: QTCREATORBUG-19083
Change-Id: I8f23c9b7186f9d81159939c8b3ef475a09bbe760
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-19 07:43:21 +00:00
Marco Bubke
5e0b207a89 Clang: Improve locking of string cache
The string cache is only very seldom written but very often read. To
improve thread scaling it is faster to lock it only for write operations.
So we use a shared mutex which is locked in shared mode for read
operations and locked exclusively for write operations.

Change-Id: I7dfd4a02c5484683e4d0becd39269c0146126a96
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 13:13:29 +00:00
Christian Stenger
fb4f66927d Squish: Adapt tst_HELP05 to changed template
Change-Id: I03973193b2a705af632fd8978b37873bde51006f
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-10-18 04:56:11 +00:00
Christian Stenger
c4ec04d254 Squish: Adapt QMLS suite to changed template
Change-Id: I43fcb9a47759025c4da2d2fba75c4fa05d1dc340
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-10-18 04:55:20 +00:00
Christian Stenger
e33d0cb1d0 Squish: Adapt Qml indentation test
The used Qml file template has changed.

Change-Id: I594c77f05ac51a49afe2498d61aea54abd5b8677
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-10-18 04:54:57 +00:00
Ivan Donchevskii
5c554c0de9 CppTools: add multiple refactoring engines support
Make model manager able to select the most functional
refactoring engine from the available ones.

Change-Id: I74031c910706fd694a0a7def022531501f1ea005
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-17 13:32:51 +00:00
Christian Stenger
9bd0fcbe2e Revert "Clang: Improve locking of string cache"
This reverts commit be939a80db.
'shared_timed_mutex' is not available before Xcode 9.

Change-Id: I1ac6c2b3691d5b4f457c431e255629a526c48c3a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-10 09:12:21 +00:00
Eike Ziller
07bec99e8f Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: Iaad0659293681cce4266fc3e4ba2a4f2068de911
2017-10-09 12:09:27 +02:00
Marco Bubke
be939a80db Clang: Improve locking of string cache
The string cache is only very seldom written but very often read. To
improve thread scaling it is faster to lock it only for write operations.
So we use a shared mutex which is locked in shared mode for read
operations and locked exclusively for write operations.

Change-Id: I2cc742d1b9cc15c162be40ab339fa8310640bc44
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 17:48:23 +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
Andre Hartmann
82b22a552f QMake: Fix build with b884f6fdbc and BUILD_TESTS enabled
qchar.h: In member function ‘QMakeEvaluator::VisitReturn
    QMakeEvaluator::evaluateBuiltinConditional(
        int, const ProKey&, const ProStringList&)’:
qchar.h:562:5: error: ‘QChar::QChar(char)’ is private
     QChar(char c) Q_DECL_NOTHROW;

Change-Id: Idd25b20ecf68a2e801b73e916a5359ff3fc7a86f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-05 12:47:05 +00:00
Orgad Shaneh
f56b2bfe6d CamelHump: Fix case insensitive matching after the same case
For example: window -> MAINWINDOW.

This was broken by the constraint that the first char must follow a non-
matching case in 2fb54abd03. It was fixed for pure lowercase in f792475739,
but this fix was evidentially partial.

Change-Id: I0c29b54768c40d0501f006182f2bd1ae1e94f3bf
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-10-05 09:26:52 +00:00
Andre Hartmann
0fb6a1479f CamelHump: Extend tests
The else part within "if (!c.isLetter())"
(camelhumpmatcher.cpp:79) was not covered
by the tests at all, so far.

Change-Id: I35eb5908110e4692cda41b58f419867da00b6501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-05 09:25:59 +00:00
Andre Hartmann
7d35e08afe CamelHump: Leave the gauls alone (fix typo)
Change-Id: Idf2080fc4ba2ae64c7bc0d1ce7dc9c81c0c8585e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-05 09:25:28 +00:00
Orgad Shaneh
5e8e619dd0 Merge remote-tracking branch 'origin/4.4' into 4.5
Change-Id: I9b7cb3d845628abf69a73a279f5a79202c0976c2
2017-10-04 16:11:17 +03:00
Robert Loehning
6d919cd85a Squish: Stabilize tst_simple_analyze
Change-Id: I3875451ee263a97f0919f08c96318502b49922f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-29 13:25:58 +00:00
hjk
e3f0e1be08 Qnx: Use simpler portsgatherer command
As indicated by the removed comment, the original version was
way too complicated.

Change-Id: Ie5d8d8fbe7bd8e44e0538117cd2aaa73958f7d8c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-09-29 10:10:08 +00:00
Ivan Donchevskii
bea6a3dc9f Clang: Fix ClangCodeModelServerSlowTest.RequestDocumentAnnotations
Add missing HighlightingMark parameter in test.

Change-Id: I7b2661152bebf038a3da650ee20b253fa18b471f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-29 09:08:04 +00:00
Nikolai Kosjar
087ea0e531 Clang: Rename directory ipcsource to source
Now it's in accordance with clangrefactoringbackend/source and
clangpchmanagerbackend/source.

Change-Id: I939cfc72cffb8fcde0649f125e6efb6670d1cbc3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-28 12:45:41 +00:00
Andre Hartmann
f792475739 CamelHumpMatcher: Fix matching word continuations without hump
Let the search string "window" also find "mainwindow.cpp",
not just "MainWindow.cpp"

Task-number: QTCREATORBUG-18957
Change-Id: Iace3111fb3ce319d916362c1f8d396844a3bc47a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-28 08:04:43 +00:00
Orgad Shaneh
c94b813561 Dumpers: Quit test immediately if make fails
Change-Id: Idee48a997dce047e5ad90d133fce9c610f609a9a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-27 08:35:49 +00:00