Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersMacros.h
Line
Count
Source
1
//===--- ASTMatchersMacros.h - Structural query framework -------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
//  Defines macros that enable us to define new matchers in a single place.
10
//  Since a matcher is a function which returns a Matcher<T> object, where
11
//  T is the type of the actual implementation of the matcher, the macros allow
12
//  us to write matchers like functions and take care of the definition of the
13
//  class boilerplate.
14
//
15
//  Note that when you define a matcher with an AST_MATCHER* macro, only the
16
//  function which creates the matcher goes into the current namespace - the
17
//  class that implements the actual matcher, which gets returned by the
18
//  generator function, is put into the 'internal' namespace. This allows us
19
//  to only have the functions (which is all the user cares about) in the
20
//  'ast_matchers' namespace and hide the boilerplate.
21
//
22
//  To define a matcher in user code, put it into your own namespace. This would
23
//  help to prevent ODR violations in case a matcher with the same name is
24
//  defined in multiple translation units:
25
//
26
//  namespace my_matchers {
27
//  AST_MATCHER_P(clang::MemberExpr, Member,
28
//                clang::ast_matchers::internal::Matcher<clang::ValueDecl>,
29
//                InnerMatcher) {
30
//    return InnerMatcher.matches(*Node.getMemberDecl(), Finder, Builder);
31
//  }
32
//  } // namespace my_matchers
33
//
34
//  Alternatively, an unnamed namespace may be used:
35
//
36
//  namespace clang {
37
//  namespace ast_matchers {
38
//  namespace {
39
//  AST_MATCHER_P(MemberExpr, Member,
40
//                internal::Matcher<ValueDecl>, InnerMatcher) {
41
//    return InnerMatcher.matches(*Node.getMemberDecl(), Finder, Builder);
42
//  }
43
//  } // namespace
44
//  } // namespace ast_matchers
45
//  } // namespace clang
46
//
47
//===----------------------------------------------------------------------===//
48
49
#ifndef LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
50
#define LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
51
52
/// AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... }
53
/// defines a zero parameter function named DefineMatcher() that returns a
54
/// ReturnType object.
55
#define AST_MATCHER_FUNCTION(ReturnType, DefineMatcher)                        \
56
  inline ReturnType DefineMatcher##_getInstance();                             \
57
404
  inline ReturnType DefineMatcher() {                                          \
58
404
    return ::clang::ast_matchers::internal::MemoizedMatcher<                   \
59
404
        ReturnType, DefineMatcher##_getInstance>::getInstance();               \
60
404
  }                                                                            \
61
  inline ReturnType DefineMatcher##_getInstance()
62
63
/// AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param) {
64
/// ... }
65
/// defines a single-parameter function named DefineMatcher() that returns a
66
/// ReturnType object.
67
///
68
/// The code between the curly braces has access to the following variables:
69
///
70
///   Param:                 the parameter passed to the function; its type
71
///                          is ParamType.
72
///
73
/// The code should return an instance of ReturnType.
74
#define AST_MATCHER_FUNCTION_P(ReturnType, DefineMatcher, ParamType, Param)    \
75
  AST_MATCHER_FUNCTION_P_OVERLOAD(ReturnType, DefineMatcher, ParamType, Param, \
76
                                  0)
77
#define AST_MATCHER_FUNCTION_P_OVERLOAD(ReturnType, DefineMatcher, ParamType,  \
78
                                        Param, OverloadId)                     \
79
  inline ReturnType DefineMatcher(ParamType const &Param);                     \
80
  typedef ReturnType (&DefineMatcher##_Type##OverloadId)(ParamType const &);   \
81
  inline ReturnType DefineMatcher(ParamType const &Param)
82
83
/// AST_MATCHER(Type, DefineMatcher) { ... }
84
/// defines a zero parameter function named DefineMatcher() that returns a
85
/// Matcher<Type> object.
86
///
87
/// The code between the curly braces has access to the following variables:
88
///
89
///   Node:                  the AST node being matched; its type is Type.
90
///   Finder:                an ASTMatchFinder*.
91
///   Builder:               a BoundNodesTreeBuilder*.
92
///
93
/// The code should return true if 'Node' matches.
94
#define AST_MATCHER(Type, DefineMatcher)                                       \
95
  namespace internal {                                                         \
96
  class matcher_##DefineMatcher##Matcher                                       \
97
      : public ::clang::ast_matchers::internal::MatcherInterface<Type> {       \
98
  public:                                                                      \
99
22.4k
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_booleanTypeMatcher::matcher_booleanTypeMatcher()
Line
Count
Source
99
240
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isIntegerMatcher::matcher_isIntegerMatcher()
Line
Count
Source
99
586
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isMainMatcher::matcher_isMainMatcher()
Line
Count
Source
99
192
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isNoReturnMatcher::matcher_isNoReturnMatcher()
Line
Count
Source
99
45
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isConstQualifiedMatcher::matcher_isConstQualifiedMatcher()
Line
Count
Source
99
17.5k
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_hasStaticStorageDurationMatcher::matcher_hasStaticStorageDurationMatcher()
Line
Count
Source
99
9
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::internal::matcher_isPotentiallyEvaluatedMatcher::matcher_isPotentiallyEvaluatedMatcher()
Line
Count
Source
99
269
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isConstMatcher::matcher_isConstMatcher()
Line
Count
Source
99
263
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isMoveConstructorMatcher::matcher_isMoveConstructorMatcher()
Line
Count
Source
99
416
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isDeletedMatcher::matcher_isDeletedMatcher()
Line
Count
Source
99
1.63k
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isMoveAssignmentOperatorMatcher::matcher_isMoveAssignmentOperatorMatcher()
Line
Count
Source
99
419
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isCopyConstructorMatcher::matcher_isCopyConstructorMatcher()
Line
Count
Source
99
416
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
clang::ast_matchers::internal::matcher_isCopyAssignmentOperatorMatcher::matcher_isCopyAssignmentOperatorMatcher()
Line
Count
Source
99
419
    explicit matcher_##DefineMatcher##Matcher() = default;                     \
100
    bool matches(const Type &Node,                                             \
101
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
102
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
103
                     *Builder) const override;                                 \
104
  };                                                                           \
105
  }                                                                            \
106
22.4k
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
22.4k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
22.4k
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
22.4k
  }                                                                            \
clang::ast_matchers::isMain()
Line
Count
Source
106
192
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
192
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
192
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
192
  }                                                                            \
