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:
3
src/libs/3rdparty/cplusplus/Parser.h
vendored
3
src/libs/3rdparty/cplusplus/Parser.h
vendored
@@ -33,7 +33,7 @@ namespace CPlusPlus {
|
||||
class CPLUSPLUS_EXPORT Parser
|
||||
{
|
||||
public:
|
||||
Parser(TranslationUnit *translationUnit);
|
||||
Parser(TranslationUnit *translationUnit, int retryParseDeclarationLimit);
|
||||
~Parser();
|
||||
|
||||
bool parseTranslationUnit(TranslationUnitAST *&node);
|
||||
@@ -317,6 +317,7 @@ private:
|
||||
MemoryPool *_pool;
|
||||
LanguageFeatures _languageFeatures;
|
||||
unsigned _tokenIndex;
|
||||
int _retryParseDeclarationLimit;
|
||||
bool _templateArguments: 1;
|
||||
bool _inFunctionBody: 1;
|
||||
bool _inExpressionStatement: 1;
|
||||
|
||||
Reference in New Issue
Block a user