Coverage Report

Created: 2020-03-31 06:27

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