Unexecuted instantiation: clang::ast_matchers::hasKeywordSelector()
clang::ast_matchers::hasStaticStorageDuration()
Line
Count
Source
106
9
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
9
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
9
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
9
  }                                                                            \
clang::ast_matchers::isNoReturn()
Line
Count
Source
106
45
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
45
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
45
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
45
  }                                                                            \
clang::ast_matchers::isDeleted()
Line
Count
Source
106
1.63k
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
1.63k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
1.63k
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
1.63k
  }                                                                            \
Unexecuted instantiation: clang::ast_matchers::isStruct()
Unexecuted instantiation: clang::ast_matchers::isUnion()
Unexecuted instantiation: clang::ast_matchers::isClass()
clang::ast_matchers::isConst()
Line
Count
Source
106
263
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
263
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
263
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
263
  }                                                                            \
clang::ast_matchers::isCopyAssignmentOperator()
Line
Count
Source
106
419
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
419
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
419
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
419
  }                                                                            \
clang::ast_matchers::isMoveAssignmentOperator()
Line
Count
Source
106
419
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
419
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
419
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
419
  }                                                                            \
clang::ast_matchers::isInteger()
Line
Count
Source
106
586
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
586
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
586
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
586
  }                                                                            \
clang::ast_matchers::isConstQualified()
Line
Count
Source
106
17.5k
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
17.5k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
17.5k
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
17.5k
  }                                                                            \
clang::ast_matchers::booleanType()
Line
Count
Source
106
240
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
240
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
240
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
240
  }                                                                            \
clang::ast_matchers::isCopyConstructor()
Line
Count
Source
106
416
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
416
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
416
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
416
  }                                                                            \
clang::ast_matchers::isMoveConstructor()
Line
Count
Source
106
416
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
416
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
416
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
416
  }                                                                            \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::isPotentiallyEvaluated()
Line
Count
Source
106
269
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() {      \
107
269
    return ::clang::ast_matchers::internal::makeMatcher(                       \
108
269
        new internal::matcher_##DefineMatcher##Matcher());                     \
109
269
  }                                                                            \
110
  inline bool internal::matcher_##DefineMatcher##Matcher::matches(             \
111
      const Type &Node,                                                        \
112
      ::clang::ast_matchers::internal::ASTMatchFinder *Finder,                 \
113
      ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
114
115
/// AST_MATCHER_P(Type, DefineMatcher, ParamType, Param) { ... }
116
/// defines a single-parameter function named DefineMatcher() that returns a
117
/// Matcher<Type> object.
118
///
119
/// The code between the curly braces has access to the following variables:
120
///
121
///   Node:                  the AST node being matched; its type is Type.
122
///   Param:                 the parameter passed to the function; its type
123
///                          is ParamType.
124
///   Finder:                an ASTMatchFinder*.
125
///   Builder:               a BoundNodesTreeBuilder*.
126
///
127
/// The code should return true if 'Node' matches.
128
#define AST_MATCHER_P(Type, DefineMatcher, ParamType, Param)                   \
129
  AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param, 0)
130
131
#define AST_MATCHER_P_OVERLOAD(Type, DefineMatcher, ParamType, Param,          \
132
                               OverloadId)                                     \
