forked from qt-creator/qt-creator
		
	C++: Remove workaround for crashing if parsing invalid code
This reverts the changes
    commit beac7b9539
    C++: Fix highlighting after "invalid code"
    commit 78ab287fc6
    C++: Stop parsing a declaration after two tries
which were a work around for QTCREATORBUG-12890.
A follow-up patch provides a proper fix.
Task-number: QTCREATORBUG-12890
Change-Id: I2650a8e41c8ff1180cad9f069e463fc51bd2f1b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
			
			
This commit is contained in:
		
							
								
								
									
										4
									
								
								src/libs/3rdparty/cplusplus/Parser.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								src/libs/3rdparty/cplusplus/Parser.h
									
									
									
									
										vendored
									
									
								
							@@ -33,7 +33,7 @@ namespace CPlusPlus {
 | 
			
		||||
class CPLUSPLUS_EXPORT Parser
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Parser(TranslationUnit *translationUnit, int retryParseDeclarationLimit);
 | 
			
		||||
    Parser(TranslationUnit *translationUnit);
 | 
			
		||||
    ~Parser();
 | 
			
		||||
 | 
			
		||||
    bool parseTranslationUnit(TranslationUnitAST *&node);
 | 
			
		||||
@@ -254,7 +254,6 @@ public:
 | 
			
		||||
    bool parseDesignator(DesignatorAST *&node);
 | 
			
		||||
 | 
			
		||||
    bool skipUntil(int token);
 | 
			
		||||
    void skipUntilAfterSemicolonOrRightBrace();
 | 
			
		||||
    void skipUntilDeclaration();
 | 
			
		||||
    bool skipUntilStatement();
 | 
			
		||||
    bool skip(int l, int r);
 | 
			
		||||
@@ -317,7 +316,6 @@ 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