forked from qt-creator/qt-creator
Clang: Reparse always before you complete the code
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>
This commit is contained in:
@@ -96,6 +96,13 @@ void TranslationUnit::reset()
|
||||
d.reset();
|
||||
}
|
||||
|
||||
void TranslationUnit::reparse()
|
||||
{
|
||||
cxTranslationUnit();
|
||||
|
||||
reparseTranslationUnit();
|
||||
}
|
||||
|
||||
CXIndex TranslationUnit::index() const
|
||||
{
|
||||
checkIfNull();
|
||||
|
||||
Reference in New Issue
Block a user