Coverage Report

Created: 2021-09-21 08:58

/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
131k
  NodeDelegateType &getNodeDelegate() {
77
131k
    return getDerived().doGetNodeDelegate();
78
131k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getNodeDelegate()
Line
Count
Source
76
121k
  NodeDelegateType &getNodeDelegate() {
77
121k
    return getDerived().doGetNodeDelegate();
78
121k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getNodeDelegate()
Line
Count
Source
76
10.0k
  NodeDelegateType &getNodeDelegate() {
77
10.0k
    return getDerived().doGetNodeDelegate();
78
10.0k
  }
79
131k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::getDerived()
Line
Count
Source
79
121k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::getDerived()
Line
Count
Source
79
10.0k
  Derived &getDerived() { return *static_cast<Derived *>(this); }
80
81
public:
82
1.48k
  void setDeserialize(bool D) { Deserialize = D; }
83
7
  bool getDeserialize() const { return Deserialize; }
84
85
  void SetTraversalKind(TraversalKind TK) { Traversal = TK; }
86
479
  TraversalKind GetTraversalKind() const { return Traversal; }
87
88
25.0k
  void Visit(const Decl *D) {
89
25.0k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isImplicit()0
)
90
0
      return;
91
92
25.0k
    getNodeDelegate().AddChild([=] {
93
25.0k
      getNodeDelegate().Visit(D);
94
25.0k
      if (!D)
95
4
        return;
96
97
25.0k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
25.0k
      for (const auto &A : D->attrs())
100
2.01k
        Visit(A);
101
102
25.0k
      if (const comments::FullComment *Comment =
103
25.0k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
53
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
25.0k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)20.3k
) {
108
20.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
20.1k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
4.71k
          dumpDeclContext(DC);
118
20.1k
      }
119
25.0k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()::operator()() const
Line
Count
Source
92
23.1k
    getNodeDelegate().AddChild([=] {
93
23.1k
      getNodeDelegate().Visit(D);
94
23.1k
      if (!D)
95
3
        return;
96
97
23.1k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
23.1k
      for (const auto &A : D->attrs())
100
1.97k
        Visit(A);
101
102
23.1k
      if (const comments::FullComment *Comment =
103
23.1k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
41
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
23.1k
      if (!isa<FunctionDecl>(*D) && 
!isa<ObjCMethodDecl>(*D)18.9k
) {
108
18.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
18.7k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
4.34k
          dumpDeclContext(DC);
118
18.7k
      }
119
23.1k
    });
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.42k
        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.42k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
361
          dumpDeclContext(DC);
118
1.42k
      }
119
1.88k
    });
120
25.0k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)
Line
Count
Source
88
23.1k
  void Visit(const Decl *D) {
89
23.1k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isImplicit()0
)
90
0
      return;
91
92
23.1k
    getNodeDelegate().AddChild([=] {
93
23.1k
      getNodeDelegate().Visit(D);
94
23.1k
      if (!D)
95
23.1k
        return;
96
97
23.1k
      ConstDeclVisitor<Derived>::Visit(D);
98
99
23.1k
      for (const auto &A : D->attrs())
100
23.1k
        Visit(A);
101
102
23.1k
      if (const comments::FullComment *Comment =
103
23.1k
              D->getASTContext().getLocalCommentForDeclUncached(D))
104
23.1k
        Visit(Comment, Comment);
105
106
      // Decls within functions are visited by the body.
107
23.1k
      if (!isa<FunctionDecl>(*D) && !isa<ObjCMethodDecl>(*D)) {
108
23.1k
        if (Traversal != TK_AsIs) {
109
23.1k
          if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110
23.1k
            auto SK = CTSD->getSpecializationKind();
111
23.1k
            if (SK == TSK_ExplicitInstantiationDeclaration ||
112
23.1k
                SK == TSK_ExplicitInstantiationDefinition)
113
23.1k
              return;
114
23.1k
          }
115
23.1k
        }
116
23.1k
        if (const auto *DC = dyn_cast<DeclContext>(D))
117
23.1k
          dumpDeclContext(DC);
118
23.1k
      }
119
23.1k
    });
120
23.1k
  }
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
31.5k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
31.5k
    getNodeDelegate().AddChild(Label, [=] {
124
31.5k
      const Stmt *S = Node;
125
126
31.5k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
22.8k
        switch (Traversal) {
128
22.8k
        case TK_AsIs:
129
22.8k
          break;
130
0
        case TK_IgnoreUnlessSpelledInSource:
131
0
          S = E->IgnoreUnlessSpelledInSource();
132
0
          break;
133
22.8k
        }
134
22.8k
      }
135
136
31.5k
      getNodeDelegate().Visit(S);
137
138
31.5k
      if (!S) {
139
911
        return;
140
911
      }
141
142
30.6k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
30.6k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)28.8k
||
146
30.6k
          
isa<RequiresExpr>(S)28.8k
)
147
1.82k
        return;
148
149
28.8k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
28.8k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
28.8k
      for (const Stmt *SubStmt : S->children())
155
24.4k
        Visit(SubStmt);
156
28.8k
    });
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
123
2.50k
    getNodeDelegate().AddChild(Label, [=] {
124
2.50k
      const Stmt *S = Node;
125
126
2.50k
      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.50k
      getNodeDelegate().Visit(S);
137
138
2.50k
      if (!S) {
139
37
        return;
140
37
      }
141
142
2.47k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
2.47k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)2.38k
||
146
2.47k
          
isa<RequiresExpr>(S)2.37k
)
147
99
        return;
148
149
2.37k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
2.37k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
2.37k
      for (const Stmt *SubStmt : S->children())
155
2.02k
        Visit(SubStmt);
156
2.37k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()::operator()() const
Line
Count
Source
123
29.0k
    getNodeDelegate().AddChild(Label, [=] {
124
29.0k
      const Stmt *S = Node;
125
126
29.0k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
21.0k
        switch (Traversal) {
128
21.0k
        case TK_AsIs:
129
21.0k
          break;
130
0
        case TK_IgnoreUnlessSpelledInSource:
131
0
          S = E->IgnoreUnlessSpelledInSource();
132
0
          break;
133
21.0k
        }
134
21.0k
      }
135
136
29.0k
      getNodeDelegate().Visit(S);
137
138
29.0k
      if (!S) {
139
874
        return;
140
874
      }
141
142
28.2k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
28.2k
      if (isa<DeclStmt>(S) || 
isa<GenericSelectionExpr>(S)26.4k
||
146
28.2k
          
isa<RequiresExpr>(S)26.4k
)
147
1.72k
        return;
148
149
26.4k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
26.4k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
0
              CXXRewrittenBinaryOperator>(S))
152
0
        return;
153
154
26.4k
      for (const Stmt *SubStmt : S->children())
155
22.4k
        Visit(SubStmt);
156
26.4k
    });
157
31.5k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
122
2.50k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
2.50k
    getNodeDelegate().AddChild(Label, [=] {
124
2.50k
      const Stmt *S = Node;
125
126
2.50k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
2.50k
        switch (Traversal) {
128
2.50k
        case TK_AsIs:
129
2.50k
          break;
130
2.50k
        case TK_IgnoreUnlessSpelledInSource:
131
2.50k
          S = E->IgnoreUnlessSpelledInSource();
132
2.50k
          break;
133
2.50k
        }
134
2.50k
      }
135
136
2.50k
      getNodeDelegate().Visit(S);
137
138
2.50k
      if (!S) {
139
2.50k
        return;
140
2.50k
      }
141
142
2.50k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
2.50k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S) ||
146
2.50k
          isa<RequiresExpr>(S))
147
2.50k
        return;
148
149
2.50k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
2.50k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
2.50k
              CXXRewrittenBinaryOperator>(S))
152
2.50k
        return;
153
154
2.50k
      for (const Stmt *SubStmt : S->children())
155
2.50k
        Visit(SubStmt);
156
2.50k
    });
157
2.50k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)
Line
Count
Source
122
29.0k
  void Visit(const Stmt *Node, StringRef Label = {}) {
123
29.0k
    getNodeDelegate().AddChild(Label, [=] {
124
29.0k
      const Stmt *S = Node;
125
126
29.0k
      if (auto *E = dyn_cast_or_null<Expr>(S)) {
127
29.0k
        switch (Traversal) {
128
29.0k
        case TK_AsIs:
129
29.0k
          break;
130
29.0k
        case TK_IgnoreUnlessSpelledInSource:
131
29.0k
          S = E->IgnoreUnlessSpelledInSource();
132
29.0k
          break;
133
29.0k
        }
134
29.0k
      }
135
136
29.0k
      getNodeDelegate().Visit(S);
137
138
29.0k
      if (!S) {
139
29.0k
        return;
140
29.0k
      }
141
142
29.0k
      ConstStmtVisitor<Derived>::Visit(S);
143
144
      // Some statements have custom mechanisms for dumping their children.
145
29.0k
      if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S) ||
146
29.0k
          isa<RequiresExpr>(S))
147
29.0k
        return;
148
149
29.0k
      if (Traversal == TK_IgnoreUnlessSpelledInSource &&
150
29.0k
          isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151
29.0k
              CXXRewrittenBinaryOperator>(S))
152
29.0k
        return;
153
154
29.0k
      for (const Stmt *SubStmt : S->children())
155
29.0k
        Visit(SubStmt);
156
29.0k
    });
157
29.0k
  }
158
159
5.05k
  void Visit(QualType T) {
160
5.05k
    SplitQualType SQT = T.split();
161
5.05k
    if (!SQT.Quals.hasQualifiers())
162
5.02k
      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.58k
  void Visit(QualType T) {
160
4.58k
    SplitQualType SQT = T.split();
161
4.58k
    if (!SQT.Quals.hasQualifiers())
162
4.55k
      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.09k
  void Visit(const Type *T) {
171
5.09k
    getNodeDelegate().AddChild([=] {
172
5.09k
      getNodeDelegate().Visit(T);
173
5.09k
      if (!T)
174
1
        return;
175
5.09k
      TypeVisitor<Derived>::Visit(T);
176
177
5.09k
      QualType SingleStepDesugar =
178
5.09k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
5.09k
      if (SingleStepDesugar != QualType(T, 0))
180
187
        Visit(SingleStepDesugar);
181
5.09k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()::operator()() const
Line
Count
Source
171
4.62k
    getNodeDelegate().AddChild([=] {
172
4.62k
      getNodeDelegate().Visit(T);
173
4.62k
      if (!T)
174
0
        return;
175
4.62k
      TypeVisitor<Derived>::Visit(T);
176
177
4.62k
      QualType SingleStepDesugar =
178
4.62k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
4.62k
      if (SingleStepDesugar != QualType(T, 0))
180
180
        Visit(SingleStepDesugar);
181
4.62k
    });
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.09k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)
Line
Count
Source
170
4.62k
  void Visit(const Type *T) {
171
4.62k
    getNodeDelegate().AddChild([=] {
172
4.62k
      getNodeDelegate().Visit(T);
173
4.62k
      if (!T)
174
4.62k
        return;
175
4.62k
      TypeVisitor<Derived>::Visit(T);
176
177
4.62k
      QualType SingleStepDesugar =
178
4.62k
          T->getLocallyUnqualifiedSingleStepDesugaredType();
179
4.62k
      if (SingleStepDesugar != QualType(T, 0))
180
4.62k
        Visit(SingleStepDesugar);
181
4.62k
    });
182
4.62k
  }
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.03k
  void Visit(const Attr *A) {
185
2.03k
    getNodeDelegate().AddChild([=] {
186
2.03k
      getNodeDelegate().Visit(A);
187
2.03k
      ConstAttrVisitor<Derived>::Visit(A);
188
2.03k
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()::operator()() const
Line
Count
Source
185
1.99k
    getNodeDelegate().AddChild([=] {
186
1.99k
      getNodeDelegate().Visit(A);
187
1.99k
      ConstAttrVisitor<Derived>::Visit(A);
188
1.99k
    });
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.03k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)
Line
Count
Source
184
1.99k
  void Visit(const Attr *A) {
185
1.99k
    getNodeDelegate().AddChild([=] {
186
1.99k
      getNodeDelegate().Visit(A);
187
1.99k
      ConstAttrVisitor<Derived>::Visit(A);
188
1.99k
    });
189
1.99k
  }
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
163
  void Visit(const CXXCtorInitializer *Init) {
192
163
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
!Init->isWritten()0
)
193
0
      return;
194
163
    getNodeDelegate().AddChild([=] {
195
163
      getNodeDelegate().Visit(Init);
196
163
      Visit(Init->getInit());
197
163
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()::operator()() const
Line
Count
Source
194
142
    getNodeDelegate().AddChild([=] {
195
142
      getNodeDelegate().Visit(Init);
196
142
      Visit(Init->getInit());
197
142
    });
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
163
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)
Line
Count
Source
191
142
  void Visit(const CXXCtorInitializer *Init) {
192
142
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
!Init->isWritten()0
)
193
0
      return;
194
142
    getNodeDelegate().AddChild([=] {
195
142
      getNodeDelegate().Visit(Init);
196
142
      Visit(Init->getInit());
197
142
    });
198
142
  }
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
617
             const Decl *From = nullptr, const char *Label = nullptr) {
202
617
    getNodeDelegate().AddChild([=] {
203
617
      getNodeDelegate().Visit(A, R, From, Label);
204
617
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
617
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()::operator()() const
Line
Count
Source
202
588
    getNodeDelegate().AddChild([=] {
203
588
      getNodeDelegate().Visit(A, R, From, Label);
204
588
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
588
    });
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
617
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)
Line
Count
Source
201
588
             const Decl *From = nullptr, const char *Label = nullptr) {
202
588
    getNodeDelegate().AddChild([=] {
203
588
      getNodeDelegate().Visit(A, R, From, Label);
204
588
      ConstTemplateArgumentVisitor<Derived>::Visit(A);
205
588
    });
206
588
  }
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
292
  void Visit(const OMPClause *C) {
217
292
    getNodeDelegate().AddChild([=] {
218
292
      getNodeDelegate().Visit(C);
219
292
      for (const auto *S : C->children())
220
410
        Visit(S);
221
292
    });
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()::operator()() const
Line
Count
Source
217
290
    getNodeDelegate().AddChild([=] {
218
290
      getNodeDelegate().Visit(C);
219
290
      for (const auto *S : C->children())
220
408
        Visit(S);
221
290
    });
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
292
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)
Line
Count
Source
216
290
  void Visit(const OMPClause *C) {
217
290
    getNodeDelegate().AddChild([=] {
218
290
      getNodeDelegate().Visit(C);
219
290
      for (const auto *S : C->children())
220
290
        Visit(S);
221
290
    });
222
290
  }
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
657
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
260
657
    getNodeDelegate().AddChild([=] {
261
657
      getNodeDelegate().Visit(C, FC);
262
657
      if (!C) {
263
0
        return;
264
0
      }
265
657
      comments::ConstCommentVisitor<Derived, void,
266
657
                                    const comments::FullComment *>::visit(C,
267
657
                                                                          FC);
268
657
      for (comments::Comment::child_iterator I = C->child_begin(),
269
657
                                             E = C->child_end();
270
1.18k
           I != E; 
++I525
)
271
525
        Visit(*I, FC);
272
657
    });
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
593
    getNodeDelegate().AddChild([=] {
261
593
      getNodeDelegate().Visit(C, FC);
262
593
      if (!C) {
263
0
        return;
264
0
      }
265
593
      comments::ConstCommentVisitor<Derived, void,
266
593
                                    const comments::FullComment *>::visit(C,
267
593
                                                                          FC);
268
593
      for (comments::Comment::child_iterator I = C->child_begin(),
269
593
                                             E = C->child_end();
270
1.06k
           I != E; 
++I473
)
271
473
        Visit(*I, FC);
272
593
    });
273
657
  }
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
593
  void Visit(const comments::Comment *C, const comments::FullComment *FC) {
260
593
    getNodeDelegate().AddChild([=] {
261
593
      getNodeDelegate().Visit(C, FC);
262
593
      if (!C) {
263
593
        return;
264
593
      }
265
593
      comments::ConstCommentVisitor<Derived, void,
266
593
                                    const comments::FullComment *>::visit(C,
267
593
                                                                          FC);
268
593
      for (comments::Comment::child_iterator I = C->child_begin(),
269
593
                                             E = C->child_end();
270
593
           I != E; ++I)
271
593
        Visit(*I, FC);
272
593
    });
273
593
  }
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
4.74k
  void dumpDeclContext(const DeclContext *DC) {
294
4.74k
    if (!DC)
295
0
      return;
296
297
4.74k
    for (const auto *D : (Deserialize ? 
DC->decls()651
:
DC->noload_decls()4.09k
))
298
16.5k
      Visit(D);
299
4.74k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpDeclContext(clang::DeclContext const*)
Line
Count
Source
293
4.38k
  void dumpDeclContext(const DeclContext *DC) {
294
4.38k
    if (!DC)
295
0
      return;
296
297
4.38k
    for (const auto *D : (Deserialize ? 
DC->decls()651
:
DC->noload_decls()3.72k
))
298
15.3k
      Visit(D);
299
4.38k
  }
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
580
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
302
580
    if (!TPL)
303
0
      return;
304
305
580
    for (const auto &TP : *TPL)
306
692
      Visit(TP);
307
308
580
    if (const Expr *RC = TPL->getRequiresClause())
309
0
      Visit(RC);
310
580
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateParameters(clang::TemplateParameterList const*)
Line
Count
Source
301
528
  void dumpTemplateParameters(const TemplateParameterList *TPL) {
302
528
    if (!TPL)
303
0
      return;
304
305
528
    for (const auto &TP : *TPL)
306
636
      Visit(TP);
307
308
528
    if (const Expr *RC = TPL->getRequiresClause())
309
0
      Visit(RC);
310
528
  }
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
343
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
328
752
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i409
)
329
409
      Visit(TAL[i]);
330
343
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::dumpTemplateArgumentList(clang::TemplateArgumentList const&)
Line
Count
Source
327
324
  void dumpTemplateArgumentList(const TemplateArgumentList &TAL) {
328
711
    for (unsigned i = 0, e = TAL.size(); i < e; 
++i387
)
329
387
      Visit(TAL[i]);
330
324
  }
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
127
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
333
127
    if (!typeParams)
334
123
      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
122
  void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams) {
333
122
    if (!typeParams)
334
119
      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
521
  void VisitPointerType(const PointerType *T) { Visit(T->getPointeeType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPointerType(clang::PointerType const*)
Line
Count
Source
345
462
  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
394
  void VisitArrayType(const ArrayType *T) { Visit(T->getElementType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitArrayType(clang::ArrayType const*)
Line
Count
Source
356
337
  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
63
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
398
63
    for (const auto &Arg : *T)
399
90
      Visit(Arg);
400
63
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
Line
Count
Source
397
63
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
398
63
    for (const auto &Arg : *T)
399
90
      Visit(Arg);
400
63
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitTemplateSpecializationType(clang::TemplateSpecializationType const*)
401
75
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
402
75
    Visit(T->getPointeeType());
403
75
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
Line
Count
Source
401
75
  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
402
75
    Visit(T->getPointeeType());
403
75
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitObjCObjectPointerType(clang::ObjCObjectPointerType const*)
404
105
  void VisitAtomicType(const AtomicType *T) { Visit(T->getValueType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitAtomicType(clang::AtomicType const*)
Line
Count
Source
404
105
  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.06k
  void VisitTypedefDecl(const TypedefDecl *D) { Visit(D->getUnderlyingType()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypedefDecl(clang::TypedefDecl const*)
Line
Count
Source
414
2.77k
  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
91
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
417
91
    if (const Expr *Init = D->getInitExpr())
418
9
      Visit(Init);
419
91
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitEnumConstantDecl(clang::EnumConstantDecl const*)
Line
Count
Source
416
73
  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
417
73
    if (const Expr *Init = D->getInitExpr())
418
8
      Visit(Init);
419
73
  }
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
4.62k
  void VisitFunctionDecl(const FunctionDecl *D) {
422
4.62k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
152
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
4.62k
    if (D->param_begin())
426
2.15k
      for (const auto *Parameter : D->parameters())
427
2.69k
        Visit(Parameter);
428
429
4.62k
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
7
      Visit(TRC);
431
432
4.62k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
4.62k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
874
      for (const auto *I : C->inits())
437
161
        Visit(I);
438
439
4.62k
    if (D->doesThisDeclarationHaveABody())
440
2.37k
      Visit(D->getBody());
441
4.62k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
421
4.18k
  void VisitFunctionDecl(const FunctionDecl *D) {
422
4.18k
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
150
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
4.18k
    if (D->param_begin())
426
1.94k
      for (const auto *Parameter : D->parameters())
427
2.44k
        Visit(Parameter);
428
429
4.18k
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
6
      Visit(TRC);
431
432
4.18k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
4.18k
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
820
      for (const auto *I : C->inits())
437
140
        Visit(I);
438
439
4.18k
    if (D->doesThisDeclarationHaveABody())
440
2.11k
      Visit(D->getBody());
441
4.18k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitFunctionDecl(clang::FunctionDecl const*)
Line
Count
Source
421
439
  void VisitFunctionDecl(const FunctionDecl *D) {
422
439
    if (const auto *FTSI = D->getTemplateSpecializationInfo())
423
2
      dumpTemplateArgumentList(*FTSI->TemplateArguments);
424
425
439
    if (D->param_begin())
426
210
      for (const auto *Parameter : D->parameters())
427
247
        Visit(Parameter);
428
429
439
    if (const Expr *TRC = D->getTrailingRequiresClause())
430
1
      Visit(TRC);
431
432
439
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isDefaulted()0
)
433
0
      return;
434
435
439
    if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
436
54
      for (const auto *I : C->inits())
437
21
        Visit(I);
438
439
439
    if (D->doesThisDeclarationHaveABody())
440
259
      Visit(D->getBody());
441
439
  }
442
443
1.94k
  void VisitFieldDecl(const FieldDecl *D) {
444
1.94k
    if (D->isBitField())
445
103
      Visit(D->getBitWidth());
446
1.94k
    if (Expr *Init = D->getInClassInitializer())
447
42
      Visit(Init);
448
1.94k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitFieldDecl(clang::FieldDecl const*)
Line
Count
Source
443
1.83k
  void VisitFieldDecl(const FieldDecl *D) {
444
1.83k
    if (D->isBitField())
445
96
      Visit(D->getBitWidth());
446
1.83k
    if (Expr *Init = D->getInClassInitializer())
447
41
      Visit(Init);
448
1.83k
  }
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
8.44k
  void VisitVarDecl(const VarDecl *D) {
451
8.44k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
8.44k
    if (D->hasInit())
455
2.50k
      Visit(D->getInit());
456
8.44k
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
450
7.98k
  void VisitVarDecl(const VarDecl *D) {
451
7.98k
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
7.98k
    if (D->hasInit())
455
2.41k
      Visit(D->getInit());
456
7.98k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitVarDecl(clang::VarDecl const*)
Line
Count
Source
450
464
  void VisitVarDecl(const VarDecl *D) {
451
464
    if (Traversal == TK_IgnoreUnlessSpelledInSource && 
D->isCXXForRangeDecl()0
)
452
0
      return;
453
454
464
    if (D->hasInit())
455
84
      Visit(D->getInit());
456
464
  }
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
697
  void VisitCapturedDecl(const CapturedDecl *D) { Visit(D->getBody()); }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitCapturedDecl(clang::CapturedDecl const*)
Line
Count
Source
475
676
  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
0
  void VisitOMPAllocateDecl(const OMPAllocateDecl *D) {
498
0
    for (const auto *E : D->varlists())
499
0
      Visit(E);
500
0
    for (const auto *C : D->clauselists())
501
0
      Visit(C);
502
0
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitOMPAllocateDecl(clang::OMPAllocateDecl const*)
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
86
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
536
86
    Visit(D->getUnderlyingType());
537
86
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeAliasDecl(clang::TypeAliasDecl const*)
Line
Count
Source
535
81
  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
536
81
    Visit(D->getUnderlyingType());
537
81
  }
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
185
      const ClassTemplateSpecializationDecl *D) {
559
185
    dumpTemplateArgumentList(D->getTemplateArgs());
560
185
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
558
168
      const ClassTemplateSpecializationDecl *D) {
559
168
    dumpTemplateArgumentList(D->getTemplateArgs());
560
168
  }
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
557
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
592
557
    if (const auto *TC = D->getTypeConstraint())
593
14
      Visit(TC->getImmediatelyDeclaredConstraint());
594
557
    if (D->hasDefaultArgument())
595
16
      Visit(D->getDefaultArgument(), SourceRange(),
596
16
            D->getDefaultArgStorage().getInheritedFrom(),
597
16
            D->defaultArgumentWasInherited() ? 
"inherited from"4
:
"previous"12
);
598
557
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl const*)
Line
Count
Source
591
509
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
592
509
    if (const auto *TC = D->getTypeConstraint())
593
12
      Visit(TC->getImmediatelyDeclaredConstraint());
594
509
    if (D->hasDefaultArgument())
595
14
      Visit(D->getDefaultArgument(), SourceRange(),
596
14
            D->getDefaultArgStorage().getInheritedFrom(),
597
14
            D->defaultArgumentWasInherited() ? 
"inherited from"4
:
"previous"10
);
598
509
  }
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
152
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
601
152
    if (const auto *E = D->getPlaceholderTypeConstraint())
602
0
      Visit(E);
603
152
    if (D->hasDefaultArgument())
604
12
      Visit(D->getDefaultArgument(), SourceRange(),
605
12
            D->getDefaultArgStorage().getInheritedFrom(),
606
12
            D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"11
);
607
152
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl const*)
Line
Count
Source
600
146
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
601
146
    if (const auto *E = D->getPlaceholderTypeConstraint())
602
0
      Visit(E);
603
146
    if (D->hasDefaultArgument())
604
12
      Visit(D->getDefaultArgument(), SourceRange(),
605
12
            D->getDefaultArgStorage().getInheritedFrom(),
606
12
            D->defaultArgumentWasInherited() ? 
"inherited from"1
:
"previous"11
);
607
146
  }
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
64
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
629
64
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
630
1
      Visit(TD->getTypeForDecl());
631
64
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitUsingShadowDecl(clang::UsingShadowDecl const*)
Line
Count
Source
628
60
  void VisitUsingShadowDecl(const UsingShadowDecl *D) {
629
60
    if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
630
0
      Visit(TD->getTypeForDecl());
631
60
  }
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
192
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
639
192
    if (D->isThisDeclarationADefinition())
640
34
      dumpDeclContext(D);
641
158
    else
642
158
      for (const ParmVarDecl *Parameter : D->parameters())
643
59
        Visit(Parameter);
644
645
192
    if (D->hasBody())
646
34
      Visit(D->getBody());
647
192
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCMethodDecl(clang::ObjCMethodDecl const*)
Line
Count
Source
638
177
  void VisitObjCMethodDecl(const ObjCMethodDecl *D) {
639
177
    if (D->isThisDeclarationADefinition())
640
31
      dumpDeclContext(D);
641
146
    else
642
146
      for (const ParmVarDecl *Parameter : D->parameters())
643
54
        Visit(Parameter);
644
645
177
    if (D->hasBody())
646
31
      Visit(D->getBody());
647
177
  }
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
107
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
654
107
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
655
107
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCInterfaceDecl(clang::ObjCInterfaceDecl const*)
Line
Count
Source
653
103
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
654
103
    dumpObjCTypeParamList(D->getTypeParamListAsWritten());
655
103
  }
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
27
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
658
27
    for (const auto &I : D->inits())
659
2
      Visit(I);
660
27
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitObjCImplementationDecl(clang::ObjCImplementationDecl const*)
Line
Count
Source
657
24
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
658
24
    for (const auto &I : D->inits())
659
2
      Visit(I);
660
24
  }
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
23
  void VisitBlockDecl(const BlockDecl *D) {
663
23
    for (const auto &I : D->parameters())
664
3
      Visit(I);
665
666
23
    for (const auto &I : D->captures())
667
11
      Visit(I);
668
23
    Visit(D->getBody());
669
23
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitBlockDecl(clang::BlockDecl const*)
Line
Count
Source
662
20
  void VisitBlockDecl(const BlockDecl *D) {
663
20
    for (const auto &I : D->parameters())
664
2
      Visit(I);
665
666
20
    for (const auto &I : D->captures())
667
8
      Visit(I);
668
20
    Visit(D->getBody());
669
20
  }
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
1.80k
  void VisitDeclStmt(const DeclStmt *Node) {
672
1.80k
    for (const auto &D : Node->decls())
673
1.86k
      Visit(D);
674
1.80k
  }
clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
671
91
  void VisitDeclStmt(const DeclStmt *Node) {
672
91
    for (const auto &D : Node->decls())
673
103
      Visit(D);
674
91
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitDeclStmt(clang::DeclStmt const*)
Line
Count
Source
671
1.71k
  void VisitDeclStmt(const DeclStmt *Node) {
672
1.71k
    for (const auto &D : Node->decls())
673
1.75k
      Visit(D);
674
1.71k
  }
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
448
  void VisitCapturedStmt(const CapturedStmt *Node) {
686
448
    Visit(Node->getCapturedDecl());
687
448
  }
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
431
  void VisitCapturedStmt(const CapturedStmt *Node) {
686
431
    Visit(Node->getCapturedDecl());
687
431
  }
688
689
333
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
690
333
    for (const auto *C : Node->clauses())
691
292
      Visit(C);
692
333
  }
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
321
  void VisitOMPExecutableDirective(const OMPExecutableDirective *Node) {
690
321
    for (const auto *C : Node->clauses())
691
290
      Visit(C);
692
321
  }
693
694
269
  void VisitInitListExpr(const InitListExpr *ILE) {
695
269
    if (auto *Filler = ILE->getArrayFiller()) {
696
21
      Visit(Filler, "array_filler");
697
21
    }
698
269
  }
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
259
  void VisitInitListExpr(const InitListExpr *ILE) {
695
259
    if (auto *Filler = ILE->getArrayFiller()) {
696
20
      Visit(Filler, "array_filler");
697
20
    }
698
259
  }
699
700
23
  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
20
  void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
701
702
124
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
703
124
    if (Expr *Source = Node->getSourceExpr())
704
122
      Visit(Source);
705
124
  }
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
72
  void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
703
72
    if (Expr *Source = Node->getSourceExpr())
704
70
      Visit(Source);
705
72
  }
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
147
  void VisitLambdaExpr(const LambdaExpr *Node) {
724
147
    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
147
    } else {
739
147
      return Visit(Node->getLambdaClass());
740
147
    }
741
147
  }
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
130
  void VisitLambdaExpr(const LambdaExpr *Node) {
724
130
    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
130
    } else {
739
130
      return Visit(Node->getLambdaClass());
740
130
    }
741
130
  }
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
33
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
750
33
    Visit(E->getParameter());
751
33
  }
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
33
  void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
750
33
    Visit(E->getParameter());
751
33
  }
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
985
  void VisitCallExpr(const CallExpr *Node) {
773
985
    for (const auto *Child :
774
1.54k
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
1.54k
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
1.54k
             return false;
777
0
           return !isa<CXXDefaultArgExpr>(Child);
778
1.54k
         })) {
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.46k
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
1.46k
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
1.46k
             return false;
777
0
           return !isa<CXXDefaultArgExpr>(Child);
778
1.46k
         })) {
779
0
      Visit(Child);
780
0
    }
781
985
  }
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
929
  void VisitCallExpr(const CallExpr *Node) {
773
929
    for (const auto *Child :
774
929
         make_filter_range(Node->children(), [this](const Stmt *Child) {
775
929
           if (Traversal != TK_IgnoreUnlessSpelledInSource)
776
929
             return false;
777
929
           return !isa<CXXDefaultArgExpr>(Child);
778
929
         })) {
779
0
      Visit(Child);
780
0
    }
781
929
  }
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
41
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
793
41
    Visit(TA.getAsExpr());
794
41
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
792
41
  void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
793
41
    Visit(TA.getAsExpr());
794
41
  }
Unexecuted instantiation: clang::ASTNodeTraverser<clang::JSONDumper, clang::JSONNodeDumper>::VisitExpressionTemplateArgument(clang::TemplateArgument const&)
795
796
441
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
797
441
    Visit(TA.getAsType());
798
441
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitTypeTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
796
416
  void VisitTypeTemplateArgument(const TemplateArgument &TA) {
797
416
    Visit(TA.getAsType());
798
416
  }
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
24
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
801
24
    for (const auto &TArg : TA.pack_elements())
802
55
      Visit(TArg);
803
24
  }
clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::VisitPackTemplateArgument(clang::TemplateArgument const&)
Line
Count
Source
800
24
  void VisitPackTemplateArgument(const TemplateArgument &TA) {
801
24
    for (const auto &TArg : TA.pack_elements())
802
55
      Visit(TArg);
803
24
  }
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