diff options
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatcher.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatcher.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp index b29f570432..0f7d7056e0 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp @@ -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; |