Commit 0c3acb80 authored by Christian Kamm's avatar Christian Kamm Committed by hjk

C++11: Allow brace-init-list in default argument declaration.

Change-Id: Iab707d855f98982697365f9a4cd7832877e64d17
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 392c80c6
...@@ -1946,7 +1946,10 @@ bool Parser::parseParameterDeclaration(ParameterDeclarationAST *&node) ...@@ -1946,7 +1946,10 @@ bool Parser::parseParameterDeclaration(ParameterDeclarationAST *&node)
parseDeclaratorOrAbstractDeclarator(ast->declarator, decl_specifier_seq); parseDeclaratorOrAbstractDeclarator(ast->declarator, decl_specifier_seq);
if (LA() == T_EQUAL) { if (LA() == T_EQUAL) {
ast->equal_token = consumeToken(); ast->equal_token = consumeToken();
parseLogicalOrExpression(ast->expression); if (!_cxx0xEnabled)
parseLogicalOrExpression(ast->expression);
else
parseInitializerClause0x(ast->expression);
} }
node = ast; node = ast;
......
...@@ -2,3 +2,5 @@ class C { ...@@ -2,3 +2,5 @@ class C {
C() : _x{12}, _y({12}) {} C() : _x{12}, _y({12}) {}
C(int i) : _x{{{12, 2}, {"foo"}}, {bar}}... {} C(int i) : _x{{{12, 2}, {"foo"}}, {bar}}... {}
}; };
void foo(int i = {1, 2, 3});
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