forked from qt-creator/qt-creator
C++11: Add alignof() expression.
Change-Id: Id3fb30b9a16ea724bab0d5b05e8cbddb0064e6eb Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
18
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
18
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -4860,6 +4860,24 @@ bool Parser::parseUnaryExpression(ExpressionAST *&node)
|
||||
return true;
|
||||
}
|
||||
|
||||
case T_ALIGNOF: {
|
||||
if (!_cxx0xEnabled)
|
||||
break;
|
||||
|
||||
AlignofExpressionAST *ast = new (_pool) AlignofExpressionAST;
|
||||
ast->alignof_token = consumeToken();
|
||||
|
||||
match(T_LPAREN, &ast->lparen_token);
|
||||
ExpressionAST *temp = 0;
|
||||
parseTypeId(temp);
|
||||
if (temp)
|
||||
ast->typeId = temp->asTypeId();
|
||||
match(T_RPAREN, &ast->rparen_token);
|
||||
|
||||
node = ast;
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
} // switch
|
||||
|
||||
Reference in New Issue
Block a user