tools/icheck/parser/src/shared/cplusplus/ASTMatch0.cpp
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 #include "AST.h"
       
    43 #include "ASTMatcher.h"
       
    44 
       
    45 using namespace CPlusPlus;
       
    46 
       
    47 bool SimpleSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
    48 {
       
    49     if (SimpleSpecifierAST *_other = pattern->asSimpleSpecifier())
       
    50         return matcher->match(this, _other);
       
    51 
       
    52     return false;
       
    53 }
       
    54 
       
    55 bool AttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
    56 {
       
    57     if (AttributeSpecifierAST *_other = pattern->asAttributeSpecifier())
       
    58         return matcher->match(this, _other);
       
    59 
       
    60     return false;
       
    61 }
       
    62 
       
    63 bool AttributeAST::match0(AST *pattern, ASTMatcher *matcher)
       
    64 {
       
    65     if (AttributeAST *_other = pattern->asAttribute())
       
    66         return matcher->match(this, _other);
       
    67 
       
    68     return false;
       
    69 }
       
    70 
       
    71 bool TypeofSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
    72 {
       
    73     if (TypeofSpecifierAST *_other = pattern->asTypeofSpecifier())
       
    74         return matcher->match(this, _other);
       
    75 
       
    76     return false;
       
    77 }
       
    78 
       
    79 bool DeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
    80 {
       
    81     if (DeclaratorAST *_other = pattern->asDeclarator())
       
    82         return matcher->match(this, _other);
       
    83 
       
    84     return false;
       
    85 }
       
    86 
       
    87 bool SimpleDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
    88 {
       
    89     if (SimpleDeclarationAST *_other = pattern->asSimpleDeclaration())
       
    90         return matcher->match(this, _other);
       
    91 
       
    92     return false;
       
    93 }
       
    94 
       
    95 bool EmptyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
    96 {
       
    97     if (EmptyDeclarationAST *_other = pattern->asEmptyDeclaration())
       
    98         return matcher->match(this, _other);
       
    99 
       
   100     return false;
       
   101 }
       
   102 
       
   103 bool AccessDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   104 {
       
   105     if (AccessDeclarationAST *_other = pattern->asAccessDeclaration())
       
   106         return matcher->match(this, _other);
       
   107 
       
   108     return false;
       
   109 }
       
   110 
       
   111 #ifdef ICHECK_BUILD
       
   112 bool QPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   113 {
       
   114     if (QPropertyDeclarationAST *_other = pattern->asQPropertyDeclarationAST())
       
   115         return matcher->match(this, _other);
       
   116 
       
   117     return false;
       
   118 }
       
   119 
       
   120 bool QEnumDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   121 {
       
   122     if (QEnumDeclarationAST *_other = pattern->asQEnumDeclarationAST())
       
   123         return matcher->match(this, _other);
       
   124 
       
   125     return false;
       
   126 }
       
   127 
       
   128 bool QFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   129 {
       
   130     if (QFlagsDeclarationAST *_other = pattern->asQFlagsDeclarationAST())
       
   131         return matcher->match(this, _other);
       
   132 
       
   133     return false;
       
   134 }
       
   135 
       
   136 bool QDeclareFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   137 {
       
   138     if (QDeclareFlagsDeclarationAST *_other = pattern->asQDeclareFlagsDeclarationAST())
       
   139         return matcher->match(this, _other);
       
   140 
       
   141     return false;
       
   142 }
       
   143 #endif
       
   144 
       
   145 bool AsmDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   146 {
       
   147     if (AsmDefinitionAST *_other = pattern->asAsmDefinition())
       
   148         return matcher->match(this, _other);
       
   149 
       
   150     return false;
       
   151 }
       
   152 
       
   153 bool BaseSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   154 {
       
   155     if (BaseSpecifierAST *_other = pattern->asBaseSpecifier())
       
   156         return matcher->match(this, _other);
       
   157 
       
   158     return false;
       
   159 }
       
   160 
       
   161 bool CompoundLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
       
   162 {
       
   163     if (CompoundLiteralAST *_other = pattern->asCompoundLiteral())
       
   164         return matcher->match(this, _other);
       
   165 
       
   166     return false;
       
   167 }
       
   168 
       
   169 bool QtMethodAST::match0(AST *pattern, ASTMatcher *matcher)
       
   170 {
       
   171     if (QtMethodAST *_other = pattern->asQtMethod())
       
   172         return matcher->match(this, _other);
       
   173 
       
   174     return false;
       
   175 }
       
   176 
       
   177 bool QtMemberDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   178 {
       
   179     if (QtMemberDeclarationAST *_other = pattern->asQtMemberDeclaration())
       
   180         return matcher->match(this, _other);
       
   181 
       
   182     return false;
       
   183 }
       
   184 
       
   185 bool BinaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   186 {
       
   187     if (BinaryExpressionAST *_other = pattern->asBinaryExpression())
       
   188         return matcher->match(this, _other);
       
   189 
       
   190     return false;
       
   191 }
       
   192 
       
   193 bool CastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   194 {
       
   195     if (CastExpressionAST *_other = pattern->asCastExpression())
       
   196         return matcher->match(this, _other);
       
   197 
       
   198     return false;
       
   199 }
       
   200 
       
   201 bool ClassSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   202 {
       
   203     if (ClassSpecifierAST *_other = pattern->asClassSpecifier())
       
   204         return matcher->match(this, _other);
       
   205 
       
   206     return false;
       
   207 }
       
   208 
       
   209 bool CaseStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   210 {
       
   211     if (CaseStatementAST *_other = pattern->asCaseStatement())
       
   212         return matcher->match(this, _other);
       
   213 
       
   214     return false;
       
   215 }
       
   216 
       
   217 bool CompoundStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   218 {
       
   219     if (CompoundStatementAST *_other = pattern->asCompoundStatement())
       
   220         return matcher->match(this, _other);
       
   221 
       
   222     return false;
       
   223 }
       
   224 
       
   225 bool ConditionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   226 {
       
   227     if (ConditionAST *_other = pattern->asCondition())
       
   228         return matcher->match(this, _other);
       
   229 
       
   230     return false;
       
   231 }
       
   232 
       
   233 bool ConditionalExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   234 {
       
   235     if (ConditionalExpressionAST *_other = pattern->asConditionalExpression())
       
   236         return matcher->match(this, _other);
       
   237 
       
   238     return false;
       
   239 }
       
   240 
       
   241 bool CppCastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   242 {
       
   243     if (CppCastExpressionAST *_other = pattern->asCppCastExpression())
       
   244         return matcher->match(this, _other);
       
   245 
       
   246     return false;
       
   247 }
       
   248 
       
   249 bool CtorInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
       
   250 {
       
   251     if (CtorInitializerAST *_other = pattern->asCtorInitializer())
       
   252         return matcher->match(this, _other);
       
   253 
       
   254     return false;
       
   255 }
       
   256 
       
   257 bool DeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   258 {
       
   259     if (DeclarationStatementAST *_other = pattern->asDeclarationStatement())
       
   260         return matcher->match(this, _other);
       
   261 
       
   262     return false;
       
   263 }
       
   264 
       
   265 bool DeclaratorIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   266 {
       
   267     if (DeclaratorIdAST *_other = pattern->asDeclaratorId())
       
   268         return matcher->match(this, _other);
       
   269 
       
   270     return false;
       
   271 }
       
   272 
       
   273 bool NestedDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   274 {
       
   275     if (NestedDeclaratorAST *_other = pattern->asNestedDeclarator())
       
   276         return matcher->match(this, _other);
       
   277 
       
   278     return false;
       
   279 }
       
   280 
       
   281 bool FunctionDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   282 {
       
   283     if (FunctionDeclaratorAST *_other = pattern->asFunctionDeclarator())
       
   284         return matcher->match(this, _other);
       
   285 
       
   286     return false;
       
   287 }
       
   288 
       
   289 bool ArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   290 {
       
   291     if (ArrayDeclaratorAST *_other = pattern->asArrayDeclarator())
       
   292         return matcher->match(this, _other);
       
   293 
       
   294     return false;
       
   295 }
       
   296 
       
   297 bool DeleteExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   298 {
       
   299     if (DeleteExpressionAST *_other = pattern->asDeleteExpression())
       
   300         return matcher->match(this, _other);
       
   301 
       
   302     return false;
       
   303 }
       
   304 
       
   305 bool DoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   306 {
       
   307     if (DoStatementAST *_other = pattern->asDoStatement())
       
   308         return matcher->match(this, _other);
       
   309 
       
   310     return false;
       
   311 }
       
   312 
       
   313 bool NamedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   314 {
       
   315     if (NamedTypeSpecifierAST *_other = pattern->asNamedTypeSpecifier())
       
   316         return matcher->match(this, _other);
       
   317 
       
   318     return false;
       
   319 }
       
   320 
       
   321 bool ElaboratedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   322 {
       
   323     if (ElaboratedTypeSpecifierAST *_other = pattern->asElaboratedTypeSpecifier())
       
   324         return matcher->match(this, _other);
       
   325 
       
   326     return false;
       
   327 }
       
   328 
       
   329 bool EnumSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   330 {
       
   331     if (EnumSpecifierAST *_other = pattern->asEnumSpecifier())
       
   332         return matcher->match(this, _other);
       
   333 
       
   334     return false;
       
   335 }
       
   336 
       
   337 bool EnumeratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   338 {
       
   339     if (EnumeratorAST *_other = pattern->asEnumerator())
       
   340         return matcher->match(this, _other);
       
   341 
       
   342     return false;
       
   343 }
       
   344 
       
   345 bool ExceptionDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   346 {
       
   347     if (ExceptionDeclarationAST *_other = pattern->asExceptionDeclaration())
       
   348         return matcher->match(this, _other);
       
   349 
       
   350     return false;
       
   351 }
       
   352 
       
   353 bool ExceptionSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   354 {
       
   355     if (ExceptionSpecificationAST *_other = pattern->asExceptionSpecification())
       
   356         return matcher->match(this, _other);
       
   357 
       
   358     return false;
       
   359 }
       
   360 
       
   361 bool ExpressionOrDeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   362 {
       
   363     if (ExpressionOrDeclarationStatementAST *_other = pattern->asExpressionOrDeclarationStatement())
       
   364         return matcher->match(this, _other);
       
   365 
       
   366     return false;
       
   367 }
       
   368 
       
   369 bool ExpressionStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   370 {
       
   371     if (ExpressionStatementAST *_other = pattern->asExpressionStatement())
       
   372         return matcher->match(this, _other);
       
   373 
       
   374     return false;
       
   375 }
       
   376 
       
   377 bool FunctionDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   378 {
       
   379     if (FunctionDefinitionAST *_other = pattern->asFunctionDefinition())
       
   380         return matcher->match(this, _other);
       
   381 
       
   382     return false;
       
   383 }
       
   384 
       
   385 bool ForeachStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   386 {
       
   387     if (ForeachStatementAST *_other = pattern->asForeachStatement())
       
   388         return matcher->match(this, _other);
       
   389 
       
   390     return false;
       
   391 }
       
   392 
       
   393 bool ForStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   394 {
       
   395     if (ForStatementAST *_other = pattern->asForStatement())
       
   396         return matcher->match(this, _other);
       
   397 
       
   398     return false;
       
   399 }
       
   400 
       
   401 bool IfStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   402 {
       
   403     if (IfStatementAST *_other = pattern->asIfStatement())
       
   404         return matcher->match(this, _other);
       
   405 
       
   406     return false;
       
   407 }
       
   408 
       
   409 bool ArrayInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
       
   410 {
       
   411     if (ArrayInitializerAST *_other = pattern->asArrayInitializer())
       
   412         return matcher->match(this, _other);
       
   413 
       
   414     return false;
       
   415 }
       
   416 
       
   417 bool LabeledStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   418 {
       
   419     if (LabeledStatementAST *_other = pattern->asLabeledStatement())
       
   420         return matcher->match(this, _other);
       
   421 
       
   422     return false;
       
   423 }
       
   424 
       
   425 bool LinkageBodyAST::match0(AST *pattern, ASTMatcher *matcher)
       
   426 {
       
   427     if (LinkageBodyAST *_other = pattern->asLinkageBody())
       
   428         return matcher->match(this, _other);
       
   429 
       
   430     return false;
       
   431 }
       
   432 
       
   433 bool LinkageSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   434 {
       
   435     if (LinkageSpecificationAST *_other = pattern->asLinkageSpecification())
       
   436         return matcher->match(this, _other);
       
   437 
       
   438     return false;
       
   439 }
       
   440 
       
   441 bool MemInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
       
   442 {
       
   443     if (MemInitializerAST *_other = pattern->asMemInitializer())
       
   444         return matcher->match(this, _other);
       
   445 
       
   446     return false;
       
   447 }
       
   448 
       
   449 bool NestedNameSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
       
   450 {
       
   451     if (NestedNameSpecifierAST *_other = pattern->asNestedNameSpecifier())
       
   452         return matcher->match(this, _other);
       
   453 
       
   454     return false;
       
   455 }
       
   456 
       
   457 bool QualifiedNameAST::match0(AST *pattern, ASTMatcher *matcher)
       
   458 {
       
   459     if (QualifiedNameAST *_other = pattern->asQualifiedName())
       
   460         return matcher->match(this, _other);
       
   461 
       
   462     return false;
       
   463 }
       
   464 
       
   465 bool OperatorFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   466 {
       
   467     if (OperatorFunctionIdAST *_other = pattern->asOperatorFunctionId())
       
   468         return matcher->match(this, _other);
       
   469 
       
   470     return false;
       
   471 }
       
   472 
       
   473 bool ConversionFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   474 {
       
   475     if (ConversionFunctionIdAST *_other = pattern->asConversionFunctionId())
       
   476         return matcher->match(this, _other);
       
   477 
       
   478     return false;
       
   479 }
       
   480 
       
   481 bool SimpleNameAST::match0(AST *pattern, ASTMatcher *matcher)
       
   482 {
       
   483     if (SimpleNameAST *_other = pattern->asSimpleName())
       
   484         return matcher->match(this, _other);
       
   485 
       
   486     return false;
       
   487 }
       
   488 
       
   489 bool DestructorNameAST::match0(AST *pattern, ASTMatcher *matcher)
       
   490 {
       
   491     if (DestructorNameAST *_other = pattern->asDestructorName())
       
   492         return matcher->match(this, _other);
       
   493 
       
   494     return false;
       
   495 }
       
   496 
       
   497 bool TemplateIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   498 {
       
   499     if (TemplateIdAST *_other = pattern->asTemplateId())
       
   500         return matcher->match(this, _other);
       
   501 
       
   502     return false;
       
   503 }
       
   504 
       
   505 bool NamespaceAST::match0(AST *pattern, ASTMatcher *matcher)
       
   506 {
       
   507     if (NamespaceAST *_other = pattern->asNamespace())
       
   508         return matcher->match(this, _other);
       
   509 
       
   510     return false;
       
   511 }
       
   512 
       
   513 bool NamespaceAliasDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   514 {
       
   515     if (NamespaceAliasDefinitionAST *_other = pattern->asNamespaceAliasDefinition())
       
   516         return matcher->match(this, _other);
       
   517 
       
   518     return false;
       
   519 }
       
   520 
       
   521 bool NewPlacementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   522 {
       
   523     if (NewPlacementAST *_other = pattern->asNewPlacement())
       
   524         return matcher->match(this, _other);
       
   525 
       
   526     return false;
       
   527 }
       
   528 
       
   529 bool NewArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   530 {
       
   531     if (NewArrayDeclaratorAST *_other = pattern->asNewArrayDeclarator())
       
   532         return matcher->match(this, _other);
       
   533 
       
   534     return false;
       
   535 }
       
   536 
       
   537 bool NewExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   538 {
       
   539     if (NewExpressionAST *_other = pattern->asNewExpression())
       
   540         return matcher->match(this, _other);
       
   541 
       
   542     return false;
       
   543 }
       
   544 
       
   545 bool NewInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
       
   546 {
       
   547     if (NewInitializerAST *_other = pattern->asNewInitializer())
       
   548         return matcher->match(this, _other);
       
   549 
       
   550     return false;
       
   551 }
       
   552 
       
   553 bool NewTypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   554 {
       
   555     if (NewTypeIdAST *_other = pattern->asNewTypeId())
       
   556         return matcher->match(this, _other);
       
   557 
       
   558     return false;
       
   559 }
       
   560 
       
   561 bool OperatorAST::match0(AST *pattern, ASTMatcher *matcher)
       
   562 {
       
   563     if (OperatorAST *_other = pattern->asOperator())
       
   564         return matcher->match(this, _other);
       
   565 
       
   566     return false;
       
   567 }
       
   568 
       
   569 bool ParameterDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   570 {
       
   571     if (ParameterDeclarationAST *_other = pattern->asParameterDeclaration())
       
   572         return matcher->match(this, _other);
       
   573 
       
   574     return false;
       
   575 }
       
   576 
       
   577 bool ParameterDeclarationClauseAST::match0(AST *pattern, ASTMatcher *matcher)
       
   578 {
       
   579     if (ParameterDeclarationClauseAST *_other = pattern->asParameterDeclarationClause())
       
   580         return matcher->match(this, _other);
       
   581 
       
   582     return false;
       
   583 }
       
   584 
       
   585 bool CallAST::match0(AST *pattern, ASTMatcher *matcher)
       
   586 {
       
   587     if (CallAST *_other = pattern->asCall())
       
   588         return matcher->match(this, _other);
       
   589 
       
   590     return false;
       
   591 }
       
   592 
       
   593 bool ArrayAccessAST::match0(AST *pattern, ASTMatcher *matcher)
       
   594 {
       
   595     if (ArrayAccessAST *_other = pattern->asArrayAccess())
       
   596         return matcher->match(this, _other);
       
   597 
       
   598     return false;
       
   599 }
       
   600 
       
   601 bool PostIncrDecrAST::match0(AST *pattern, ASTMatcher *matcher)
       
   602 {
       
   603     if (PostIncrDecrAST *_other = pattern->asPostIncrDecr())
       
   604         return matcher->match(this, _other);
       
   605 
       
   606     return false;
       
   607 }
       
   608 
       
   609 bool MemberAccessAST::match0(AST *pattern, ASTMatcher *matcher)
       
   610 {
       
   611     if (MemberAccessAST *_other = pattern->asMemberAccess())
       
   612         return matcher->match(this, _other);
       
   613 
       
   614     return false;
       
   615 }
       
   616 
       
   617 bool TypeidExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   618 {
       
   619     if (TypeidExpressionAST *_other = pattern->asTypeidExpression())
       
   620         return matcher->match(this, _other);
       
   621 
       
   622     return false;
       
   623 }
       
   624 
       
   625 bool TypenameCallExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   626 {
       
   627     if (TypenameCallExpressionAST *_other = pattern->asTypenameCallExpression())
       
   628         return matcher->match(this, _other);
       
   629 
       
   630     return false;
       
   631 }
       
   632 
       
   633 bool TypeConstructorCallAST::match0(AST *pattern, ASTMatcher *matcher)
       
   634 {
       
   635     if (TypeConstructorCallAST *_other = pattern->asTypeConstructorCall())
       
   636         return matcher->match(this, _other);
       
   637 
       
   638     return false;
       
   639 }
       
   640 
       
   641 bool PostfixExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   642 {
       
   643     if (PostfixExpressionAST *_other = pattern->asPostfixExpression())
       
   644         return matcher->match(this, _other);
       
   645 
       
   646     return false;
       
   647 }
       
   648 
       
   649 bool PointerToMemberAST::match0(AST *pattern, ASTMatcher *matcher)
       
   650 {
       
   651     if (PointerToMemberAST *_other = pattern->asPointerToMember())
       
   652         return matcher->match(this, _other);
       
   653 
       
   654     return false;
       
   655 }
       
   656 
       
   657 bool PointerAST::match0(AST *pattern, ASTMatcher *matcher)
       
   658 {
       
   659     if (PointerAST *_other = pattern->asPointer())
       
   660         return matcher->match(this, _other);
       
   661 
       
   662     return false;
       
   663 }
       
   664 
       
   665 bool ReferenceAST::match0(AST *pattern, ASTMatcher *matcher)
       
   666 {
       
   667     if (ReferenceAST *_other = pattern->asReference())
       
   668         return matcher->match(this, _other);
       
   669 
       
   670     return false;
       
   671 }
       
   672 
       
   673 bool BreakStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   674 {
       
   675     if (BreakStatementAST *_other = pattern->asBreakStatement())
       
   676         return matcher->match(this, _other);
       
   677 
       
   678     return false;
       
   679 }
       
   680 
       
   681 bool ContinueStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   682 {
       
   683     if (ContinueStatementAST *_other = pattern->asContinueStatement())
       
   684         return matcher->match(this, _other);
       
   685 
       
   686     return false;
       
   687 }
       
   688 
       
   689 bool GotoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   690 {
       
   691     if (GotoStatementAST *_other = pattern->asGotoStatement())
       
   692         return matcher->match(this, _other);
       
   693 
       
   694     return false;
       
   695 }
       
   696 
       
   697 bool ReturnStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   698 {
       
   699     if (ReturnStatementAST *_other = pattern->asReturnStatement())
       
   700         return matcher->match(this, _other);
       
   701 
       
   702     return false;
       
   703 }
       
   704 
       
   705 bool SizeofExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   706 {
       
   707     if (SizeofExpressionAST *_other = pattern->asSizeofExpression())
       
   708         return matcher->match(this, _other);
       
   709 
       
   710     return false;
       
   711 }
       
   712 
       
   713 bool NumericLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
       
   714 {
       
   715     if (NumericLiteralAST *_other = pattern->asNumericLiteral())
       
   716         return matcher->match(this, _other);
       
   717 
       
   718     return false;
       
   719 }
       
   720 
       
   721 bool BoolLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
       
   722 {
       
   723     if (BoolLiteralAST *_other = pattern->asBoolLiteral())
       
   724         return matcher->match(this, _other);
       
   725 
       
   726     return false;
       
   727 }
       
   728 
       
   729 bool ThisExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   730 {
       
   731     if (ThisExpressionAST *_other = pattern->asThisExpression())
       
   732         return matcher->match(this, _other);
       
   733 
       
   734     return false;
       
   735 }
       
   736 
       
   737 bool NestedExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   738 {
       
   739     if (NestedExpressionAST *_other = pattern->asNestedExpression())
       
   740         return matcher->match(this, _other);
       
   741 
       
   742     return false;
       
   743 }
       
   744 
       
   745 bool StringLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
       
   746 {
       
   747     if (StringLiteralAST *_other = pattern->asStringLiteral())
       
   748         return matcher->match(this, _other);
       
   749 
       
   750     return false;
       
   751 }
       
   752 
       
   753 bool SwitchStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   754 {
       
   755     if (SwitchStatementAST *_other = pattern->asSwitchStatement())
       
   756         return matcher->match(this, _other);
       
   757 
       
   758     return false;
       
   759 }
       
   760 
       
   761 bool TemplateDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   762 {
       
   763     if (TemplateDeclarationAST *_other = pattern->asTemplateDeclaration())
       
   764         return matcher->match(this, _other);
       
   765 
       
   766     return false;
       
   767 }
       
   768 
       
   769 bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   770 {
       
   771     if (ThrowExpressionAST *_other = pattern->asThrowExpression())
       
   772         return matcher->match(this, _other);
       
   773 
       
   774     return false;
       
   775 }
       
   776 
       
   777 bool TranslationUnitAST::match0(AST *pattern, ASTMatcher *matcher)
       
   778 {
       
   779     if (TranslationUnitAST *_other = pattern->asTranslationUnit())
       
   780         return matcher->match(this, _other);
       
   781 
       
   782     return false;
       
   783 }
       
   784 
       
   785 bool TryBlockStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   786 {
       
   787     if (TryBlockStatementAST *_other = pattern->asTryBlockStatement())
       
   788         return matcher->match(this, _other);
       
   789 
       
   790     return false;
       
   791 }
       
   792 
       
   793 bool CatchClauseAST::match0(AST *pattern, ASTMatcher *matcher)
       
   794 {
       
   795     if (CatchClauseAST *_other = pattern->asCatchClause())
       
   796         return matcher->match(this, _other);
       
   797 
       
   798     return false;
       
   799 }
       
   800 
       
   801 bool TypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
       
   802 {
       
   803     if (TypeIdAST *_other = pattern->asTypeId())
       
   804         return matcher->match(this, _other);
       
   805 
       
   806     return false;
       
   807 }
       
   808 
       
   809 bool TypenameTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
       
   810 {
       
   811     if (TypenameTypeParameterAST *_other = pattern->asTypenameTypeParameter())
       
   812         return matcher->match(this, _other);
       
   813 
       
   814     return false;
       
   815 }
       
   816 
       
   817 bool TemplateTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
       
   818 {
       
   819     if (TemplateTypeParameterAST *_other = pattern->asTemplateTypeParameter())
       
   820         return matcher->match(this, _other);
       
   821 
       
   822     return false;
       
   823 }
       
   824 
       
   825 bool UnaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   826 {
       
   827     if (UnaryExpressionAST *_other = pattern->asUnaryExpression())
       
   828         return matcher->match(this, _other);
       
   829 
       
   830     return false;
       
   831 }
       
   832 
       
   833 bool UsingAST::match0(AST *pattern, ASTMatcher *matcher)
       
   834 {
       
   835     if (UsingAST *_other = pattern->asUsing())
       
   836         return matcher->match(this, _other);
       
   837 
       
   838     return false;
       
   839 }
       
   840 
       
   841 bool UsingDirectiveAST::match0(AST *pattern, ASTMatcher *matcher)
       
   842 {
       
   843     if (UsingDirectiveAST *_other = pattern->asUsingDirective())
       
   844         return matcher->match(this, _other);
       
   845 
       
   846     return false;
       
   847 }
       
   848 
       
   849 bool WhileStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
   850 {
       
   851     if (WhileStatementAST *_other = pattern->asWhileStatement())
       
   852         return matcher->match(this, _other);
       
   853 
       
   854     return false;
       
   855 }
       
   856 
       
   857 bool ObjCClassForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   858 {
       
   859     if (ObjCClassForwardDeclarationAST *_other = pattern->asObjCClassForwardDeclaration())
       
   860         return matcher->match(this, _other);
       
   861 
       
   862     return false;
       
   863 }
       
   864 
       
   865 bool ObjCClassDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   866 {
       
   867     if (ObjCClassDeclarationAST *_other = pattern->asObjCClassDeclaration())
       
   868         return matcher->match(this, _other);
       
   869 
       
   870     return false;
       
   871 }
       
   872 
       
   873 bool ObjCProtocolForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   874 {
       
   875     if (ObjCProtocolForwardDeclarationAST *_other = pattern->asObjCProtocolForwardDeclaration())
       
   876         return matcher->match(this, _other);
       
   877 
       
   878     return false;
       
   879 }
       
   880 
       
   881 bool ObjCProtocolDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   882 {
       
   883     if (ObjCProtocolDeclarationAST *_other = pattern->asObjCProtocolDeclaration())
       
   884         return matcher->match(this, _other);
       
   885 
       
   886     return false;
       
   887 }
       
   888 
       
   889 bool ObjCProtocolRefsAST::match0(AST *pattern, ASTMatcher *matcher)
       
   890 {
       
   891     if (ObjCProtocolRefsAST *_other = pattern->asObjCProtocolRefs())
       
   892         return matcher->match(this, _other);
       
   893 
       
   894     return false;
       
   895 }
       
   896 
       
   897 bool ObjCMessageArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
       
   898 {
       
   899     if (ObjCMessageArgumentAST *_other = pattern->asObjCMessageArgument())
       
   900         return matcher->match(this, _other);
       
   901 
       
   902     return false;
       
   903 }
       
   904 
       
   905 bool ObjCMessageExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   906 {
       
   907     if (ObjCMessageExpressionAST *_other = pattern->asObjCMessageExpression())
       
   908         return matcher->match(this, _other);
       
   909 
       
   910     return false;
       
   911 }
       
   912 
       
   913 bool ObjCProtocolExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   914 {
       
   915     if (ObjCProtocolExpressionAST *_other = pattern->asObjCProtocolExpression())
       
   916         return matcher->match(this, _other);
       
   917 
       
   918     return false;
       
   919 }
       
   920 
       
   921 bool ObjCTypeNameAST::match0(AST *pattern, ASTMatcher *matcher)
       
   922 {
       
   923     if (ObjCTypeNameAST *_other = pattern->asObjCTypeName())
       
   924         return matcher->match(this, _other);
       
   925 
       
   926     return false;
       
   927 }
       
   928 
       
   929 bool ObjCEncodeExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   930 {
       
   931     if (ObjCEncodeExpressionAST *_other = pattern->asObjCEncodeExpression())
       
   932         return matcher->match(this, _other);
       
   933 
       
   934     return false;
       
   935 }
       
   936 
       
   937 bool ObjCSelectorWithoutArgumentsAST::match0(AST *pattern, ASTMatcher *matcher)
       
   938 {
       
   939     if (ObjCSelectorWithoutArgumentsAST *_other = pattern->asObjCSelectorWithoutArguments())
       
   940         return matcher->match(this, _other);
       
   941 
       
   942     return false;
       
   943 }
       
   944 
       
   945 bool ObjCSelectorArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
       
   946 {
       
   947     if (ObjCSelectorArgumentAST *_other = pattern->asObjCSelectorArgument())
       
   948         return matcher->match(this, _other);
       
   949 
       
   950     return false;
       
   951 }
       
   952 
       
   953 bool ObjCSelectorWithArgumentsAST::match0(AST *pattern, ASTMatcher *matcher)
       
   954 {
       
   955     if (ObjCSelectorWithArgumentsAST *_other = pattern->asObjCSelectorWithArguments())
       
   956         return matcher->match(this, _other);
       
   957 
       
   958     return false;
       
   959 }
       
   960 
       
   961 bool ObjCSelectorExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
       
   962 {
       
   963     if (ObjCSelectorExpressionAST *_other = pattern->asObjCSelectorExpression())
       
   964         return matcher->match(this, _other);
       
   965 
       
   966     return false;
       
   967 }
       
   968 
       
   969 bool ObjCInstanceVariablesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   970 {
       
   971     if (ObjCInstanceVariablesDeclarationAST *_other = pattern->asObjCInstanceVariablesDeclaration())
       
   972         return matcher->match(this, _other);
       
   973 
       
   974     return false;
       
   975 }
       
   976 
       
   977 bool ObjCVisibilityDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   978 {
       
   979     if (ObjCVisibilityDeclarationAST *_other = pattern->asObjCVisibilityDeclaration())
       
   980         return matcher->match(this, _other);
       
   981 
       
   982     return false;
       
   983 }
       
   984 
       
   985 bool ObjCPropertyAttributeAST::match0(AST *pattern, ASTMatcher *matcher)
       
   986 {
       
   987     if (ObjCPropertyAttributeAST *_other = pattern->asObjCPropertyAttribute())
       
   988         return matcher->match(this, _other);
       
   989 
       
   990     return false;
       
   991 }
       
   992 
       
   993 bool ObjCPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
   994 {
       
   995     if (ObjCPropertyDeclarationAST *_other = pattern->asObjCPropertyDeclaration())
       
   996         return matcher->match(this, _other);
       
   997 
       
   998     return false;
       
   999 }
       
  1000 
       
  1001 bool ObjCMessageArgumentDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1002 {
       
  1003     if (ObjCMessageArgumentDeclarationAST *_other = pattern->asObjCMessageArgumentDeclaration())
       
  1004         return matcher->match(this, _other);
       
  1005 
       
  1006     return false;
       
  1007 }
       
  1008 
       
  1009 bool ObjCMethodPrototypeAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1010 {
       
  1011     if (ObjCMethodPrototypeAST *_other = pattern->asObjCMethodPrototype())
       
  1012         return matcher->match(this, _other);
       
  1013 
       
  1014     return false;
       
  1015 }
       
  1016 
       
  1017 bool ObjCMethodDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1018 {
       
  1019     if (ObjCMethodDeclarationAST *_other = pattern->asObjCMethodDeclaration())
       
  1020         return matcher->match(this, _other);
       
  1021 
       
  1022     return false;
       
  1023 }
       
  1024 
       
  1025 bool ObjCSynthesizedPropertyAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1026 {
       
  1027     if (ObjCSynthesizedPropertyAST *_other = pattern->asObjCSynthesizedProperty())
       
  1028         return matcher->match(this, _other);
       
  1029 
       
  1030     return false;
       
  1031 }
       
  1032 
       
  1033 bool ObjCSynthesizedPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1034 {
       
  1035     if (ObjCSynthesizedPropertiesDeclarationAST *_other = pattern->asObjCSynthesizedPropertiesDeclaration())
       
  1036         return matcher->match(this, _other);
       
  1037 
       
  1038     return false;
       
  1039 }
       
  1040 
       
  1041 bool ObjCDynamicPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1042 {
       
  1043     if (ObjCDynamicPropertiesDeclarationAST *_other = pattern->asObjCDynamicPropertiesDeclaration())
       
  1044         return matcher->match(this, _other);
       
  1045 
       
  1046     return false;
       
  1047 }
       
  1048 
       
  1049 bool ObjCFastEnumerationAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1050 {
       
  1051     if (ObjCFastEnumerationAST *_other = pattern->asObjCFastEnumeration())
       
  1052         return matcher->match(this, _other);
       
  1053 
       
  1054     return false;
       
  1055 }
       
  1056 
       
  1057 bool ObjCSynchronizedStatementAST::match0(AST *pattern, ASTMatcher *matcher)
       
  1058 {
       
  1059     if (ObjCSynchronizedStatementAST *_other = pattern->asObjCSynchronizedStatement())
       
  1060         return matcher->match(this, _other);
       
  1061 
       
  1062     return false;
       
  1063 }
       
  1064