C++11: handle noexcept specifications.

Change-Id: I7da3affea2758b2e01124105e2521e1f2c5f6678
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-02-02 11:40:01 +01:00
parent a2f9ee870e
commit dd4299073e
18 changed files with 197 additions and 33 deletions

View File

@@ -968,7 +968,7 @@ bool ASTMatcher::match(ExceptionDeclarationAST *node, ExceptionDeclarationAST *p
return true;
}
bool ASTMatcher::match(ExceptionSpecificationAST *node, ExceptionSpecificationAST *pattern)
bool ASTMatcher::match(DynamicExceptionSpecificationAST *node, DynamicExceptionSpecificationAST *pattern)
{
(void) node;
(void) pattern;
@@ -989,6 +989,25 @@ bool ASTMatcher::match(ExceptionSpecificationAST *node, ExceptionSpecificationAS
return true;
}
bool ASTMatcher::match(NoExceptSpecificationAST *node, NoExceptSpecificationAST *pattern)
{
(void) node;
(void) pattern;
pattern->noexcept_token = node->noexcept_token;
pattern->lparen_token = node->lparen_token;
if (! pattern->expression)
pattern->expression = node->expression;
else if (! AST::match(node->expression, pattern->expression, this))
return false;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(ExpressionOrDeclarationStatementAST *node, ExpressionOrDeclarationStatementAST *pattern)
{
(void) node;