133
  namespace internal {                                                         \
134
  class matcher_##DefineMatcher##OverloadId##Matcher                           \
135
      : public ::clang::ast_matchers::internal::MatcherInterface<Type> {       \
136
  public:                                                                      \
137
    explicit matcher_##DefineMatcher##OverloadId##Matcher(                     \
138
        ParamType const &A##Param)                                             \
139
181k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_isDerivedFrom0Matcher::matcher_isDerivedFrom0Matcher(clang::ast_matchers::internal::Matcher<clang::NamedDecl> const&)
Line
Count
Source
139
1.07k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_isSameOrDerivedFrom0Matcher::matcher_isSameOrDerivedFrom0Matcher(clang::ast_matchers::internal::Matcher<clang::NamedDecl> const&)
Line
Count
Source
139
770
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_pointsTo0Matcher::matcher_pointsTo0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
104
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_references0Matcher::matcher_references0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
16.1k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_onImplicitObjectArgument0Matcher::matcher_onImplicitObjectArgument0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
17
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_pointsTo1Matcher::matcher_pointsTo1Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
139
37
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_ignoringImpCasts0Matcher::matcher_ignoringImpCasts0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
174
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_ignoringParenCasts0Matcher::matcher_ignoringParenCasts0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
459
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_ignoringParenImpCasts0Matcher::matcher_ignoringParenImpCasts0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
2.74k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasIncrement0Matcher::matcher_hasIncrement0Matcher(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
139
164
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasLoopInit0Matcher::matcher_hasLoopInit0Matcher(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
139
166
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasLoopVariable0Matcher::matcher_hasLoopVariable0Matcher(clang::ast_matchers::internal::Matcher<clang::VarDecl> const&)
Line
Count
Source
139
157
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasRangeInit0Matcher::matcher_hasRangeInit0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
157
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasArgumentOfType0Matcher::matcher_hasArgumentOfType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
273
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_ofKind0Matcher::matcher_ofKind0Matcher(clang::UnaryExprOrTypeTrait const&)
Line
Count
Source
139
275
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_matchesName0Matcher::matcher_matchesName0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
139
235
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_isDerivedFrom1Matcher::matcher_isDerivedFrom1Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
139
37
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_isSameOrDerivedFrom1Matcher::matcher_isSameOrDerivedFrom1Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
139
755
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasMethod0Matcher::matcher_hasMethod0Matcher(clang::ast_matchers::internal::Matcher<clang::CXXMethodDecl> const&)
Line
Count
Source
139
1.64k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_on0Matcher::matcher_on0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
286
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasReceiverType0Matcher::matcher_hasReceiverType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
378
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasReceiver0Matcher::matcher_hasReceiver0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
380
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasSelector0Matcher::matcher_hasSelector0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
139
760
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_callee0Matcher::matcher_callee0Matcher(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
139
525
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_callee1Matcher::matcher_callee1Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
139
4.24k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_asString0Matcher::matcher_asString0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
139
527
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasUnqualifiedDesugaredType0Matcher::matcher_hasUnqualifiedDesugaredType0Matcher(clang::ast_matchers::internal::Matcher<clang::Type> const&)
Line
Count
Source
139
1.43k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasCanonicalType0Matcher::matcher_hasCanonicalType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
1.96k
        : Param(A##Param) {}                                                   \
Unexecuted instantiation: clang::ast_matchers::internal::matcher_thisPointerType0Matcher::matcher_thisPointerType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
clang::ast_matchers::internal::matcher_to0Matcher::matcher_to0Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
139
50.2k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasSingleDecl0Matcher::matcher_hasSingleDecl0Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
139
407
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasInitializer0Matcher::matcher_hasInitializer0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
16.7k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_returns0Matcher::matcher_returns0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
419
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasConditionVariableStatement0Matcher::matcher_hasConditionVariableStatement0Matcher(clang::ast_matchers::internal::Matcher<clang::DeclStmt> const&)
Line
Count
Source
139
233
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasBase0Matcher::matcher_hasBase0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
164
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasUnaryOperand0Matcher::matcher_hasUnaryOperand0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
17.2k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasCastKind0Matcher::matcher_hasCastKind0Matcher(clang::CastKind const&)
Line
Count
Source
139
525
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasDestinationType0Matcher::matcher_hasDestinationType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
163
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasImplicitDestinationType0Matcher::matcher_hasImplicitDestinationType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
139
166
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasTrueExpression0Matcher::matcher_hasTrueExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
387
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasFalseExpression0Matcher::matcher_hasFalseExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
389
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_ofClass0Matcher::matcher_ofClass0Matcher(clang::ast_matchers::internal::Matcher<clang::CXXRecordDecl> const&)
Line
Count
Source
139
494
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsNode0Matcher::matcher_equalsNode0Matcher(clang::Decl const* const&)
Line
Count
Source
139
47.9k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsNode1Matcher::matcher_equalsNode1Matcher(clang::Stmt const* const&)
Line
Count
Source
139
5.63k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasReturnValue0Matcher::matcher_hasReturnValue0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
262
        : Param(A##Param) {}                                                   \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::internal::matcher_hasControllingExpr0Matcher::matcher_hasControllingExpr0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
269
        : Param(A##Param) {}                                                   \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::internal::matcher_maybeEvalCommaExpr0Matcher::matcher_maybeEvalCommaExpr0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
139
3.39k
        : Param(A##Param) {}                                                   \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::internal::matcher_hasCaptureInit0Matcher::matcher_hasCaptureInit0Matcher(clang::Expr const* const&)
Line
Count
Source
139
261
        : Param(A##Param) {}                                                   \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::internal::matcher_hasRangeStmt0Matcher::matcher_hasRangeStmt0Matcher(clang::ast_matchers::internal::Matcher<clang::DeclStmt> const&)
Line
Count
Source
139
147
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnySelectorMatcher0Matcher::matcher_hasAnySelectorMatcher0Matcher(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
Line
Count
Source
139
220
        : Param(A##Param) {}                                                   \
140
    bool matches(const Type &Node,                                             \
141
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
142
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
143
                     *Builder) const override;                                 \
144
                                                                               \
145
  private:                                                                     \
146
    ParamType const Param;                                                     \
147
  };                                                                           \
148
  }                                                                            \
149
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher(         \
150
181k
      ParamType const &Param) {                                                \
151
181k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
181k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
181k
  }                                                                            \
clang::ast_matchers::isDerivedFrom(clang::ast_matchers::internal::Matcher<clang::NamedDecl> const&)
Line
Count
Source
150
1.07k
      ParamType const &Param) {                                                \
151
1.07k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
1.07k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
1.07k
  }                                                                            \
clang::ast_matchers::isSameOrDerivedFrom(clang::ast_matchers::internal::Matcher<clang::NamedDecl> const&)
Line
Count
Source
150
770
      ParamType const &Param) {                                                \
151
770
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
770
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
770
  }                                                                            \
clang::ast_matchers::pointsTo(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
104
      ParamType const &Param) {                                                \
151
104
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
104
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
104
  }                                                                            \
clang::ast_matchers::references(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
16.1k
      ParamType const &Param) {                                                \
151
16.1k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
16.1k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
16.1k
  }                                                                            \
clang::ast_matchers::onImplicitObjectArgument(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
17
      ParamType const &Param) {                                                \
151
17
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
17
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
17
  }                                                                            \
clang::ast_matchers::pointsTo(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
150
37
      ParamType const &Param) {                                                \
151
37
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
37
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
37
  }                                                                            \
clang::ast_matchers::ignoringImpCasts(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
174
      ParamType const &Param) {                                                \
151
174
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
174
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
174
  }                                                                            \
clang::ast_matchers::ignoringParenCasts(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
459
      ParamType const &Param) {                                                \
151
459
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
459
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
459
  }                                                                            \
clang::ast_matchers::ignoringParenImpCasts(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
2.74k
      ParamType const &Param) {                                                \
151
2.74k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
2.74k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
2.74k
  }                                                                            \
clang::ast_matchers::hasIncrement(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
150
164
      ParamType const &Param) {                                                \
151
164
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
164
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
164
  }                                                                            \
clang::ast_matchers::hasLoopInit(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
150
166
      ParamType const &Param) {                                                \
151
166
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
166
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
166
  }                                                                            \
clang::ast_matchers::hasLoopVariable(clang::ast_matchers::internal::Matcher<clang::VarDecl> const&)
Line
Count
Source
150
157
      ParamType const &Param) {                                                \
151
157
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
157
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
157
  }                                                                            \
clang::ast_matchers::hasRangeInit(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
157
      ParamType const &Param) {                                                \
151
157
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
157
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
157
  }                                                                            \
clang::ast_matchers::hasArgumentOfType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
273
      ParamType const &Param) {                                                \
151
273
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
273
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
273
  }                                                                            \
clang::ast_matchers::ofKind(clang::UnaryExprOrTypeTrait const&)
Line
Count
Source
150
275
      ParamType const &Param) {                                                \
151
275
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
275
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
275
  }                                                                            \
clang::ast_matchers::matchesName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
150
235
      ParamType const &Param) {                                                \
151
235
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
235
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
235
  }                                                                            \
clang::ast_matchers::isDerivedFrom(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
150
37
      ParamType const &Param) {                                                \
151
37
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
37
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
37
  }                                                                            \
clang::ast_matchers::isSameOrDerivedFrom(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
150
755
      ParamType const &Param) {                                                \
151
755
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
755
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
755
  }                                                                            \
clang::ast_matchers::hasMethod(clang::ast_matchers::internal::Matcher<clang::CXXMethodDecl> const&)
Line
Count
Source
150
1.64k
      ParamType const &Param) {                                                \
151
1.64k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
1.64k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
1.64k
  }                                                                            \
clang::ast_matchers::on(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
286
      ParamType const &Param) {                                                \
151
286
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
286
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
286
  }                                                                            \
clang::ast_matchers::hasReceiverType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
378
      ParamType const &Param) {                                                \
151
378
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
378
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
378
  }                                                                            \
clang::ast_matchers::hasReceiver(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
380
      ParamType const &Param) {                                                \
151
380
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
380
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
380
  }                                                                            \
clang::ast_matchers::hasSelector(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
150
760
      ParamType const &Param) {                                                \
151
760
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
760
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
760
  }                                                                            \
clang::ast_matchers::callee(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
150
525
      ParamType const &Param) {                                                \
151
525
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
525
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
525
  }                                                                            \
clang::ast_matchers::callee(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
150
4.24k
      ParamType const &Param) {                                                \
151
4.24k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
4.24k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
4.24k
  }                                                                            \
clang::ast_matchers::asString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
150
527
      ParamType const &Param) {                                                \
151
527
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
527
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
527
  }                                                                            \
clang::ast_matchers::hasUnqualifiedDesugaredType(clang::ast_matchers::internal::Matcher<clang::Type> const&)
Line
Count
Source
150
1.43k
      ParamType const &Param) {                                                \
151
1.43k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
1.43k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
1.43k
  }                                                                            \
