forked from qt-creator/qt-creator
C++11: More (expression-list) or brace-init-list.
This time in the 'new' expression. Changed it to make
new C(1, abc...) and new C{1, abc}
work.
Change-Id: I7232798fd083b653ee04ef9ede386d6536133e16
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
26
src/libs/3rdparty/cplusplus/AST.cpp
vendored
26
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -2052,32 +2052,6 @@ unsigned NewExpressionAST::lastToken() const
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned NewInitializerAST::firstToken() const
|
||||
{
|
||||
if (lparen_token)
|
||||
return lparen_token;
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->firstToken())
|
||||
return candidate;
|
||||
if (rparen_token)
|
||||
return rparen_token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned NewInitializerAST::lastToken() const
|
||||
{
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->lastToken())
|
||||
return candidate;
|
||||
if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned ExpressionListParenAST::firstToken() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user