C++11: Allow uniform initialization in ctor init lists.

So
class C { C() : _x{12}, _y({12}) {} };
now parses correctly.

Change-Id: I4281dcb0541a86b550e74630cad6ae0a59fef1b4
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-09-17 09:58:09 +02:00
committed by hjk
parent 903ba378c2
commit b9f6f1bcf7
16 changed files with 88 additions and 71 deletions

View File

@@ -772,11 +772,8 @@ MemInitializerAST *MemInitializerAST::clone(MemoryPool *pool) const
MemInitializerAST *ast = new (pool) MemInitializerAST;
if (name)
ast->name = name->clone(pool);
ast->lparen_token = lparen_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->rparen_token = rparen_token;
if (expression)
ast->expression = expression->clone(pool);
return ast;
}