diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2012-02-10 14:41:58 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2012-02-10 16:29:04 +0100 |
commit | 3f5dc36a5361c9c7e515e6213bf5c6e64e4dd7bd (patch) | |
tree | a53e577c56cdfda1ee4151084e8b82ec3540d778 /src/libs/3rdparty/cplusplus/ASTMatcher.cpp | |
parent | 07d335b21525be20d36cb9a1fe017497184016e0 (diff) | |
download | qt-creator-3f5dc36a5361c9c7e515e6213bf5c6e64e4dd7bd.tar.gz |
C++11: first set of changes for decltype.
Change-Id: I49d6ff7eb1805cd07bdfcb27bb37d4c6cadc9115
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatcher.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatcher.cpp | 19 |
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; |