forked from qt-creator/qt-creator
C++11: add support for static_assert.
Change-Id: I82d8d60acaa9265fd25e0a3734855b19bdef9c06 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
28
src/libs/3rdparty/cplusplus/ASTMatcher.cpp
vendored
28
src/libs/3rdparty/cplusplus/ASTMatcher.cpp
vendored
@@ -1917,6 +1917,34 @@ bool ASTMatcher::match(NestedExpressionAST *node, NestedExpressionAST *pattern)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTMatcher::match(StaticAssertDeclarationAST *node, StaticAssertDeclarationAST *pattern)
|
||||
{
|
||||
(void) node;
|
||||
(void) pattern;
|
||||
|
||||
pattern->static_assert_token = node->static_assert_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->comma_token = node->comma_token;
|
||||
|
||||
if (! pattern->string_literal)
|
||||
pattern->string_literal = node->string_literal;
|
||||
else if (! AST::match(node->string_literal, pattern->string_literal, this))
|
||||
return false;
|
||||
|
||||
pattern->rparen_token = node->rparen_token;
|
||||
|
||||
pattern->semicolon_token = node->semicolon_token;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ASTMatcher::match(StringLiteralAST *node, StringLiteralAST *pattern)
|
||||
{
|
||||
(void) node;
|
||||
|
||||
Reference in New Issue
Block a user