diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 91e634d624e3a22a7535ec32c6ac9876a5e8a78f..7d31b6658360fcf5f32de83edf892ddd7a46d67a 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);