forked from qt-creator/qt-creator
C++: Add a clarifying comment and TODO
Change-Id: If6e6db7c4ca011159e78a27755ff9f665b179300 Reviewed-by: Wang Hoi <wanghoi@126.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
19
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
19
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -2651,6 +2651,25 @@ bool Parser::parseBraceOrEqualInitializer0x(ExpressionAST *&node)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
initializer-clause:
|
||||
assignment-expression
|
||||
braced-init-list
|
||||
designated-initializer
|
||||
|
||||
If the next token is a T_LBRACKET, it could be the begin of either
|
||||
|
||||
* a C++11 lambda-introducer (parsed by parseAssignmentExpression)
|
||||
* or a C99 designator (parsed by parseDesignatedInitializer).
|
||||
|
||||
Because currently C99 and C++11 Support is activated at the same time,
|
||||
first try to parse the assignment-expression. If this fails, try to
|
||||
parse a designated-initializer.
|
||||
|
||||
TODO:
|
||||
As soon as there will be only "one active language", parse either
|
||||
the assignment-expression or the designated-initializer, not both.
|
||||
*/
|
||||
bool Parser::parseInitializerClause0x(ExpressionAST *&node)
|
||||
{
|
||||
DEBUG_THIS_RULE();
|
||||
|
Reference in New Issue
Block a user