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:
Nikolai Kosjar
2015-02-06 15:04:23 +01:00
parent d68fc038cc
commit ae3aa07c4d
8 changed files with 8 additions and 55 deletions

View File

@@ -49,8 +49,7 @@ TranslationUnit::TranslationUnit(Control *control, const StringLiteral *fileId)
_lastSourceChar(0),
_pool(0),
_ast(0),
_flags(0),
_retryParseDeclarationLimit(defaultRetryParseDeclarationLimit())
_flags(0)
{
_tokens = new std::vector<Token>();
_comments = new std::vector<Token>();
@@ -300,7 +299,7 @@ bool TranslationUnit::parse(ParseMode mode)
f._parsed = true;
Parser parser(this, _retryParseDeclarationLimit);
Parser parser(this);
bool parsed = false;
switch (mode) {