Coverage Report

Created: 2020-09-15 12:33

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/AST/ASTNodeTraverser.h
Line
Count
Source (jump to first uncovered line)
1
//===--- ASTNodeTraverser.h - Traversal of AST nodes ----------------------===//
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
// This file implements the AST traversal facilities.  Other users
10
// of this class may make use of the same traversal logic by inheriting it,
11
// similar to RecursiveASTVisitor.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CLANG_AST_ASTNODETRAVERSER_H
16
#define LLVM_CLANG_AST_ASTNODETRAVERSER_H
17
18
#include "clang/AST/ASTTypeTraits.h"
19
#include "clang/AST/AttrVisitor.h"
20
#include "clang/AST/CommentVisitor.h"
21
#include "clang/AST/DeclVisitor.h"
22
#include "clang/AST/LocInfoType.h"
23
#include "clang/AST/StmtVisitor.h"
24
#include "clang/AST/TemplateArgumentVisitor.h"
25
#include "clang/AST/Type.h"
26
#include "clang/AST/TypeVisitor.h"
27
28
namespace clang {
29
30
class APValue;
31
32
/**
33
34
ASTNodeTraverser traverses the Clang AST for dumping purposes.
35
36
The `Derived::doGetNodeDelegate()` method is required to be an accessible member
37
which returns a reference of type `NodeDelegateType &` which implements the
38
following interface:
39
40
struct {
41
  template <typename Fn> void AddChild(Fn DoAddChild);
42
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild);
43
44
  void Visit(const comments::Comment *C, const comments::FullComment *FC);
45
  void Visit(const Attr *A);
46
  void Visit(const TemplateArgument &TA, SourceRange R = {},
47
             const Decl *From = nullptr, StringRef Label = {});
48
  void Visit(const Stmt *Node);
49
  void Visit(const Type *T);
50
  void Visit(QualType T);
51
  void Visit(const Decl *D);
52
  void Visit(const CXXCtorInitializer *Init);
53
  void Visit(const OMPClause *C);
54
  void Visit(const BlockDecl::Capture &C);
55
  void Visit(const GenericSelectionExpr::ConstAssociation &A);
56
  void Visit(const APValue &Value, QualType Ty);
57
};
58
*/
59
template <typename Derived, typename NodeDelegateType>
60
class ASTNodeTraverser
61
    : public ConstDeclVisitor<Derived>,
62
      public ConstStmtVisitor<Derived>,
63
      public comments::ConstCommentVisitor<Derived, void,
64
                                           const comments::FullComment *>,
65
      public TypeVisitor<Derived>,
66
      public ConstAttrVisitor<Derived>,
67
      public ConstTemplateArgumentVisitor<Derived> {
68
69
  /// Indicates whether we should trigger deserialization of nodes that had
70
  /// not already been loaded.
71
  bool Deserialize = false;
72
73
  TraversalKind Traversal = TraversalKind::TK_AsIs;
74
75
107k
  NodeDelegateType &getNodeDelegate() {
76
107k
    return getDerived().doGetNodeDelegate();
77
107k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getNodeDelegate()
Line
Count
Source
75
100k
  NodeDelegateType &getNodeDelegate() {
76
100k
    return getDerived().doGetNodeDelegate();
77
100k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getNodeDelegate()
Line
Count
Source
75
6.55k
  NodeDelegateType &getNodeDelegate() {
76
6.55k
    return getDerived().doGetNodeDelegate();
77
6.55k
  }
78
107k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getDerived()
Line
Count
Source
78
100k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getDerived()
Line
Count
Source
78
6.55k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
79
80
public:
81
1.34k
  void setDeserialize(bool D) { Deserialize = D; }
82
7
  bool getDeserialize() const { return Deserialize; }
83
84
  void SetTraversalKind(TraversalKind TK) { Traversal = TK; }
85
86
20.9k
  void Visit(const Decl *D) {
87
20.9k
    getNodeDelegate().AddChild([=] {
88
20.9k
      getNodeDelegate().Visit(D);
89
20.9k
      if (!D)
90
4
        return;
91
20.8k
92
20.8k
      ConstDeclVisitor<Derived>::Visit(D);
93
20.8k
94
20.8k
      for (const auto &A : D->attrs())
95
1.63k
        Visit(A);
96
20.8k
97
20.8k
      if (const comments::FullComment *Comment =
98
53
              D->getASTContext().getLocalCommentForDeclUncached(D))
99
53
        Visit(Comment, Comment);
100
20.8k
101
      // Decls within functions are visited by the body.
102
20.8k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)17.3k
) {
103
17.1k
        if (const auto *DC = dyn_cast<DeclContext>(D))
104
4.13k
          dumpDeclContext(DC);
105
17.1k
      }
106
20.8k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const
Line
Count
Source
87
19.6k
    getNodeDelegate().AddChild([=] {
88
19.6k
      getNodeDelegate().Visit(D);
89
19.6k
      if (!D)
90
3
        return;
91
19.6k
92
19.6k
      ConstDeclVisitor<Derived>::Visit(D);
93
19.6k
94
19.6k
      for (const auto &A : D->attrs())
95
1.61k
        Visit(A);
96
19.6k
97
19.6k
      if (const comments::FullComment *Comment =
98
41
              D->getASTContext().getLocalCommentForDeclUncached(D))
99
41
        Visit(Comment, Comment);
100
19.6k
101
      // Decls within functions are visited by the body.
102
19.6k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)16.4k
) {
103
16.2k
        if (const auto *DC = dyn_cast<DeclContext>(D))
104
3.88k
          dumpDeclContext(DC);
105
16.2k
      }
106
19.6k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const
Line
Count
Source
87
1.20k
    getNodeDelegate().AddChild([=] {
88
1.20k
      getNodeDelegate().Visit(D);
89
1.20k
      if (!D)
90
1
        return;
91
1.20k
92
1.20k
      ConstDeclVisitor<Derived>::Visit(D);
93
1.20k
94
1.20k
      for (const auto &A : D->attrs())
95
24
        Visit(A);
96
1.20k
97
1.20k
      if (const comments::FullComment *Comment =
98
12
              D->getASTContext().getLocalCommentForDeclUncached(D))
99
12
        Visit(Comment, Comment);
100
1.20k
101
      // Decls within functions are visited by the body.
102
1.20k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)911
) {
103
896
        if (const auto *DC = dyn_cast<DeclContext>(D))
104
243
          dumpDeclContext(DC);
105
896
      }
106
1.20k
    });
107
20.9k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)
Line
Count
Source
86
19.6k
  void Visit(const Decl *D) {
87
19.6k
    getNodeDelegate().AddChild([=] {
88
19.6k
      getNodeDelegate().Visit(D);
89
19.6k
      if (!D)
90
19.6k
        return;
91
19.6k
92
19.6k
      ConstDeclVisitor<Derived>::Visit(D);
93
19.6k
94
19.6k
      for (const auto &A : D->attrs())
95
19.6k
        Visit(A);
96
19.6k
97
19.6k
      if (const comments::FullComment *Comment =
98
19.6k
              D->getASTContext().getLocalCommentForDeclUncached(D))
99
19.6k
        Visit(Comment, Comment);
100
19.6k
101
      // Decls within functions are visited by the body.
102
19.6k
      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
103
19.6k
        if (const auto *DC = dyn_cast<DeclContext>(D))
104
19.6k
          dumpDeclContext(DC);
105
19.6k
      }
106
19.6k
    });
107
19.6k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Decl const*)
Line
Count
Source
86
1.20k
  void Visit(const Decl *D) {
87
1.20k
    getNodeDelegate().AddChild([=] {
88
1.20k
      getNodeDelegate().Visit(D);
89
1.20k
      if (!D)
90
1.20k
        return;
91
1.20k
92
1.20k
      ConstDeclVisitor<Derived>::Visit(D);
93
1.20k
94
1.20k
      for (const auto &A : D->attrs())
95
1.20k
        Visit(A);
96
1.20k
97
1.20k
      if (const comments::FullComment *Comment =
98
1.20k
              D->getASTContext().getLocalCommentForDeclUncached(D))
99
1.20k
        Visit(Comment, Comment);
100
1.20k
101
      // Decls within functions are visited by the body.
102
1.20k
      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
103
1.20k
        if (const auto *DC = dyn_cast<DeclContext>(D))
104
1.20k
          dumpDeclContext(DC);
105
1.20k
      }
106
1.20k
    });
107
1.20k
  }
108
109
25.9k
  void Visit(const Stmt *Node, StringRef Label = {}) {
110
25.9k
    getNodeDelegate().AddChild(Label, [=] {
111
25.9k
      const Stmt *S = Node;
112
25.9k
113
25.9k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
114
18.7k
        switch (Traversal) {
115
18.7k
        case TK_AsIs:
116
18.7k
          break;
117
0
        case TK_IgnoreImplicitCastsAndParentheses:
118
0
          S = E->IgnoreParenImpCasts();
119
0
          break;
120
0
        case TK_IgnoreUnlessSpelledInSource:
121
0
          S = E->IgnoreUnlessSpelledInSource();
122
0
          break;
123
25.9k
        }
124
25.9k
      }
125
25.9k
126
25.9k
      getNodeDelegate().Visit(S);
127
25.9k
128
25.9k
      if (!S) {
129
828
        return;
130
828
      }
131
25.1k
132
25.1k
      ConstStmtVisitor<Derived>::Visit(S);
133
25.1k
134
      // Some statements have custom mechanisms for dumping their children.
135
25.1k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)23.5k
)
136
1.57k
        return;
137
23.5k
138
23.5k
      if (isa<LambdaExpr>(S) && 
Traversal == TK_IgnoreUnlessSpelledInSource113
)
139
0
        return;
