Commit b3113bbb authored by Marco Bubke's avatar Marco Bubke
Browse files

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: default avatarNikolai Kosjar <>
parent 568d7e7c
......@@ -49,6 +49,8 @@ CodeCompleter::CodeCompleter(TranslationUnit translationUnit)
QVector<CodeCompletion> CodeCompleter::complete(uint line, uint column)
ClangCodeCompleteResults completeResults(clang_codeCompleteAt(translationUnit.cxTranslationUnit(),
......@@ -96,6 +96,13 @@ void TranslationUnit::reset()
void TranslationUnit::reparse()
CXIndex TranslationUnit::index() const
......@@ -73,6 +73,7 @@ public:
bool isNull() const;
void reset();
void reparse();
CXIndex index() const;
CXTranslationUnit cxTranslationUnit() const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment