Coverage Report

Created: 2022-01-18 06:27

/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 concepts::Requirement *R);
57
  void Visit(const APValue &Value, QualType Ty);
58
};
59
*/
60
template <typename Derived, typename NodeDelegateType>
61
class ASTNodeTraverser
62
    : public ConstDeclVisitor<Derived>,
63
      public ConstStmtVisitor<Derived>,
64
      public comments::ConstCommentVisitor<Derived, void,
65
                                           const comments::FullComment *>,
66
      public TypeVisitor<Derived>,
67
      public ConstAttrVisitor<Derived>,
68
      public ConstTemplateArgumentVisitor<Derived> {
69
70
  /// Indicates whether we should trigger deserialization of nodes that had
71
  /// not already been loaded.
72
  bool Deserialize = false;
73
74
  TraversalKind Traversal = TraversalKind::TK_AsIs;
75
76
147k
  NodeDelegateType &getNodeDelegate() {
77
147k
    return getDerived().doGetNodeDelegate();
78
147k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getNodeDelegate()
Line
Count
Source
76
137k
  NodeDelegateType &getNodeDelegate() {
77
137k
    return getDerived().doGetNodeDelegate();
78
137k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getNodeDelegate()
Line
Count
Source
76
10.1k
  NodeDelegateType &getNodeDelegate() {
77
10.1k
    return getDerived().doGetNodeDelegate();
78
10.1k
  }
79
147k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getDerived()
Line
Count
Source
79
137k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getDerived()
Line
Count
Source
79
10.1k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
80
81
public:
82
1.60k
  void setDeserialize(bool D) { Deserialize = D; }
83
7
  bool getDeserialize() const { return Deserialize; }
84
85
  void SetTraversalKind(TraversalKind TK) { Traversal = TK; }
86
547
  TraversalKind GetTraversalKind() const { return Traversal; }
87
88
27.5k
  void Visit(const Decl *D) {
89
27.5k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isImplicit()0
)
90
0
      return;
91
92
27.5k
    getNodeDelegate().AddChild([=] {
93
27.5k
      getNodeDelegate().Visit(D);
94
27.5k
      if (!D)
95
4
        return;
96
97
27.5k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
27.5k
      for (const auto &A : D->attrs())
100
2.34k
        Visit(A);
101
102
27.5k
      if (const comments::FullComment *Comment =
103
27.5k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
53
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
27.5k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)22.3k
) {
108
22.1k
        if (Traversal != TK_AsIs) {
109
0
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
0
            auto SK = CTSD->getSpecializationKind();
111
0
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
0
                SK == TSK_ExplicitInstantiationDefinition)
113
0
              return;
114
0
          }
115
0
        }
116
22.1k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
5.14k
          dumpDeclContext(DC);
118
22.1k
      }
119
27.5k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const
Line
Count
Source
92
25.6k
    getNodeDelegate().AddChild([=] {
93
25.6k
      getNodeDelegate().Visit(D);
94
25.6k
      if (!D)
95
3
        return;
96
97
25.6k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
25.6k
      for (const auto &A : D->attrs())
100
2.30k
        Visit(A);
101
102
25.6k
      if (const comments::FullComment *Comment =
103
25.6k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
41
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
25.6k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)20.9k
) {
108
20.7k
        if (Traversal != TK_AsIs) {
109
0
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
0
            auto SK = CTSD->getSpecializationKind();
111
0
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
0
                SK == TSK_ExplicitInstantiationDefinition)
113
0
              return;
114
0
          }
115
0
        }
116
20.7k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
4.78k
          dumpDeclContext(DC);
118
20.7k
      }
119
25.6k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const
Line
Count
Source
92
1.88k
    getNodeDelegate().AddChild([=] {
93
1.88k
      getNodeDelegate().Visit(D);
94
1.88k
      if (!D)
95
1
        return;
96
97
1.88k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
1.88k
      for (const auto &A : D->attrs())
100
34
        Visit(A);
101
102
1.88k
      if (const comments::FullComment *Comment =
103
1.88k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
12
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
1.88k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)1.44k
) {
108
1.43k
        if (Traversal != TK_AsIs) {
109
0
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
0
            auto SK = CTSD->getSpecializationKind();
111
0
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
0
                SK == TSK_ExplicitInstantiationDefinition)
113
0
              return;
114
0
          }
115
0
        }
116
1.43k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
361
          dumpDeclContext(DC);
118
1.43k
      }
119
1.88k
    });
120
27.5k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)
Line
Count
Source
88
25.6k
  void Visit(const Decl *D) {
89
25.6k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isImplicit()0
)
90
0
      return;
91
92
25.6k
    getNodeDelegate().AddChild([=] {
93
25.6k
      getNodeDelegate().Visit(D);
94
25.6k
      if (!D)
95
25.6k
        return;
96
97
25.6k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
25.6k
      for (const auto &A : D->attrs())
100
25.6k
        Visit(A);
101
102
25.6k
      if (const comments::FullComment *Comment =
103
25.6k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
25.6k
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
25.6k
      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
108
25.6k
        if (Traversal != TK_AsIs) {
109
25.6k
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
25.6k
            auto SK = CTSD->getSpecializationKind();
111
25.6k
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
25.6k
                SK == TSK_ExplicitInstantiationDefinition)
113
25.6k
              return;
114
25.6k
          }
115
25.6k
        }
116
25.6k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
25.6k
          dumpDeclContext(DC);
118
25.6k
      }
119
25.6k
    });
120
25.6k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Decl const*)
Line
Count
Source
88
1.88k
  void Visit(const Decl *D) {
89
1.88k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isImplicit()0
)
90
0
      return;
91
92
1.88k
    getNodeDelegate().AddChild([=] {
93
1.88k
      getNodeDelegate().Visit(D);
94
1.88k
      if (!D)
95
1.88k
        return;
96
97
1.88k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
1.88k
      for (const auto &A : D->attrs())
100
1.88k
        Visit(A);
101
102
1.88k
      if (const comments::FullComment *Comment =
103
1.88k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
1.88k
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
1.88k
      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
108
1.88k
        if (Traversal != TK_AsIs) {
109
1.88k
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
1.88k
            auto SK = CTSD->getSpecializationKind();
111
1.88k
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
1.88k
                SK == TSK_ExplicitInstantiationDefinition)
113
1.88k
              return;
114
1.88k
          }
115
1.88k
        }
116
1.88k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
1.88k
          dumpDeclContext(DC);
118
1.88k
      }
119
1.88k
    });
120
1.88k
  }
121
122
36.3k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
36.3k
    getNodeDelegate().AddChild(Label, [=] {
124
36.3k
      const Stmt *S = Node;
125
126
36.3k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
26.4k
        switch (Traversal) {
128
26.4k
        case TK_AsIs:
129
26.4k
          break;
130
0
        case TK_IgnoreUnlessSpelledInSource:
131
0
          S = E->IgnoreUnlessSpelledInSource();
132
0
          break;
133
26.4k
        }
134
26.4k
      }
135
136
36.3k
      getNodeDelegate().Visit(S);
137
138
36.3k
      if (!S) {
139
1.05k
        return;
140
1.05k
      }
141
142
35.3k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
35.3k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)33.3k
||
146
35.3k
          
isa<RequiresExpr>(S)33.2k
)
147
2.04k
        return;
148
149
33.2k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
33.2k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
33.2k
      for (const Stmt *SubStmt : S->children())
155
28.2k
        Visit(SubStmt);
156
33.2k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
123
2.52k
    getNodeDelegate().AddChild(Label, [=] {
124
2.52k
      const Stmt *S = Node;
125
126
2.52k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
1.83k
        switch (Traversal) {
128
1.83k
        case TK_AsIs:
129
1.83k
          break;
130
0
        case TK_IgnoreUnlessSpelledInSource:
131
0
          S = E->IgnoreUnlessSpelledInSource();
132
0
          break;
133
1.83k
        }
134
1.83k
      }
135
136
2.52k
      getNodeDelegate().Visit(S);
137
138
2.52k
      if (!S) {
139
37
        return;
140
37
      }
141
142
2.48k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
2.48k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)2.39k
||
146
2.48k
          
isa<RequiresExpr>(S)2.38k
)
147
100
        return;
148
149
2.38k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
2.38k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
2.38k
      for (const Stmt *SubStmt : S->children())
155
2.03k
        Visit(SubStmt);
156
2.38k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
123
33.8k
    getNodeDelegate().AddChild(Label, [=] {
124
33.8k
      const Stmt *S = Node;
125
126
33.8k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
24.6k
        switch (Traversal) {
128
24.6k
        case TK_AsIs:
129
24.6k
          break;
130
0
        case TK_IgnoreUnlessSpelledInSource:
131
0
          S = E->IgnoreUnlessSpelledInSource();
132
0
          break;
133
24.6k
        }
134
24.6k
      }
135
136
33.8k
      getNodeDelegate().Visit(S);
137
138
33.8k
      if (!S) {
139
1.01k
        return;
140
1.01k
      }
141
142
32.8k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
32.8k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)30.9k
||
146
32.8k
          
isa<RequiresExpr>(S)30.9k
)
147
1.94k
        return;
148
149
30.9k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
30.9k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
30.9k
      for (const Stmt *SubStmt : S->children())
155
26.2k
        Visit(SubStmt);
156
30.9k
    });
157
36.3k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
122
2.52k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
2.52k
    getNodeDelegate().AddChild(Label, [=] {
124
2.52k
      const Stmt *S = Node;
125
126
2.52k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
2.52k
        switch (Traversal) {
128
2.52k
        case TK_AsIs:
129
2.52k
          break;
130
2.52k
        case TK_IgnoreUnlessSpelledInSource:
131
2.52k
          S = E->IgnoreUnlessSpelledInSource();
132
2.52k
          break;
133
2.52k
        }
134
2.52k
      }
135
136
2.52k
      getNodeDelegate().Visit(S);
137
138
2.52k
      if (!S) {
139
2.52k
        return;
140
2.52k
      }
141
142
2.52k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
2.52k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S) ||
146
2.52k
          isa<RequiresExpr>(S))
147
2.52k
        return;
148
149
2.52k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
2.52k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
2.52k
              CXXRewrittenBinaryOperator>(S))
152
2.52k
        return;
153
154
2.52k
      for (const Stmt *SubStmt : S->children())
155
2.52k
        Visit(SubStmt);
156
2.52k
    });
