cxTranslationUnit() is starting a reparsing if it is needed so in the best
case it is useless. But it can be maybe harmful if the translation unit
isn't already created.
Change-Id: Ie733edac58ab8f7eccb1611ca1554209f8aa8718
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
We have to revert it if the fix is going in.
Change-Id: I28418e6c7cf6c40afdb5025eb1a52c13a0aa1302
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
The document is now always reparsed after a change.
Change-Id: Iad1d9f78d98f75d5e873de35ac487a8dabc4fc4e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Includes are now watched by a file watcher. Unsaved file changes are
watched too. If they are changed the translation units which depend on
them are set to a state which require a reparse. Later the diagnostics
of this units are collected and send back to creator.
Change-Id: I2fb5c7dd6644687f22399edd8d18edd6215c9505
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diagnostics are now moved to the clang backend process. Fixits are
supported too.
Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Triggering completion happens often on invalid code, which leads to
diagnostics from libclang. Suppress those by default, but allow to
inspect them with the logging category:
qtc.clangbackend.verboselib=true
Change-Id: I802ae58fe1b5244f3228ee73a181ea362de20608
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
There are two ways to hot fix the dependency problem. First version is to
disable the caching(not the preamble) but it is triggering bugs. Second
version is to enable caching and reparse before every complete. I opted
for the second version because it is the commonly used path for most
implementations. Later we have to minimize the reparse calls but for that
we need the cooperation of editor.
Change-Id: I878afb896cbf2338cbeb13d9e596a7776dd49854
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
We reparse before every code completion so this code can be removed. We
will reuse some of it later.
This reverts commit 2443f18b85.
Change-Id: Ifcadfaa09b87ce5b58bfe5fe3cbaa2a86a59c5a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
...by ensuring that the precompiled preamble is created.
Change-Id: I80784b6a79c40a7e452530e8288783f33f881efc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Completion should be faster and the test are still running.
Change-Id: If663e80ce349547b0948412e52b9bf4f76cbb011
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>