Commit 5f6f880a authored by Christian Kamm's avatar Christian Kamm Committed by hjk

Fix bug with expression list parsing.

Empty lists would have a single null entry, instead of being null
entirely.

Change-Id: I5114cf1e0ecdbcde5631511ad03a8d559668ea80
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent b947861c
...@@ -2677,8 +2677,7 @@ bool Parser::parseInitializerClause0x(ExpressionAST *&node) ...@@ -2677,8 +2677,7 @@ bool Parser::parseInitializerClause0x(ExpressionAST *&node)
if (LA() == T_LBRACE) if (LA() == T_LBRACE)
return parseBracedInitList0x(node); return parseBracedInitList0x(node);
parseAssignmentExpression(node); return parseAssignmentExpression(node);
return true;
} }
bool Parser::parseInitializerList0x(ExpressionListAST *&node) bool Parser::parseInitializerList0x(ExpressionListAST *&node)
...@@ -4775,7 +4774,7 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node) ...@@ -4775,7 +4774,7 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
if (lookAtBuiltinTypeSpecifier() && if (lookAtBuiltinTypeSpecifier() &&
parseSimpleTypeSpecifier(type_specifier) && parseSimpleTypeSpecifier(type_specifier) &&
(LA() == T_LPAREN || (_cxx0xEnabled && LA() == T_LBRACE))) { (LA() == T_LPAREN || (_cxx0xEnabled && LA() == T_LBRACE))) {
ExpressionAST *expr; ExpressionAST *expr = 0;
if (LA() == T_LPAREN) { if (LA() == T_LPAREN) {
parseExpressionListParen(expr); parseExpressionListParen(expr);
} else { // T_LBRACE } else { // T_LBRACE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment