forked from qt-creator/qt-creator
C++11: Parse alias declarations.
The parser no longer fails declarations like: using Foo = std::vector<int>::iterator; Change-Id: Ib3a552ebbe0147fa138db6448a52cdba8f9b9207 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
21
src/libs/3rdparty/cplusplus/ASTMatcher.cpp
vendored
21
src/libs/3rdparty/cplusplus/ASTMatcher.cpp
vendored
@@ -1485,6 +1485,27 @@ bool ASTMatcher::match(NamespaceAliasDefinitionAST *node, NamespaceAliasDefiniti
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTMatcher::match(AliasDeclarationAST *node, AliasDeclarationAST *pattern)
|
||||
{
|
||||
(void) node;
|
||||
(void) pattern;
|
||||
|
||||
pattern->using_token = node->using_token;
|
||||
|
||||
pattern->identifier_token = node->identifier_token;
|
||||
|
||||
pattern->equal_token = node->equal_token;
|
||||
|
||||
if (! pattern->typeId)
|
||||
pattern->typeId = node->typeId;
|
||||
else if (! AST::match(node->typeId, pattern->typeId, this))
|
||||
return false;
|
||||
|
||||
pattern->semicolon_token = node->semicolon_token;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTMatcher::match(ExpressionListParenAST *node, ExpressionListParenAST *pattern)
|
||||
{
|
||||
(void) node;
|
||||
|
||||
Reference in New Issue
Block a user