140
23.5k
141
23.5k
      for (const Stmt *SubStmt : S->children())
142
20.1k
        Visit(SubStmt);
143
23.5k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
110
1.69k
    getNodeDelegate().AddChild(Label, [=] {
111
1.69k
      const Stmt *S = Node;
112
1.69k
113
1.69k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
114
1.26k
        switch (Traversal) {
115
1.26k
        case TK_AsIs:
116
1.26k
          break;
117
0
        case TK_IgnoreImplicitCastsAndParentheses:
118
0
          S = E->IgnoreParenImpCasts();
119
0
          break;
120
0
        case TK_IgnoreUnlessSpelledInSource:
121
0
          S = E->IgnoreUnlessSpelledInSource();
122
0
          break;
123
1.69k
        }
124
1.69k
      }
125
1.69k
126
1.69k
      getNodeDelegate().Visit(S);
127
1.69k
128
1.69k
      if (!S) {
129
21
        return;
130
21
      }
131
1.67k
132
1.67k
      ConstStmtVisitor<Derived>::Visit(S);
133
1.67k
134
      // Some statements have custom mechanisms for dumping their children.
135
1.67k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)1.61k
)
136
62
        return;
137
1.60k
138
1.60k
      if (isa<LambdaExpr>(S) && 
Traversal == TK_IgnoreUnlessSpelledInSource17
)
139
0
        return;
140
1.60k
141
1.60k
      for (const Stmt *SubStmt : S->children())
142
1.39k
        Visit(SubStmt);
143
1.60k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
110
24.2k
    getNodeDelegate().AddChild(Label, [=] {
111
24.2k
      const Stmt *S = Node;
112
24.2k
113
24.2k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
114
17.4k
        switch (Traversal) {
115
17.4k
        case TK_AsIs:
116
17.4k
          break;
117
0
        case TK_IgnoreImplicitCastsAndParentheses:
118
0
          S = E->IgnoreParenImpCasts();
119
0
          break;
120
0
        case TK_IgnoreUnlessSpelledInSource:
121
0
          S = E->IgnoreUnlessSpelledInSource();
122
0
          break;
123
24.2k
        }
124
24.2k
      }
125
24.2k
126
24.2k
      getNodeDelegate().Visit(S);
127
24.2k
128
24.2k
      if (!S) {
129
807
        return;
130
807
      }
131
23.4k
132
23.4k
      ConstStmtVisitor<Derived>::Visit(S);
133
23.4k
134
      // Some statements have custom mechanisms for dumping their children.
135
23.4k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)21.9k
)
136
1.51k
        return;
137
21.9k
138
21.9k
      if (isa<LambdaExpr>(S) && 
Traversal == TK_IgnoreUnlessSpelledInSource96
)
139
0
        return;
140
21.9k
141
21.9k
      for (const Stmt *SubStmt : S->children())
142
18.7k
        Visit(SubStmt);
143
21.9k
    });
144
25.9k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
109
1.69k
  void Visit(const Stmt *Node, StringRef Label = {}) {
110
1.69k
    getNodeDelegate().AddChild(Label, [=] {
111
1.69k
      const Stmt *S = Node;
112
1.69k
113
1.69k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
114
1.69k
        switch (Traversal) {
115
1.69k
        case TK_AsIs:
116
1.69k
          break;
117
1.69k
        case TK_IgnoreImplicitCastsAndParentheses:
118
1.69k
          S = E->IgnoreParenImpCasts();
119
1.69k
          break;
120
1.69k
        case TK_IgnoreUnlessSpelledInSource:
121
1.69k
          S = E->IgnoreUnlessSpelledInSource();
122
1.69k
          break;
123
1.69k
        }
124
1.69k
      }
125
1.69k
126
1.69k
      getNodeDelegate().Visit(S);
127
1.69k
128
1.69k
      if (!S) {
129
1.69k
        return;
130
1.69k
      }
131
1.69k
132
1.69k
      ConstStmtVisitor<Derived>::Visit(S);
133
1.69k
134
      // Some statements have custom mechanisms for dumping their children.
135
1.69k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S))
136
1.69k
        return;
137
1.69k
138
1.69k
      if (isa<LambdaExpr>(S) && Traversal == TK_IgnoreUnlessSpelledInSource)
139
1.69k
        return;
140
1.69k
141
1.69k
      for (const Stmt *SubStmt : S->children())
142
1.69k
        Visit(SubStmt);
143
1.69k
    });
144
1.69k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
109
24.2k
  void Visit(const Stmt *Node, StringRef Label = {}) {
110
24.2k
    getNodeDelegate().AddChild(Label, [=] {
111
24.2k
      const Stmt *S = Node;
112
24.2k
113
24.2k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
114
24.2k
        switch (Traversal) {
115
24.2k
        case TK_AsIs:
116
24.2k
          break;
117
24.2k
        case TK_IgnoreImplicitCastsAndParentheses:
118
24.2k
          S = E->IgnoreParenImpCasts();
119
24.2k
          break;
120
24.2k
        case TK_IgnoreUnlessSpelledInSource:
121
24.2k
          S = E->IgnoreUnlessSpelledInSource();
122
24.2k
          break;
123
24.2k
        }
124
24.2k
      }
125
24.2k
126
24.2k
      getNodeDelegate().Visit(S);
127
24.2k
128
24.2k
      if (!S) {
129
24.2k
        return;
130
24.2k
      }
131
24.2k
132
24.2k
      ConstStmtVisitor<Derived>::Visit(S);
133
24.2k
134
      // Some statements have custom mechanisms for dumping their children.
135
24.2k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S))
136
24.2k
        return;
137
24.2k
138
24.2k
      if (isa<LambdaExpr>(S) && Traversal == TK_IgnoreUnlessSpelledInSource)
139
24.2k
        return;
140
24.2k
141
24.2k
      for (const Stmt *SubStmt : S->children())
142
24.2k
        Visit(SubStmt);
143
24.2k
    });
144
24.2k
  }
