diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-23 10:24:37 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-23 10:25:43 +0100 |
commit | 464f797f2f8af8bb941d99f36ff62798a7111383 (patch) | |
tree | 4febcba851c17c48fb5bdf55a73a9f8c576eb5d6 /src/shared/cplusplus/Parser.cpp | |
parent | 6f80219d3e4a1e9cb1143535645bdbdd1d15c53c (diff) | |
download | qt-creator-464f797f2f8af8bb941d99f36ff62798a7111383.tar.gz |
Don't check the compound statement terminator when parsing.
The check should be done in the semantic phase.
Diffstat (limited to 'src/shared/cplusplus/Parser.cpp')
-rw-r--r-- | src/shared/cplusplus/Parser.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 91e634d624..7d31b66583 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -3576,14 +3576,6 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node) ast->statement = statement->asCompoundStatement(); match(T_RPAREN, &ast->rparen_token); node = ast; - if (ast->statement && ast->statement->statement_list) { - // check that the last statement is an expression-statement - StatementAST *lastStmt = ast->statement->statement_list->lastValue(); - if (!lastStmt || ! ast->asExpressionStatement()) - _translationUnit->error(cursor(), - "expected an expression statement before token `%s'", - tok().spell()); - } return true; } else { return parseNestedExpression(node); |