From 3f5dc36a5361c9c7e515e6213bf5c6e64e4dd7bd Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 10 Feb 2012 14:41:58 +0100 Subject: C++11: first set of changes for decltype. Change-Id: I49d6ff7eb1805cd07bdfcb27bb37d4c6cadc9115 Reviewed-by: Roberto Raggi --- src/libs/3rdparty/cplusplus/ASTMatcher.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/libs/3rdparty/cplusplus/ASTMatcher.cpp') 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; -- cgit v1.2.1