clang::ast_matchers::hasCanonicalType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
1.96k
      ParamType const &Param) {                                                \
151
1.96k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
1.96k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
1.96k
  }                                                                            \
Unexecuted instantiation: clang::ast_matchers::thisPointerType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
clang::ast_matchers::to(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
150
50.2k
      ParamType const &Param) {                                                \
151
50.2k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
50.2k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
50.2k
  }                                                                            \
clang::ast_matchers::hasSingleDecl(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
150
407
      ParamType const &Param) {                                                \
151
407
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
407
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
407
  }                                                                            \
clang::ast_matchers::hasInitializer(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
16.7k
      ParamType const &Param) {                                                \
151
16.7k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
16.7k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
16.7k
  }                                                                            \
clang::ast_matchers::returns(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
419
      ParamType const &Param) {                                                \
151
419
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
419
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
419
  }                                                                            \
clang::ast_matchers::hasConditionVariableStatement(clang::ast_matchers::internal::Matcher<clang::DeclStmt> const&)
Line
Count
Source
150
233
      ParamType const &Param) {                                                \
151
233
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
233
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
233
  }                                                                            \
clang::ast_matchers::hasBase(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
164
      ParamType const &Param) {                                                \
151
164
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
164
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
164
  }                                                                            \
clang::ast_matchers::hasUnaryOperand(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
17.2k
      ParamType const &Param) {                                                \
151
17.2k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
17.2k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
17.2k
  }                                                                            \
clang::ast_matchers::hasCastKind(clang::CastKind const&)
Line
Count
Source
150
525
      ParamType const &Param) {                                                \
151
525
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
525
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
525
  }                                                                            \
clang::ast_matchers::hasDestinationType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
163
      ParamType const &Param) {                                                \
151
163
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
163
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
163
  }                                                                            \
clang::ast_matchers::hasImplicitDestinationType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
150
166
      ParamType const &Param) {                                                \
151
166
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
166
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
166
  }                                                                            \
clang::ast_matchers::hasTrueExpression(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
387
      ParamType const &Param) {                                                \
151
387
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
387
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
387
  }                                                                            \
clang::ast_matchers::hasFalseExpression(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
389
      ParamType const &Param) {                                                \
151
389
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
389
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
389
  }                                                                            \
clang::ast_matchers::ofClass(clang::ast_matchers::internal::Matcher<clang::CXXRecordDecl> const&)
Line
Count
Source
150
494
      ParamType const &Param) {                                                \
151
494
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
494
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
494
  }                                                                            \
clang::ast_matchers::equalsNode(clang::Decl const* const&)
Line
Count
Source
150
47.9k
      ParamType const &Param) {                                                \
151
47.9k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
47.9k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
47.9k
  }                                                                            \
clang::ast_matchers::equalsNode(clang::Stmt const* const&)
Line
Count
Source
150
5.63k
      ParamType const &Param) {                                                \
151
5.63k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
5.63k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
5.63k
  }                                                                            \
clang::ast_matchers::hasReturnValue(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
262
      ParamType const &Param) {                                                \
151
262
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
262
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
262
  }                                                                            \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::hasControllingExpr(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
269
      ParamType const &Param) {                                                \
151
269
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
269
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
269
  }                                                                            \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::maybeEvalCommaExpr(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
150
3.39k
      ParamType const &Param) {                                                \
151
3.39k
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
3.39k
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
3.39k
  }                                                                            \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::hasCaptureInit(clang::Expr const* const&)
Line
Count
Source
150
261
      ParamType const &Param) {                                                \
151
261
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
261
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
261
  }                                                                            \
ExprMutationAnalyzer.cpp:clang::(anonymous namespace)::hasRangeStmt(clang::ast_matchers::internal::Matcher<clang::DeclStmt> const&)
Line
Count
Source
150
147
      ParamType const &Param) {                                                \
151
147
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
147
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
147
  }                                                                            \
clang::ast_matchers::hasAnySelectorMatcher(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
Line
Count
Source
150
220
      ParamType const &Param) {                                                \
151
220
    return ::clang::ast_matchers::internal::makeMatcher(                       \
152
220
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param));    \
153
220
  }                                                                            \
154
  typedef ::clang::ast_matchers::internal::Matcher<Type>(                      \
155
      &DefineMatcher##_Type##OverloadId)(ParamType const &Param);              \
156
  inline bool internal::matcher_##DefineMatcher##OverloadId##Matcher::matches( \
157
      const Type &Node,                                                        \
158
      ::clang::ast_matchers::internal::ASTMatchFinder *Finder,                 \
159
      ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
160
161
/// AST_MATCHER_P2(
162
///     Type, DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... }
163
/// defines a two-parameter function named DefineMatcher() that returns a
164
/// Matcher<Type> object.
165
///
166
/// The code between the curly braces has access to the following variables:
167
///
168
///   Node:                  the AST node being matched; its type is Type.
169
///   Param1, Param2:        the parameters passed to the function; their types
170
///                          are ParamType1 and ParamType2.
171
///   Finder:                an ASTMatchFinder*.
172
///   Builder:               a BoundNodesTreeBuilder*.
173
///
174
/// The code should return true if 'Node' matches.
175
#define AST_MATCHER_P2(Type, DefineMatcher, ParamType1, Param1, ParamType2,    \
176
                       Param2)                                                 \