145
146
3.83k
  void Visit(QualType T) {
147
3.83k
    SplitQualType SQT = T.split();
148
3.83k
    if (!SQT.Quals.hasQualifiers())
149
3.82k
      return Visit(SQT.Ty);
150
7
151
7
    getNodeDelegate().AddChild([=] {
152
7
      getNodeDelegate().Visit(T);
153
7
      Visit(T.split().Ty);
154
7
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()::operator()() const
Line
Count
Source
151
6
    getNodeDelegate().AddChild([=] {
152
6
      getNodeDelegate().Visit(T);
153
6
      Visit(T.split().Ty);
154
6
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::QualType)::'lambda'()::operator()() const
Line
Count
Source
151
1
    getNodeDelegate().AddChild([=] {
152
1
      getNodeDelegate().Visit(T);
153
1
      Visit(T.split().Ty);
154
1
    });
155
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)
Line
Count
Source
146
3.56k
  void Visit(QualType T) {
147
3.56k
    SplitQualType SQT = T.split();
148
3.56k
    if (!SQT.Quals.hasQualifiers())
149
3.56k
      return Visit(SQT.Ty);
150
6
151
6
    getNodeDelegate().AddChild([=] {
152
6
      getNodeDelegate().Visit(T);
153
6
      Visit(T.split().Ty);
154
6
    });
155
6
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::QualType)
Line
Count
Source
146
263
  void Visit(QualType T) {
147
263
    SplitQualType SQT = T.split();
148
263
    if (!SQT.Quals.hasQualifiers())
149
262
      return Visit(SQT.Ty);
150
1
151
1
    getNodeDelegate().AddChild([=] {
152
1
      getNodeDelegate().Visit(T);
153
1
      Visit(T.split().Ty);
154
1
    });
155
1
  }
156
157
3.85k
  void Visit(const Type *T) {
158
3.85k
    getNodeDelegate().AddChild([=] {
159
3.85k
      getNodeDelegate().Visit(T);
160
3.85k
      if (!T)
161
1
        return;
162
3.85k
      TypeVisitor<Derived>::Visit(T);
163
3.85k
164
3.85k
      QualType SingleStepDesugar =
165
3.85k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
166
3.85k
      if (SingleStepDesugar != QualType(T, 0))
167
134
        Visit(SingleStepDesugar);
168
3.85k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()::operator()() const
Line
Count
Source
158
3.58k
    getNodeDelegate().AddChild([=] {
159
3.58k
      getNodeDelegate().Visit(T);
160
3.58k
      if (!T)
161
0
        return;
162
3.58k
      TypeVisitor<Derived>::Visit(T);
163
3.58k
164
3.58k
      QualType SingleStepDesugar =
165
3.58k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
166
3.58k
      if (SingleStepDesugar != QualType(T, 0))
167
127
        Visit(SingleStepDesugar);
168
3.58k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Type const*)::'lambda'()::operator()() const
Line
Count
Source
158
266
    getNodeDelegate().AddChild([=] {
159
266
      getNodeDelegate().Visit(T);
160
266
      if (!T)
161
1
        return;
162
265
      TypeVisitor<Derived>::Visit(T);
163
265
164
265
      QualType SingleStepDesugar =
165
265
          T->getLocallyUnqualifiedSingleStepDesugaredType();
166
265
      if (SingleStepDesugar != QualType(T, 0))
167
7
        Visit(SingleStepDesugar);
168
265
    });
169
3.85k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)
Line
Count
Source
157
3.58k
  void Visit(const Type *T) {
158
3.58k
    getNodeDelegate().AddChild([=] {
159
3.58k
      getNodeDelegate().Visit(T);
160
3.58k
      if (!T)
161
3.58k
        return;
162
3.58k
      TypeVisitor<Derived>::Visit(T);
163
3.58k
164
3.58k
      QualType SingleStepDesugar =
165
3.58k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
166
3.58k
      if (SingleStepDesugar != QualType(T, 0))
167
3.58k
        Visit(SingleStepDesugar);
168
3.58k
    });
169
3.58k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Type const*)
Line
Count
Source
157
266
  void Visit(const Type *T) {
158
266
    getNodeDelegate().AddChild([=] {
159
266
      getNodeDelegate().Visit(T);
160
266
      if (!T)
161
266
        return;
162
266
      TypeVisitor<Derived>::Visit(T);
163
266
164
266
      QualType SingleStepDesugar =
165
266
          T->getLocallyUnqualifiedSingleStepDesugaredType();
166
266
      if (SingleStepDesugar != QualType(T, 0))
167
266
        Visit(SingleStepDesugar);
168
266
    });
169
266
  }
170
171
1.65k
  void Visit(const Attr *A) {
172
1.65k
    getNodeDelegate().AddChild([=] {
173
1.65k
      getNodeDelegate().Visit(A);
174
1.65k
      ConstAttrVisitor<Derived>::Visit(A);
175
1.65k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()::operator()() const
Line
Count
Source
172
1.62k
    getNodeDelegate().AddChild([=] {
173
1.62k
      getNodeDelegate().Visit(A);
174
1.62k
      ConstAttrVisitor<Derived>::Visit(A);
175
1.62k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Attr const*)::'lambda'()::operator()() const
Line
Count
Source
172
24
    getNodeDelegate().AddChild([=] {
173
24
      getNodeDelegate().Visit(A);
174
24
      ConstAttrVisitor<Derived>::Visit(A);
175
24
    });
176
1.65k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)
Line
Count
Source
171
1.62k
  void Visit(const Attr *A) {
172
1.62k
    getNodeDelegate().AddChild([=] {
173
1.62k
      getNodeDelegate().Visit(A);
174
1.62k
      ConstAttrVisitor<Derived>::Visit(A);
175
1.62k
    });
176
1.62k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Attr const*)
Line
Count
Source
171
24
  void Visit(const Attr *A) {
172
24
    getNodeDelegate().AddChild([=] {
173
24
      getNodeDelegate().Visit(A);
174
24
      ConstAttrVisitor<Derived>::Visit(A);
175
24
    });
176
24
  }
177
178
96
  void Visit(const CXXCtorInitializer *Init) {
179
96
    getNodeDelegate().AddChild([=] {
180
96
      getNodeDelegate().Visit(Init);
181
96
      Visit(Init->getInit());
182
96
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()::operator()() const
Line
Count
Source
179
93
    getNodeDelegate().AddChild([=] {
180
93
      getNodeDelegate().Visit(Init);
181
93
      Visit(Init->getInit());
182
93
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()::operator()() const
Line
Count
Source
179
3
    getNodeDelegate().AddChild([=] {
180
3
      getNodeDelegate().Visit(Init);
181
3
      Visit(Init->getInit());
182
3
    });
183
96
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)
Line
Count
Source
178
93
  void Visit(const CXXCtorInitializer *Init) {
179
93
    getNodeDelegate().AddChild([=] {
180
93
      getNodeDelegate().Visit(Init);
181
93
      Visit(Init->getInit());
182
93
    });
183
93
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::CXXCtorInitializer const*)
Line
Count
Source
178
3
  void Visit(const CXXCtorInitializer *Init) {
179
3
    getNodeDelegate().AddChild([=] {
180
3
      getNodeDelegate().Visit(Init);
181
3
      Visit(Init->getInit());
182
3
    });
183
3
  }
184
185
  void Visit(const TemplateArgument &A, SourceRange R = {},
186
432
             const Decl *From = nullptr, const char *Label = nullptr) {
187
432
    getNodeDelegate().AddChild([=] {
188
432
      getNodeDelegate().Visit(A, R, From, Label);
189
432
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
190
432
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()::operator()() const
Line
Count
Source
187
425
    getNodeDelegate().AddChild([=] {
188
425
      getNodeDelegate().Visit(A, R, From, Label);
189
425
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
190
425
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()::operator()() const
Line
Count
Source
187
7
    getNodeDelegate().AddChild([=] {
188
7
      getNodeDelegate().Visit(A, R, From, Label);
189
7
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
190
7
    });
191
432
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)
Line
Count
Source
186
425
             const Decl *From = nullptr, const char *Label = nullptr) {
187
425
    getNodeDelegate().AddChild([=] {
188
425
      getNodeDelegate().Visit(A, R, From, Label);
189
425
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
190
425
    });
191
425
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)
Line
Count
Source
186
7
             const Decl *From = nullptr, const char *Label = nullptr) {
187
7
    getNodeDelegate().AddChild([=] {
188
7
      getNodeDelegate().Visit(A, R, From, Label);
189
7
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
190
7
    });
191
7
  }
192
193
11
  void Visit(const BlockDecl::Capture &C) {
194
11
    getNodeDelegate().AddChild([=] {
195
11
      getNodeDelegate().Visit(C);
196
11
      if (C.hasCopyExpr())
197
2
        Visit(C.getCopyExpr());
198
11
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()::operator()() const
Line
Count
Source
194
8
    getNodeDelegate().AddChild([=] {
195
8
      getNodeDelegate().Visit(C);
196
8
      if (C.hasCopyExpr())
197
2
        Visit(C.getCopyExpr());
198
8
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()::operator()() const
Line
Count
Source
194
3
    getNodeDelegate().AddChild([=] {
195
3
      getNodeDelegate().Visit(C);
196
3
      if (C.hasCopyExpr())
197
0
        Visit(C.getCopyExpr());
198
3
    });
199
11
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)
Line
Count
Source
193
8
  void Visit(const BlockDecl::Capture &C) {
194
8
    getNodeDelegate().AddChild([=] {
195
8
      getNodeDelegate().Visit(C);
196
8
      if (C.hasCopyExpr())
197
8
        Visit(C.getCopyExpr());
198
8
    });
199
8
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::BlockDecl::Capture const&)
Line
Count
Source
193
3
  void Visit(const BlockDecl::Capture &C) {
194
3
    getNodeDelegate().AddChild([=] {
195
3
      getNodeDelegate().Visit(C);
196
3
      if (C.hasCopyExpr())
197
3
        Visit(C.getCopyExpr());
198
3
    });
199
3
  }
200
201
160
  void Visit(const OMPClause *C) {
202
160
    getNodeDelegate().AddChild([=] {
203
160
      getNodeDelegate().Visit(C);
204
160
      for (const auto *S : C->children())
205
222
        Visit(S);
206
160
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()::operator()() const
Line
Count
Source
202
160
    getNodeDelegate().AddChild([=] {
203
160
      getNodeDelegate().Visit(C);
204
160
      for (const auto *S : C->children())
205
222
        Visit(S);
206
160
    });
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()::operator()() const
207
160
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)
Line
Count
Source
201
160
  void Visit(const OMPClause *C) {
202
160
    getNodeDelegate().AddChild([=] {
203
160
      getNodeDelegate().Visit(C);
204
160
      for (const auto *S : C->children())
205
160
        Visit(S);
206
160
    });
207
160
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::OMPClause const*)
208
209
30
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
210
30
    getNodeDelegate().AddChild([=] {
211
30
      getNodeDelegate().Visit(A);
212
30
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
213
19
        Visit(TSI->getType());
214
30
      Visit(A.getAssociationExpr());
215
30
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()::operator()() const
Line
Count
Source
210
12
    getNodeDelegate().AddChild([=] {
211
12
      getNodeDelegate().Visit(A);
212
12
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
213
7
        Visit(TSI->getType());
214
12
      Visit(A.getAssociationExpr());
215
12
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()::operator()() const
Line
Count
Source
210
18
    getNodeDelegate().AddChild([=] {
211
18
      getNodeDelegate().Visit(A);
212
18
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
213
12
        Visit(TSI->getType());
214
18
      Visit(A.getAssociationExpr());
215
18
    });
216
30
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)
Line
Count
Source
209
12
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
210
12
    getNodeDelegate().AddChild([=] {
211
12
      getNodeDelegate().Visit(A);
212
12
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
213
12
        Visit(TSI->getType());
214
12
      Visit(A.getAssociationExpr());
215
12
    });
216
12
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)
Line
Count
Source
209
18
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
210
18
    getNodeDelegate().AddChild([=] {
211
18
      getNodeDelegate().Visit(A);
212
18
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
213
18
        Visit(TSI->getType());
214
18
      Visit(A.getAssociationExpr());
215
18
    });
216
18
  }
217
218
0
  void Visit(const APValue &Value, QualType Ty) {
219
0
    getNodeDelegate().AddChild([=] { getNodeDelegate().Visit(Value, Ty); });
220
0
  }
221
222
657
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
223
657
    getNodeDelegate().AddChild([=] {
224
657
      getNodeDelegate().Visit(C, FC);
225
657
      if (!C) {
226
0
        return;
227
0
      }
228
657
      comments::ConstCommentVisitor<Derived, void,
229
657
                                    const comments::FullComment *>::visit(C,
230
657
                                                                          FC);
231
657
      for (comments::Comment::child_iterator I = C->child_begin(),
232
657
                                             E = C->child_end();
233
1.18k
           I != E; 
++I525
)
234
525
        Visit(*I, FC);
235
657
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()::operator()() const
Line
Count
Source
223
64
    getNodeDelegate().AddChild([=] {
224
64
      getNodeDelegate().Visit(C, FC);
225
64
      if (!C) {
226
0
        return;
227
0
      }
228
64
      comments::ConstCommentVisitor<Derived, void,
229
64
                                    const comments::FullComment *>::visit(C,
230
64
                                                                          FC);
231
64
      for (comments::Comment::child_iterator I = C->child_begin(),
232
64
                                             E = C->child_end();
233
116
           I != E; 
++I52
)
234
52
        Visit(*I, FC);
235
64
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()::operator()() const
Line
Count
Source
223
593
    getNodeDelegate().AddChild([=] {
224
593
      getNodeDelegate().Visit(C, FC);
225
593
      if (!C) {
226
0
        return;
227
0
      }
228
593
      comments::ConstCommentVisitor<Derived, void,
229
593
                                    const comments::FullComment *>::visit(C,
230
593
                                                                          FC);
231
593
      for (comments::Comment::child_iterator I = C->child_begin(),
232
593
                                             E = C->child_end();
233
1.06k
           I != E; 
++I473
)
234
473
        Visit(*I, FC);
235
593
    });
236
657
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)
Line
Count
Source
222
64
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
223
64
    getNodeDelegate().AddChild([=] {
224
64
      getNodeDelegate().Visit(C, FC);
225
64
      if (!C) {
226
64
        return;
227
64
      }
228
64
      comments::ConstCommentVisitor<Derived, void,
229
64
                                    const comments::FullComment *>::visit(C,
230
64
                                                                          FC);
231
64
      for (comments::Comment::child_iterator I = C->child_begin(),
232
64
                                             E = C->child_end();
233
64
           I != E; ++I)
234
64
        Visit(*I, FC);
235
64
    });
236
64
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)
Line
Count
Source
222
593
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
223
593
    getNodeDelegate().AddChild([=] {
224
593
      getNodeDelegate().Visit(C, FC);
225
593
      if (!C) {
226
593
        return;
227
593
      }
228
593
      comments::ConstCommentVisitor<Derived, void,
229
593
                                    const comments::FullComment *>::visit(C,
230
593
                                                                          FC);
231
593
      for (comments::Comment::child_iterator I = C->child_begin(),
232
593
                                             E = C->child_end();
233
593
           I != E; ++I)
234
593
        Visit(*I, FC);
235
593
    });
236
593
  }
237
238
  void Visit(const DynTypedNode &N) {
239
    // FIXME: Improve this with a switch or a visitor pattern.
240
    if (const auto *D = N.get<Decl>())
241
      Visit(D);
242
    else if (const auto *S = N.get<Stmt>())
243
      Visit(S);
244
    else if (const auto *QT = N.get<QualType>())
245
      Visit(*QT);
246
    else if (const auto *T = N.get<Type>())
247
      Visit(T);
248
    else if (const auto *C = N.get<CXXCtorInitializer>())
249
      Visit(C);
250
    else if (const auto *C = N.get<OMPClause>())
251
      Visit(C);
252
    else if (const auto *T = N.get<TemplateArgument>())
253
      Visit(*T);
254
  }
255
256
4.16k
  void dumpDeclContext(const DeclContext *DC) {
257
4.16k
    if (!DC)
258
0
      return;
259
4.16k
260
4.16k
    for (const auto *D : (Deserialize ? 
DC->decls()596
:
DC->noload_decls()3.57k
))
261
14.1k
      Visit(D);
262
4.16k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpDeclContext(clang::DeclContext const*)
Line
Count
Source
256
3.92k
  void dumpDeclContext(const DeclContext *DC) {
257
3.92k
    if (!DC)
258
0
      return;
259
3.92k
260
3.92k
    for (const auto *D : (Deserialize ? 
DC->decls()596
:
DC->noload_decls()3.32k
))
261
13.4k
      Visit(D);
262
3.92k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpDeclContext(clang::DeclContext const*)
Line
Count
Source
256
246
  void dumpDeclContext(const DeclContext *DC) {
257
246
    if (!DC)
258
0
      return;
259
246
260
246
    for (const auto *D : (Deserialize ? 
DC->decls()0
: DC->noload_decls()))
261
733
      Visit(D);
262
246
  }
263
264
432
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
265
432
    if (!TPL)
266
0
      return;
267
432
268
432
    for (const auto &TP : *TPL)
269
502
      Visit(TP);
270
432
271
432
    if (const Expr *RC = TPL->getRequiresClause())
272
0
      Visit(RC);
273
432
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateParameters(clang::TemplateParameterList const*)
Line
Count
Source
264
399
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
265
399
    if (!TPL)
266
0
      return;
267
399
268
399
    for (const auto &TP : *TPL)
269
466
      Visit(TP);
270
399
271
399
    if (const Expr *RC = TPL->getRequiresClause())
272
0
      Visit(RC);
273
399
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateParameters(clang::TemplateParameterList const*)
Line
Count
Source
264
33
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
265
33
    if (!TPL)
266
0
      return;
267
33
268
33
    for (const auto &TP : *TPL)
269
36
      Visit(TP);
270
33
271
33
    if (const Expr *RC = TPL->getRequiresClause())
272
0
      Visit(RC);
273
33
  }
274
275
  void
276
1
  dumpASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *TALI) {
277
1
    if (!TALI)
278
0
      return;
279
1
280
1
    for (const auto &TA : TALI->arguments())
281
1
      dumpTemplateArgumentLoc(TA);
282
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpASTTemplateArgumentListInfo(clang::ASTTemplateArgumentListInfo const*)
Line
Count
Source
276
1
  dumpASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *TALI) {
277
1
    if (!TALI)
278
0
      return;
279
1
280
1
    for (const auto &TA : TALI->arguments())
281
1
      dumpTemplateArgumentLoc(TA);
282
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpASTTemplateArgumentListInfo(clang::ASTTemplateArgumentListInfo const*)
283
284
  void dumpTemplateArgumentLoc(const TemplateArgumentLoc &A,
285
                               const Decl *From = nullptr,
286
20
                               const char *Label = nullptr) {
287
20
    Visit(A.getArgument(), A.getSourceRange(), From, Label);
288
20
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateArgumentLoc(clang::TemplateArgumentLoc const&, clang::Decl const*, char const*)
Line
Count
Source
286
20
                               const char *Label = nullptr) {
287
20
    Visit(A.getArgument(), A.getSourceRange(), From, Label);
288
20
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateArgumentLoc(clang::TemplateArgumentLoc const&, clang::Decl const*, char const*)
289
290
218
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
291
474
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i256
)
292
256
      Visit(TAL[i]);
293
218
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateArgumentList(clang::TemplateArgumentList const&)
Line
Count
Source
290
215
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
291
466
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i251
)
292
251
      Visit(TAL[i]);
293
215
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateArgumentList(clang::TemplateArgumentList const&)
Line
Count
Source
290
3
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
291
8
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i5
)
292
5
      Visit(TAL[i]);
293
3
  }
294
295
115
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
296
115
    if (!typeParams)
297
111
      return;
298
4
299
5
    
for (const auto &typeParam : *typeParams)4
{
300
5
      Visit(typeParam);
301
5
    }
302
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpObjCTypeParamList(clang::ObjCTypeParamList const*)
Line
Count
Source
295
110
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
296
110
    if (!typeParams)
297
107
      return;
298
3
299
4
    
for (const auto &typeParam : *typeParams)3
{
300
4
      Visit(typeParam);
301
4
    }
302
3
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpObjCTypeParamList(clang::ObjCTypeParamList const*)
Line
Count
Source
295
5
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
296
5
    if (!typeParams)
297
4
      return;
298
1
299
1
    for (const auto &typeParam : *typeParams) {
300
1
      Visit(typeParam);
301
1
    }
302
1
  }
303
304
0
  void VisitComplexType(const ComplexType *T) { Visit(T->getElementType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitComplexType(clang::ComplexType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitComplexType(clang::ComplexType const*)
305
  void VisitLocInfoType(const LocInfoType *T) {
306
    Visit(T->getTypeSourceInfo()->getType());
307
  }
308
401
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPointerType(clang::PointerType const*)
Line
Count
Source
308
369
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPointerType(clang::PointerType const*)
Line
Count
Source
308
32
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
309
0
  void VisitBlockPointerType(const BlockPointerType *T) {
310
0
    Visit(T->getPointeeType());
311
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockPointerType(clang::BlockPointerType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBlockPointerType(clang::BlockPointerType const*)
312
16
  void VisitReferenceType(const ReferenceType *T) {
313
16
    Visit(T->getPointeeType());
314
16
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitReferenceType(clang::ReferenceType const*)
Line
Count
Source
312
16
  void VisitReferenceType(const ReferenceType *T) {
313
16
    Visit(T->getPointeeType());
314
16
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitReferenceType(clang::ReferenceType const*)
315
2
  void VisitMemberPointerType(const MemberPointerType *T) {
316
2
    Visit(T->getClass());
317
2
    Visit(T->getPointeeType());
318
2
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitMemberPointerType(clang::MemberPointerType const*)
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitMemberPointerType(clang::MemberPointerType const*)
Line
Count
Source
315
2
  void VisitMemberPointerType(const MemberPointerType *T) {
316
2
    Visit(T->getClass());
317
2
    Visit(T->getPointeeType());
318
2
  }
319
314
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitArrayType(clang::ArrayType const*)
Line
Count
Source
319
284
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitArrayType(clang::ArrayType const*)
Line
Count
Source
319
30
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
320
0
  void VisitVariableArrayType(const VariableArrayType *T) {
321
0
    VisitArrayType(T);
322
0
    Visit(T->getSizeExpr());
323
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVariableArrayType(clang::VariableArrayType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVariableArrayType(clang::VariableArrayType const*)
324
5
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
325
5
    Visit(T->getElementType());
326
5
    Visit(T->getSizeExpr());
327
5
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDependentSizedArrayType(clang::DependentSizedArrayType const*)
Line
Count
Source
324
4
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
325
4
    Visit(T->getElementType());
326
4
    Visit(T->getSizeExpr());
327
4
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDependentSizedArrayType(clang::DependentSizedArrayType const*)
Line
Count
Source
324
1
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
325
1
    Visit(T->getElementType());
326
1
    Visit(T->getSizeExpr());
327
1
  }
328
0
  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T) {
329
0
    Visit(T->getElementType());
330
0
    Visit(T->getSizeExpr());
331
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDependentSizedExtVectorType(clang::DependentSizedExtVectorType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDependentSizedExtVectorType(clang::DependentSizedExtVectorType const*)
332
5
  void VisitVectorType(const VectorType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVectorType(clang::VectorType const*)
Line
Count
Source
332
5
  void VisitVectorType(const VectorType *T) { Visit(T->getElementType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVectorType(clang::VectorType const*)
333
28
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionType(clang::FunctionType const*)
Line
Count
Source
333
24
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionType(clang::FunctionType const*)
Line
Count
Source
333
4
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
334
28
  void VisitFunctionProtoType(const FunctionProtoType *T) {
335
28
    VisitFunctionType(T);
336
28
    for (const QualType &PT : T->getParamTypes())
337
22
      Visit(PT);
338
28
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionProtoType(clang::FunctionProtoType const*)
Line
Count
Source
334
24
  void VisitFunctionProtoType(const FunctionProtoType *T) {
335
24
    VisitFunctionType(T);
336
24
    for (const QualType &PT : T->getParamTypes())
337
21
      Visit(PT);
338
24
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionProtoType(clang::FunctionProtoType const*)
Line
Count
Source
334
4
  void VisitFunctionProtoType(const FunctionProtoType *T) {
335
4
    VisitFunctionType(T);
336
4
    for (const QualType &PT : T->getParamTypes())
337
1
      Visit(PT);
338
4
  }
339
18
  void VisitTypeOfExprType(const TypeOfExprType *T) {
340
18
    Visit(T->getUnderlyingExpr());
341
18
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeOfExprType(clang::TypeOfExprType const*)
Line
Count
Source
339
18
  void VisitTypeOfExprType(const TypeOfExprType *T) {
340
18
    Visit(T->getUnderlyingExpr());
341
18
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeOfExprType(clang::TypeOfExprType const*)
342
7
  void VisitDecltypeType(const DecltypeType *T) {
343
7
    Visit(T->getUnderlyingExpr());
344
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDecltypeType(clang::DecltypeType const*)
Line
Count
Source
342
7
  void VisitDecltypeType(const DecltypeType *T) {
343
7
    Visit(T->getUnderlyingExpr());
344
7
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDecltypeType(clang::DecltypeType const*)
345
0
  void VisitUnaryTransformType(const UnaryTransformType *T) {
346
0
    Visit(T->getBaseType());
347
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitUnaryTransformType(clang::UnaryTransformType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitUnaryTransformType(clang::UnaryTransformType const*)
348
1
  void VisitAttributedType(const AttributedType *T) {
349
    // FIXME: AttrKind
350
1
    Visit(T->getModifiedType());
351
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAttributedType(clang::AttributedType const*)
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitAttributedType(clang::AttributedType const*)
Line
Count
Source
348
1
  void VisitAttributedType(const AttributedType *T) {
349
    // FIXME: AttrKind
350
1
    Visit(T->getModifiedType());
351
1
  }
352
17
  void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
353
17
    Visit(T->getReplacedParameter());
354
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstTemplateTypeParmType(clang::SubstTemplateTypeParmType const*)
Line
Count
Source
352
17
  void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
353
17
    Visit(T->getReplacedParameter());
354
17
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstTemplateTypeParmType(clang::SubstTemplateTypeParmType const*)
355
  void
356
1
  VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
357
1
    Visit(T->getReplacedParameter());
358
1
    Visit(T->getArgumentPack());
359
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstTemplateTypeParmPackType(clang::SubstTemplateTypeParmPackType const*)
Line
Count
Source
356
1
  VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
357
1
    Visit(T->getReplacedParameter());
358
1
    Visit(T->getArgumentPack());
359
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstTemplateTypeParmPackType(clang::SubstTemplateTypeParmPackType const*)
360
53
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
361
53
    for (const auto &Arg : *T)
362
78
      Visit(Arg);
363
53
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
Line
Count
Source
360
53
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
361
53
    for (const auto &Arg : *T)
362
78
      Visit(Arg);
363
53
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
364
60
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
365
60
    Visit(T->getPointeeType());
366
60
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
Line
Count
Source
364
60
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
365
60
    Visit(T->getPointeeType());
366
60
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
367
61
  void VisitAtomicType(const AtomicType *T) { Visit(T->getValueType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAtomicType(clang::AtomicType const*)
Line
Count
Source
367
61
  void VisitAtomicType(const AtomicType *T) { Visit(T->getValueType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitAtomicType(clang::AtomicType const*)
368
6
  void VisitPipeType(const PipeType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPipeType(clang::PipeType const*)
Line
Count
Source
368
6
  void VisitPipeType(const PipeType *T) { Visit(T->getElementType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPipeType(clang::PipeType const*)
369
0
  void VisitAdjustedType(const AdjustedType *T) { Visit(T->getOriginalType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAdjustedType(clang::AdjustedType const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitAdjustedType(clang::AdjustedType const*)
370
5
  void VisitPackExpansionType(const PackExpansionType *T) {
371
5
    if (!T->isSugared())
372
5
      Visit(T->getPattern());
373
5
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPackExpansionType(clang::PackExpansionType const*)
Line
Count
Source
370
5
  void VisitPackExpansionType(const PackExpansionType *T) {
371
5
    if (!T->isSugared())
372
5
      Visit(T->getPattern());
373
5
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPackExpansionType(clang::PackExpansionType const*)
374
  // FIXME: ElaboratedType, DependentNameType,
375
  // DependentTemplateSpecializationType, ObjCObjectType
376
377
2.35k
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypedefDecl(clang::TypedefDecl const*)
Line
Count
Source
377
2.20k
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypedefDecl(clang::TypedefDecl const*)
Line
Count
Source
377
159
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
378
379
86
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
380
86
    if (const Expr *Init = D->getInitExpr())
381
9
      Visit(Init);
382
86
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitEnumConstantDecl(clang::EnumConstantDecl const*)
Line
Count
Source
379
69
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
380
69
    if (const Expr *Init = D->getInitExpr())
381
8
      Visit(Init);
382
69
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitEnumConstantDecl(clang::EnumConstantDecl const*)
Line
Count
Source
379
17
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
380
17
    if (const Expr *Init = D->getInitExpr())
381
1
      Visit(Init);
382
17
  }
383
384
3.56k
  void VisitFunctionDecl(const FunctionDecl *D) {
385
3.56k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
386
71
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
387
3.56k
388
3.56k
    if (D->param_begin())
389
1.60k
      for (const auto *Parameter : D->parameters())
390
1.96k
        Visit(Parameter);
391
3.56k
392
3.56k
    if (const Expr *TRC = D->getTrailingRequiresClause())
393
4
      Visit(TRC);
394
3.56k
395
3.56k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
396
675
      for (const auto *I : C->inits())
397
94
        Visit(I);
398
3.56k
399
3.56k
    if (D->doesThisDeclarationHaveABody())
400
1.77k
      Visit(D->getBody());
401
3.56k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
384
3.26k
  void VisitFunctionDecl(const FunctionDecl *D) {
385
3.26k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
386
70
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
387
3.26k
388
3.26k
    if (D->param_begin())
389
1.45k
      for (const auto *Parameter : D->parameters())
390
1.78k
        Visit(Parameter);
391
3.26k
392
3.26k
    if (const Expr *TRC = D->getTrailingRequiresClause())
393
4
      Visit(TRC);
394
3.26k
395
3.26k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
396
650
      for (const auto *I : C->inits())
397
91
        Visit(I);
398
3.26k
399
3.26k
    if (D->doesThisDeclarationHaveABody())
400
1.61k
      Visit(D->getBody());
401
3.26k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
384
293
  void VisitFunctionDecl(const FunctionDecl *D) {
385
293
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
386
1
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
387
293
388
293
    if (D->param_begin())
389
148
      for (const auto *Parameter : D->parameters())
390
184
        Visit(Parameter);
391
293
392
293
    if (const Expr *TRC = D->getTrailingRequiresClause())
393
0
      Visit(TRC);
394
293
395
293
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
396
25
      for (const auto *I : C->inits())
397
3
        Visit(I);
398
293
399
293
    if (D->doesThisDeclarationHaveABody())
400
157
      Visit(D->getBody());
401
293
  }
402
403
1.83k
  void VisitFieldDecl(const FieldDecl *D) {
404
1.83k
    if (D->isBitField())
405
72
      Visit(D->getBitWidth());
406
1.83k
    if (Expr *Init = D->getInClassInitializer())
407
42
      Visit(Init);
408
1.83k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFieldDecl(clang::FieldDecl const*)
Line
Count
Source
403
1.73k
  void VisitFieldDecl(const FieldDecl *D) {
404
1.73k
    if (D->isBitField())
405
65
      Visit(D->getBitWidth());
406
1.73k
    if (Expr *Init = D->getInClassInitializer())
407
41
      Visit(Init);
408
1.73k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFieldDecl(clang::FieldDecl const*)
Line
Count
Source
403
95
  void VisitFieldDecl(const FieldDecl *D) {
404
95
    if (D->isBitField())
405
7
      Visit(D->getBitWidth());
406
95
    if (Expr *Init = D->getInClassInitializer())
407
1
      Visit(Init);
408
95
  }
409
410
7.28k
  void VisitVarDecl(const VarDecl *D) {
411
7.28k
    if (D->hasInit())
412
2.26k
      Visit(D->getInit());
413
7.28k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
410
7.00k
  void VisitVarDecl(const VarDecl *D) {
411
7.00k
    if (D->hasInit())
412
2.21k
      Visit(D->getInit());
413
7.00k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
410
281
  void VisitVarDecl(const VarDecl *D) {
411
281
    if (D->hasInit())
412
51
      Visit(D->getInit());
413
281
  }
414
415
0
  void VisitDecompositionDecl(const DecompositionDecl *D) {
416
0
    VisitVarDecl(D);
417
0
    for (const auto *B : D->bindings())
418
0
      Visit(B);
419
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDecompositionDecl(clang::DecompositionDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDecompositionDecl(clang::DecompositionDecl const*)
420
421
0
  void VisitBindingDecl(const BindingDecl *D) {
422
0
    if (const auto *E = D->getBinding())
423
0
      Visit(E);
424
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBindingDecl(clang::BindingDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBindingDecl(clang::BindingDecl const*)
425
426
3
  void VisitFileScopeAsmDecl(const FileScopeAsmDecl *D) {
427
3
    Visit(D->getAsmString());
428
3
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFileScopeAsmDecl(clang::FileScopeAsmDecl const*)
Line
Count
Source
426
3
  void VisitFileScopeAsmDecl(const FileScopeAsmDecl *D) {
427
3
    Visit(D->getAsmString());
428
3
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFileScopeAsmDecl(clang::FileScopeAsmDecl const*)
429
430
627
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCapturedDecl(clang::CapturedDecl const*)
Line
Count
Source
430
626
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCapturedDecl(clang::CapturedDecl const*)
Line
Count
Source
430
1
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
431
432
2
  void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
433
2
    for (const auto *E : D->varlists())
434
4
      Visit(E);
435
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPThreadPrivateDecl(clang::OMPThreadPrivateDecl const*)
Line
Count
Source
432
2
  void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
433
2
    for (const auto *E : D->varlists())
434
4
      Visit(E);
435
2
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPThreadPrivateDecl(clang::OMPThreadPrivateDecl const*)
436
437
6
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D) {
438
6
    Visit(D->getCombiner());
439
6
    if (const auto *Initializer = D->getInitializer())
440
2
      Visit(Initializer);
441
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPDeclareReductionDecl(clang::OMPDeclareReductionDecl const*)
Line
Count
Source
437
6
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D) {
438
6
    Visit(D->getCombiner());
439
6
    if (const auto *Initializer = D->getInitializer())
440
2
      Visit(Initializer);
441
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPDeclareReductionDecl(clang::OMPDeclareReductionDecl const*)
442
443
0
  void VisitOMPDeclareMapperDecl(const OMPDeclareMapperDecl *D) {
444
0
    for (const auto *C : D->clauselists())
445
0
      Visit(C);
446
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPDeclareMapperDecl(clang::OMPDeclareMapperDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPDeclareMapperDecl(clang::OMPDeclareMapperDecl const*)
447
448
96
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D) {
449
96
    Visit(D->getInit());
450
96
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPCapturedExprDecl(clang::OMPCapturedExprDecl const*)
Line
Count
Source
448
96
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D) {
449
96
    Visit(D->getInit());
450
96
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPCapturedExprDecl(clang::OMPCapturedExprDecl const*)
451
452
0
  void VisitOMPAllocateDecl(const OMPAllocateDecl *D) {
453
0
    for (const auto *E : D->varlists())
454
0
      Visit(E);
455
0
    for (const auto *C : D->clauselists())
456
0
      Visit(C);
457
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
458
459
  template <typename SpecializationDecl>
460
  void dumpTemplateDeclSpecialization(const SpecializationDecl *D) {
461
    for (const auto *RedeclWithBadType : D->redecls()) {
462
      // FIXME: The redecls() range sometimes has elements of a less-specific
463
      // type. (In particular, ClassTemplateSpecializationDecl::redecls() gives
464
      // us TagDecls, and should give CXXRecordDecls).
465
      auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
466
      if (!Redecl) {
467
        // Found the injected-class-name for a class template. This will be
468
        // dumped as part of its surrounding class so we don't need to dump it
469
        // here.
470
        assert(isa<CXXRecordDecl>(RedeclWithBadType) &&
471
               "expected an injected-class-name");
472
        continue;
473
      }
474
      Visit(Redecl);
475
    }
476
  }
477
478
  template <typename TemplateDecl>
479
  void dumpTemplateDecl(const TemplateDecl *D) {
480
    dumpTemplateParameters(D->getTemplateParameters());
481
482
    Visit(D->getTemplatedDecl());
483
484
    for (const auto *Child : D->specializations())
485
      dumpTemplateDeclSpecialization(Child);
486
  }
487
488
64
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
489
64
    Visit(D->getUnderlyingType());
490
64
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeAliasDecl(clang::TypeAliasDecl const*)
Line
Count
Source
488
59
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
489
59
    Visit(D->getUnderlyingType());
490
59
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeAliasDecl(clang::TypeAliasDecl const*)
Line
Count
Source
488
5
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
489
5
    Visit(D->getUnderlyingType());
490
5
  }
491
492
6
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D) {
493
6
    dumpTemplateParameters(D->getTemplateParameters());
494
6
    Visit(D->getTemplatedDecl());
495
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl const*)
Line
Count
Source
492
6
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D) {
493
6
    dumpTemplateParameters(D->getTemplateParameters());
494
6
    Visit(D->getTemplatedDecl());
495
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl const*)
496
497
43
  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
498
43
    Visit(D->getAssertExpr());
499
43
    Visit(D->getMessage());
500
43
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitStaticAssertDecl(clang::StaticAssertDecl const*)
Line
Count
Source
497
43
  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
498
43
    Visit(D->getAssertExpr());
499
43
    Visit(D->getMessage());
500
43
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitStaticAssertDecl(clang::StaticAssertDecl const*)
501
502
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) {
503
    dumpTemplateDecl(D);
504
  }
505
506
  void VisitClassTemplateDecl(const ClassTemplateDecl *D) {
507
    dumpTemplateDecl(D);
508
  }
509
510
  void VisitClassTemplateSpecializationDecl(
511
141
      const ClassTemplateSpecializationDecl *D) {
512
141
    dumpTemplateArgumentList(D->getTemplateArgs());
513
141
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
511
139
      const ClassTemplateSpecializationDecl *D) {
512
139
    dumpTemplateArgumentList(D->getTemplateArgs());
513
139
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
511
2
      const ClassTemplateSpecializationDecl *D) {
512
2
    dumpTemplateArgumentList(D->getTemplateArgs());
513
2
  }
514
515
  void VisitClassTemplatePartialSpecializationDecl(
516
17
      const ClassTemplatePartialSpecializationDecl *D) {
517
17
    VisitClassTemplateSpecializationDecl(D);
518
17
    dumpTemplateParameters(D->getTemplateParameters());
519
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassTemplatePartialSpecializationDecl(clang::ClassTemplatePartialSpecializationDecl const*)
Line
Count
Source
516
16
      const ClassTemplatePartialSpecializationDecl *D) {
517
16
    VisitClassTemplateSpecializationDecl(D);
518
16
    dumpTemplateParameters(D->getTemplateParameters());
519
16
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassTemplatePartialSpecializationDecl(clang::ClassTemplatePartialSpecializationDecl const*)
Line
Count
Source
516
1
      const ClassTemplatePartialSpecializationDecl *D) {
517
1
    VisitClassTemplateSpecializationDecl(D);
518
1
    dumpTemplateParameters(D->getTemplateParameters());
519
1
  }
520
521
  void VisitClassScopeFunctionSpecializationDecl(
522
1
      const ClassScopeFunctionSpecializationDecl *D) {
523
1
    Visit(D->getSpecialization());
524
1
    dumpASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
525
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassScopeFunctionSpecializationDecl(clang::ClassScopeFunctionSpecializationDecl const*)
Line
Count
Source
522
1
      const ClassScopeFunctionSpecializationDecl *D) {
523
1
    Visit(D->getSpecialization());
524
1
    dumpASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
525
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassScopeFunctionSpecializationDecl(clang::ClassScopeFunctionSpecializationDecl const*)
526
  void VisitVarTemplateDecl(const VarTemplateDecl *D) { dumpTemplateDecl(D); }
527
528
4
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D) {
529
4
    dumpTemplateParameters(D->getTemplateParameters());
530
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBuiltinTemplateDecl(clang::BuiltinTemplateDecl const*)
Line
Count
Source
528
4
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D) {
529
4
    dumpTemplateParameters(D->getTemplateParameters());
530
4
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBuiltinTemplateDecl(clang::BuiltinTemplateDecl const*)
531
532
  void
533
6
  VisitVarTemplateSpecializationDecl(const VarTemplateSpecializationDecl *D) {
534
6
    dumpTemplateArgumentList(D->getTemplateArgs());
535
6
    VisitVarDecl(D);
536
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl const*)
Line
Count
Source
533
6
  VisitVarTemplateSpecializationDecl(const VarTemplateSpecializationDecl *D) {
534
6
    dumpTemplateArgumentList(D->getTemplateArgs());
535
6
    VisitVarDecl(D);
536
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl const*)
537
538
  void VisitVarTemplatePartialSpecializationDecl(
539
0
      const VarTemplatePartialSpecializationDecl *D) {
540
0
    dumpTemplateParameters(D->getTemplateParameters());
541
0
    VisitVarTemplateSpecializationDecl(D);
542
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarTemplatePartialSpecializationDecl(clang::VarTemplatePartialSpecializationDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarTemplatePartialSpecializationDecl(clang::VarTemplatePartialSpecializationDecl const*)
543
544
400
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
545
400
    if (const auto *TC = D->getTypeConstraint())
546
8
      Visit(TC->getImmediatelyDeclaredConstraint());
547
400
    if (D->hasDefaultArgument())
548
11
      Visit(D->getDefaultArgument(), SourceRange(),
549
11
            D->getDefaultArgStorage().getInheritedFrom(),
550
10
            D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
551
400
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl const*)
Line
Count
Source
544
368
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
545
368
    if (const auto *TC = D->getTypeConstraint())
546
8
      Visit(TC->getImmediatelyDeclaredConstraint());
547
368
    if (D->hasDefaultArgument())
548
9
      Visit(D->getDefaultArgument(), SourceRange(),
549
9
            D->getDefaultArgStorage().getInheritedFrom(),
550
8
            D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
551
368
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl const*)
Line
Count
Source
544
32
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
545
32
    if (const auto *TC = D->getTypeConstraint())
546
0
      Visit(TC->getImmediatelyDeclaredConstraint());
547
32
    if (D->hasDefaultArgument())
548
2
      Visit(D->getDefaultArgument(), SourceRange(),
549
2
            D->getDefaultArgStorage().getInheritedFrom(),
550
2
            D->defaultArgumentWasInherited() ? 
"inherited from"0
: "previous");
551
32
  }
552
553
106
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
554
106
    if (const auto *E = D->getPlaceholderTypeConstraint())
555
0
      Visit(E);
556
106
    if (D->hasDefaultArgument())
557
12
      Visit(D->getDefaultArgument(), SourceRange(),
558
12
            D->getDefaultArgStorage().getInheritedFrom(),
559
11
            D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
560
106
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl const*)
Line
Count
Source
553
103
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
554
103
    if (const auto *E = D->getPlaceholderTypeConstraint())
555
0
      Visit(E);
556
103
    if (D->hasDefaultArgument())
557
12
      Visit(D->getDefaultArgument(), SourceRange(),
558
12
            D->getDefaultArgStorage().getInheritedFrom(),
559
11
            D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
560
103
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl const*)
Line
Count
Source
553
3
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
554
3
    if (const auto *E = D->getPlaceholderTypeConstraint())
555
0
      Visit(E);
556
3
    if (D->hasDefaultArgument())
557
0
      Visit(D->getDefaultArgument(), SourceRange(),
558
0
            D->getDefaultArgStorage().getInheritedFrom(),
559
0
            D->defaultArgumentWasInherited() ? "inherited from" : "previous");
560
3
  }
561
562
16
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
563
16
    dumpTemplateParameters(D->getTemplateParameters());
564
16
    if (D->hasDefaultArgument())
565
3
      dumpTemplateArgumentLoc(
566
3
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
567
2
          D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
568
16
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl const*)
Line
Count
Source
562
15
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
563
15
    dumpTemplateParameters(D->getTemplateParameters());
564
15
    if (D->hasDefaultArgument())
565
3
      dumpTemplateArgumentLoc(
566
3
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
567
2
          D->defaultArgumentWasInherited() ? 
"inherited from"1
: "previous");
568
15
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl const*)
Line
Count
Source
562
1
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
563
1
    dumpTemplateParameters(D->getTemplateParameters());
564
1
    if (D->hasDefaultArgument())
565
0
      dumpTemplateArgumentLoc(
566
0
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
567
0
          D->defaultArgumentWasInherited() ? "inherited from" : "previous");
568
1
  }
569
570
0
  void VisitConceptDecl(const ConceptDecl *D) {
571
0
    dumpTemplateParameters(D->getTemplateParameters());
572
0
    Visit(D->getConstraintExpr());
573
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitConceptDecl(clang::ConceptDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitConceptDecl(clang::ConceptDecl const*)
574
575
12
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE) {
576
12
    if (CSE->hasExplicitTemplateArgs())
577
12
      for (const auto &ArgLoc : CSE->getTemplateArgsAsWritten()->arguments())
578
16
        dumpTemplateArgumentLoc(ArgLoc);
579
12
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitConceptSpecializationExpr(clang::ConceptSpecializationExpr const*)
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitConceptSpecializationExpr(clang::ConceptSpecializationExpr const*)
Line
Count
Source
575
12
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE) {
576
12
    if (CSE->hasExplicitTemplateArgs())
577
12
      for (const auto &ArgLoc : CSE->getTemplateArgsAsWritten()->arguments())
578
16
        dumpTemplateArgumentLoc(ArgLoc);
579
12
  }
580
581
29
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
582
29
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
583
1
      Visit(TD->getTypeForDecl());
584
29
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitUsingShadowDecl(clang::UsingShadowDecl const*)
Line
Count
Source
581
26
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
582
26
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
583
0
      Visit(TD->getTypeForDecl());
584
26
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitUsingShadowDecl(clang::UsingShadowDecl const*)
Line
Count
Source
581
3
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
582
3
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
583
1
      Visit(TD->getTypeForDecl());
584
3
  }
585
586
10
  void VisitFriendDecl(const FriendDecl *D) {
587
10
    if (!D->getFriendType())
588
6
      Visit(D->getFriendDecl());
589
10
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFriendDecl(clang::FriendDecl const*)
Line
Count
Source
586
10
  void VisitFriendDecl(const FriendDecl *D) {
587
10
    if (!D->getFriendType())
588
6
      Visit(D->getFriendDecl());
589
10
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFriendDecl(clang::FriendDecl const*)
590
591
189
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
592
189
    if (D->isThisDeclarationADefinition())
593
34
      dumpDeclContext(D);
594
155
    else
595
155
      for (const ParmVarDecl *Parameter : D->parameters())
596
58
        Visit(Parameter);
597
189
598
189
    if (D->hasBody())
599
34
      Visit(D->getBody());
600
189
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCMethodDecl(clang::ObjCMethodDecl const*)
Line
Count
Source
591
174
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
592
174
    if (D->isThisDeclarationADefinition())
593
31
      dumpDeclContext(D);
594
143
    else
595
143
      for (const ParmVarDecl *Parameter : D->parameters())
596
53
        Visit(Parameter);
597
174
598
174
    if (D->hasBody())
599
31
      Visit(D->getBody());
600
174
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCMethodDecl(clang::ObjCMethodDecl const*)
Line
Count
Source
591
15
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
592
15
    if (D->isThisDeclarationADefinition())
593
3
      dumpDeclContext(D);
594
12
    else
595
12
      for (const ParmVarDecl *Parameter : D->parameters())
596
5
        Visit(Parameter);
597
15
598
15
    if (D->hasBody())
599
3
      Visit(D->getBody());
600
15
  }
601
602
20
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
603
20
    dumpObjCTypeParamList(D->getTypeParamList());
604
20
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCCategoryDecl(clang::ObjCCategoryDecl const*)
Line
Count
Source
602
19
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
603
19
    dumpObjCTypeParamList(D->getTypeParamList());
604
19
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCCategoryDecl(clang::ObjCCategoryDecl const*)
Line
Count
Source
602
1
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
603
1
    dumpObjCTypeParamList(D->getTypeParamList());
604
1
  }
605
606
95
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
607
95
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
608
95
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCInterfaceDecl(clang::ObjCInterfaceDecl const*)
Line
Count
Source
606
91
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
607
91
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
608
91
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCInterfaceDecl(clang::ObjCInterfaceDecl const*)
Line
Count
Source
606
4
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
607
4
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
608
4
  }
609
610
27
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
611
27
    for (const auto &I : D->inits())
612
2
      Visit(I);
613
27
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCImplementationDecl(clang::ObjCImplementationDecl const*)
Line
Count
Source
610
24
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
611
24
    for (const auto &I : D->inits())
612
2
      Visit(I);
613
24
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCImplementationDecl(clang::ObjCImplementationDecl const*)
Line
Count
Source
610
3
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
611
3
    for (const auto &I : D->inits())
612
0
      Visit(I);
613
3
  }
614
615
22
  void VisitBlockDecl(const BlockDecl *D) {
616
22
    for (const auto &I : D->parameters())
617
3
      Visit(I);
618
22
619
22
    for (const auto &I : D->captures())
620
11
      Visit(I);
621
22
    Visit(D->getBody());
622
22
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockDecl(clang::BlockDecl const*)
Line
Count
Source
615
19
  void VisitBlockDecl(const BlockDecl *D) {
616
19
    for (const auto &I : D->parameters())
617
2
      Visit(I);
618
19
619
19
    for (const auto &I : D->captures())
620
8
      Visit(I);
621
19
    Visit(D->getBody());
622
19
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBlockDecl(clang::BlockDecl const*)
Line
Count
Source
615
3
  void VisitBlockDecl(const BlockDecl *D) {
616
3
    for (const auto &I : D->parameters())
617
1
      Visit(I);
618
3
619
3
    for (const auto &I : D->captures())
620
3
      Visit(I);
621
3
    Visit(D->getBody());
622
3
  }
623
624
1.56k
  void VisitDeclStmt(const DeclStmt *Node) {
625
1.56k
    for (const auto &D : Node->decls())
626
1.60k
      Visit(D);
627
1.56k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
624
55
  void VisitDeclStmt(const DeclStmt *Node) {
625
55
    for (const auto &D : Node->decls())
626
57
      Visit(D);
627
55
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
624
1.50k
  void VisitDeclStmt(const DeclStmt *Node) {
625
1.50k
    for (const auto &D : Node->decls())
626
1.54k
      Visit(D);
627
1.50k
  }
628
629
14
  void VisitAttributedStmt(const AttributedStmt *Node) {
630
14
    for (const auto *A : Node->getAttrs())
631
16
      Visit(A);
632
14
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitAttributedStmt(clang::AttributedStmt const*)
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAttributedStmt(clang::AttributedStmt const*)
Line
Count
Source
629
14
  void VisitAttributedStmt(const AttributedStmt *Node) {
630
14
    for (const auto *A : Node->getAttrs())
631
16
      Visit(A);
632
14
  }
633
634
12
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
635
12
    Visit(Node->getExceptionDecl());
636
12
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCXXCatchStmt(clang::CXXCatchStmt const*)
Line
Count
Source
634
2
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
635
2
    Visit(Node->getExceptionDecl());
636
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCXXCatchStmt(clang::CXXCatchStmt const*)
Line
Count
Source
634
10
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
635
10
    Visit(Node->getExceptionDecl());
636
10
  }
637
638
382
  void VisitCapturedStmt(const CapturedStmt *Node) {
639
382
    Visit(Node->getCapturedDecl());
640
382
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCapturedStmt(clang::CapturedStmt const*)
Line
Count
Source
638
1
  void VisitCapturedStmt(const CapturedStmt *Node) {
639
1
    Visit(Node->getCapturedDecl());
640
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCapturedStmt(clang::CapturedStmt const*)
Line
Count
Source
638
381
  void VisitCapturedStmt(const CapturedStmt *Node) {
639
381
    Visit(Node->getCapturedDecl());
640
381
  }
641
642
187
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
643
187
    for (const auto *C : Node->clauses())
644
160
      Visit(C);
645
187
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPExecutableDirective(clang::OMPExecutableDirective const*)
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPExecutableDirective(clang::OMPExecutableDirective const*)
Line
Count
Source
642
187
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
643
187
    for (const auto *C : Node->clauses())
644
160
      Visit(C);
645
187
  }
646
647
260
  void VisitInitListExpr(const InitListExpr *ILE) {
648
260
    if (auto *Filler = ILE->getArrayFiller()) {
649
21
      Visit(Filler, "array_filler");
650
21
    }
651
260
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitInitListExpr(clang::InitListExpr const*)
Line
Count
Source
647
10
  void VisitInitListExpr(const InitListExpr *ILE) {
648
10
    if (auto *Filler = ILE->getArrayFiller()) {
649
1
      Visit(Filler, "array_filler");
650
1
    }
651
10
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitInitListExpr(clang::InitListExpr const*)
Line
Count
Source
647
250
  void VisitInitListExpr(const InitListExpr *ILE) {
648
250
    if (auto *Filler = ILE->getArrayFiller()) {
649
20
      Visit(Filler, "array_filler");
650
20
    }
651
250
  }
652
653
22
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBlockExpr(clang::BlockExpr const*)
Line
Count
Source
653
3
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockExpr(clang::BlockExpr const*)
Line
Count
Source
653
19
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
654
655
106
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
656
106
    if (Expr *Source = Node->getSourceExpr())
657
104
      Visit(Source);
658
106
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOpaqueValueExpr(clang::OpaqueValueExpr const*)
Line
Count
Source
655
52
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
656
52
    if (Expr *Source = Node->getSourceExpr())
657
52
      Visit(Source);
658
52
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOpaqueValueExpr(clang::OpaqueValueExpr const*)
Line
Count
Source
655
54
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
656
54
    if (Expr *Source = Node->getSourceExpr())
657
52
      Visit(Source);
658
54
  }
659
660
17
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
661
17
    Visit(E->getControllingExpr());
662
17
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
663
17
664
30
    for (const auto Assoc : E->associations()) {
665
30
      Visit(Assoc);
666
30
    }
667
17
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitGenericSelectionExpr(clang::GenericSelectionExpr const*)
Line
Count
Source
660
7
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
661
7
    Visit(E->getControllingExpr());
662
7
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
663
7
664
12
    for (const auto Assoc : E->associations()) {
665
12
      Visit(Assoc);
666
12
    }
667
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitGenericSelectionExpr(clang::GenericSelectionExpr const*)
Line
Count
Source
660
10
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
661
10
    Visit(E->getControllingExpr());
662
10
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
663
10
664
18
    for (const auto Assoc : E->associations()) {
665
18
      Visit(Assoc);
666
18
    }
667
10
  }
668
669
113
  void VisitLambdaExpr(const LambdaExpr *Node) {
670
113
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
671
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
672
0
        const auto *C = Node->capture_begin() + I;
673
0
        if (!C->isExplicit())
674
0
          continue;
675
0
        if (Node->isInitCapture(C))
676
0
          Visit(C->getCapturedVar());
677
0
        else
678
0
          Visit(Node->capture_init_begin()[I]);
679
0
      }
680
0
      dumpTemplateParameters(Node->getTemplateParameterList());
681
0
      for (const auto *P : Node->getCallOperator()->parameters())
682
0
        Visit(P);
683
0
      Visit(Node->getBody());
684
113
    } else {
685
113
      return Visit(Node->getLambdaClass());
686
113
    }
687
113
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitLambdaExpr(clang::LambdaExpr const*)
Line
Count
Source
669
17
  void VisitLambdaExpr(const LambdaExpr *Node) {
670
17
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
671
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
672
0
        const auto *C = Node->capture_begin() + I;
673
0
        if (!C->isExplicit())
674
0
          continue;
675
0
        if (Node->isInitCapture(C))
676
0
          Visit(C->getCapturedVar());
677
0
        else
678
0
          Visit(Node->capture_init_begin()[I]);
679
0
      }
680
0
      dumpTemplateParameters(Node->getTemplateParameterList());
681
0
      for (const auto *P : Node->getCallOperator()->parameters())
682
0
        Visit(P);
683
0
      Visit(Node->getBody());
684
17
    } else {
685
17
      return Visit(Node->getLambdaClass());
686
17
    }
687
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitLambdaExpr(clang::LambdaExpr const*)
Line
Count
Source
669
96
  void VisitLambdaExpr(const LambdaExpr *Node) {
670
96
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
671
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
672
0
        const auto *C = Node->capture_begin() + I;
673
0
        if (!C->isExplicit())
674
0
          continue;
675
0
        if (Node->isInitCapture(C))
676
0
          Visit(C->getCapturedVar());
677
0
        else
678
0
          Visit(Node->capture_init_begin()[I]);
679
0
      }
680
0
      dumpTemplateParameters(Node->getTemplateParameterList());
681
0
      for (const auto *P : Node->getCallOperator()->parameters())
682
0
        Visit(P);
683
0
      Visit(Node->getBody());
684
96
    } else {
685
96
      return Visit(Node->getLambdaClass());
686
96
    }
687
96
  }
688
689
13
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
690
13
    if (Node->isPartiallySubstituted())
691
0
      for (const auto &A : Node->getPartialArguments())
692
0
        Visit(A);
693
13
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSizeOfPackExpr(clang::SizeOfPackExpr const*)
Line
Count
Source
689
1
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
690
1
    if (Node->isPartiallySubstituted())
691
0
      for (const auto &A : Node->getPartialArguments())
692
0
        Visit(A);
693
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSizeOfPackExpr(clang::SizeOfPackExpr const*)
Line
Count
Source
689
12
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
690
12
    if (Node->isPartiallySubstituted())
691
0
      for (const auto &A : Node->getPartialArguments())
692
0
        Visit(A);
693
12
  }
694
695
19
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
696
19
    Visit(E->getParameter());
697
19
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstNonTypeTemplateParmExpr(clang::SubstNonTypeTemplateParmExpr const*)
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstNonTypeTemplateParmExpr(clang::SubstNonTypeTemplateParmExpr const*)
Line
Count
Source
695
19
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
696
19
    Visit(E->getParameter());
697
19
  }
698
  void VisitSubstNonTypeTemplateParmPackExpr(
699
1
      const SubstNonTypeTemplateParmPackExpr *E) {
700
1
    Visit(E->getParameterPack());
701
1
    Visit(E->getArgumentPack());
702
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstNonTypeTemplateParmPackExpr(clang::SubstNonTypeTemplateParmPackExpr const*)
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstNonTypeTemplateParmPackExpr(clang::SubstNonTypeTemplateParmPackExpr const*)
Line
Count
Source
699
1
      const SubstNonTypeTemplateParmPackExpr *E) {
700
1
    Visit(E->getParameterPack());
701
1
    Visit(E->getArgumentPack());
702
1
  }
703
704
11
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
705
11
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
706
8
      Visit(CatchParam);
707
11
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCAtCatchStmt(clang::ObjCAtCatchStmt const*)
Line
Count
Source
704
2
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
705
2
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
706
1
      Visit(CatchParam);
707
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCAtCatchStmt(clang::ObjCAtCatchStmt const*)
Line
Count
Source
704
9
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
705
9
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
706
7
      Visit(CatchParam);
707
9
  }
708
709
39
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
710
39
    Visit(TA.getAsExpr());
711
39
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
709
39
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
710
39
    Visit(TA.getAsExpr());
711
39
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
712
713
285
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
714
285
    Visit(TA.getAsType());
715
285
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
713
278
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
714
278
    Visit(TA.getAsType());
715
278
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
713
7
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
714
7
    Visit(TA.getAsType());
715
7
  }
716
717
22
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
718
22
    for (const auto &TArg : TA.pack_elements())
719
53
      Visit(TArg);
720
22
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPackTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
717
22
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
718
22
    for (const auto &TArg : TA.pack_elements())
719
53
      Visit(TArg);
720
22
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPackTemplateArgument(clang::TemplateArgument const&)
721
722
  // Implements Visit methods for Attrs.
723
#include "clang/AST/AttrNodeTraverse.inc"
724
};
725
726
} // namespace clang
727
728
#endif // LLVM_CLANG_AST_ASTNODETRAVERSER_H