Commit 47d2558f authored by Christian Kamm's avatar Christian Kamm Committed by hjk
Browse files

C++11: Fix bug with parsing ctor initializers.



Task-number: QTCREATORBUG-7919

Change-Id: I12307c3fb6c20424c8b5aaf564a031924c755d25
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 89fa7823
......@@ -4967,7 +4967,7 @@ bool Parser::parseExpressionListParen(ExpressionAST *&node)
if (LA() == T_LPAREN) {
unsigned lparen_token = consumeToken();
ExpressionListAST *expression_list = 0;
if (parseExpressionList(expression_list) && expression_list && LA() == T_RPAREN) {
if (parseExpressionList(expression_list) && LA() == T_RPAREN) {
unsigned rparen_token = consumeToken();
ExpressionListParenAST *ast = new (_pool) ExpressionListParenAST;
ast->lparen_token = lparen_token;
......
class C {
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