177
  AST_MATCHER_P2_OVERLOAD(Type, DefineMatcher, ParamType1, Param1, ParamType2, \
178
                          Param2, 0)
179
180
#define AST_MATCHER_P2_OVERLOAD(Type, DefineMatcher, ParamType1, Param1,       \
181
                                ParamType2, Param2, OverloadId)                \
182
  namespace internal {                                                         \
183
  class matcher_##DefineMatcher##OverloadId##Matcher                           \
184
      : public ::clang::ast_matchers::internal::MatcherInterface<Type> {       \
185
  public:                                                                      \
186
    matcher_##DefineMatcher##OverloadId##Matcher(ParamType1 const &A##Param1,  \
187
                                                 ParamType2 const &A##Param2)  \
188
        : Param1(A##Param1), Param2(A##Param2) {}                              \
189
    bool matches(const Type &Node,                                             \
190
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
191
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
192
                     *Builder) const override;                                 \
193
                                                                               \
194
  private:                                                                     \
195
    ParamType1 const Param1;                                                   \
196
    ParamType2 const Param2;                                                   \
197
  };                                                                           \
198
  }                                                                            \
199
  inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher(         \
200
      ParamType1 const &Param1, ParamType2 const &Param2) {                    \
201
    return ::clang::ast_matchers::internal::makeMatcher(                       \
202
        new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param1,     \
203
                                                                   Param2));   \
204
  }                                                                            \
205
  typedef ::clang::ast_matchers::internal::Matcher<Type>(                      \
206
      &DefineMatcher##_Type##OverloadId)(ParamType1 const &Param1,             \
207
                                         ParamType2 const &Param2);            \
208
  inline bool internal::matcher_##DefineMatcher##OverloadId##Matcher::matches( \
209
      const Type &Node,                                                        \
210
      ::clang::ast_matchers::internal::ASTMatchFinder *Finder,                 \
211
      ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
212
213
/// Construct a type-list to be passed to the AST_POLYMORPHIC_MATCHER*
214
///   macros.
215
///
216
/// You can't pass something like \c TypeList<Foo, Bar> to a macro, because it
217
/// will look at that as two arguments. However, you can pass
218
/// \c void(TypeList<Foo, Bar>), which works thanks to the parenthesis.
219
/// The \c PolymorphicMatcherWithParam* classes will unpack the function type to
220
/// extract the TypeList object.
221
#define AST_POLYMORPHIC_SUPPORTED_TYPES(...)                                   \
222
  void(::clang::ast_matchers::internal::TypeList<__VA_ARGS__>)
223
224
/// AST_POLYMORPHIC_MATCHER(DefineMatcher) { ... }
225
/// defines a single-parameter function named DefineMatcher() that is
226
/// polymorphic in the return type.
227
///
228
/// The variables are the same as for AST_MATCHER, but NodeType will be deduced
229
/// from the calling context.
230
#define AST_POLYMORPHIC_MATCHER(DefineMatcher, ReturnTypesF)                   \
231
  namespace internal {                                                         \
232
  template <typename NodeType>                                                 \
233
  class matcher_##DefineMatcher##Matcher                                       \
234
      : public ::clang::ast_matchers::internal::MatcherInterface<NodeType> {   \
235
  public:                                                                      \
236
    bool matches(const NodeType &Node,                                         \
237
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
238
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
239
                     *Builder) const override;                                 \
240
  };                                                                           \
241
  }                                                                            \
242
  inline ::clang::ast_matchers::internal::PolymorphicMatcherWithParam0<        \
243
      internal::matcher_##DefineMatcher##Matcher, ReturnTypesF>                \
244
636
  DefineMatcher() {                                                            \
245
636
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam0<      \
246
636
        internal::matcher_##DefineMatcher##Matcher, ReturnTypesF>();           \
247
636
  }                                                                            \
clang::ast_matchers::isAssignmentOperator()
Line
Count
Source
244
427
  DefineMatcher() {                                                            \
245
427
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam0<      \
246
427
        internal::matcher_##DefineMatcher##Matcher, ReturnTypesF>();           \
247
427
  }                                                                            \
clang::ast_matchers::isTemplateInstantiation()
Line
Count
Source
244
209
  DefineMatcher() {                                                            \
245
209
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam0<      \
246
209
        internal::matcher_##DefineMatcher##Matcher, ReturnTypesF>();           \
247
209
  }                                                                            \
248
  template <typename NodeType>                                                 \
249
  bool internal::matcher_##DefineMatcher##Matcher<NodeType>::matches(          \
250
      const NodeType &Node,                                                    \
251
      ::clang::ast_matchers::internal::ASTMatchFinder *Finder,                 \
252
      ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
253
254
/// AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ParamType, Param) { ... }
255
/// defines a single-parameter function named DefineMatcher() that is
256
/// polymorphic in the return type.
257
///
258
/// The variables are the same as for
259
/// AST_MATCHER_P, with the addition of NodeType, which specifies the node type
260
/// of the matcher Matcher<NodeType> returned by the function matcher().
261
///
262
/// FIXME: Pull out common code with above macro?
263
#define AST_POLYMORPHIC_MATCHER_P(DefineMatcher, ReturnTypesF, ParamType,      \
264
                                  Param)                                       \
265
  AST_POLYMORPHIC_MATCHER_P_OVERLOAD(DefineMatcher, ReturnTypesF, ParamType,   \
266
                                     Param, 0)
267
268
#define AST_POLYMORPHIC_MATCHER_P_OVERLOAD(DefineMatcher, ReturnTypesF,        \
269
                                           ParamType, Param, OverloadId)       \
