Commit Graph

68 Commits

Author SHA1 Message Date
Marco Bubke
6e14eb6940 Clang: Rename ForCodeCompletion in ForEditor
It reflects that the translation units and projects have a tied
relationship with an editor.

Change-Id: I3c01d5776980fe079af1fdef82feded83fdf5463
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:02:02 +00:00
Marco Bubke
b278dc87ca Clang: Add diagnostics
Diagnostics are now moved to the clang backend process. Fixits are
supported too.

Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 14:59:16 +00:00
Marco Bubke
ec4d002857 Clang: Rename command in message
Change-Id: I1e2671d15b0db3c670b86dd0d4bed5ee09e866f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-25 12:54:27 +00:00
Nikolai Kosjar
64d8ac4880 Clang: Fix showing signature tooltips for functions
...and others in the generic completion widget.

Task-number: QTCREATORBUG-14874
Change-Id: I75122eaf364d740b0a64ca514b31a26c5c8ea673
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-08-10 09:35:01 +00:00
Marco Bubke
8c3c882a8a Clang: Fix parsing of enable_if_t
Task-number: QTCREATORBUG-11864
Change-Id: Ifd0d3482bc4f4373394734d4b173304db32a6a2d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-05 10:50:34 +00:00
Nikolai Kosjar
5643a45a83 Clang: Fallback to global completion if function call completion fails
We can not offer proper constructor completion with libclang <= 3.6, so
fall back to normal/global completion.

Change-Id: I90bb8d981ae20ed4c228f829ad4267221b92f8a1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-23 11:18:55 +00:00
Nikolai Kosjar
c6b52267f4 Clang: Fix sending (un)register translation unit
Handle the following use cases:

  1. Editor is opened
    --> Register file at backend.

  2. Close editor for which a project part exists
    --> Unregister file with project part.

  3. Close editor for which no project part exists (anymore)
    --> Unregister file with empty/default project part.

Change-Id: I2b253004a920cccef989876538ab552eacf6b45c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 13:08:32 +00:00
Nikolai Kosjar
420bc69739 CppTools: Use project part ids instead of file paths
File paths are not unique since e.g. each qbs group in a file is mapped
to a project part.

Change-Id: I7df3f224dd23046b869f2588b8a34eb26cfc0b1a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:49:14 +00:00
Nikolai Kosjar
95c90dcd42 Clang: Tests: Use global temporary dir to remove test file later
Change-Id: Ic31428db15ebbc3a4fc5d5a24723d3a557b77b58
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:48:40 +00:00
Nikolai Kosjar
73cee4d64a Clang: Tests: Mini refactorings
Change-Id: I4a058d4c68c126d74badfc699a239ef9b2790f3a
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-17 11:33:49 +00:00
Marco Bubke
89bc1fc4c4 Clang: Rename filePaths in ids
UnregisterProjectPartsForCodeCompletionCommand is using them as ids
and not as file paths.

Change-Id: I13a82c1995c60bdb60c72f4fd794aa354fcbb4ef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-15 08:57:42 +00:00
Nikolai Kosjar
7f4ce089d3 Clang: Tests: Make waiting for reloaded document more robust
testUnsavedFilesTrackingByModifyingIncludedFileExternally() is flaky.

Apparently the hard coded timeout is not enough for all circumstances.

Change-Id: I9f884e488d3c4bd5398e505ecee122912d946e6b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 09:30:01 +00:00
Nikolai Kosjar
521d7cf7a3 Clang: Send in-memory generated ui header to backend
Change-Id: I59e9b1f10d1a7fe9a75cbe84117aa5cc04460dab
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-09 08:06:26 +00:00
Marco Bubke
ed27414f48 Clang: Split clangcompletion.[h|cpp]
First step for refactor them.

Change-Id: If9de084e39ddf31317035ccbbc1fd57d7797d193
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-06 12:41:01 +00:00
Marco Bubke
5c74f34ebf Clang: Rename ModelManagerSupportClang::instance to instance_forTestsOnly
To make it clear that it is for testing only.

Change-Id: If257b0049e87c834b24073991f173bfc1b3e93e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-06 12:12:06 +00:00
Marco Bubke
5e2942a5bd Clang: Use member instead of pointer
It makes the resource allocation much more clear.

Change-Id: Ib276e089dc3db551171373d72e9b54c9d87b4c8c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-01 11:52:54 +00:00
Marco Bubke
1402c067b1 Clang: Rename CodeModelBackEnd in ClangBackEnd
Change-Id: I13e8a458634110456375956d4d4da7239c86957f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-16 13:29:27 +00:00
Nikolai Kosjar
23b8a3b2e8 Clang: Use completion through backend process
This makes us independent of libclang crashes for completion.
Re-parsing for highlighting still happens in the Qt Creator process.

Run in verbose mode:
    qtc.clangcodemodel.ipc=true

Run tests:
    -test "ClangCodeModel"

Task-number: QTCREATORBUG-14108
Task-number: QTCREATORBUG-12819
Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-10 10:15:40 +00:00