forked from qt-creator/qt-creator
C++: Fix highlighting after "invalid code"
For the semantic info document we do not expand function like macros and
because of that certain macro invocations lead to invalid code that we
need to handle, e.g.:
Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
class Foo {};
This change makes parsing Foo in the semantic info document successfully
again, which affects highlighting of that class.
Change-Id: I389265ac64d3f0b8b8f406d38fa58d78820b14ba
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -623,6 +623,13 @@ void Document::tokenize()
|
||||
_translationUnit->tokenize();
|
||||
}
|
||||
|
||||
void Document::setRetryHarderToParseDeclarations(bool yesno)
|
||||
{
|
||||
_translationUnit->setRetryParseDeclarationLimit(
|
||||
yesno ? 1000
|
||||
: TranslationUnit::defaultRetryParseDeclarationLimit());
|
||||
}
|
||||
|
||||
bool Document::isParsed() const
|
||||
{
|
||||
return _translationUnit->isParsed();
|
||||
|
||||
Reference in New Issue
Block a user