C++11: Add alignof() expression.

Change-Id: Id3fb30b9a16ea724bab0d5b05e8cbddb0064e6eb
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-09-17 13:47:18 +02:00
committed by hjk
parent 1aed32d866
commit ecd54059d3
14 changed files with 149 additions and 0 deletions

View File

@@ -1925,6 +1925,25 @@ bool ASTMatcher::match(SizeofExpressionAST *node, SizeofExpressionAST *pattern)
return true;
}
bool ASTMatcher::match(AlignofExpressionAST *node, AlignofExpressionAST *pattern)
{
(void) node;
(void) pattern;
pattern->alignof_token = node->alignof_token;
pattern->lparen_token = node->lparen_token;
if (! pattern->typeId)
pattern->typeId = node->typeId;
else if (! AST::match(node->typeId, pattern->typeId, this))
return false;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(PointerLiteralAST *node, PointerLiteralAST *pattern)
{
(void) node;