forked from qt-creator/qt-creator
C++11: Allow brace-init-list in range-for statement.
Also drop the unused 'initializer' member from RangeBasedForStatementAST. Change-Id: I078ebbc85cafa643af4bfe62d698bf7de71360e4 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
6
src/libs/3rdparty/cplusplus/AST.cpp
vendored
6
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -4362,9 +4362,6 @@ unsigned RangeBasedForStatementAST::firstToken() const
|
||||
if (declarator)
|
||||
if (unsigned candidate = declarator->firstToken())
|
||||
return candidate;
|
||||
if (initializer)
|
||||
if (unsigned candidate = initializer->firstToken())
|
||||
return candidate;
|
||||
if (colon_token)
|
||||
return colon_token;
|
||||
if (expression)
|
||||
@@ -4391,9 +4388,6 @@ unsigned RangeBasedForStatementAST::lastToken() const
|
||||
return candidate;
|
||||
if (colon_token)
|
||||
return colon_token + 1;
|
||||
if (initializer)
|
||||
if (unsigned candidate = initializer->lastToken())
|
||||
return candidate;
|
||||
if (declarator)
|
||||
if (unsigned candidate = declarator->lastToken())
|
||||
return candidate;
|
||||
|
||||
Reference in New Issue
Block a user