157
2.52k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
122
33.8k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
33.8k
    getNodeDelegate().AddChild(Label, [=] {
124
33.8k
      const Stmt *S = Node;
125
126
33.8k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
33.8k
        switch (Traversal) {
128
33.8k
        case TK_AsIs:
129
33.8k
          break;
130
33.8k
        case TK_IgnoreUnlessSpelledInSource:
131
33.8k
          S = E->IgnoreUnlessSpelledInSource();
132
33.8k
          break;
133
33.8k
        }
134
33.8k
      }
135
136
33.8k
      getNodeDelegate().Visit(S);
137
138
33.8k
      if (!S) {
139
33.8k
        return;
140
33.8k
      }
141
142
33.8k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
33.8k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S) ||
146
33.8k
          isa<RequiresExpr>(S))
147
33.8k
        return;
148
149
33.8k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
33.8k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
33.8k
              CXXRewrittenBinaryOperator>(S))
152
33.8k
        return;
153
154
33.8k
      for (const Stmt *SubStmt : S->children())
155
33.8k
        Visit(SubStmt);
156
33.8k
    });
157
33.8k
  }
158
159
5.27k
  void Visit(QualType T) {
160
5.27k
    SplitQualType SQT = T.split();
161
5.27k
    if (!SQT.Quals.hasQualifiers())
162
5.24k
      return Visit(SQT.Ty);
163
164
27
    getNodeDelegate().AddChild([=] {
165
27
      getNodeDelegate().Visit(T);
166
27
      Visit(T.split().Ty);
167
27
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()::operator()() const
Line
Count
Source
164
26
    getNodeDelegate().AddChild([=] {
165
26
      getNodeDelegate().Visit(T);
166
26
      Visit(T.split().Ty);
167
26
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::QualType)::'lambda'()::operator()() const
Line
Count
Source
164
1
    getNodeDelegate().AddChild([=] {
165
1
      getNodeDelegate().Visit(T);
166
1
      Visit(T.split().Ty);
167
1
    });
168
27
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)
Line
Count
Source
159
4.80k
  void Visit(QualType T) {
160
4.80k
    SplitQualType SQT = T.split();
161
4.80k
    if (!SQT.Quals.hasQualifiers())
162
4.77k
      return Visit(SQT.Ty);
163
164
26
    getNodeDelegate().AddChild([=] {
165
26
      getNodeDelegate().Visit(T);
166
26
      Visit(T.split().Ty);
167
26
    });
168
26
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::QualType)
Line
Count
Source
159
470
  void Visit(QualType T) {
160
470
    SplitQualType SQT = T.split();
161
470
    if (!SQT.Quals.hasQualifiers())
162
469
      return Visit(SQT.Ty);
163
164
1
    getNodeDelegate().AddChild([=] {
165
1
      getNodeDelegate().Visit(T);
166
1
      Visit(T.split().Ty);
167
1
    });
168
1
  }
169
170
5.31k
  void Visit(const Type *T) {
171
5.31k
    getNodeDelegate().AddChild([=] {
172
5.31k
      getNodeDelegate().Visit(T);
173
5.31k
      if (!T)
174
1
        return;
175
5.31k
      TypeVisitor<Derived>::Visit(T);
176
177
5.31k
      QualType SingleStepDesugar =
178
5.31k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
5.31k
      if (SingleStepDesugar != QualType(T, 0))
180
194
        Visit(SingleStepDesugar);
181
5.31k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()::operator()() const
Line
Count
Source
171
4.84k
    getNodeDelegate().AddChild([=] {
172
4.84k
      getNodeDelegate().Visit(T);
173
4.84k
      if (!T)
174
0
        return;
175
4.84k
      TypeVisitor<Derived>::Visit(T);
176
177
4.84k
      QualType SingleStepDesugar =
178
4.84k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
4.84k
      if (SingleStepDesugar != QualType(T, 0))
180
187
        Visit(SingleStepDesugar);
181
4.84k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Type const*)::'lambda'()::operator()() const
Line
Count
Source
171
474
    getNodeDelegate().AddChild([=] {
172
474
      getNodeDelegate().Visit(T);
173
474
      if (!T)
174
1
        return;
175
473
      TypeVisitor<Derived>::Visit(T);
176
177
473
      QualType SingleStepDesugar =
178
473
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
473
      if (SingleStepDesugar != QualType(T, 0))
180
7
        Visit(SingleStepDesugar);
181
473
    });
182
5.31k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)
Line
Count
Source
170
4.84k
  void Visit(const Type *T) {
171
4.84k
    getNodeDelegate().AddChild([=] {
172
4.84k
      getNodeDelegate().Visit(T);
173
4.84k
      if (!T)
174
4.84k
        return;
175
4.84k
      TypeVisitor<Derived>::Visit(T);
176
177
4.84k
      QualType SingleStepDesugar =
178
4.84k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
4.84k
      if (SingleStepDesugar != QualType(T, 0))
180
4.84k
        Visit(SingleStepDesugar);
181
4.84k
    });
182
4.84k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Type const*)
Line
Count
Source
170
474
  void Visit(const Type *T) {
171
474
    getNodeDelegate().AddChild([=] {
172
474
      getNodeDelegate().Visit(T);
173
474
      if (!T)
174
474
        return;
175
474
      TypeVisitor<Derived>::Visit(T);
176
177
474
      QualType SingleStepDesugar =
178
474
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
474
      if (SingleStepDesugar != QualType(T, 0))
180
474
        Visit(SingleStepDesugar);
181
474
    });
182
474
  }
183
184
2.36k
  void Visit(const Attr *A) {
185
2.36k
    getNodeDelegate().AddChild([=] {
186
2.36k
      getNodeDelegate().Visit(A);
187
2.36k
      ConstAttrVisitor<Derived>::Visit(A);
188
2.36k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()::operator()() const
Line
Count
Source
185
2.32k
    getNodeDelegate().AddChild([=] {
186
2.32k
      getNodeDelegate().Visit(A);
187
2.32k
      ConstAttrVisitor<Derived>::Visit(A);
188
2.32k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Attr const*)::'lambda'()::operator()() const
Line
Count
Source
185
34
    getNodeDelegate().AddChild([=] {
186
34
      getNodeDelegate().Visit(A);
187
34
      ConstAttrVisitor<Derived>::Visit(A);
188
34
    });
189
2.36k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)
Line
Count
Source
184
2.32k
  void Visit(const Attr *A) {
185
2.32k
    getNodeDelegate().AddChild([=] {
186
2.32k
      getNodeDelegate().Visit(A);
187
2.32k
      ConstAttrVisitor<Derived>::Visit(A);
188
2.32k
    });
189
2.32k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Attr const*)
Line
Count
Source
184
34
  void Visit(const Attr *A) {
185
34
    getNodeDelegate().AddChild([=] {
186
34
      getNodeDelegate().Visit(A);
187
34
      ConstAttrVisitor<Derived>::Visit(A);
188
34
    });
189
34
  }
190
191
182
  void Visit(const CXXCtorInitializer *Init) {
192
182
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
!Init->isWritten()0
)
193
0
      return;
194
182
    getNodeDelegate().AddChild([=] {
195
182
      getNodeDelegate().Visit(Init);
196
182
      Visit(Init->getInit());
197
182
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()::operator()() const
Line
Count
Source
194
161
    getNodeDelegate().AddChild([=] {
195
161
      getNodeDelegate().Visit(Init);
196
161
      Visit(Init->getInit());
197
161
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()::operator()() const
Line
Count
Source
194
21
    getNodeDelegate().AddChild([=] {
195
21
      getNodeDelegate().Visit(Init);
196
21
      Visit(Init->getInit());
197
21
    });
198
182
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)
Line
Count
Source
191
161
  void Visit(const CXXCtorInitializer *Init) {
192
161
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
!Init->isWritten()0
)
193
0
      return;
194
161
    getNodeDelegate().AddChild([=] {
195
161
      getNodeDelegate().Visit(Init);
196
161
      Visit(Init->getInit());
197
161
    });
198
161
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::CXXCtorInitializer const*)
Line
Count
Source
191
21
  void Visit(const CXXCtorInitializer *Init) {
192
21
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
!Init->isWritten()0
)
193
0
      return;
194
21
    getNodeDelegate().AddChild([=] {
195
21
      getNodeDelegate().Visit(Init);
196
21
      Visit(Init->getInit());
197
21
    });
198
21
  }
199
200
  void Visit(const TemplateArgument &A, SourceRange R = {},
201
673
             const Decl *From = nullptr, const char *Label = nullptr) {
202
673
    getNodeDelegate().AddChild([=] {
203
673
      getNodeDelegate().Visit(A, R, From, Label);
204
673
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
673
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()::operator()() const
Line
Count
Source
202
644
    getNodeDelegate().AddChild([=] {
203
644
      getNodeDelegate().Visit(A, R, From, Label);
204
644
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
644
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()::operator()() const
Line
Count
Source
202
29
    getNodeDelegate().AddChild([=] {
203
29
      getNodeDelegate().Visit(A, R, From, Label);
204
29
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
29
    });
206
673
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)
Line
Count
Source
201
644
             const Decl *From = nullptr, const char *Label = nullptr) {
202
644
    getNodeDelegate().AddChild([=] {
203
644
      getNodeDelegate().Visit(A, R, From, Label);
204
644
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
644
    });
206
644
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)
Line
Count
Source
201
29
             const Decl *From = nullptr, const char *Label = nullptr) {
202
29
    getNodeDelegate().AddChild([=] {
203
29
      getNodeDelegate().Visit(A, R, From, Label);
204
29
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
29
    });
206
29
  }
207
208
11
  void Visit(const BlockDecl::Capture &C) {
209
11
    getNodeDelegate().AddChild([=] {
210
11
      getNodeDelegate().Visit(C);
211
11
      if (C.hasCopyExpr())
212
2
        Visit(C.getCopyExpr());
213
11
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()::operator()() const
Line
Count
Source
209
8
    getNodeDelegate().AddChild([=] {
210
8
      getNodeDelegate().Visit(C);
211
8
      if (C.hasCopyExpr())
212
2
        Visit(C.getCopyExpr());
213
8
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()::operator()() const
Line
Count
Source
209
3
    getNodeDelegate().AddChild([=] {
210
3
      getNodeDelegate().Visit(C);
211
3
      if (C.hasCopyExpr())
212
0
        Visit(C.getCopyExpr());
213
3
    });
214
11
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)
Line
Count
Source
208
8
  void Visit(const BlockDecl::Capture &C) {
209
8
    getNodeDelegate().AddChild([=] {
210
8
      getNodeDelegate().Visit(C);
211
8
      if (C.hasCopyExpr())
212
8
        Visit(C.getCopyExpr());
213
8
    });
214
8
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::BlockDecl::Capture const&)
Line
Count
Source
208
3
  void Visit(const BlockDecl::Capture &C) {
209
3
    getNodeDelegate().AddChild([=] {
210
3
      getNodeDelegate().Visit(C);
211
3
      if (C.hasCopyExpr())
212
3
        Visit(C.getCopyExpr());
213
3
    });
214
3
  }
215
216
362
  void Visit(const OMPClause *C) {
217
362
    getNodeDelegate().AddChild([=] {
218
362
      getNodeDelegate().Visit(C);
219
362
      for (const auto *S : C->children())
220
456
        Visit(S);
221
362
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()::operator()() const
Line
Count
Source
217
360
    getNodeDelegate().AddChild([=] {
218
360
      getNodeDelegate().Visit(C);
219
360
      for (const auto *S : C->children())
220
454
        Visit(S);
221
360
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()::operator()() const
Line
Count
Source
217
2
    getNodeDelegate().AddChild([=] {
218
2
      getNodeDelegate().Visit(C);
219
2
      for (const auto *S : C->children())
220
2
        Visit(S);
221
2
    });
222
362
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)
Line
Count
Source
216
360
  void Visit(const OMPClause *C) {
217
360
    getNodeDelegate().AddChild([=] {
218
360
      getNodeDelegate().Visit(C);
219
360
      for (const auto *S : C->children())
220
360
        Visit(S);
221
360
    });
222
360
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::OMPClause const*)
Line
Count
Source
216
2
  void Visit(const OMPClause *C) {
217
2
    getNodeDelegate().AddChild([=] {
218
2
      getNodeDelegate().Visit(C);
219
2
      for (const auto *S : C->children())
220
2
        Visit(S);
221
2
    });
222
2
  }
223
224
38
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
225
38
    getNodeDelegate().AddChild([=] {
226
38
      getNodeDelegate().Visit(A);
227
38
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
228
27
        Visit(TSI->getType());
229
38
      Visit(A.getAssociationExpr());
230
38
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()::operator()() const
Line
Count
Source
225
12
    getNodeDelegate().AddChild([=] {
226
12
      getNodeDelegate().Visit(A);
227
12
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
228
7
        Visit(TSI->getType());
229
12
      Visit(A.getAssociationExpr());
230
12
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()::operator()() const
Line
Count
Source
225
26
    getNodeDelegate().AddChild([=] {
226
26
      getNodeDelegate().Visit(A);
227
26
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
228
20
        Visit(TSI->getType());
229
26
      Visit(A.getAssociationExpr());
230
26
    });
231
38
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)
Line
Count
Source
224
12
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
225
12
    getNodeDelegate().AddChild([=] {
226
12
      getNodeDelegate().Visit(A);
227
12
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
228
12
        Visit(TSI->getType());
229
12
      Visit(A.getAssociationExpr());
230
12
    });
231
12
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)
Line
Count
Source
224
26
  void Visit(const GenericSelectionExpr::ConstAssociation &A) {
225
26
    getNodeDelegate().AddChild([=] {
226
26
      getNodeDelegate().Visit(A);
227
26
      if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
228
26
        Visit(TSI->getType());
229
26
      Visit(A.getAssociationExpr());
230
26
    });
231
26
  }
232
233
12
  void Visit(const concepts::Requirement *R) {
234
12
    getNodeDelegate().AddChild([=] {
235
12
      getNodeDelegate().Visit(R);
236
12
      if (!R)
237
0
        return;
238
12
      if (auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239
3
        if (!TR->isSubstitutionFailure())
240
3
          Visit(TR->getType()->getType().getTypePtr());
241
9
      } else if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242
6
        if (!ER->isExprSubstitutionFailure())
243
6
          Visit(ER->getExpr());
244
6
        if (!ER->getReturnTypeRequirement().isEmpty())
245
3
          Visit(ER->getReturnTypeRequirement()
246
3
                    .getTypeConstraint()
247
3
                    ->getImmediatelyDeclaredConstraint());
248
6
      } else 
if (auto *3
NR3
= dyn_cast<concepts::NestedRequirement>(R)) {
249
3
        if (!NR->isSubstitutionFailure())
250
3
          Visit(NR->getConstraintExpr());
251
3
      }
252
12
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()::operator()() const
Line
Count
Source
234
4
    getNodeDelegate().AddChild([=] {
235
4
      getNodeDelegate().Visit(R);
236
4
      if (!R)
237
0
        return;
238
4
      if (auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239
1
        if (!TR->isSubstitutionFailure())
240
1
          Visit(TR->getType()->getType().getTypePtr());
241
3
      } else if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242
2
        if (!ER->isExprSubstitutionFailure())
243
2
          Visit(ER->getExpr());
244
2
        if (!ER->getReturnTypeRequirement().isEmpty())
245
1
          Visit(ER->getReturnTypeRequirement()
246
1
                    .getTypeConstraint()
247
1
                    ->getImmediatelyDeclaredConstraint());
248
2
      } else 
if (auto *1
NR1
= dyn_cast<concepts::NestedRequirement>(R)) {
249
1
        if (!NR->isSubstitutionFailure())
250
1
          Visit(NR->getConstraintExpr());
251
1
      }
252
4
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()::operator()() const
Line
Count
Source
234
8
    getNodeDelegate().AddChild([=] {
235
8
      getNodeDelegate().Visit(R);
236
8
      if (!R)
237
0
        return;
238
8
      if (auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239
2
        if (!TR->isSubstitutionFailure())
240
2
          Visit(TR->getType()->getType().getTypePtr());
241
6
      } else if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242
4
        if (!ER->isExprSubstitutionFailure())
243
4
          Visit(ER->getExpr());
244
4
        if (!ER->getReturnTypeRequirement().isEmpty())
245
2
          Visit(ER->getReturnTypeRequirement()
246
2
                    .getTypeConstraint()
247
2
                    ->getImmediatelyDeclaredConstraint());
248
4
      } else 
if (auto *2
NR2
= dyn_cast<concepts::NestedRequirement>(R)) {
249
2
        if (!NR->isSubstitutionFailure())
250
2
          Visit(NR->getConstraintExpr());
251
2
      }
252
8
    });
253
12
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::concepts::Requirement const*)
Line
Count
Source
233
4
  void Visit(const concepts::Requirement *R) {
234
4
    getNodeDelegate().AddChild([=] {
235
4
      getNodeDelegate().Visit(R);
236
4
      if (!R)
237
4
        return;
238
4
      if (auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239
4
        if (!TR->isSubstitutionFailure())
240
4
          Visit(TR->getType()->getType().getTypePtr());
241
4
      } else if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242
4
        if (!ER->isExprSubstitutionFailure())
243
4
          Visit(ER->getExpr());
244
4
        if (!ER->getReturnTypeRequirement().isEmpty())
245
4
          Visit(ER->getReturnTypeRequirement()
246
4
                    .getTypeConstraint()
247
4
                    ->getImmediatelyDeclaredConstraint());
248
4
      } else if (auto *NR = dyn_cast<concepts::NestedRequirement>(R)) {
249
4
        if (!NR->isSubstitutionFailure())
250
4
          Visit(NR->getConstraintExpr());
251
4
      }
252
4
    });
253
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)
Line
Count
Source
233
8
  void Visit(const concepts::Requirement *R) {
234
8
    getNodeDelegate().AddChild([=] {
235
8
      getNodeDelegate().Visit(R);
236
8
      if (!R)
237
8
        return;
238
8
      if (auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239
8
        if (!TR->isSubstitutionFailure())
240
8
          Visit(TR->getType()->getType().getTypePtr());
241
8
      } else if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242
8
        if (!ER->isExprSubstitutionFailure())
243
8
          Visit(ER->getExpr());
244
8
        if (!ER->getReturnTypeRequirement().isEmpty())
245
8
          Visit(ER->getReturnTypeRequirement()
246
8
                    .getTypeConstraint()
247
8
                    ->getImmediatelyDeclaredConstraint());
248
8
      } else if (auto *NR = dyn_cast<concepts::NestedRequirement>(R)) {
249
8
        if (!NR->isSubstitutionFailure())
250
8
          Visit(NR->getConstraintExpr());
251
8
      }
252
8
    });
253
8
  }
254
255
0
  void Visit(const APValue &Value, QualType Ty) {
256
0
    getNodeDelegate().AddChild([=] { getNodeDelegate().Visit(Value, Ty); });
257
0
  }
258
259
689
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
260
689
    getNodeDelegate().AddChild([=] {
261
689
      getNodeDelegate().Visit(C, FC);
262
689
      if (!C) {
263
0
        return;
264
0
      }
265
689
      comments::ConstCommentVisitor<Derived, void,
266
689
                                    const comments::FullComment *>::visit(C,
267
689
                                                                          FC);
268
689
      for (comments::Comment::child_iterator I = C->child_begin(),
269
689
                                             E = C->child_end();
270
1.24k
           I != E; 
++I557
)
271
557
        Visit(*I, FC);
272
689
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()::operator()() const
Line
Count
Source
260
64
    getNodeDelegate().AddChild([=] {
261
64
      getNodeDelegate().Visit(C, FC);
262
64
      if (!C) {
263
0
        return;
264
0
      }
265
64
      comments::ConstCommentVisitor<Derived, void,
266
64
                                    const comments::FullComment *>::visit(C,
267
64
                                                                          FC);
268
64
      for (comments::Comment::child_iterator I = C->child_begin(),
269
64
                                             E = C->child_end();
270
116
           I != E; 
++I52
)
271
52
        Visit(*I, FC);
272
64
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()::operator()() const
Line
Count
Source
260
625
    getNodeDelegate().AddChild([=] {
261
625
      getNodeDelegate().Visit(C, FC);
262
625
      if (!C) {
263
0
        return;
264
0
      }
265
625
      comments::ConstCommentVisitor<Derived, void,
266
625
                                    const comments::FullComment *>::visit(C,
267
625
                                                                          FC);
268
625
      for (comments::Comment::child_iterator I = C->child_begin(),
269
625
                                             E = C->child_end();
270
1.13k
           I != E; 
++I505
)
271
505
        Visit(*I, FC);
272
625
    });
273
689
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)
Line
Count
Source
259
64
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
260
64
    getNodeDelegate().AddChild([=] {
261
64
      getNodeDelegate().Visit(C, FC);
262
64
      if (!C) {
263
64
        return;
264
64
      }
265
64
      comments::ConstCommentVisitor<Derived, void,
266
64
                                    const comments::FullComment *>::visit(C,
267
64
                                                                          FC);
268
64
      for (comments::Comment::child_iterator I = C->child_begin(),
269
64
                                             E = C->child_end();
270
64
           I != E; ++I)
271
64
        Visit(*I, FC);
272
64
    });
273
64
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)
Line
Count
Source
259
625
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
260
625
    getNodeDelegate().AddChild([=] {
261
625
      getNodeDelegate().Visit(C, FC);
262
625
      if (!C) {
263
625
        return;
264
625
      }
265
625
      comments::ConstCommentVisitor<Derived, void,
266
625
                                    const comments::FullComment *>::visit(C,
267
625
                                                                          FC);
268
625
      for (comments::Comment::child_iterator I = C->child_begin(),
269
625
                                             E = C->child_end();
270
625
           I != E; ++I)
271
625
        Visit(*I, FC);
272
625
    });
273
625
  }
274
275
  void Visit(const DynTypedNode &N) {
276
    // FIXME: Improve this with a switch or a visitor pattern.
277
    if (const auto *D = N.get<Decl>())
278
      Visit(D);
279
    else if (const auto *S = N.get<Stmt>())
280
      Visit(S);
281
    else if (const auto *QT = N.get<QualType>())
282
      Visit(*QT);
283
    else if (const auto *T = N.get<Type>())
284
      Visit(T);
285
    else if (const auto *C = N.get<CXXCtorInitializer>())
286
      Visit(C);
287
    else if (const auto *C = N.get<OMPClause>())
288
      Visit(C);
289
    else if (const auto *T = N.get<TemplateArgument>())
290
      Visit(*T);
291
  }
292
293
5.17k
  void dumpDeclContext(const DeclContext *DC) {
294
5.17k
    if (!DC)
295
0
      return;
296
297
5.17k
    for (const auto *D : (Deserialize ? 
DC->decls()808
:
DC->noload_decls()4.37k
))
298
18.0k
      Visit(D);
299
5.17k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpDeclContext(clang::DeclContext const*)
Line
Count
Source
293
4.81k
  void dumpDeclContext(const DeclContext *DC) {
294
4.81k
    if (!DC)
295
0
      return;
296
297
4.81k
    for (const auto *D : (Deserialize ? 
DC->decls()808
:
DC->noload_decls()4.00k
))
298
16.8k
      Visit(D);
299
4.81k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpDeclContext(clang::DeclContext const*)
Line
Count
Source
293
364
  void dumpDeclContext(const DeclContext *DC) {
294
364
    if (!DC)
295
0
      return;
296
297
364
    for (const auto *D : (Deserialize ? 
DC->decls()0
: DC->noload_decls()))
298
1.21k
      Visit(D);
299
364
  }
300
301
648
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
302
648
    if (!TPL)
303
0
      return;
304
305
648
    for (const auto &TP : *TPL)
306
778
      Visit(TP);
307
308
648
    if (const Expr *RC = TPL->getRequiresClause())
309
0
      Visit(RC);
310
648
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateParameters(clang::TemplateParameterList const*)
Line
Count
Source
301
596
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
302
596
    if (!TPL)
303
0
      return;
304
305
596
    for (const auto &TP : *TPL)
306
722
      Visit(TP);
307
308
596
    if (const Expr *RC = TPL->getRequiresClause())
309
0
      Visit(RC);
310
596
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateParameters(clang::TemplateParameterList const*)
Line
Count
Source
301
52
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
302
52
    if (!TPL)
303
0
      return;
304
305
52
    for (const auto &TP : *TPL)
306
56
      Visit(TP);
307
308
52
    if (const Expr *RC = TPL->getRequiresClause())
309
0
      Visit(RC);
310
52
  }
311
312
  void
313
1
  dumpASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *TALI) {
314
1
    if (!TALI)
315
0
      return;
316
317
1
    for (const auto &TA : TALI->arguments())
318
1
      dumpTemplateArgumentLoc(TA);
319
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpASTTemplateArgumentListInfo(clang::ASTTemplateArgumentListInfo const*)
Line
Count
Source
313
1
  dumpASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *TALI) {
314
1
    if (!TALI)
315
0
      return;
316
317
1
    for (const auto &TA : TALI->arguments())
318
1
      dumpTemplateArgumentLoc(TA);
319
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpASTTemplateArgumentListInfo(clang::ASTTemplateArgumentListInfo const*)
320
321
  void dumpTemplateArgumentLoc(const TemplateArgumentLoc &A,
322
                               const Decl *From = nullptr,
323
33
                               const char *Label = nullptr) {
324
33
    Visit(A.getArgument(), A.getSourceRange(), From, Label);
325
33
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateArgumentLoc(clang::TemplateArgumentLoc const&, clang::Decl const*, char const*)
Line
Count
Source
323
28
                               const char *Label = nullptr) {
324
28
    Visit(A.getArgument(), A.getSourceRange(), From, Label);
325
28
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateArgumentLoc(clang::TemplateArgumentLoc const&, clang::Decl const*, char const*)
Line
Count
Source
323
5
                               const char *Label = nullptr) {
324
5
    Visit(A.getArgument(), A.getSourceRange(), From, Label);
325
5
  }
326
327
378
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
328
833
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i455
)
329
455
      Visit(TAL[i]);
330
378
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateArgumentList(clang::TemplateArgumentList const&)
Line
Count
Source
327
359
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
328
792
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i433
)
329
433
      Visit(TAL[i]);
330
359
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpTemplateArgumentList(clang::TemplateArgumentList const&)
Line
Count
Source
327
19
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
328
41
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i22
)
329
22
      Visit(TAL[i]);
330
19
  }
331
332
129
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
333
129
    if (!typeParams)
334
125
      return;
335
336
5
    
for (const auto &typeParam : *typeParams)4
{
337
5
      Visit(typeParam);
338
5
    }
339
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpObjCTypeParamList(clang::ObjCTypeParamList const*)
Line
Count
Source
332
124
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
333
124
    if (!typeParams)
334
121
      return;
335
336
4
    
for (const auto &typeParam : *typeParams)3
{
337
4
      Visit(typeParam);
338
4
    }
339
3
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::dumpObjCTypeParamList(clang::ObjCTypeParamList const*)
Line
Count
Source
332
5
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
333
5
    if (!typeParams)
334
4
      return;
335
336
1
    for (const auto &typeParam : *typeParams) {
337
1
      Visit(typeParam);
338
1
    }
339
1
  }
340
341
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*)
342
  void VisitLocInfoType(const LocInfoType *T) {
343
    Visit(T->getTypeSourceInfo()->getType());
344
  }
345
543
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPointerType(clang::PointerType const*)
Line
Count
Source
345
484
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPointerType(clang::PointerType const*)
Line
Count
Source
345
59
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
346
0
  void VisitBlockPointerType(const BlockPointerType *T) {
347
0
    Visit(T->getPointeeType());
348
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*)
349
28
  void VisitReferenceType(const ReferenceType *T) {
350
28
    Visit(T->getPointeeType());
351
28
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitReferenceType(clang::ReferenceType const*)
Line
Count
Source
349
28
  void VisitReferenceType(const ReferenceType *T) {
350
28
    Visit(T->getPointeeType());
351
28
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitReferenceType(clang::ReferenceType const*)
352
2
  void VisitMemberPointerType(const MemberPointerType *T) {
353
2
    Visit(T->getClass());
354
2
    Visit(T->getPointeeType());
355
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
352
2
  void VisitMemberPointerType(const MemberPointerType *T) {
353
2
    Visit(T->getClass());
354
2
    Visit(T->getPointeeType());
355
2
  }
356
412
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitArrayType(clang::ArrayType const*)
Line
Count
Source
356
355
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitArrayType(clang::ArrayType const*)
Line
Count
Source
356
57
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
357
0
  void VisitVariableArrayType(const VariableArrayType *T) {
358
0
    VisitArrayType(T);
359
0
    Visit(T->getSizeExpr());
360
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*)
361
7
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
362
7
    Visit(T->getElementType());
363
7
    Visit(T->getSizeExpr());
364
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDependentSizedArrayType(clang::DependentSizedArrayType const*)
Line
Count
Source
361
6
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
362
6
    Visit(T->getElementType());
363
6
    Visit(T->getSizeExpr());
364
6
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDependentSizedArrayType(clang::DependentSizedArrayType const*)
Line
Count
Source
361
1
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
362
1
    Visit(T->getElementType());
363
1
    Visit(T->getSizeExpr());
364
1
  }
365
0
  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T) {
366
0
    Visit(T->getElementType());
367
0
    Visit(T->getSizeExpr());
368
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*)
369
6
  void VisitVectorType(const VectorType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVectorType(clang::VectorType const*)
Line
Count
Source
369
6
  void VisitVectorType(const VectorType *T) { Visit(T->getElementType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVectorType(clang::VectorType const*)
370
29
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionType(clang::FunctionType const*)
Line
Count
Source
370
25
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionType(clang::FunctionType const*)
Line
Count
Source
370
4
  void VisitFunctionType(const FunctionType *T) { Visit(T->getReturnType()); }
371
29
  void VisitFunctionProtoType(const FunctionProtoType *T) {
372
29
    VisitFunctionType(T);
373
29
    for (const QualType &PT : T->getParamTypes())
374
22
      Visit(PT);
375
29
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionProtoType(clang::FunctionProtoType const*)
Line
Count
Source
371
25
  void VisitFunctionProtoType(const FunctionProtoType *T) {
372
25
    VisitFunctionType(T);
373
25
    for (const QualType &PT : T->getParamTypes())
374
21
      Visit(PT);
375
25
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionProtoType(clang::FunctionProtoType const*)
Line
Count
Source
371
4
  void VisitFunctionProtoType(const FunctionProtoType *T) {
372
4
    VisitFunctionType(T);
373
4
    for (const QualType &PT : T->getParamTypes())
374
1
      Visit(PT);
375
4
  }
376
18
  void VisitTypeOfExprType(const TypeOfExprType *T) {
377
18
    Visit(T->getUnderlyingExpr());
378
18
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeOfExprType(clang::TypeOfExprType const*)
Line
Count
Source
376
18
  void VisitTypeOfExprType(const TypeOfExprType *T) {
377
18
    Visit(T->getUnderlyingExpr());
378
18
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeOfExprType(clang::TypeOfExprType const*)
379
7
  void VisitDecltypeType(const DecltypeType *T) {
380
7
    Visit(T->getUnderlyingExpr());
381
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDecltypeType(clang::DecltypeType const*)
Line
Count
Source
379
7
  void VisitDecltypeType(const DecltypeType *T) {
380
7
    Visit(T->getUnderlyingExpr());
381
7
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDecltypeType(clang::DecltypeType const*)
382
0
  void VisitUnaryTransformType(const UnaryTransformType *T) {
383
0
    Visit(T->getBaseType());
384
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*)
385
1
  void VisitAttributedType(const AttributedType *T) {
386
    // FIXME: AttrKind
387
1
    Visit(T->getModifiedType());
388
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
385
1
  void VisitAttributedType(const AttributedType *T) {
386
    // FIXME: AttrKind
387
1
    Visit(T->getModifiedType());
388
1
  }
389
33
  void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
390
33
    Visit(T->getReplacedParameter());
391
33
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstTemplateTypeParmType(clang::SubstTemplateTypeParmType const*)
Line
Count
Source
389
33
  void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
390
33
    Visit(T->getReplacedParameter());
391
33
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstTemplateTypeParmType(clang::SubstTemplateTypeParmType const*)
392
  void
393
1
  VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
394
1
    Visit(T->getReplacedParameter());
395
1
    Visit(T->getArgumentPack());
396
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSubstTemplateTypeParmPackType(clang::SubstTemplateTypeParmPackType const*)
Line
Count
Source
393
1
  VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
394
1
    Visit(T->getReplacedParameter());
395
1
    Visit(T->getArgumentPack());
396
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSubstTemplateTypeParmPackType(clang::SubstTemplateTypeParmPackType const*)
397
64
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
398
64
    for (const auto &Arg : *T)
399
91
      Visit(Arg);
400
64
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
Line
Count
Source
397
64
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
398
64
    for (const auto &Arg : *T)
399
91
      Visit(Arg);
400
64
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
401
81
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
402
81
    Visit(T->getPointeeType());
403
81
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
Line
Count
Source
401
81
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
402
81
    Visit(T->getPointeeType());
403
81
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
404
114
  void VisitAtomicType(const AtomicType *T) { Visit(T->getValueType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAtomicType(clang::AtomicType const*)
Line
Count
Source
404
114
  void VisitAtomicType(const AtomicType *T) { Visit(T->getValueType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitAtomicType(clang::AtomicType const*)
405
6
  void VisitPipeType(const PipeType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPipeType(clang::PipeType const*)
Line
Count
Source
405
6
  void VisitPipeType(const PipeType *T) { Visit(T->getElementType()); }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPipeType(clang::PipeType const*)
406
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*)
407
6
  void VisitPackExpansionType(const PackExpansionType *T) {
408
6
    if (!T->isSugared())
409
6
      Visit(T->getPattern());
410
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPackExpansionType(clang::PackExpansionType const*)
Line
Count
Source
407
6
  void VisitPackExpansionType(const PackExpansionType *T) {
408
6
    if (!T->isSugared())
409
6
      Visit(T->getPattern());
410
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPackExpansionType(clang::PackExpansionType const*)
411
  // FIXME: ElaboratedType, DependentNameType,
412
  // DependentTemplateSpecializationType, ObjCObjectType
413
414
3.17k
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypedefDecl(clang::TypedefDecl const*)
Line
Count
Source
414
2.87k
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypedefDecl(clang::TypedefDecl const*)
Line
Count
Source
414
294
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
415
416
113
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
417
113
    if (const Expr *Init = D->getInitExpr())
418
31
      Visit(Init);
419
113
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitEnumConstantDecl(clang::EnumConstantDecl const*)
Line
Count
Source
416
95
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
417
95
    if (const Expr *Init = D->getInitExpr())
418
30
      Visit(Init);
419
95
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitEnumConstantDecl(clang::EnumConstantDecl const*)
Line
Count
Source
416
18
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
417
18
    if (const Expr *Init = D->getInitExpr())
418
1
      Visit(Init);
419
18
  }
420
421
5.13k
  void VisitFunctionDecl(const FunctionDecl *D) {
422
5.13k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
176
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
5.13k
    if (D->param_begin())
426
2.40k
      for (const auto *Parameter : D->parameters())
427
3.10k
        Visit(Parameter);
428
429
5.13k
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
7
      Visit(TRC);
431
432
5.13k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
5.13k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
930
      for (const auto *I : C->inits())
437
179
        Visit(I);
438
439
5.13k
    if (D->doesThisDeclarationHaveABody())
440
2.61k
      Visit(D->getBody());
441
5.13k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
421
4.69k
  void VisitFunctionDecl(const FunctionDecl *D) {
422
4.69k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
174
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
4.69k
    if (D->param_begin())
426
2.19k
      for (const auto *Parameter : D->parameters())
427
2.85k
        Visit(Parameter);
428
429
4.69k
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
6
      Visit(TRC);
431
432
4.69k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
4.69k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
876
      for (const auto *I : C->inits())
437
158
        Visit(I);
438
439
4.69k
    if (D->doesThisDeclarationHaveABody())
440
2.35k
      Visit(D->getBody());
441
4.69k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
421
440
  void VisitFunctionDecl(const FunctionDecl *D) {
422
440
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
2
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
440
    if (D->param_begin())
426
211
      for (const auto *Parameter : D->parameters())
427
248
        Visit(Parameter);
428
429
440
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
1
      Visit(TRC);
431
432
440
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
440
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
54
      for (const auto *I : C->inits())
437
21
        Visit(I);
438
439
440
    if (D->doesThisDeclarationHaveABody())
440
260
      Visit(D->getBody());
441
440
  }
442
443
2.05k
  void VisitFieldDecl(const FieldDecl *D) {
444
2.05k
    if (D->isBitField())
445
103
      Visit(D->getBitWidth());
446
2.05k
    if (Expr *Init = D->getInClassInitializer())
447
42
      Visit(Init);
448
2.05k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFieldDecl(clang::FieldDecl const*)
Line
Count
Source
443
1.94k
  void VisitFieldDecl(const FieldDecl *D) {
444
1.94k
    if (D->isBitField())
445
96
      Visit(D->getBitWidth());
446
1.94k
    if (Expr *Init = D->getInClassInitializer())
447
41
      Visit(Init);
448
1.94k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFieldDecl(clang::FieldDecl const*)
Line
Count
Source
443
111
  void VisitFieldDecl(const FieldDecl *D) {
444
111
    if (D->isBitField())
445
7
      Visit(D->getBitWidth());
446
111
    if (Expr *Init = D->getInClassInitializer())
447
1
      Visit(Init);
448
111
  }
449
450
9.53k
  void VisitVarDecl(const VarDecl *D) {
451
9.53k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
9.53k
    if (D->hasInit())
455
2.77k
      Visit(D->getInit());
456
9.53k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
450
9.07k
  void VisitVarDecl(const VarDecl *D) {
451
9.07k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
9.07k
    if (D->hasInit())
455
2.69k
      Visit(D->getInit());
456
9.07k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
450
466
  void VisitVarDecl(const VarDecl *D) {
451
466
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
466
    if (D->hasInit())
455
84
      Visit(D->getInit());
456
466
  }
457
458
0
  void VisitDecompositionDecl(const DecompositionDecl *D) {
459
0
    VisitVarDecl(D);
460
0
    for (const auto *B : D->bindings())
461
0
      Visit(B);
462
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*)
463
464
0
  void VisitBindingDecl(const BindingDecl *D) {
465
0
    if (Traversal == TK_IgnoreUnlessSpelledInSource)
466
0
      return;
467
0
    if (const auto *E = D->getBinding())
468
0
      Visit(E);
469
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*)
470
471
3
  void VisitFileScopeAsmDecl(const FileScopeAsmDecl *D) {
472
3
    Visit(D->getAsmString());
473
3
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFileScopeAsmDecl(clang::FileScopeAsmDecl const*)
Line
Count
Source
471
3
  void VisitFileScopeAsmDecl(const FileScopeAsmDecl *D) {
472
3
    Visit(D->getAsmString());
473
3
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFileScopeAsmDecl(clang::FileScopeAsmDecl const*)
474
475
857
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCapturedDecl(clang::CapturedDecl const*)
Line
Count
Source
475
836
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCapturedDecl(clang::CapturedDecl const*)
Line
Count
Source
475
21
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
476
477
2
  void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
478
2
    for (const auto *E : D->varlists())
479
4
      Visit(E);
480
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPThreadPrivateDecl(clang::OMPThreadPrivateDecl const*)
Line
Count
Source
477
2
  void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
478
2
    for (const auto *E : D->varlists())
479
4
      Visit(E);
480
2
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPThreadPrivateDecl(clang::OMPThreadPrivateDecl const*)
481
482
6
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D) {
483
6
    Visit(D->getCombiner());
484
6
    if (const auto *Initializer = D->getInitializer())
485
2
      Visit(Initializer);
486
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPDeclareReductionDecl(clang::OMPDeclareReductionDecl const*)
Line
Count
Source
482
6
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D) {
483
6
    Visit(D->getCombiner());
484
6
    if (const auto *Initializer = D->getInitializer())
485
2
      Visit(Initializer);
486
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPDeclareReductionDecl(clang::OMPDeclareReductionDecl const*)
487
488
0
  void VisitOMPDeclareMapperDecl(const OMPDeclareMapperDecl *D) {
489
0
    for (const auto *C : D->clauselists())
490
0
      Visit(C);
491
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*)
492
493
96
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D) {
494
96
    Visit(D->getInit());
495
96
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPCapturedExprDecl(clang::OMPCapturedExprDecl const*)
Line
Count
Source
493
96
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D) {
494
96
    Visit(D->getInit());
495
96
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPCapturedExprDecl(clang::OMPCapturedExprDecl const*)
496
497
8
  void VisitOMPAllocateDecl(const OMPAllocateDecl *D) {
498
8
    for (const auto *E : D->varlists())
499
8
      Visit(E);
500
8
    for (const auto *C : D->clauselists())
501
12
      Visit(C);
502
8
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
Line
Count
Source
497
8
  void VisitOMPAllocateDecl(const OMPAllocateDecl *D) {
498
8
    for (const auto *E : D->varlists())
499
8
      Visit(E);
500
8
    for (const auto *C : D->clauselists())
501
12
      Visit(C);
502
8
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
503
504
  template <typename SpecializationDecl>
505
  void dumpTemplateDeclSpecialization(const SpecializationDecl *D) {
506
    for (const auto *RedeclWithBadType : D->redecls()) {
507
      // FIXME: The redecls() range sometimes has elements of a less-specific
508
      // type. (In particular, ClassTemplateSpecializationDecl::redecls() gives
509
      // us TagDecls, and should give CXXRecordDecls).
510
      auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
511
      if (!Redecl) {
512
        // Found the injected-class-name for a class template. This will be
513
        // dumped as part of its surrounding class so we don't need to dump it
514
        // here.
515
        assert(isa<CXXRecordDecl>(RedeclWithBadType) &&
516
               "expected an injected-class-name");
517
        continue;
518
      }
519
      Visit(Redecl);
520
    }
521
  }
522
523
  template <typename TemplateDecl>
524
  void dumpTemplateDecl(const TemplateDecl *D) {
525
    dumpTemplateParameters(D->getTemplateParameters());
526
527
    Visit(D->getTemplatedDecl());
528
529
    if (Traversal == TK_AsIs) {
530
      for (const auto *Child : D->specializations())
531
        dumpTemplateDeclSpecialization(Child);
532
    }
533
  }
534
535
99
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
536
99
    Visit(D->getUnderlyingType());
537
99
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeAliasDecl(clang::TypeAliasDecl const*)
Line
Count
Source
535
94
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
536
94
    Visit(D->getUnderlyingType());
537
94
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeAliasDecl(clang::TypeAliasDecl const*)
Line
Count
Source
535
5
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
536
5
    Visit(D->getUnderlyingType());
537
5
  }
538
539
7
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D) {
540
7
    dumpTemplateParameters(D->getTemplateParameters());
541
7
    Visit(D->getTemplatedDecl());
542
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl const*)
Line
Count
Source
539
7
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D) {
540
7
    dumpTemplateParameters(D->getTemplateParameters());
541
7
    Visit(D->getTemplatedDecl());
542
7
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl const*)
543
544
44
  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
545
44
    Visit(D->getAssertExpr());
546
44
    Visit(D->getMessage());
547
44
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitStaticAssertDecl(clang::StaticAssertDecl const*)
Line
Count
Source
544
43
  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
545
43
    Visit(D->getAssertExpr());
546
43
    Visit(D->getMessage());
547
43
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitStaticAssertDecl(clang::StaticAssertDecl const*)
Line
Count
Source
544
1
  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
545
1
    Visit(D->getAssertExpr());
546
1
    Visit(D->getMessage());
547
1
  }
548
549
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) {
550
    dumpTemplateDecl(D);
551
  }
552
553
  void VisitClassTemplateDecl(const ClassTemplateDecl *D) {
554
    dumpTemplateDecl(D);
555
  }
556
557
  void VisitClassTemplateSpecializationDecl(
558
196
      const ClassTemplateSpecializationDecl *D) {
559
196
    dumpTemplateArgumentList(D->getTemplateArgs());
560
196
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
558
179
      const ClassTemplateSpecializationDecl *D) {
559
179
    dumpTemplateArgumentList(D->getTemplateArgs());
560
179
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
558
17
      const ClassTemplateSpecializationDecl *D) {
559
17
    dumpTemplateArgumentList(D->getTemplateArgs());
560
17
  }
561
562
  void VisitClassTemplatePartialSpecializationDecl(
563
21
      const ClassTemplatePartialSpecializationDecl *D) {
564
21
    VisitClassTemplateSpecializationDecl(D);
565
21
    dumpTemplateParameters(D->getTemplateParameters());
566
21
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassTemplatePartialSpecializationDecl(clang::ClassTemplatePartialSpecializationDecl const*)
Line
Count
Source
563
19
      const ClassTemplatePartialSpecializationDecl *D) {
564
19
    VisitClassTemplateSpecializationDecl(D);
565
19
    dumpTemplateParameters(D->getTemplateParameters());
566
19
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassTemplatePartialSpecializationDecl(clang::ClassTemplatePartialSpecializationDecl const*)
Line
Count
Source
563
2
      const ClassTemplatePartialSpecializationDecl *D) {
564
2
    VisitClassTemplateSpecializationDecl(D);
565
2
    dumpTemplateParameters(D->getTemplateParameters());
566
2
  }
567
568
  void VisitClassScopeFunctionSpecializationDecl(
569
1
      const ClassScopeFunctionSpecializationDecl *D) {
570
1
    Visit(D->getSpecialization());
571
1
    dumpASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
572
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassScopeFunctionSpecializationDecl(clang::ClassScopeFunctionSpecializationDecl const*)
Line
Count
Source
569
1
      const ClassScopeFunctionSpecializationDecl *D) {
570
1
    Visit(D->getSpecialization());
571
1
    dumpASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
572
1
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitClassScopeFunctionSpecializationDecl(clang::ClassScopeFunctionSpecializationDecl const*)
573
  void VisitVarTemplateDecl(const VarTemplateDecl *D) { dumpTemplateDecl(D); }
574
575
4
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D) {
576
4
    dumpTemplateParameters(D->getTemplateParameters());
577
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBuiltinTemplateDecl(clang::BuiltinTemplateDecl const*)
Line
Count
Source
575
4
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D) {
576
4
    dumpTemplateParameters(D->getTemplateParameters());
577
4
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBuiltinTemplateDecl(clang::BuiltinTemplateDecl const*)
578
579
  void
580
6
  VisitVarTemplateSpecializationDecl(const VarTemplateSpecializationDecl *D) {
581
6
    dumpTemplateArgumentList(D->getTemplateArgs());
582
6
    VisitVarDecl(D);
583
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl const*)
Line
Count
Source
580
6
  VisitVarTemplateSpecializationDecl(const VarTemplateSpecializationDecl *D) {
581
6
    dumpTemplateArgumentList(D->getTemplateArgs());
582
6
    VisitVarDecl(D);
583
6
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl const*)
584
585
  void VisitVarTemplatePartialSpecializationDecl(
586
0
      const VarTemplatePartialSpecializationDecl *D) {
587
0
    dumpTemplateParameters(D->getTemplateParameters());
588
0
    VisitVarTemplateSpecializationDecl(D);
589
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*)
590
591
629
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
592
629
    if (const auto *TC = D->getTypeConstraint())
593
14
      Visit(TC->getImmediatelyDeclaredConstraint());
594
629
    if (D->hasDefaultArgument())
595
22
      Visit(D->getDefaultArgument(), SourceRange(),
596
22
            D->getDefaultArgStorage().getInheritedFrom(),
597
22
            D->defaultArgumentWasInherited() ? 
"inherited from"7
:
"previous"15
);
598
629
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl const*)
Line
Count
Source
591
581
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
592
581
    if (const auto *TC = D->getTypeConstraint())
593
12
      Visit(TC->getImmediatelyDeclaredConstraint());
594
581
    if (D->hasDefaultArgument())
595
20
      Visit(D->getDefaultArgument(), SourceRange(),
596
20
            D->getDefaultArgStorage().getInheritedFrom(),
597
20
            D->defaultArgumentWasInherited() ? 
"inherited from"7
:
"previous"13
);
598
581
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl const*)
Line
Count
Source
591
48
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
592
48
    if (const auto *TC = D->getTypeConstraint())
593
2
      Visit(TC->getImmediatelyDeclaredConstraint());
594
48
    if (D->hasDefaultArgument())
595
2
      Visit(D->getDefaultArgument(), SourceRange(),
596
2
            D->getDefaultArgStorage().getInheritedFrom(),
597
2
            D->defaultArgumentWasInherited() ? 
"inherited from"0
: "previous");
598
48
  }
599
600
178
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
601
178
    if (const auto *E = D->getPlaceholderTypeConstraint())
602
0
      Visit(E);
603
178
    if (D->hasDefaultArgument())
604
13
      Visit(D->getDefaultArgument(), SourceRange(),
605
13
            D->getDefaultArgStorage().getInheritedFrom(),
606
13
            D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"12
);
607
178
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl const*)
Line
Count
Source
600
172
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
601
172
    if (const auto *E = D->getPlaceholderTypeConstraint())
602
0
      Visit(E);
603
172
    if (D->hasDefaultArgument())
604
13
      Visit(D->getDefaultArgument(), SourceRange(),
605
13
            D->getDefaultArgStorage().getInheritedFrom(),
606
13
            D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"12
);
607
172
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl const*)
Line
Count
Source
600
6
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
601
6
    if (const auto *E = D->getPlaceholderTypeConstraint())
602
0
      Visit(E);
603
6
    if (D->hasDefaultArgument())
604
0
      Visit(D->getDefaultArgument(), SourceRange(),
605
0
            D->getDefaultArgStorage().getInheritedFrom(),
606
0
            D->defaultArgumentWasInherited() ? "inherited from" : "previous");
607
6
  }
608
609
17
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
610
17
    dumpTemplateParameters(D->getTemplateParameters());
611
17
    if (D->hasDefaultArgument())
612
4
      dumpTemplateArgumentLoc(
613
4
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
614
4
          D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"3
);
615
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl const*)
Line
Count
Source
609
15
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
610
15
    dumpTemplateParameters(D->getTemplateParameters());
611
15
    if (D->hasDefaultArgument())
612
3
      dumpTemplateArgumentLoc(
613
3
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
614
3
          D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"2
);
615
15
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl const*)
Line
Count
Source
609
2
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
610
2
    dumpTemplateParameters(D->getTemplateParameters());
611
2
    if (D->hasDefaultArgument())
612
1
      dumpTemplateArgumentLoc(
613
1
          D->getDefaultArgument(), D->getDefaultArgStorage().getInheritedFrom(),
614
1
          D->defaultArgumentWasInherited() ? 
"inherited from"0
: "previous");
615
2
  }
616
617
6
  void VisitConceptDecl(const ConceptDecl *D) {
618
6
    dumpTemplateParameters(D->getTemplateParameters());
619
6
    Visit(D->getConstraintExpr());
620
6
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitConceptDecl(clang::ConceptDecl const*)
Line
Count
Source
617
4
  void VisitConceptDecl(const ConceptDecl *D) {
618
4
    dumpTemplateParameters(D->getTemplateParameters());
619
4
    Visit(D->getConstraintExpr());
620
4
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitConceptDecl(clang::ConceptDecl const*)
Line
Count
Source
617
2
  void VisitConceptDecl(const ConceptDecl *D) {
618
2
    dumpTemplateParameters(D->getTemplateParameters());
619
2
    Visit(D->getConstraintExpr());
620
2
  }
621
622
24
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE) {
623
24
    if (CSE->hasExplicitTemplateArgs())
624
24
      for (const auto &ArgLoc : CSE->getTemplateArgsAsWritten()->arguments())
625
28
        dumpTemplateArgumentLoc(ArgLoc);
626
24
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitConceptSpecializationExpr(clang::ConceptSpecializationExpr const*)
Line
Count
Source
622
4
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE) {
623
4
    if (CSE->hasExplicitTemplateArgs())
624
4
      for (const auto &ArgLoc : CSE->getTemplateArgsAsWritten()->arguments())
625
4
        dumpTemplateArgumentLoc(ArgLoc);
626
4
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitConceptSpecializationExpr(clang::ConceptSpecializationExpr const*)
Line
Count
Source
622
20
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE) {
623
20
    if (CSE->hasExplicitTemplateArgs())
624
20
      for (const auto &ArgLoc : CSE->getTemplateArgsAsWritten()->arguments())
625
24
        dumpTemplateArgumentLoc(ArgLoc);
626
20
  }
627
628
83
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
629
83
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
630
2
      Visit(TD->getTypeForDecl());
631
83
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitUsingShadowDecl(clang::UsingShadowDecl const*)
Line
Count
Source
628
79
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
629
79
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
630
1
      Visit(TD->getTypeForDecl());
631
79
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitUsingShadowDecl(clang::UsingShadowDecl const*)
Line
Count
Source
628
4
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
629
4
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
630
1
      Visit(TD->getTypeForDecl());
631
4
  }
632
633
12
  void VisitFriendDecl(const FriendDecl *D) {
634
12
    if (!D->getFriendType())
635
7
      Visit(D->getFriendDecl());
636
12
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFriendDecl(clang::FriendDecl const*)
Line
Count
Source
633
10
  void VisitFriendDecl(const FriendDecl *D) {
634
10
    if (!D->getFriendType())
635
6
      Visit(D->getFriendDecl());
636
10
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFriendDecl(clang::FriendDecl const*)
Line
Count
Source
633
2
  void VisitFriendDecl(const FriendDecl *D) {
634
2
    if (!D->getFriendType())
635
1
      Visit(D->getFriendDecl());
636
2
  }
637
638
193
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
639
193
    if (D->isThisDeclarationADefinition())
640
35
      dumpDeclContext(D);
641
158
    else
642
158
      for (const ParmVarDecl *Parameter : D->parameters())
643
59
        Visit(Parameter);
644
645
193
    if (D->hasBody())
646
35
      Visit(D->getBody());
647
193
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCMethodDecl(clang::ObjCMethodDecl const*)
Line
Count
Source
638
178
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
639
178
    if (D->isThisDeclarationADefinition())
640
32
      dumpDeclContext(D);
641
146
    else
642
146
      for (const ParmVarDecl *Parameter : D->parameters())
643
54
        Visit(Parameter);
644
645
178
    if (D->hasBody())
646
32
      Visit(D->getBody());
647
178
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCMethodDecl(clang::ObjCMethodDecl const*)
Line
Count
Source
638
15
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
639
15
    if (D->isThisDeclarationADefinition())
640
3
      dumpDeclContext(D);
641
12
    else
642
12
      for (const ParmVarDecl *Parameter : D->parameters())
643
5
        Visit(Parameter);
644
645
15
    if (D->hasBody())
646
3
      Visit(D->getBody());
647
15
  }
648
649
20
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
650
20
    dumpObjCTypeParamList(D->getTypeParamList());
651
20
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCCategoryDecl(clang::ObjCCategoryDecl const*)
Line
Count
Source
649
19
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
650
19
    dumpObjCTypeParamList(D->getTypeParamList());
651
19
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCCategoryDecl(clang::ObjCCategoryDecl const*)
Line
Count
Source
649
1
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
650
1
    dumpObjCTypeParamList(D->getTypeParamList());
651
1
  }
652
653
109
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
654
109
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
655
109
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCInterfaceDecl(clang::ObjCInterfaceDecl const*)
Line
Count
Source
653
105
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
654
105
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
655
105
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCInterfaceDecl(clang::ObjCInterfaceDecl const*)
Line
Count
Source
653
4
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
654
4
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
655
4
  }
656
657
28
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
658
28
    for (const auto &I : D->inits())
659
3
      Visit(I);
660
28
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCImplementationDecl(clang::ObjCImplementationDecl const*)
Line
Count
Source
657
25
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
658
25
    for (const auto &I : D->inits())
659
3
      Visit(I);
660
25
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCImplementationDecl(clang::ObjCImplementationDecl const*)
Line
Count
Source
657
3
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
658
3
    for (const auto &I : D->inits())
659
0
      Visit(I);
660
3
  }
661
662
24
  void VisitBlockDecl(const BlockDecl *D) {
663
24
    for (const auto &I : D->parameters())
664
3
      Visit(I);
665
666
24
    for (const auto &I : D->captures())
667
11
      Visit(I);
668
24
    Visit(D->getBody());
669
24
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockDecl(clang::BlockDecl const*)
Line
Count
Source
662
21
  void VisitBlockDecl(const BlockDecl *D) {
663
21
    for (const auto &I : D->parameters())
664
2
      Visit(I);
665
666
21
    for (const auto &I : D->captures())
667
8
      Visit(I);
668
21
    Visit(D->getBody());
669
21
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBlockDecl(clang::BlockDecl const*)
Line
Count
Source
662
3
  void VisitBlockDecl(const BlockDecl *D) {
663
3
    for (const auto &I : D->parameters())
664
1
      Visit(I);
665
666
3
    for (const auto &I : D->captures())
667
3
      Visit(I);
668
3
    Visit(D->getBody());
669
3
  }
670
671
2.01k
  void VisitDeclStmt(const DeclStmt *Node) {
672
2.01k
    for (const auto &D : Node->decls())
673
2.08k
      Visit(D);
674
2.01k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
671
92
  void VisitDeclStmt(const DeclStmt *Node) {
672
92
    for (const auto &D : Node->decls())
673
104
      Visit(D);
674
92
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
671
1.92k
  void VisitDeclStmt(const DeclStmt *Node) {
672
1.92k
    for (const auto &D : Node->decls())
673
1.98k
      Visit(D);
674
1.92k
  }
675
676
16
  void VisitAttributedStmt(const AttributedStmt *Node) {
677
16
    for (const auto *A : Node->getAttrs())
678
20
      Visit(A);
679
16
  }
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
676
16
  void VisitAttributedStmt(const AttributedStmt *Node) {
677
16
    for (const auto *A : Node->getAttrs())
678
20
      Visit(A);
679
16
  }
680
681
12
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
682
12
    Visit(Node->getExceptionDecl());
683
12
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCXXCatchStmt(clang::CXXCatchStmt const*)
Line
Count
Source
681
2
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
682
2
    Visit(Node->getExceptionDecl());
683
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCXXCatchStmt(clang::CXXCatchStmt const*)
Line
Count
Source
681
10
  void VisitCXXCatchStmt(const CXXCatchStmt *Node) {
682
10
    Visit(Node->getExceptionDecl());
683
10
  }
684
685
536
  void VisitCapturedStmt(const CapturedStmt *Node) {
686
536
    Visit(Node->getCapturedDecl());
687
536
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCapturedStmt(clang::CapturedStmt const*)
Line
Count
Source
685
17
  void VisitCapturedStmt(const CapturedStmt *Node) {
686
17
    Visit(Node->getCapturedDecl());
687
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCapturedStmt(clang::CapturedStmt const*)
Line
Count
Source
685
519
  void VisitCapturedStmt(const CapturedStmt *Node) {
686
519
    Visit(Node->getCapturedDecl());
687
519
  }
688
689
401
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
690
401
    for (const auto *C : Node->clauses())
691
350
      Visit(C);
692
401
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPExecutableDirective(clang::OMPExecutableDirective const*)
Line
Count
Source
689
12
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
690
12
    for (const auto *C : Node->clauses())
691
2
      Visit(C);
692
12
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPExecutableDirective(clang::OMPExecutableDirective const*)
Line
Count
Source
689
389
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
690
389
    for (const auto *C : Node->clauses())
691
348
      Visit(C);
692
389
  }
693
694
279
  void VisitInitListExpr(const InitListExpr *ILE) {
695
279
    if (auto *Filler = ILE->getArrayFiller()) {
696
21
      Visit(Filler, "array_filler");
697
21
    }
698
279
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitInitListExpr(clang::InitListExpr const*)
Line
Count
Source
694
10
  void VisitInitListExpr(const InitListExpr *ILE) {
695
10
    if (auto *Filler = ILE->getArrayFiller()) {
696
1
      Visit(Filler, "array_filler");
697
1
    }
698
10
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitInitListExpr(clang::InitListExpr const*)
Line
Count
Source
694
269
  void VisitInitListExpr(const InitListExpr *ILE) {
695
269
    if (auto *Filler = ILE->getArrayFiller()) {
696
20
      Visit(Filler, "array_filler");
697
20
    }
698
269
  }
699
700
24
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitBlockExpr(clang::BlockExpr const*)
Line
Count
Source
700
3
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockExpr(clang::BlockExpr const*)
Line
Count
Source
700
21
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
701
702
158
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
703
158
    if (Expr *Source = Node->getSourceExpr())
704
158
      Visit(Source);
705
158
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOpaqueValueExpr(clang::OpaqueValueExpr const*)
Line
Count
Source
702
52
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
703
52
    if (Expr *Source = Node->getSourceExpr())
704
52
      Visit(Source);
705
52
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOpaqueValueExpr(clang::OpaqueValueExpr const*)
Line
Count
Source
702
106
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
703
106
    if (Expr *Source = Node->getSourceExpr())
704
106
      Visit(Source);
705
106
  }
706
707
21
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
708
21
    Visit(E->getControllingExpr());
709
21
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
710
711
38
    for (const auto Assoc : E->associations()) {
712
38
      Visit(Assoc);
713
38
    }
714
21
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitGenericSelectionExpr(clang::GenericSelectionExpr const*)
Line
Count
Source
707
7
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
708
7
    Visit(E->getControllingExpr());
709
7
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
710
711
12
    for (const auto Assoc : E->associations()) {
712
12
      Visit(Assoc);
713
12
    }
714
7
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitGenericSelectionExpr(clang::GenericSelectionExpr const*)
Line
Count
Source
707
14
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E) {
708
14
    Visit(E->getControllingExpr());
709
14
    Visit(E->getControllingExpr()->getType()); // FIXME: remove
710
711
26
    for (const auto Assoc : E->associations()) {
712
26
      Visit(Assoc);
713
26
    }
714
14
  }
715
716
3
  void VisitRequiresExpr(const RequiresExpr *E) {
717
3
    for (auto *D : E->getLocalParameters())
718
3
      Visit(D);
719
3
    for (auto *R : E->getRequirements())
720
12
      Visit(R);
721
3
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitRequiresExpr(clang::RequiresExpr const*)
Line
Count
Source
716
1
  void VisitRequiresExpr(const RequiresExpr *E) {
717
1
    for (auto *D : E->getLocalParameters())
718
1
      Visit(D);
719
1
    for (auto *R : E->getRequirements())
720
4
      Visit(R);
721
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitRequiresExpr(clang::RequiresExpr const*)
Line
Count
Source
716
2
  void VisitRequiresExpr(const RequiresExpr *E) {
717
2
    for (auto *D : E->getLocalParameters())
718
2
      Visit(D);
719
2
    for (auto *R : E->getRequirements())
720
8
      Visit(R);
721
2
  }
722
723
158
  void VisitLambdaExpr(const LambdaExpr *Node) {
724
158
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
725
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
726
0
        const auto *C = Node->capture_begin() + I;
727
0
        if (!C->isExplicit())
728
0
          continue;
729
0
        if (Node->isInitCapture(C))
730
0
          Visit(C->getCapturedVar());
731
0
        else
732
0
          Visit(Node->capture_init_begin()[I]);
733
0
      }
734
0
      dumpTemplateParameters(Node->getTemplateParameterList());
735
0
      for (const auto *P : Node->getCallOperator()->parameters())
736
0
        Visit(P);
737
0
      Visit(Node->getBody());
738
158
    } else {
739
158
      return Visit(Node->getLambdaClass());
740
158
    }
741
158
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitLambdaExpr(clang::LambdaExpr const*)
Line
Count
Source
723
17
  void VisitLambdaExpr(const LambdaExpr *Node) {
724
17
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
725
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
726
0
        const auto *C = Node->capture_begin() + I;
727
0
        if (!C->isExplicit())
728
0
          continue;
729
0
        if (Node->isInitCapture(C))
730
0
          Visit(C->getCapturedVar());
731
0
        else
732
0
          Visit(Node->capture_init_begin()[I]);
733
0
      }
734
0
      dumpTemplateParameters(Node->getTemplateParameterList());
735
0
      for (const auto *P : Node->getCallOperator()->parameters())
736
0
        Visit(P);
737
0
      Visit(Node->getBody());
738
17
    } else {
739
17
      return Visit(Node->getLambdaClass());
740
17
    }
741
17
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitLambdaExpr(clang::LambdaExpr const*)
Line
Count
Source
723
141
  void VisitLambdaExpr(const LambdaExpr *Node) {
724
141
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
725
0
      for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
726
0
        const auto *C = Node->capture_begin() + I;
727
0
        if (!C->isExplicit())
728
0
          continue;
729
0
        if (Node->isInitCapture(C))
730
0
          Visit(C->getCapturedVar());
731
0
        else
732
0
          Visit(Node->capture_init_begin()[I]);
733
0
      }
734
0
      dumpTemplateParameters(Node->getTemplateParameterList());
735
0
      for (const auto *P : Node->getCallOperator()->parameters())
736
0
        Visit(P);
737
0
      Visit(Node->getBody());
738
141
    } else {
739
141
      return Visit(Node->getLambdaClass());
740
141
    }
741
141
  }
742
743
13
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
744
13
    if (Node->isPartiallySubstituted())
745
0
      for (const auto &A : Node->getPartialArguments())
746
0
        Visit(A);
747
13
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitSizeOfPackExpr(clang::SizeOfPackExpr const*)
Line
Count
Source
743
1
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
744
1
    if (Node->isPartiallySubstituted())
745
0
      for (const auto &A : Node->getPartialArguments())
746
0
        Visit(A);
747
1
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitSizeOfPackExpr(clang::SizeOfPackExpr const*)
Line
Count
Source
743
12
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
744
12
    if (Node->isPartiallySubstituted())
745
0
      for (const auto &A : Node->getPartialArguments())
746
0
        Visit(A);
747
12
  }
748
749
45
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
750
45
    Visit(E->getParameter());
751
45
  }
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
749
45
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
750
45
    Visit(E->getParameter());
751
45
  }
752
  void VisitSubstNonTypeTemplateParmPackExpr(
753
1
      const SubstNonTypeTemplateParmPackExpr *E) {
754
1
    Visit(E->getParameterPack());
755
1
    Visit(E->getArgumentPack());
756
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
753
1
      const SubstNonTypeTemplateParmPackExpr *E) {
754
1
    Visit(E->getParameterPack());
755
1
    Visit(E->getArgumentPack());
756
1
  }
757
758
11
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
759
11
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
760
8
      Visit(CatchParam);
761
11
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCAtCatchStmt(clang::ObjCAtCatchStmt const*)
Line
Count
Source
758
2
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
759
2
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
760
1
      Visit(CatchParam);
761
2
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCAtCatchStmt(clang::ObjCAtCatchStmt const*)
Line
Count
Source
758
9
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
759
9
    if (const VarDecl *CatchParam = Node->getCatchParamDecl())
760
7
      Visit(CatchParam);
761
9
  }
762
763
14
  void VisitCXXForRangeStmt(const CXXForRangeStmt *Node) {
764
14
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
765
0
      Visit(Node->getInit());
766
0
      Visit(Node->getLoopVariable());
767
0
      Visit(Node->getRangeInit());
768
0
      Visit(Node->getBody());
769
0
    }
770
14
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCXXForRangeStmt(clang::CXXForRangeStmt const*)
Line
Count
Source
763
3
  void VisitCXXForRangeStmt(const CXXForRangeStmt *Node) {
764
3
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
765
0
      Visit(Node->getInit());
766
0
      Visit(Node->getLoopVariable());
767
0
      Visit(Node->getRangeInit());
768
0
      Visit(Node->getBody());
769
0
    }
770
3
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCXXForRangeStmt(clang::CXXForRangeStmt const*)
Line
Count
Source
763
11
  void VisitCXXForRangeStmt(const CXXForRangeStmt *Node) {
764
11
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
765
0
      Visit(Node->getInit());
766
0
      Visit(Node->getLoopVariable());
767
0
      Visit(Node->getRangeInit());
768
0
      Visit(Node->getBody());
769
0
    }
770
11
  }
771
772
1.18k
  void VisitCallExpr(const CallExpr *Node) {
773
1.18k
    for (const auto *Child :
774
1.85k
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
1.85k
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
1.85k
             return false;
777
0
           return !isa<CXXDefaultArgExpr>(Child);
778
1.85k
         })) {
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCallExpr(clang::CallExpr const*)::'lambda'(clang::Stmt const*)::operator()(clang::Stmt const*) const
Line
Count
Source
774
86
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
86
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
86
             return false;
777
0
           return !isa<CXXDefaultArgExpr>(Child);
778
86
         })) {
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCallExpr(clang::CallExpr const*)::'lambda'(clang::Stmt const*)::operator()(clang::Stmt const*) const
Line
Count
Source
774
1.77k
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
1.77k
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
1.77k
             return false;
777
0
           return !isa<CXXDefaultArgExpr>(Child);
778
1.77k
         })) {
779
0
      Visit(Child);
780
0
    }
781
1.18k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCallExpr(clang::CallExpr const*)
Line
Count
Source
772
56
  void VisitCallExpr(const CallExpr *Node) {
773
56
    for (const auto *Child :
774
56
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
56
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
56
             return false;
777
56
           return !isa<CXXDefaultArgExpr>(Child);
778
56
         })) {
779
0
      Visit(Child);
780
0
    }
781
56
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCallExpr(clang::CallExpr const*)
Line
Count
Source
772
1.13k
  void VisitCallExpr(const CallExpr *Node) {
773
1.13k
    for (const auto *Child :
774
1.13k
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
1.13k
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
1.13k
             return false;
777
1.13k
           return !isa<CXXDefaultArgExpr>(Child);
778
1.13k
         })) {
779
0
      Visit(Child);
780
0
    }
781
1.13k
  }
782
783
0
  void VisitCXXRewrittenBinaryOperator(const CXXRewrittenBinaryOperator *Node) {
784
0
    if (Traversal == TK_IgnoreUnlessSpelledInSource) {
785
0
      Visit(Node->getLHS());
786
0
      Visit(Node->getRHS());
787
0
    } else {
788
0
      ConstStmtVisitor<Derived>::VisitCXXRewrittenBinaryOperator(Node);
789
0
    }
790
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitCXXRewrittenBinaryOperator(clang::CXXRewrittenBinaryOperator const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCXXRewrittenBinaryOperator(clang::CXXRewrittenBinaryOperator const*)
791
792
42
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
793
42
    Visit(TA.getAsExpr());
794
42
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
792
42
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
793
42
    Visit(TA.getAsExpr());
794
42
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
795
796
479
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
797
479
    Visit(TA.getAsType());
798
479
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
796
454
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
797
454
    Visit(TA.getAsType());
798
454
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTypeTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
796
25
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
797
25
    Visit(TA.getAsType());
798
25
  }
799
800
27
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
801
27
    for (const auto &TArg : TA.pack_elements())
802
57
      Visit(TArg);
803
27
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPackTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
800
27
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
801
27
    for (const auto &TArg : TA.pack_elements())
802
57
      Visit(TArg);
803
27
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitPackTemplateArgument(clang::TemplateArgument const&)
804
805
  // Implements Visit methods for Attrs.
806
#include "clang/AST/AttrNodeTraverse.inc"
807
};
808
809
} // namespace clang
810
811
#endif // LLVM_CLANG_AST_ASTNODETRAVERSER_H