forked from qt-creator/qt-creator
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:
16
src/libs/3rdparty/cplusplus/AST.cpp
vendored
16
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -1744,26 +1744,18 @@ unsigned MemInitializerAST::firstToken() const
|
||||
if (name)
|
||||
if (unsigned candidate = name->firstToken())
|
||||
return candidate;
|
||||
if (lparen_token)
|
||||
return lparen_token;
|
||||
if (expression_list)
|
||||
if (unsigned candidate = expression_list->firstToken())
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->firstToken())
|
||||
return candidate;
|
||||
if (rparen_token)
|
||||
return rparen_token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned MemInitializerAST::lastToken() const
|
||||
{
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
if (expression_list)
|
||||
if (unsigned candidate = expression_list->lastToken())
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->lastToken())
|
||||
return candidate;
|
||||
if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
if (name)
|
||||
if (unsigned candidate = name->lastToken())
|
||||
return candidate;
|
||||
|
||||
Reference in New Issue
Block a user