270
  namespace internal {                                                         \
271
  template <typename NodeType, typename ParamT>                                \
272
  class matcher_##DefineMatcher##OverloadId##Matcher                           \
273
      : public ::clang::ast_matchers::internal::MatcherInterface<NodeType> {   \
274
  public:                                                                      \
275
    explicit matcher_##DefineMatcher##OverloadId##Matcher(                     \
276
        ParamType const &A##Param)                                             \
277
69.5k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::Expr, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
1.83k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType1Matcher<clang::Expr, clang::ast_matchers::internal::Matcher<clang::Decl> >::matcher_hasType1Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
277
41
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasRHS0Matcher<clang::BinaryOperator, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasRHS0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
1.79k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasLHS0Matcher<clang::BinaryOperator, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasLHS0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
2.44k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsBoundNode0Matcher<clang::VarDecl, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_equalsBoundNode0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
869
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyArgument0Matcher<clang::CallExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasAnyArgument0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
1.22k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyArgument0Matcher<clang::ObjCMessageExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasAnyArgument0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
733
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsBoundNode0Matcher<clang::Expr, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_equalsBoundNode0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
690
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasOperatorName0Matcher<clang::BinaryOperator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_hasOperatorName0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
2.69k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasCondition0Matcher<clang::IfStmt, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasCondition0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
238
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasCondition0Matcher<clang::ConditionalOperator, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasCondition0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
236
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasOperatorName0Matcher<clang::UnaryOperator, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_hasOperatorName0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
18.0k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::ExplicitCastExpr, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
460
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::VarDecl, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
17.1k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::ParmVarDecl, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
16.7k
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyParameter0Matcher<clang::ObjCMethodDecl, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_hasAnyParameter0Matcher(clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
277
217
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyParameter0Matcher<clang::FunctionDecl, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_hasAnyParameter0Matcher(clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
277
217
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyParameter0Matcher<clang::BlockDecl, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_hasAnyParameter0Matcher(clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
277
217
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasSourceExpression0Matcher<clang::CStyleCastExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasSourceExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
13
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::CStyleCastExpr, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
9
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType1Matcher<clang::VarDecl, clang::ast_matchers::internal::Matcher<clang::Decl> >::matcher_hasType1Matcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
277
16
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasType0Matcher<clang::FieldDecl, clang::ast_matchers::internal::Matcher<clang::QualType> >::matcher_hasType0Matcher(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
277
32
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsBoundNode0Matcher<clang::ObjCMessageExpr, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_equalsBoundNode0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
756
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasBody0Matcher<clang::ForStmt, clang::ast_matchers::internal::Matcher<clang::Stmt> >::matcher_hasBody0Matcher(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
277
167
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasCondition0Matcher<clang::ForStmt, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasCondition0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
167
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsBoundNode0Matcher<clang::Decl, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_equalsBoundNode0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
660
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasObjectExpression0Matcher<clang::UnresolvedMemberExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasObjectExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
262
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasObjectExpression0Matcher<clang::CXXDependentScopeMemberExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasObjectExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
434
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_argumentCountIs0Matcher<clang::CXXOperatorCallExpr, unsigned int>::matcher_argumentCountIs0Matcher(unsigned int const&)
Line
Count
Source
277
409
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasAnyArgument0Matcher<clang::CXXUnresolvedConstructExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasAnyArgument0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
262
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasObjectExpression0Matcher<clang::MemberExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasObjectExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
178
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_hasSourceExpression0Matcher<clang::CastExpr, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasSourceExpression0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
277
162
        : Param(A##Param) {}                                                   \
clang::ast_matchers::internal::matcher_equalsBoundNode0Matcher<clang::DeclStmt, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::matcher_equalsBoundNode0Matcher(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
277
147
        : Param(A##Param) {}                                                   \
278
    bool matches(const NodeType &Node,                                         \
279
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
280
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
281
                     *Builder) const override;                                 \
282
                                                                               \
283
  private:                                                                     \
284
    ParamType const Param;                                                     \
285
  };                                                                           \
286
  }                                                                            \
287
  inline ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<        \
288
      internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,       \
289
      ReturnTypesF>                                                            \
290
68.5k
  DefineMatcher(ParamType const &Param) {                                      \
291
68.5k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
68.5k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
68.5k
        ReturnTypesF>(Param);                                                  \
294
68.5k
  }                                                                            \
clang::ast_matchers::hasType(clang::ast_matchers::internal::Matcher<clang::QualType> const&)
Line
Count
Source
290
36.3k
  DefineMatcher(ParamType const &Param) {                                      \
291
36.3k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
36.3k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
36.3k
        ReturnTypesF>(Param);                                                  \
294
36.3k
  }                                                                            \
clang::ast_matchers::hasType(clang::ast_matchers::internal::Matcher<clang::Decl> const&)
Line
Count
Source
290
73
  DefineMatcher(ParamType const &Param) {                                      \
291
73
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
73
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
73
        ReturnTypesF>(Param);                                                  \
294
73
  }                                                                            \
clang::ast_matchers::argumentCountIs(unsigned int const&)
Line
Count
Source
290
412
  DefineMatcher(ParamType const &Param) {                                      \
291
412
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
412
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
412
        ReturnTypesF>(Param);                                                  \
294
412
  }                                                                            \
clang::ast_matchers::hasAnyArgument(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
1.48k
  DefineMatcher(ParamType const &Param) {                                      \
291
1.48k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
1.48k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
1.48k
        ReturnTypesF>(Param);                                                  \
294
1.48k
  }                                                                            \
clang::ast_matchers::hasAnyParameter(clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
290
225
  DefineMatcher(ParamType const &Param) {                                      \
291
225
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
225
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
225
        ReturnTypesF>(Param);                                                  \
294
225
  }                                                                            \
clang::ast_matchers::hasCondition(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
648
  DefineMatcher(ParamType const &Param) {                                      \
291
648
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
648
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
648
        ReturnTypesF>(Param);                                                  \
294
648
  }                                                                            \
clang::ast_matchers::equalsBoundNode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
290
3.13k
  DefineMatcher(ParamType const &Param) {                                      \
291
3.13k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
3.13k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
3.13k
        ReturnTypesF>(Param);                                                  \
294
3.13k
  }                                                                            \
clang::ast_matchers::hasBody(clang::ast_matchers::internal::Matcher<clang::Stmt> const&)
Line
Count
Source
290
181
  DefineMatcher(ParamType const &Param) {                                      \
291
181
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
181
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
181
        ReturnTypesF>(Param);                                                  \
294
181
  }                                                                            \
clang::ast_matchers::hasOperatorName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
290
20.7k
  DefineMatcher(ParamType const &Param) {                                      \
291
20.7k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
20.7k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
20.7k
        ReturnTypesF>(Param);                                                  \
294
20.7k
  }                                                                            \
clang::ast_matchers::hasLHS(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
2.45k
  DefineMatcher(ParamType const &Param) {                                      \
291
2.45k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
2.45k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
2.45k
        ReturnTypesF>(Param);                                                  \
294
2.45k
  }                                                                            \
clang::ast_matchers::hasRHS(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
1.79k
  DefineMatcher(ParamType const &Param) {                                      \
291
1.79k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
1.79k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
1.79k
        ReturnTypesF>(Param);                                                  \
294
1.79k
  }                                                                            \
clang::ast_matchers::hasSourceExpression(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
195
  DefineMatcher(ParamType const &Param) {                                      \
291
195
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
195
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
195
        ReturnTypesF>(Param);                                                  \
294
195
  }                                                                            \
clang::ast_matchers::hasObjectExpression(clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
290
874
  DefineMatcher(ParamType const &Param) {                                      \
291
874
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<      \
292
874
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,     \
293
874
        ReturnTypesF>(Param);                                                  \
294
874
  }                                                                            \
295
  typedef ::clang::ast_matchers::internal::PolymorphicMatcherWithParam1<       \
296
      internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType,       \
297
      ReturnTypesF>(&DefineMatcher##_Type##OverloadId)(                        \
298
      ParamType const &Param);                                                 \
299
  template <typename NodeType, typename ParamT>                                \
300
  bool internal::                                                              \
301
      matcher_##DefineMatcher##OverloadId##Matcher<NodeType, ParamT>::matches( \
302
          const NodeType &Node,                                                \
303
          ::clang::ast_matchers::internal::ASTMatchFinder *Finder,             \
304
          ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder)     \
305
          const
306
307
/// AST_POLYMORPHIC_MATCHER_P2(
308
///     DefineMatcher, ParamType1, Param1, ParamType2, Param2) { ... }
309
/// defines a two-parameter function named matcher() that is polymorphic in
310
/// the return type.
311
///
312
/// The variables are the same as for AST_MATCHER_P2, with the
313
/// addition of NodeType, which specifies the node type of the matcher
314
/// Matcher<NodeType> returned by the function DefineMatcher().
315
#define AST_POLYMORPHIC_MATCHER_P2(DefineMatcher, ReturnTypesF, ParamType1,    \
316
                                   Param1, ParamType2, Param2)                 \
317
  AST_POLYMORPHIC_MATCHER_P2_OVERLOAD(DefineMatcher, ReturnTypesF, ParamType1, \
318
                                      Param1, ParamType2, Param2, 0)
319
320
#define AST_POLYMORPHIC_MATCHER_P2_OVERLOAD(DefineMatcher, ReturnTypesF,       \
321
                                            ParamType1, Param1, ParamType2,    \
322
                                            Param2, OverloadId)                \
323
  namespace internal {                                                         \
324
  template <typename NodeType, typename ParamT1, typename ParamT2>             \
325
  class matcher_##DefineMatcher##OverloadId##Matcher                           \
326
      : public ::clang::ast_matchers::internal::MatcherInterface<NodeType> {   \
327
  public:                                                                      \
328
    matcher_##DefineMatcher##OverloadId##Matcher(ParamType1 const &A##Param1,  \
329
                                                 ParamType2 const &A##Param2)  \
330
18.7k
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_hasArgument0Matcher<clang::CallExpr, unsigned int, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasArgument0Matcher(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
330
646
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_forEachArgumentWithParam0Matcher<clang::CallExpr, clang::ast_matchers::internal::Matcher<clang::Expr>, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_forEachArgumentWithParam0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
330
16.5k
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_hasParameter0Matcher<clang::CXXConstructorDecl, unsigned int, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_hasParameter0Matcher(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
330
218
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_hasParameter0Matcher<clang::FunctionDecl, unsigned int, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_hasParameter0Matcher(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
330
237
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_hasArgument0Matcher<clang::CXXOperatorCallExpr, unsigned int, clang::ast_matchers::internal::Matcher<clang::Expr> >::matcher_hasArgument0Matcher(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
330
672
        : Param1(A##Param1), Param2(A##Param2) {}                              \
clang::ast_matchers::internal::matcher_forEachArgumentWithParam0Matcher<clang::CXXConstructExpr, clang::ast_matchers::internal::Matcher<clang::Expr>, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> >::matcher_forEachArgumentWithParam0Matcher(clang::ast_matchers::internal::Matcher<clang::Expr> const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
330
401
        : Param1(A##Param1), Param2(A##Param2) {}                              \
331
    bool matches(const NodeType &Node,                                         \
332
                 ::clang::ast_matchers::internal::ASTMatchFinder *Finder,      \
333
                 ::clang::ast_matchers::internal::BoundNodesTreeBuilder        \
334
                     *Builder) const override;                                 \
335
                                                                               \
336
  private:                                                                     \
337
    ParamType1 const Param1;                                                   \
338
    ParamType2 const Param2;                                                   \
339
  };                                                                           \
340
  }                                                                            \
341
  inline ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<        \
342
      internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,      \
343
      ParamType2, ReturnTypesF>                                                \
344
18.3k
  DefineMatcher(ParamType1 const &Param1, ParamType2 const &Param2) {          \
345
18.3k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<      \
346
18.3k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,    \
347
18.3k
        ParamType2, ReturnTypesF>(Param1, Param2);                             \
348
18.3k
  }                                                                            \
clang::ast_matchers::hasArgument(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::Expr> const&)
Line
Count
Source
344
1.32k
  DefineMatcher(ParamType1 const &Param1, ParamType2 const &Param2) {          \
345
1.32k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<      \
346
1.32k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,    \
347
1.32k
        ParamType2, ReturnTypesF>(Param1, Param2);                             \
348
1.32k
  }                                                                            \
clang::ast_matchers::hasParameter(unsigned int const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
344
465
  DefineMatcher(ParamType1 const &Param1, ParamType2 const &Param2) {          \
345
465
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<      \
346
465
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,    \
347
465
        ParamType2, ReturnTypesF>(Param1, Param2);                             \
348
465
  }                                                                            \
clang::ast_matchers::forEachArgumentWithParam(clang::ast_matchers::internal::Matcher<clang::Expr> const&, clang::ast_matchers::internal::Matcher<clang::ParmVarDecl> const&)
Line
Count
Source
344
16.5k
  DefineMatcher(ParamType1 const &Param1, ParamType2 const &Param2) {          \
345
16.5k
    return ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<      \
346
16.5k
        internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,    \
347
16.5k
        ParamType2, ReturnTypesF>(Param1, Param2);                             \
348
16.5k
  }                                                                            \
349
  typedef ::clang::ast_matchers::internal::PolymorphicMatcherWithParam2<       \
350
      internal::matcher_##DefineMatcher##OverloadId##Matcher, ParamType1,      \
351
      ParamType2, ReturnTypesF>(&DefineMatcher##_Type##OverloadId)(            \
352
      ParamType1 const &Param1, ParamType2 const &Param2);                     \
353
  template <typename NodeType, typename ParamT1, typename ParamT2>             \
354
  bool internal::matcher_##DefineMatcher##OverloadId##Matcher<                 \
355
      NodeType, ParamT1, ParamT2>::                                            \
356
      matches(const NodeType &Node,                                            \
357
              ::clang::ast_matchers::internal::ASTMatchFinder *Finder,         \
358
              ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) \
359
          const
360
361
// FIXME: add a matcher for TypeLoc derived classes using its custom casting
362
// API (no longer dyn_cast) if/when we need such matching
363
364
#define AST_TYPE_TRAVERSE_MATCHER_DECL(MatcherName, FunctionName,              \
365
                                       ReturnTypesF)                           \
366
  namespace internal {                                                         \
367
  template <typename T> struct TypeMatcher##MatcherName##Getter {              \
368
2.14k
    static QualType (T::*value())() const { return &T::FunctionName; }         \
clang::ast_matchers::internal::TypeMatcherpointeeGetter<clang::PointerType>::value()
Line
Count
Source
368
739
    static QualType (T::*value())() const { return &T::FunctionName; }         \
clang::ast_matchers::internal::TypeMatcherpointeeGetter<clang::ObjCObjectPointerType>::value()
Line
Count
Source
368
230
    static QualType (T::*value())() const { return &T::FunctionName; }         \
clang::ast_matchers::internal::TypeMatcherpointeeGetter<clang::ReferenceType>::value()
Line
Count
Source
368
1.17k
    static QualType (T::*value())() const { return &T::FunctionName; }         \
369
  };                                                                           \
370
  }                                                                            \
371
  extern const ::clang::ast_matchers::internal::                               \
372
      TypeTraversePolymorphicMatcher<                                          \
373
          QualType,                                                            \
374
          ::clang::ast_matchers::internal::TypeMatcher##MatcherName##Getter,   \
375
          ::clang::ast_matchers::internal::TypeTraverseMatcher,                \
376
          ReturnTypesF>::Func MatcherName
377
378
#define AST_TYPE_TRAVERSE_MATCHER_DEF(MatcherName, ReturnTypesF)               \
379
  const ::clang::ast_matchers::internal::TypeTraversePolymorphicMatcher<       \
380
      QualType,                                                                \
381
      ::clang::ast_matchers::internal::TypeMatcher##MatcherName##Getter,       \
382
      ::clang::ast_matchers::internal::TypeTraverseMatcher,                    \
383
      ReturnTypesF>::Func MatcherName
384
385
/// AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName) defines
386
/// the matcher \c MatcherName that can be used to traverse from one \c Type
387
/// to another.
388
///
389
/// For a specific \c SpecificType, the traversal is done using
390
/// \c SpecificType::FunctionName. The existence of such a function determines
391
/// whether a corresponding matcher can be used on \c SpecificType.
392
#define AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName, ReturnTypesF)     \
393
  namespace internal {                                                         \
394
  template <typename T> struct TypeMatcher##MatcherName##Getter {              \
395
    static QualType (T::*value())() const { return &T::FunctionName; }         \
396
  };                                                                           \
397
  }                                                                            \
398
  const ::clang::ast_matchers::internal::TypeTraversePolymorphicMatcher<       \
399
      QualType,                                                                \
400
      ::clang::ast_matchers::internal::TypeMatcher##MatcherName##Getter,       \
401
      ::clang::ast_matchers::internal::TypeTraverseMatcher,                    \
402
      ReturnTypesF>::Func MatcherName
403
404
#define AST_TYPELOC_TRAVERSE_MATCHER_DECL(MatcherName, FunctionName,           \
405
                                          ReturnTypesF)                        \
406
  namespace internal {                                                         \
407
  template <typename T> struct TypeLocMatcher##MatcherName##Getter {           \
408
    static TypeLoc (T::*value())() const { return &T::FunctionName##Loc; }     \
409
  };                                                                           \
410
  }                                                                            \
411
  extern const ::clang::ast_matchers::internal::                               \
412
      TypeTraversePolymorphicMatcher<                                          \
413
          TypeLoc,                                                             \
414
          ::clang::ast_matchers::internal::                                    \
415
              TypeLocMatcher##MatcherName##Getter,                             \
416
          ::clang::ast_matchers::internal::TypeLocTraverseMatcher,             \
417
          ReturnTypesF>::Func MatcherName##Loc;                                \
418
  AST_TYPE_TRAVERSE_MATCHER_DECL(MatcherName, FunctionName##Type, ReturnTypesF)
419
420
#define AST_TYPELOC_TRAVERSE_MATCHER_DEF(MatcherName, ReturnTypesF)            \
421
  const ::clang::ast_matchers::internal::TypeTraversePolymorphicMatcher<       \
422
      TypeLoc,                                                                 \
423
      ::clang::ast_matchers::internal::TypeLocMatcher##MatcherName##Getter,    \
424
      ::clang::ast_matchers::internal::TypeLocTraverseMatcher,                 \
425
      ReturnTypesF>::Func MatcherName##Loc;                                    \
426
  AST_TYPE_TRAVERSE_MATCHER_DEF(MatcherName, ReturnTypesF)
427
428
/// AST_TYPELOC_TRAVERSE_MATCHER(MatcherName, FunctionName) works
429
/// identical to \c AST_TYPE_TRAVERSE_MATCHER but operates on \c TypeLocs.
430
#define AST_TYPELOC_TRAVERSE_MATCHER(MatcherName, FunctionName, ReturnTypesF)  \
431
  namespace internal {                                                         \
432
  template <typename T> struct TypeLocMatcher##MatcherName##Getter {           \
433
    static TypeLoc (T::*value())() const { return &T::FunctionName##Loc; }     \
434
  };                                                                           \
435
  }                                                                            \
436
  const ::clang::ast_matchers::internal::TypeTraversePolymorphicMatcher<       \
437
      TypeLoc,                                                                 \
438
      ::clang::ast_matchers::internal::TypeLocMatcher##MatcherName##Getter,    \
439
      ::clang::ast_matchers::internal::TypeLocTraverseMatcher,                 \
440
      ReturnTypesF>::Func MatcherName##Loc;                                    \
441
  AST_TYPE_TRAVERSE_MATCHER(MatcherName, FunctionName##Type, ReturnTypesF)
442
443
#endif // LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H