summaryrefslogtreecommitdiff
path: root/src/libs/3rdparty/cplusplus/ASTMatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatcher.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/ASTMatcher.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp
index daafb070b1..15595ac170 100644
--- a/src/libs/3rdparty/cplusplus/ASTMatcher.cpp
+++ b/src/libs/3rdparty/cplusplus/ASTMatcher.cpp
@@ -136,6 +136,25 @@ bool ASTMatcher::match(TypeofSpecifierAST *node, TypeofSpecifierAST *pattern)
return true;
}
+bool ASTMatcher::match(DecltypeSpecifierAST *node, DecltypeSpecifierAST *pattern)
+{
+ (void) node;
+ (void) pattern;
+
+ pattern->decltype_token = node->decltype_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(DeclaratorAST *node, DeclaratorAST *pattern)
{
(void) node;