Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/AST/TextNodeDumper.h
Line
Count
Source
1
//===--- TextNodeDumper.h - Printing 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 AST dumping of components of individual AST nodes.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_AST_TEXTNODEDUMPER_H
14
#define LLVM_CLANG_AST_TEXTNODEDUMPER_H
15
16
#include "clang/AST/ASTContext.h"
17
#include "clang/AST/ASTDumperUtils.h"
18
#include "clang/AST/AttrVisitor.h"
19
#include "clang/AST/CommentCommandTraits.h"
20
#include "clang/AST/CommentVisitor.h"
21
#include "clang/AST/DeclVisitor.h"
22
#include "clang/AST/ExprConcepts.h"
23
#include "clang/AST/ExprCXX.h"
24
#include "clang/AST/StmtVisitor.h"
25
#include "clang/AST/TemplateArgumentVisitor.h"
26
#include "clang/AST/Type.h"
27
#include "clang/AST/TypeVisitor.h"
28
29
namespace clang {
30
31
class APValue;
32
33
class TextTreeStructure {
34
  raw_ostream &OS;
35
  const bool ShowColors;
36
37
  /// Pending[i] is an action to dump an entity at level i.
38
  llvm::SmallVector<std::function<void(bool IsLastChild)>, 32> Pending;
39
40
  /// Indicates whether we're at the top level.
41
  bool TopLevel = true;
42
43
  /// Indicates if we're handling the first child after entering a new depth.
44
  bool FirstChild = true;
45
46
  /// Prefix for currently-being-dumped entity.
47
  std::string Prefix;
48
49
public:
50
  /// Add a child of the current node.  Calls DoAddChild without arguments
51
46.4k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
46.4k
    return AddChild("", DoAddChild);
53
46.4k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
25.6k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
25.6k
    return AddChild("", DoAddChild);
53
25.6k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
8
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
8
    return AddChild("", DoAddChild);
53
8
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
644
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
644
    return AddChild("", DoAddChild);
53
644
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
161
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
161
    return AddChild("", DoAddChild);
53
161
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
4.84k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
4.84k
    return AddChild("", DoAddChild);
53
4.84k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
360
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
360
    return AddChild("", DoAddChild);
53
360
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
2.32k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
2.32k
    return AddChild("", DoAddChild);
53
2.32k
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)
Line
Count
Source
51
7
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
7
    return AddChild("", DoAddChild);
53
7
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())
Line
Count
Source
51
132
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
132
    return AddChild("", DoAddChild);
53
132
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
51
134
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
134
    return AddChild("", DoAddChild);
53
134
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())
Line
Count
Source
51
5
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
5
    return AddChild("", DoAddChild);
53
5
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
26
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
26
    return AddChild("", DoAddChild);
53
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
26
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
26
    return AddChild("", DoAddChild);
53
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
8
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
8
    return AddChild("", DoAddChild);
53
8
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
625
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
625
    return AddChild("", DoAddChild);
53
625
  }
Unexecuted instantiation: void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::APValue const&, clang::QualType)::'lambda'()>(clang::ASTDumper)
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::Decl const*)::$_0>(clang::TextNodeDumper::Visit(clang::Decl const*)::$_0)
Line
Count
Source
51
3
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
3
    return AddChild("", DoAddChild);
53
3
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7>(clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7)
Line
Count
Source
51
10
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
10
    return AddChild("", DoAddChild);
53
10
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8>(clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8)
Line
Count
Source
51
3
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
3
    return AddChild("", DoAddChild);
53
3
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9>(clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9)
Line
Count
Source
51
1.43k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.43k
    return AddChild("", DoAddChild);
53
1.43k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12>(clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12)
Line
Count
Source
51
13
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
13
    return AddChild("", DoAddChild);
53
13
  }
Unexecuted instantiation: TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14>(clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14)
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15)
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'()>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'())
Line
Count
Source
51
1.41k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.41k
    return AddChild("", DoAddChild);
53
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16)
Line
Count
Source
51
110
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
110
    return AddChild("", DoAddChild);
53
110
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
54
55
  /// Add a child of the current node with an optional label.
56
  /// Calls DoAddChild without arguments.
57
80.8k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
80.8k
    if (TopLevel) {
61
1.72k
      TopLevel = false;
62
1.72k
      DoAddChild();
63
3.19k
      while (!Pending.empty()) {
64
1.46k
        Pending.back()(true);
65
1.46k
        Pending.pop_back();
66
1.46k
      }
67
1.72k
      Prefix.clear();
68
1.72k
      OS << "\n";
69
1.72k
      TopLevel = true;
70
1.72k
      return;
71
1.72k
    }
72
73
79.0k
    auto DumpWithIndent = [this, DoAddChild,
74
79.0k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
79.0k
      {
88
79.0k
        OS << '\n';
89
79.0k
        ColorScope Color(OS, ShowColors, IndentColor);
90
79.0k
        OS << Prefix << (IsLastChild ? 
'`'39.6k
:
'|'39.4k
) << '-';
91
79.0k
        if (!Label.empty())
92
576
          OS << Label << ": ";
93
94
79.0k
        this->Prefix.push_back(IsLastChild ? 
' '39.6k
:
'|'39.4k
);
95
79.0k
        this->Prefix.push_back(' ');
96
79.0k
      }
97
98
79.0k
      FirstChild = true;
99
79.0k
      unsigned Depth = Pending.size();
100
101
79.0k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
117k
      while (Depth < Pending.size()) {
106
38.1k
        Pending.back()(true);
107
38.1k
        this->Pending.pop_back();
108
38.1k
      }
109
110
      // Restore the old prefix.
111
79.0k
      this->Prefix.resize(Prefix.size() - 2);
112
79.0k
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
8
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
8
      {
88
8
        OS << '\n';
89
8
        ColorScope Color(OS, ShowColors, IndentColor);
90
8
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
8
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
8
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
8
        this->Prefix.push_back(' ');
96
8
      }
97
98
8
      FirstChild = true;
99
8
      unsigned Depth = Pending.size();
100
101
8
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
10
      while (Depth < Pending.size()) {
106
2
        Pending.back()(true);
107
2
        this->Pending.pop_back();
108
2
      }
109
110
      // Restore the old prefix.
111
8
      this->Prefix.resize(Prefix.size() - 2);
112
8
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
644
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
644
      {
88
644
        OS << '\n';
89
644
        ColorScope Color(OS, ShowColors, IndentColor);
90
644
        OS << Prefix << (IsLastChild ? 
'`'137
:
'|'507
) << '-';
91
644
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
644
        this->Prefix.push_back(IsLastChild ? 
' '137
:
'|'507
);
95
644
        this->Prefix.push_back(' ');
96
644
      }
97
98
644
      FirstChild = true;
99
644
      unsigned Depth = Pending.size();
100
101
644
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.17k
      while (Depth < Pending.size()) {
106
527
        Pending.back()(true);
107
527
        this->Pending.pop_back();
108
527
      }
109
110
      // Restore the old prefix.
111
644
      this->Prefix.resize(Prefix.size() - 2);
112
644
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
161
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
161
      {
88
161
        OS << '\n';
89
161
        ColorScope Color(OS, ShowColors, IndentColor);
90
161
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
161
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
161
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
161
        this->Prefix.push_back(' ');
96
161
      }
97
98
161
      FirstChild = true;
99
161
      unsigned Depth = Pending.size();
100
101
161
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
322
      while (Depth < Pending.size()) {
106
161
        Pending.back()(true);
107
161
        this->Pending.pop_back();
108
161
      }
109
110
      // Restore the old prefix.
111
161
      this->Prefix.resize(Prefix.size() - 2);
112
161
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
4.81k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
4.81k
      {
88
4.81k
        OS << '\n';
89
4.81k
        ColorScope Color(OS, ShowColors, IndentColor);
90
4.81k
        OS << Prefix << (IsLastChild ? 
'`'4.70k
:
'|'109
) << '-';
91
4.81k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
4.81k
        this->Prefix.push_back(IsLastChild ? 
' '4.70k
:
'|'109
);
95
4.81k
        this->Prefix.push_back(' ');
96
4.81k
      }
97
98
4.81k
      FirstChild = true;
99
4.81k
      unsigned Depth = Pending.size();
100
101
4.81k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
7.13k
      while (Depth < Pending.size()) {
106
2.32k
        Pending.back()(true);
107
2.32k
        this->Pending.pop_back();
108
2.32k
      }
109
110
      // Restore the old prefix.
111
4.81k
      this->Prefix.resize(Prefix.size() - 2);
112
4.81k
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
360
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
360
      {
88
360
        OS << '\n';
89
360
        ColorScope Color(OS, ShowColors, IndentColor);
90
360
        OS << Prefix << (IsLastChild ? 
'`'65
:
'|'295
) << '-';
91
360
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
360
        this->Prefix.push_back(IsLastChild ? 
' '65
:
'|'295
);
95
360
        this->Prefix.push_back(' ');
96
360
      }
97
98
360
      FirstChild = true;
99
360
      unsigned Depth = Pending.size();
100
101
360
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
685
      while (Depth < Pending.size()) {
106
325
        Pending.back()(true);
107
325
        this->Pending.pop_back();
108
325
      }
109
110
      // Restore the old prefix.
111
360
      this->Prefix.resize(Prefix.size() - 2);
112
360
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
2.32k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
2.32k
      {
88
2.32k
        OS << '\n';
89
2.32k
        ColorScope Color(OS, ShowColors, IndentColor);
90
2.32k
        OS << Prefix << (IsLastChild ? 
'`'1.35k
:
'|'968
) << '-';
91
2.32k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
2.32k
        this->Prefix.push_back(IsLastChild ? 
' '1.35k
:
'|'968
);
95
2.32k
        this->Prefix.push_back(' ');
96
2.32k
      }
97
98
2.32k
      FirstChild = true;
99
2.32k
      unsigned Depth = Pending.size();
100
101
2.32k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.68k
      while (Depth < Pending.size()) {
106
354
        Pending.back()(true);
107
354
        this->Pending.pop_back();
108
354
      }
109
110
      // Restore the old prefix.
111
2.32k
      this->Prefix.resize(Prefix.size() - 2);
112
2.32k
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
24.0k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
24.0k
      {
88
24.0k
        OS << '\n';
89
24.0k
        ColorScope Color(OS, ShowColors, IndentColor);
90
24.0k
        OS << Prefix << (IsLastChild ? 
'`'6.91k
:
'|'17.1k
) << '-';
91
24.0k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
24.0k
        this->Prefix.push_back(IsLastChild ? 
' '6.91k
:
'|'17.1k
);
95
24.0k
        this->Prefix.push_back(' ');
96
24.0k
      }
97
98
24.0k
      FirstChild = true;
99
24.0k
      unsigned Depth = Pending.size();
100
101
24.0k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
37.3k
      while (Depth < Pending.size()) {
106
13.2k
        Pending.back()(true);
107
13.2k
        this->Pending.pop_back();
108
13.2k
      }
109
110
      // Restore the old prefix.
111
24.0k
      this->Prefix.resize(Prefix.size() - 2);
112
24.0k
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
134
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
134
      {
88
134
        OS << '\n';
89
134
        ColorScope Color(OS, ShowColors, IndentColor);
90
134
        OS << Prefix << (IsLastChild ? 
'`'106
:
'|'28
) << '-';
91
134
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
134
        this->Prefix.push_back(IsLastChild ? 
' '106
:
'|'28
);
95
134
        this->Prefix.push_back(' ');
96
134
      }
97
98
134
      FirstChild = true;
99
134
      unsigned Depth = Pending.size();
100
101
134
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
136
      while (Depth < Pending.size()) {
106
2
        Pending.back()(true);
107
2
        this->Pending.pop_back();
108
2
      }
109
110
      // Restore the old prefix.
111
134
      this->Prefix.resize(Prefix.size() - 2);
112
134
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
132
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
132
      {
88
132
        OS << '\n';
89
132
        ColorScope Color(OS, ShowColors, IndentColor);
90
132
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'130
) << '-';
91
132
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
132
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'130
);
95
132
        this->Prefix.push_back(' ');
96
132
      }
97
98
132
      FirstChild = true;
99
132
      unsigned Depth = Pending.size();
100
101
132
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
238
      while (Depth < Pending.size()) {
106
106
        Pending.back()(true);
107
106
        this->Pending.pop_back();
108
106
      }
109
110
      // Restore the old prefix.
111
132
      this->Prefix.resize(Prefix.size() - 2);
112
132
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
5
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
5
      {
88
5
        OS << '\n';
89
5
        ColorScope Color(OS, ShowColors, IndentColor);
90
5
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
5
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
5
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
5
        this->Prefix.push_back(' ');
96
5
      }
97
98
5
      FirstChild = true;
99
5
      unsigned Depth = Pending.size();
100
101
5
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
5
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
5
      this->Prefix.resize(Prefix.size() - 2);
112
5
    };
Unexecuted instantiation: ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)::'lambda'(bool)::operator()(bool) const
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? 
'`'24
:
'|'2
) << '-';
91
26
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? 
' '24
:
'|'2
);
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
52
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? 
'`'14
:
'|'12
) << '-';
91
26
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? 
' '14
:
'|'12
);
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
52
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
8
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
8
      {
88
8
        OS << '\n';
89
8
        ColorScope Color(OS, ShowColors, IndentColor);
90
8
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'6
) << '-';
91
8
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
8
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'6
);
95
8
        this->Prefix.push_back(' ');
96
8
      }
97
98
8
      FirstChild = true;
99
8
      unsigned Depth = Pending.size();
100
101
8
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
16
      while (Depth < Pending.size()) {
106
8
        Pending.back()(true);
107
8
        this->Pending.pop_back();
108
8
      }
109
110
      // Restore the old prefix.
111
8
      this->Prefix.resize(Prefix.size() - 2);
112
8
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
33.8k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
33.8k
      {
88
33.8k
        OS << '\n';
89
33.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
33.8k
        OS << Prefix << (IsLastChild ? 
'`'23.2k
:
'|'10.6k
) << '-';
91
33.8k
        if (!Label.empty())
92
20
          OS << Label << ": ";
93
94
33.8k
        this->Prefix.push_back(IsLastChild ? 
' '23.2k
:
'|'10.6k
);
95
33.8k
        this->Prefix.push_back(' ');
96
33.8k
      }
97
98
33.8k
      FirstChild = true;
99
33.8k
      unsigned Depth = Pending.size();
100
101
33.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
53.1k
      while (Depth < Pending.size()) {
106
19.2k
        Pending.back()(true);
107
19.2k
        this->Pending.pop_back();
108
19.2k
      }
109
110
      // Restore the old prefix.
111
33.8k
      this->Prefix.resize(Prefix.size() - 2);
112
33.8k
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
546
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
546
      {
88
546
        OS << '\n';
89
546
        ColorScope Color(OS, ShowColors, IndentColor);
90
546
        OS << Prefix << (IsLastChild ? 
'`'385
:
'|'161
) << '-';
91
546
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
546
        this->Prefix.push_back(IsLastChild ? 
' '385
:
'|'161
);
95
546
        this->Prefix.push_back(' ');
96
546
      }
97
98
546
      FirstChild = true;
99
546
      unsigned Depth = Pending.size();
100
101
546
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
818
      while (Depth < Pending.size()) {
106
272
        Pending.back()(true);
107
272
        this->Pending.pop_back();
108
272
      }
109
110
      // Restore the old prefix.
111
546
      this->Prefix.resize(Prefix.size() - 2);
112
546
    };
Unexecuted instantiation: void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::APValue const&, clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::Decl const*)::$_0>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::Decl const*)::$_0)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
3
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
3
      {
88
3
        OS << '\n';
89
3
        ColorScope Color(OS, ShowColors, IndentColor);
90
3
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
3
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
3
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
3
        this->Prefix.push_back(' ');
96
3
      }
97
98
3
      FirstChild = true;
99
3
      unsigned Depth = Pending.size();
100
101
3
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
3
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
3
      this->Prefix.resize(Prefix.size() - 2);
112
3
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpAPValueChildren(clang::APValue const&, clang::QualType, clang::APValue const& (*)(clang::APValue const&, unsigned int), unsigned int, llvm::StringRef, llvm::StringRef)::$_1>(llvm::StringRef, clang::TextNodeDumper::dumpAPValueChildren(clang::APValue const&, clang::QualType, clang::APValue const& (*)(clang::APValue const&, unsigned int), unsigned int, llvm::StringRef, llvm::StringRef)::$_1)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
130
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
130
      {
88
130
        OS << '\n';
89
130
        ColorScope Color(OS, ShowColors, IndentColor);
90
130
        OS << Prefix << (IsLastChild ? 
'`'72
:
'|'58
) << '-';
91
130
        if (!Label.empty())
92
130
          OS << Label << ": ";
93
94
130
        this->Prefix.push_back(IsLastChild ? 
' '72
:
'|'58
);
95
130
        this->Prefix.push_back(' ');
96
130
      }
97
98
130
      FirstChild = true;
99
130
      unsigned Depth = Pending.size();
100
101
130
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
170
      while (Depth < Pending.size()) {
106
40
        Pending.back()(true);
107
40
        this->Pending.pop_back();
108
40
      }
109
110
      // Restore the old prefix.
111
130
      this->Prefix.resize(Prefix.size() - 2);
112
130
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_4>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_4)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
12
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
12
      {
88
12
        OS << '\n';
89
12
        ColorScope Color(OS, ShowColors, IndentColor);
90
12
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
12
        if (!Label.empty())
92
12
          OS << Label << ": ";
93
94
12
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
12
        this->Prefix.push_back(' ');
96
12
      }
97
98
12
      FirstChild = true;
99
12
      unsigned Depth = Pending.size();
100
101
12
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
16
      while (Depth < Pending.size()) {
106
4
        Pending.back()(true);
107
4
        this->Pending.pop_back();
108
4
      }
109
110
      // Restore the old prefix.
111
12
      this->Prefix.resize(Prefix.size() - 2);
112
12
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
10
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
10
      {
88
10
        OS << '\n';
89
10
        ColorScope Color(OS, ShowColors, IndentColor);
90
10
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
10
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
10
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
10
        this->Prefix.push_back(' ');
96
10
      }
97
98
10
      FirstChild = true;
99
10
      unsigned Depth = Pending.size();
100
101
10
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
20
      while (Depth < Pending.size()) {
106
10
        Pending.back()(true);
107
10
        this->Pending.pop_back();
108
10
      }
109
110
      // Restore the old prefix.
111
10
      this->Prefix.resize(Prefix.size() - 2);
112
10
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8>(llvm::StringRef, clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
3
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
3
      {
88
3
        OS << '\n';
89
3
        ColorScope Color(OS, ShowColors, IndentColor);
90
3
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
3
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
3
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
3
        this->Prefix.push_back(' ');
96
3
      }
97
98
3
      FirstChild = true;
99
3
      unsigned Depth = Pending.size();
100
101
3
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
3
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
3
      this->Prefix.resize(Prefix.size() - 2);
112
3
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9>(llvm::StringRef, clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.43k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.43k
      {
88
1.43k
        OS << '\n';
89
1.43k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.43k
        OS << Prefix << (IsLastChild ? 
'`'1.18k
:
'|'248
) << '-';
91
1.43k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.43k
        this->Prefix.push_back(IsLastChild ? 
' '1.18k
:
'|'248
);
95
1.43k
        this->Prefix.push_back(' ');
96
1.43k
      }
97
98
1.43k
      FirstChild = true;
99
1.43k
      unsigned Depth = Pending.size();
100
101
1.43k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.43k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.43k
      this->Prefix.resize(Prefix.size() - 2);
112
1.43k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstantExpr(clang::ConstantExpr const*)::$_10>(llvm::StringRef, clang::TextNodeDumper::VisitConstantExpr(clang::ConstantExpr const*)::$_10)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
325
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
325
      {
88
325
        OS << '\n';
89
325
        ColorScope Color(OS, ShowColors, IndentColor);
90
325
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
325
        if (!Label.empty())
92
325
          OS << Label << ": ";
93
94
325
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
325
        this->Prefix.push_back(' ');
96
325
      }
97
98
325
      FirstChild = true;
99
325
      unsigned Depth = Pending.size();
100
101
325
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
325
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
325
      this->Prefix.resize(Prefix.size() - 2);
112
325
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12>(llvm::StringRef, clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
13
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
13
      {
88
13
        OS << '\n';
89
13
        ColorScope Color(OS, ShowColors, IndentColor);
90
13
        OS << Prefix << (IsLastChild ? 
'`'4
:
'|'9
) << '-';
91
13
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
13
        this->Prefix.push_back(IsLastChild ? 
' '4
:
'|'9
);
95
13
        this->Prefix.push_back(' ');
96
13
      }
97
98
13
      FirstChild = true;
99
13
      unsigned Depth = Pending.size();
100
101
13
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
13
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
13
      this->Prefix.resize(Prefix.size() - 2);
112
13
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13>(llvm::StringRef, clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
89
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
89
      {
88
89
        OS << '\n';
89
89
        ColorScope Color(OS, ShowColors, IndentColor);
90
89
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
89
        if (!Label.empty())
92
89
          OS << Label << ": ";
93
94
89
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
89
        this->Prefix.push_back(' ');
96
89
      }
97
98
89
      FirstChild = true;
99
89
      unsigned Depth = Pending.size();
100
101
89
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
129
      while (Depth < Pending.size()) {
106
40
        Pending.back()(true);
107
40
        this->Pending.pop_back();
108
40
      }
109
110
      // Restore the old prefix.
111
89
      this->Prefix.resize(Prefix.size() - 2);
112
89
    };
Unexecuted instantiation: TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14>(llvm::StringRef, clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14)::'lambda'(bool)::operator()(bool) const
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? 
'`'5
:
'|'1.40k
) << '-';
91
1.41k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? 
' '5
:
'|'1.40k
);
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.82k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
110
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
110
      {
88
110
        OS << '\n';
89
110
        ColorScope Color(OS, ShowColors, IndentColor);
90
110
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
110
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
110
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
110
        this->Prefix.push_back(' ');
96
110
      }
97
98
110
      FirstChild = true;
99
110
      unsigned Depth = Pending.size();
100
101
110
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
110
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
110
      this->Prefix.resize(Prefix.size() - 2);
112
110
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
79.0k
    if (FirstChild) {
115
39.6k
      Pending.push_back(std::move(DumpWithIndent));
116
39.6k
    } else {
117
39.4k
      Pending.back()(false);
118
39.4k
      Pending.back() = std::move(DumpWithIndent);
119
39.4k
    }
120
79.0k
    FirstChild = false;
121
79.0k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
25.6k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
25.6k
    if (TopLevel) {
61
1.60k
      TopLevel = false;
62
1.60k
      DoAddChild();
63
2.95k
      while (!Pending.empty()) {
64
1.35k
        Pending.back()(true);
65
1.35k
        Pending.pop_back();
66
1.35k
      }
67
1.60k
      Prefix.clear();
68
1.60k
      OS << "\n";
69
1.60k
      TopLevel = true;
70
1.60k
      return;
71
1.60k
    }
72
73
24.0k
    auto DumpWithIndent = [this, DoAddChild,
74
24.0k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
24.0k
      {
88
24.0k
        OS << '\n';
89
24.0k
        ColorScope Color(OS, ShowColors, IndentColor);
90
24.0k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
24.0k
        if (!Label.empty())
92
24.0k
          OS << Label << ": ";
93
94
24.0k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
24.0k
        this->Prefix.push_back(' ');
96
24.0k
      }
97
98
24.0k
      FirstChild = true;
99
24.0k
      unsigned Depth = Pending.size();
100
101
24.0k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
24.0k
      while (Depth < Pending.size()) {
106
24.0k
        Pending.back()(true);
107
24.0k
        this->Pending.pop_back();
108
24.0k
      }
109
110
      // Restore the old prefix.
111
24.0k
      this->Prefix.resize(Prefix.size() - 2);
112
24.0k
    };
113
114
24.0k
    if (FirstChild) {
115
6.22k
      Pending.push_back(std::move(DumpWithIndent));
116
17.8k
    } else {
117
17.8k
      Pending.back()(false);
118
17.8k
      Pending.back() = std::move(DumpWithIndent);
119
17.8k
    }
120
24.0k
    FirstChild = false;
121
24.0k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::BlockDecl::Capture const&)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
8
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
8
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
8
    auto DumpWithIndent = [this, DoAddChild,
74
8
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
8
      {
88
8
        OS << '\n';
89
8
        ColorScope Color(OS, ShowColors, IndentColor);
90
8
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
8
        if (!Label.empty())
92
8
          OS << Label << ": ";
93
94
8
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
8
        this->Prefix.push_back(' ');
96
8
      }
97
98
8
      FirstChild = true;
99
8
      unsigned Depth = Pending.size();
100
101
8
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
8
      while (Depth < Pending.size()) {
106
8
        Pending.back()(true);
107
8
        this->Pending.pop_back();
108
8
      }
109
110
      // Restore the old prefix.
111
8
      this->Prefix.resize(Prefix.size() - 2);
112
8
    };
113
114
8
    if (FirstChild) {
115
6
      Pending.push_back(std::move(DumpWithIndent));
116
6
    } else {
117
2
      Pending.back()(false);
118
2
      Pending.back() = std::move(DumpWithIndent);
119
2
    }
120
8
    FirstChild = false;
121
8
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::TemplateArgument const&, clang::SourceRange, clang::Decl const*, char const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
644
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
644
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
644
    auto DumpWithIndent = [this, DoAddChild,
74
644
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
644
      {
88
644
        OS << '\n';
89
644
        ColorScope Color(OS, ShowColors, IndentColor);
90
644
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
644
        if (!Label.empty())
92
644
          OS << Label << ": ";
93
94
644
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
644
        this->Prefix.push_back(' ');
96
644
      }
97
98
644
      FirstChild = true;
99
644
      unsigned Depth = Pending.size();
100
101
644
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
644
      while (Depth < Pending.size()) {
106
644
        Pending.back()(true);
107
644
        this->Pending.pop_back();
108
644
      }
109
110
      // Restore the old prefix.
111
644
      this->Prefix.resize(Prefix.size() - 2);
112
644
    };
113
114
644
    if (FirstChild) {
115
339
      Pending.push_back(std::move(DumpWithIndent));
116
339
    } else {
117
305
      Pending.back()(false);
118
305
      Pending.back() = std::move(DumpWithIndent);
119
305
    }
120
644
    FirstChild = false;
121
644
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
161
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
161
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
161
    auto DumpWithIndent = [this, DoAddChild,
74
161
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
161
      {
88
161
        OS << '\n';
89
161
        ColorScope Color(OS, ShowColors, IndentColor);
90
161
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
161
        if (!Label.empty())
92
161
          OS << Label << ": ";
93
94
161
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
161
        this->Prefix.push_back(' ');
96
161
      }
97
98
161
      FirstChild = true;
99
161
      unsigned Depth = Pending.size();
100
101
161
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
161
      while (Depth < Pending.size()) {
106
161
        Pending.back()(true);
107
161
        this->Pending.pop_back();
108
161
      }
109
110
      // Restore the old prefix.
111
161
      this->Prefix.resize(Prefix.size() - 2);
112
161
    };
113
114
161
    if (FirstChild) {
115
42
      Pending.push_back(std::move(DumpWithIndent));
116
119
    } else {
117
119
      Pending.back()(false);
118
119
      Pending.back() = std::move(DumpWithIndent);
119
119
    }
120
161
    FirstChild = false;
121
161
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
4.84k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
4.84k
    if (TopLevel) {
61
26
      TopLevel = false;
62
26
      DoAddChild();
63
46
      while (!Pending.empty()) {
64
20
        Pending.back()(true);
65
20
        Pending.pop_back();
66
20
      }
67
26
      Prefix.clear();
68
26
      OS << "\n";
69
26
      TopLevel = true;
70
26
      return;
71
26
    }
72
73
4.81k
    auto DumpWithIndent = [this, DoAddChild,
74
4.81k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
4.81k
      {
88
4.81k
        OS << '\n';
89
4.81k
        ColorScope Color(OS, ShowColors, IndentColor);
90
4.81k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
4.81k
        if (!Label.empty())
92
4.81k
          OS << Label << ": ";
93
94
4.81k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
4.81k
        this->Prefix.push_back(' ');
96
4.81k
      }
97
98
4.81k
      FirstChild = true;
99
4.81k
      unsigned Depth = Pending.size();
100
101
4.81k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
4.81k
      while (Depth < Pending.size()) {
106
4.81k
        Pending.back()(true);
107
4.81k
        this->Pending.pop_back();
108
4.81k
      }
109
110
      // Restore the old prefix.
111
4.81k
      this->Prefix.resize(Prefix.size() - 2);
112
4.81k
    };
113
114
4.81k
    if (FirstChild) {
115
4.65k
      Pending.push_back(std::move(DumpWithIndent));
116
4.65k
    } else {
117
165
      Pending.back()(false);
118
165
      Pending.back() = std::move(DumpWithIndent);
119
165
    }
120
4.81k
    FirstChild = false;
121
4.81k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
360
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
360
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
360
    auto DumpWithIndent = [this, DoAddChild,
74
360
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
360
      {
88
360
        OS << '\n';
89
360
        ColorScope Color(OS, ShowColors, IndentColor);
90
360
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
360
        if (!Label.empty())
92
360
          OS << Label << ": ";
93
94
360
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
360
        this->Prefix.push_back(' ');
96
360
      }
97
98
360
      FirstChild = true;
99
360
      unsigned Depth = Pending.size();
100
101
360
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
360
      while (Depth < Pending.size()) {
106
360
        Pending.back()(true);
107
360
        this->Pending.pop_back();
108
360
      }
109
110
      // Restore the old prefix.
111
360
      this->Prefix.resize(Prefix.size() - 2);
112
360
    };
113
114
360
    if (FirstChild) {
115
254
      Pending.push_back(std::move(DumpWithIndent));
116
254
    } else {
117
106
      Pending.back()(false);
118
106
      Pending.back() = std::move(DumpWithIndent);
119
106
    }
120
360
    FirstChild = false;
121
360
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
2.32k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
2.32k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
2.32k
    auto DumpWithIndent = [this, DoAddChild,
74
2.32k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
2.32k
      {
88
2.32k
        OS << '\n';
89
2.32k
        ColorScope Color(OS, ShowColors, IndentColor);
90
2.32k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
2.32k
        if (!Label.empty())
92
2.32k
          OS << Label << ": ";
93
94
2.32k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
2.32k
        this->Prefix.push_back(' ');
96
2.32k
      }
97
98
2.32k
      FirstChild = true;
99
2.32k
      unsigned Depth = Pending.size();
100
101
2.32k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.32k
      while (Depth < Pending.size()) {
106
2.32k
        Pending.back()(true);
107
2.32k
        this->Pending.pop_back();
108
2.32k
      }
109
110
      // Restore the old prefix.
111
2.32k
      this->Prefix.resize(Prefix.size() - 2);
112
2.32k
    };
113
114
2.32k
    if (FirstChild) {
115
1.03k
      Pending.push_back(std::move(DumpWithIndent));
116
1.29k
    } else {
117
1.29k
      Pending.back()(false);
118
1.29k
      Pending.back() = std::move(DumpWithIndent);
119
1.29k
    }
120
2.32k
    FirstChild = false;
121
2.32k
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)
Line
Count
Source
57
7
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
7
    if (TopLevel) {
61
7
      TopLevel = false;
62
7
      DoAddChild();
63
14
      while (!Pending.empty()) {
64
7
        Pending.back()(true);
65
7
        Pending.pop_back();
66
7
      }
67
7
      Prefix.clear();
68
7
      OS << "\n";
69
7
      TopLevel = true;
70
7
      return;
71
7
    }
72
73
0
    auto DumpWithIndent = [this, DoAddChild,
74
0
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
0
      {
88
0
        OS << '\n';
89
0
        ColorScope Color(OS, ShowColors, IndentColor);
90
0
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
0
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
0
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
0
        this->Prefix.push_back(' ');
96
0
      }
97
98
0
      FirstChild = true;
99
0
      unsigned Depth = Pending.size();
100
101
0
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
0
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
0
      this->Prefix.resize(Prefix.size() - 2);
112
0
    };
113
114
0
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
0
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
0
    FirstChild = false;
121
0
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())
Line
Count
Source
57
132
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
132
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
132
    auto DumpWithIndent = [this, DoAddChild,
74
132
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
132
      {
88
132
        OS << '\n';
89
132
        ColorScope Color(OS, ShowColors, IndentColor);
90
132
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
132
        if (!Label.empty())
92
132
          OS << Label << ": ";
93
94
132
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
132
        this->Prefix.push_back(' ');
96
132
      }
97
98
132
      FirstChild = true;
99
132
      unsigned Depth = Pending.size();
100
101
132
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
132
      while (Depth < Pending.size()) {
106
132
        Pending.back()(true);
107
132
        this->Pending.pop_back();
108
132
      }
109
110
      // Restore the old prefix.
111
132
      this->Prefix.resize(Prefix.size() - 2);
112
132
    };
113
114
132
    if (FirstChild) {
115
7
      Pending.push_back(std::move(DumpWithIndent));
116
125
    } else {
117
125
      Pending.back()(false);
118
125
      Pending.back() = std::move(DumpWithIndent);
119
125
    }
120
132
    FirstChild = false;
121
132
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
57
134
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
134
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
134
    auto DumpWithIndent = [this, DoAddChild,
74
134
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
134
      {
88
134
        OS << '\n';
89
134
        ColorScope Color(OS, ShowColors, IndentColor);
90
134
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
134
        if (!Label.empty())
92
134
          OS << Label << ": ";
93
94
134
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
134
        this->Prefix.push_back(' ');
96
134
      }
97
98
134
      FirstChild = true;
99
134
      unsigned Depth = Pending.size();
100
101
134
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
134
      while (Depth < Pending.size()) {
106
134
        Pending.back()(true);
107
134
        this->Pending.pop_back();
108
134
      }
109
110
      // Restore the old prefix.
111
134
      this->Prefix.resize(Prefix.size() - 2);
112
134
    };
113
114
134
    if (FirstChild) {
115
106
      Pending.push_back(std::move(DumpWithIndent));
116
106
    } else {
117
28
      Pending.back()(false);
118
28
      Pending.back() = std::move(DumpWithIndent);
119
28
    }
120
134
    FirstChild = false;
121
134
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())
Line
Count
Source
57
5
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
5
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
5
    auto DumpWithIndent = [this, DoAddChild,
74
5
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
5
      {
88
5
        OS << '\n';
89
5
        ColorScope Color(OS, ShowColors, IndentColor);
90
5
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
5
        if (!Label.empty())
92
5
          OS << Label << ": ";
93
94
5
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
5
        this->Prefix.push_back(' ');
96
5
      }
97
98
5
      FirstChild = true;
99
5
      unsigned Depth = Pending.size();
100
101
5
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
5
      while (Depth < Pending.size()) {
106
5
        Pending.back()(true);
107
5
        this->Pending.pop_back();
108
5
      }
109
110
      // Restore the old prefix.
111
5
      this->Prefix.resize(Prefix.size() - 2);
112
5
    };
113
114
5
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
5
    } else {
117
5
      Pending.back()(false);
118
5
      Pending.back() = std::move(DumpWithIndent);
119
5
    }
120
5
    FirstChild = false;
121
5
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
26
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
26
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
26
    auto DumpWithIndent = [this, DoAddChild,
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
26
        if (!Label.empty())
92
26
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
26
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
113
114
26
    if (FirstChild) {
115
20
      Pending.push_back(std::move(DumpWithIndent));
116
20
    } else {
117
6
      Pending.back()(false);
118
6
      Pending.back() = std::move(DumpWithIndent);
119
6
    }
120
26
    FirstChild = false;
121
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
33.8k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
33.8k
    if (TopLevel) {
61
15
      TopLevel = false;
62
15
      DoAddChild();
63
21
      while (!Pending.empty()) {
64
6
        Pending.back()(true);
65
6
        Pending.pop_back();
66
6
      }
67
15
      Prefix.clear();
68
15
      OS << "\n";
69
15
      TopLevel = true;
70
15
      return;
71
15
    }
72
73
33.8k
    auto DumpWithIndent = [this, DoAddChild,
74
33.8k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
33.8k
      {
88
33.8k
        OS << '\n';
89
33.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
33.8k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
33.8k
        if (!Label.empty())
92
33.8k
          OS << Label << ": ";
93
94
33.8k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
33.8k
        this->Prefix.push_back(' ');
96
33.8k
      }
97
98
33.8k
      FirstChild = true;
99
33.8k
      unsigned Depth = Pending.size();
100
101
33.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
33.8k
      while (Depth < Pending.size()) {
106
33.8k
        Pending.back()(true);
107
33.8k
        this->Pending.pop_back();
108
33.8k
      }
109
110
      // Restore the old prefix.
111
33.8k
      this->Prefix.resize(Prefix.size() - 2);
112
33.8k
    };
113
114
33.8k
    if (FirstChild) {
115
21.9k
      Pending.push_back(std::move(DumpWithIndent));
116
21.9k
    } else {
117
11.8k
      Pending.back()(false);
118
11.8k
      Pending.back() = std::move(DumpWithIndent);
119
11.8k
    }
120
33.8k
    FirstChild = false;
121
33.8k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
26
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
26
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
26
    auto DumpWithIndent = [this, DoAddChild,
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
26
        if (!Label.empty())
92
26
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
26
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
113
114
26
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
26
    } else {
117
26
      Pending.back()(false);
118
26
      Pending.back() = std::move(DumpWithIndent);
119
26
    }
120
26
    FirstChild = false;
121
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
8
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
8
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
8
    auto DumpWithIndent = [this, DoAddChild,
74
8
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
8
      {
88
8
        OS << '\n';
89
8
        ColorScope Color(OS, ShowColors, IndentColor);
90
8
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
8
        if (!Label.empty())
92
8
          OS << Label << ": ";
93
94
8
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
8
        this->Prefix.push_back(' ');
96
8
      }
97
98
8
      FirstChild = true;
99
8
      unsigned Depth = Pending.size();
100
101
8
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
8
      while (Depth < Pending.size()) {
106
8
        Pending.back()(true);
107
8
        this->Pending.pop_back();
108
8
      }
109
110
      // Restore the old prefix.
111
8
      this->Prefix.resize(Prefix.size() - 2);
112
8
    };
113
114
8
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
8
    } else {
117
8
      Pending.back()(false);
118
8
      Pending.back() = std::move(DumpWithIndent);
119
8
    }
120
8
    FirstChild = false;
121
8
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
625
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
625
    if (TopLevel) {
61
79
      TopLevel = false;
62
79
      DoAddChild();
63
157
      while (!Pending.empty()) {
64
78
        Pending.back()(true);
65
78
        Pending.pop_back();
66
78
      }
67
79
      Prefix.clear();
68
79
      OS << "\n";
69
79
      TopLevel = true;
70
79
      return;
71
79
    }
72
73
546
    auto DumpWithIndent = [this, DoAddChild,
74
546
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
546
      {
88
546
        OS << '\n';
89
546
        ColorScope Color(OS, ShowColors, IndentColor);
90
546
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
546
        if (!Label.empty())
92
546
          OS << Label << ": ";
93
94
546
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
546
        this->Prefix.push_back(' ');
96
546
      }
97
98
546
      FirstChild = true;
99
546
      unsigned Depth = Pending.size();
100
101
546
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
546
      while (Depth < Pending.size()) {
106
546
        Pending.back()(true);
107
546
        this->Pending.pop_back();
108
546
      }
109
110
      // Restore the old prefix.
111
546
      this->Prefix.resize(Prefix.size() - 2);
112
546
    };
113
114
546
    if (FirstChild) {
115
375
      Pending.push_back(std::move(DumpWithIndent));
116
375
    } else {
117
171
      Pending.back()(false);
118
171
      Pending.back() = std::move(DumpWithIndent);
119
171
    }
120
546
    FirstChild = false;
121
546
  }
Unexecuted instantiation: void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::APValue const&, clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::Decl const*)::$_0>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::Decl const*)::$_0)
Line
Count
Source
57
3
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
3
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
3
    auto DumpWithIndent = [this, DoAddChild,
74
3
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
3
      {
88
3
        OS << '\n';
89
3
        ColorScope Color(OS, ShowColors, IndentColor);
90
3
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
3
        if (!Label.empty())
92
3
          OS << Label << ": ";
93
94
3
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
3
        this->Prefix.push_back(' ');
96
3
      }
97
98
3
      FirstChild = true;
99
3
      unsigned Depth = Pending.size();
100
101
3
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
3
      while (Depth < Pending.size()) {
106
3
        Pending.back()(true);
107
3
        this->Pending.pop_back();
108
3
      }
109
110
      // Restore the old prefix.
111
3
      this->Prefix.resize(Prefix.size() - 2);
112
3
    };
113
114
3
    if (FirstChild) {
115
3
      Pending.push_back(std::move(DumpWithIndent));
116
3
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
3
    FirstChild = false;
121
3
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpAPValueChildren(clang::APValue const&, clang::QualType, clang::APValue const& (*)(clang::APValue const&, unsigned int), unsigned int, llvm::StringRef, llvm::StringRef)::$_1>(llvm::StringRef, clang::TextNodeDumper::dumpAPValueChildren(clang::APValue const&, clang::QualType, clang::APValue const& (*)(clang::APValue const&, unsigned int), unsigned int, llvm::StringRef, llvm::StringRef)::$_1)
Line
Count
Source
57
130
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
130
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
130
    auto DumpWithIndent = [this, DoAddChild,
74
130
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
130
      {
88
130
        OS << '\n';
89
130
        ColorScope Color(OS, ShowColors, IndentColor);
90
130
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
130
        if (!Label.empty())
92
130
          OS << Label << ": ";
93
94
130
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
130
        this->Prefix.push_back(' ');
96
130
      }
97
98
130
      FirstChild = true;
99
130
      unsigned Depth = Pending.size();
100
101
130
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
130
      while (Depth < Pending.size()) {
106
130
        Pending.back()(true);
107
130
        this->Pending.pop_back();
108
130
      }
109
110
      // Restore the old prefix.
111
130
      this->Prefix.resize(Prefix.size() - 2);
112
130
    };
113
114
130
    if (FirstChild) {
115
82
      Pending.push_back(std::move(DumpWithIndent));
116
82
    } else {
117
48
      Pending.back()(false);
118
48
      Pending.back() = std::move(DumpWithIndent);
119
48
    }
120
130
    FirstChild = false;
121
130
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_4>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_4)
Line
Count
Source
57
12
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
12
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
12
    auto DumpWithIndent = [this, DoAddChild,
74
12
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
12
      {
88
12
        OS << '\n';
89
12
        ColorScope Color(OS, ShowColors, IndentColor);
90
12
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
12
        if (!Label.empty())
92
12
          OS << Label << ": ";
93
94
12
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
12
        this->Prefix.push_back(' ');
96
12
      }
97
98
12
      FirstChild = true;
99
12
      unsigned Depth = Pending.size();
100
101
12
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
12
      while (Depth < Pending.size()) {
106
12
        Pending.back()(true);
107
12
        this->Pending.pop_back();
108
12
      }
109
110
      // Restore the old prefix.
111
12
      this->Prefix.resize(Prefix.size() - 2);
112
12
    };
113
114
12
    if (FirstChild) {
115
2
      Pending.push_back(std::move(DumpWithIndent));
116
10
    } else {
117
10
      Pending.back()(false);
118
10
      Pending.back() = std::move(DumpWithIndent);
119
10
    }
120
12
    FirstChild = false;
121
12
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7>(llvm::StringRef, clang::TextNodeDumper::Visit(clang::APValue const&, clang::QualType)::$_7)
Line
Count
Source
57
10
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
10
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
10
    auto DumpWithIndent = [this, DoAddChild,
74
10
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
10
      {
88
10
        OS << '\n';
89
10
        ColorScope Color(OS, ShowColors, IndentColor);
90
10
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
10
        if (!Label.empty())
92
10
          OS << Label << ": ";
93
94
10
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
10
        this->Prefix.push_back(' ');
96
10
      }
97
98
10
      FirstChild = true;
99
10
      unsigned Depth = Pending.size();
100
101
10
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
10
      while (Depth < Pending.size()) {
106
10
        Pending.back()(true);
107
10
        this->Pending.pop_back();
108
10
      }
109
110
      // Restore the old prefix.
111
10
      this->Prefix.resize(Prefix.size() - 2);
112
10
    };
113
114
10
    if (FirstChild) {
115
10
      Pending.push_back(std::move(DumpWithIndent));
116
10
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
10
    FirstChild = false;
121
10
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8>(llvm::StringRef, clang::TextNodeDumper::dumpCleanupObject(llvm::PointerUnion<clang::BlockDecl*, clang::CompoundLiteralExpr*> const&)::$_8)
Line
Count
Source
57
3
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
3
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
3
    auto DumpWithIndent = [this, DoAddChild,
74
3
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
3
      {
88
3
        OS << '\n';
89
3
        ColorScope Color(OS, ShowColors, IndentColor);
90
3
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
3
        if (!Label.empty())
92
3
          OS << Label << ": ";
93
94
3
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
3
        this->Prefix.push_back(' ');
96
3
      }
97
98
3
      FirstChild = true;
99
3
      unsigned Depth = Pending.size();
100
101
3
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
3
      while (Depth < Pending.size()) {
106
3
        Pending.back()(true);
107
3
        this->Pending.pop_back();
108
3
      }
109
110
      // Restore the old prefix.
111
3
      this->Prefix.resize(Prefix.size() - 2);
112
3
    };
113
114
3
    if (FirstChild) {
115
3
      Pending.push_back(std::move(DumpWithIndent));
116
3
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
3
    FirstChild = false;
121
3
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9>(llvm::StringRef, clang::TextNodeDumper::dumpDeclRef(clang::Decl const*, llvm::StringRef)::$_9)
Line
Count
Source
57
1.43k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.43k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.43k
    auto DumpWithIndent = [this, DoAddChild,
74
1.43k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.43k
      {
88
1.43k
        OS << '\n';
89
1.43k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.43k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.43k
        if (!Label.empty())
92
1.43k
          OS << Label << ": ";
93
94
1.43k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.43k
        this->Prefix.push_back(' ');
96
1.43k
      }
97
98
1.43k
      FirstChild = true;
99
1.43k
      unsigned Depth = Pending.size();
100
101
1.43k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.43k
      while (Depth < Pending.size()) {
106
1.43k
        Pending.back()(true);
107
1.43k
        this->Pending.pop_back();
108
1.43k
      }
109
110
      // Restore the old prefix.
111
1.43k
      this->Prefix.resize(Prefix.size() - 2);
112
1.43k
    };
113
114
1.43k
    if (FirstChild) {
115
1.24k
      Pending.push_back(std::move(DumpWithIndent));
116
1.24k
    } else {
117
183
      Pending.back()(false);
118
183
      Pending.back() = std::move(DumpWithIndent);
119
183
    }
120
1.43k
    FirstChild = false;
121
1.43k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstantExpr(clang::ConstantExpr const*)::$_10>(llvm::StringRef, clang::TextNodeDumper::VisitConstantExpr(clang::ConstantExpr const*)::$_10)
Line
Count
Source
57
325
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
325
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
325
    auto DumpWithIndent = [this, DoAddChild,
74
325
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
325
      {
88
325
        OS << '\n';
89
325
        ColorScope Color(OS, ShowColors, IndentColor);
90
325
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
325
        if (!Label.empty())
92
325
          OS << Label << ": ";
93
94
325
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
325
        this->Prefix.push_back(' ');
96
325
      }
97
98
325
      FirstChild = true;
99
325
      unsigned Depth = Pending.size();
100
101
325
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
325
      while (Depth < Pending.size()) {
106
325
        Pending.back()(true);
107
325
        this->Pending.pop_back();
108
325
      }
109
110
      // Restore the old prefix.
111
325
      this->Prefix.resize(Prefix.size() - 2);
112
325
    };
113
114
325
    if (FirstChild) {
115
325
      Pending.push_back(std::move(DumpWithIndent));
116
325
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
325
    FirstChild = false;
121
325
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12>(llvm::StringRef, clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12)
Line
Count
Source
57
13
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
13
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
13
    auto DumpWithIndent = [this, DoAddChild,
74
13
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
13
      {
88
13
        OS << '\n';
89
13
        ColorScope Color(OS, ShowColors, IndentColor);
90
13
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
13
        if (!Label.empty())
92
13
          OS << Label << ": ";
93
94
13
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
13
        this->Prefix.push_back(' ');
96
13
      }
97
98
13
      FirstChild = true;
99
13
      unsigned Depth = Pending.size();
100
101
13
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
13
      while (Depth < Pending.size()) {
106
13
        Pending.back()(true);
107
13
        this->Pending.pop_back();
108
13
      }
109
110
      // Restore the old prefix.
111
13
      this->Prefix.resize(Prefix.size() - 2);
112
13
    };
113
114
13
    if (FirstChild) {
115
13
      Pending.push_back(std::move(DumpWithIndent));
116
13
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
13
    FirstChild = false;
121
13
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13>(llvm::StringRef, clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13)
Line
Count
Source
57
89
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
89
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
89
    auto DumpWithIndent = [this, DoAddChild,
74
89
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
89
      {
88
89
        OS << '\n';
89
89
        ColorScope Color(OS, ShowColors, IndentColor);
90
89
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
89
        if (!Label.empty())
92
89
          OS << Label << ": ";
93
94
89
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
89
        this->Prefix.push_back(' ');
96
89
      }
97
98
89
      FirstChild = true;
99
89
      unsigned Depth = Pending.size();
100
101
89
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
89
      while (Depth < Pending.size()) {
106
89
        Pending.back()(true);
107
89
        this->Pending.pop_back();
108
89
      }
109
110
      // Restore the old prefix.
111
89
      this->Prefix.resize(Prefix.size() - 2);
112
89
    };
113
114
89
    if (FirstChild) {
115
89
      Pending.push_back(std::move(DumpWithIndent));
116
89
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
89
    FirstChild = false;
121
89
  }
Unexecuted instantiation: TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14>(llvm::StringRef, clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14)
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15)
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
1.40k
      Pending.push_back(std::move(DumpWithIndent));
116
1.40k
    } else {
117
1
      Pending.back()(false);
118
1
      Pending.back() = std::move(DumpWithIndent);
119
1
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
1.41k
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda0'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
1.41k
      Pending.back()(false);
118
1.41k
      Pending.back() = std::move(DumpWithIndent);
119
1.41k
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda1'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
1.41k
      Pending.back()(false);
118
1.41k
      Pending.back() = std::move(DumpWithIndent);
119
1.41k
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda2'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
1.41k
      Pending.back()(false);
118
1.41k
      Pending.back() = std::move(DumpWithIndent);
119
1.41k
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda3'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
1.41k
      Pending.back()(false);
118
1.41k
      Pending.back() = std::move(DumpWithIndent);
119
1.41k
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda4'())
Line
Count
Source
57
1.41k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
1.41k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
1.41k
    auto DumpWithIndent = [this, DoAddChild,
74
1.41k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
1.41k
      {
88
1.41k
        OS << '\n';
89
1.41k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.41k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.41k
        if (!Label.empty())
92
1.41k
          OS << Label << ": ";
93
94
1.41k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.41k
        this->Prefix.push_back(' ');
96
1.41k
      }
97
98
1.41k
      FirstChild = true;
99
1.41k
      unsigned Depth = Pending.size();
100
101
1.41k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.41k
      while (Depth < Pending.size()) {
106
1.41k
        Pending.back()(true);
107
1.41k
        this->Pending.pop_back();
108
1.41k
      }
109
110
      // Restore the old prefix.
111
1.41k
      this->Prefix.resize(Prefix.size() - 2);
112
1.41k
    };
113
114
1.41k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.41k
    } else {
117
1.41k
      Pending.back()(false);
118
1.41k
      Pending.back() = std::move(DumpWithIndent);
119
1.41k
    }
120
1.41k
    FirstChild = false;
121
1.41k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16)
Line
Count
Source
57
110
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
110
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
110
    auto DumpWithIndent = [this, DoAddChild,
74
110
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
110
      {
88
110
        OS << '\n';
89
110
        ColorScope Color(OS, ShowColors, IndentColor);
90
110
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
110
        if (!Label.empty())
92
110
          OS << Label << ": ";
93
94
110
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
110
        this->Prefix.push_back(' ');
96
110
      }
97
98
110
      FirstChild = true;
99
110
      unsigned Depth = Pending.size();
100
101
110
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
110
      while (Depth < Pending.size()) {
106
110
        Pending.back()(true);
107
110
        this->Pending.pop_back();
108
110
      }
109
110
      // Restore the old prefix.
111
110
      this->Prefix.resize(Prefix.size() - 2);
112
110
    };
113
114
110
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
110
    } else {
117
110
      Pending.back()(false);
118
110
      Pending.back() = std::move(DumpWithIndent);
119
110
    }
120
110
    FirstChild = false;
121
110
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
15
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
15
    FirstChild = false;
121
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
15
      Pending.back()(false);
118
15
      Pending.back() = std::move(DumpWithIndent);
119
15
    }
120
15
    FirstChild = false;
121
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
15
      Pending.back()(false);
118
15
      Pending.back() = std::move(DumpWithIndent);
119
15
    }
120
15
    FirstChild = false;
121
15
  }
122
123
  TextTreeStructure(raw_ostream &OS, bool ShowColors)
124
1.81k
      : OS(OS), ShowColors(ShowColors) {}
125
};
126
127
class TextNodeDumper
128
    : public TextTreeStructure,
129
      public comments::ConstCommentVisitor<TextNodeDumper, void,
130
                                           const comments::FullComment *>,
131
      public ConstAttrVisitor<TextNodeDumper>,
132
      public ConstTemplateArgumentVisitor<TextNodeDumper>,
133
      public ConstStmtVisitor<TextNodeDumper>,
134
      public TypeVisitor<TextNodeDumper>,
135
      public ConstDeclVisitor<TextNodeDumper> {
136
  raw_ostream &OS;
137
  const bool ShowColors;
138
139
  /// Keep track of the last location we print out so that we can
140
  /// print out deltas from then on out.
141
  const char *LastLocFilename = "";
142
  unsigned LastLocLine = ~0U;
143
144
  /// \p Context, \p SM, and \p Traits can be null. This is because we want
145
  /// to be able to call \p dump() in a debugger without having to pass the
146
  /// \p ASTContext to \p dump. Not all parts of the AST dump output will be
147
  /// available without the \p ASTContext.
148
  const ASTContext *Context = nullptr;
149
  const SourceManager *SM = nullptr;
150
151
  /// The policy to use for printing; can be defaulted.
152
  PrintingPolicy PrintPolicy = LangOptions();
153
154
  const comments::CommandTraits *Traits = nullptr;
155
156
  const char *getCommandName(unsigned CommandID);
157
  void printFPOptions(FPOptionsOverride FPO);
158
159
  void dumpAPValueChildren(const APValue &Value, QualType Ty,
160
                           const APValue &(*IdxToChildFun)(const APValue &,
161
                                                           unsigned),
162
                           unsigned NumChildren, StringRef LabelSingular,
163
                           StringRef LabelPlurial);
164
165
public:
166
  TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors);
167
  TextNodeDumper(raw_ostream &OS, bool ShowColors);
168
169
  void Visit(const comments::Comment *C, const comments::FullComment *FC);
170
171
  void Visit(const Attr *A);
172
173
  void Visit(const TemplateArgument &TA, SourceRange R,
174
             const Decl *From = nullptr, StringRef Label = {});
175
176
  void Visit(const Stmt *Node);
177
178
  void Visit(const Type *T);
179
180
  void Visit(QualType T);
181
182
  void Visit(const Decl *D);
183
184
  void Visit(const CXXCtorInitializer *Init);
185
186
  void Visit(const OMPClause *C);
187
188
  void Visit(const BlockDecl::Capture &C);
189
190
  void Visit(const GenericSelectionExpr::ConstAssociation &A);
191
192
  void Visit(const concepts::Requirement *R);
193
194
  void Visit(const APValue &Value, QualType Ty);
195
196
  void dumpPointer(const void *Ptr);
197
  void dumpLocation(SourceLocation Loc);
198
  void dumpSourceRange(SourceRange R);
199
  void dumpBareType(QualType T, bool Desugar = true);
200
  void dumpType(QualType T);
201
  void dumpBareDeclRef(const Decl *D);
202
  void dumpName(const NamedDecl *ND);
203
  void dumpAccessSpecifier(AccessSpecifier AS);
204
  void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C);
205
206
  void dumpDeclRef(const Decl *D, StringRef Label = {});
207
208
  void visitTextComment(const comments::TextComment *C,
209
                        const comments::FullComment *);
210
  void visitInlineCommandComment(const comments::InlineCommandComment *C,
211
                                 const comments::FullComment *);
212
  void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C,
213
                                const comments::FullComment *);
214
  void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C,
215
                              const comments::FullComment *);
216
  void visitBlockCommandComment(const comments::BlockCommandComment *C,
217
                                const comments::FullComment *);
218
  void visitParamCommandComment(const comments::ParamCommandComment *C,
219
                                const comments::FullComment *FC);
220
  void visitTParamCommandComment(const comments::TParamCommandComment *C,
221
                                 const comments::FullComment *FC);
222
  void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C,
223
                                 const comments::FullComment *);
224
  void
225
  visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C,
226
                                const comments::FullComment *);
227
  void visitVerbatimLineComment(const comments::VerbatimLineComment *C,
228
                                const comments::FullComment *);
229
230
// Implements Visit methods for Attrs.
231
#include "clang/AST/AttrTextNodeDump.inc"
232
233
  void VisitNullTemplateArgument(const TemplateArgument &TA);
234
  void VisitTypeTemplateArgument(const TemplateArgument &TA);
235
  void VisitDeclarationTemplateArgument(const TemplateArgument &TA);
236
  void VisitNullPtrTemplateArgument(const TemplateArgument &TA);
237
  void VisitIntegralTemplateArgument(const TemplateArgument &TA);
238
  void VisitTemplateTemplateArgument(const TemplateArgument &TA);
239
  void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA);
240
  void VisitExpressionTemplateArgument(const TemplateArgument &TA);
241
  void VisitPackTemplateArgument(const TemplateArgument &TA);
242
243
  void VisitIfStmt(const IfStmt *Node);
244
  void VisitSwitchStmt(const SwitchStmt *Node);
245
  void VisitWhileStmt(const WhileStmt *Node);
246
  void VisitLabelStmt(const LabelStmt *Node);
247
  void VisitGotoStmt(const GotoStmt *Node);
248
  void VisitCaseStmt(const CaseStmt *Node);
249
  void VisitConstantExpr(const ConstantExpr *Node);
250
  void VisitCallExpr(const CallExpr *Node);
251
  void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node);
252
  void VisitCastExpr(const CastExpr *Node);
253
  void VisitImplicitCastExpr(const ImplicitCastExpr *Node);
254
  void VisitDeclRefExpr(const DeclRefExpr *Node);
255
  void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node);
256
  void VisitPredefinedExpr(const PredefinedExpr *Node);
257
  void VisitCharacterLiteral(const CharacterLiteral *Node);
258
  void VisitIntegerLiteral(const IntegerLiteral *Node);
259
  void VisitFixedPointLiteral(const FixedPointLiteral *Node);
260
  void VisitFloatingLiteral(const FloatingLiteral *Node);
261
  void VisitStringLiteral(const StringLiteral *Str);
262
  void VisitInitListExpr(const InitListExpr *ILE);
263
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E);
264
  void VisitUnaryOperator(const UnaryOperator *Node);
265
  void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node);
266
  void VisitMemberExpr(const MemberExpr *Node);
267
  void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node);
268
  void VisitBinaryOperator(const BinaryOperator *Node);
269
  void VisitCompoundAssignOperator(const CompoundAssignOperator *Node);
270
  void VisitAddrLabelExpr(const AddrLabelExpr *Node);
271
  void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node);
272
  void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node);
273
  void VisitCXXThisExpr(const CXXThisExpr *Node);
274
  void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node);
275
  void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node);
276
  void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node);
277
  void VisitCXXConstructExpr(const CXXConstructExpr *Node);
278
  void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node);
279
  void VisitCXXNewExpr(const CXXNewExpr *Node);
280
  void VisitCXXDeleteExpr(const CXXDeleteExpr *Node);
281
  void VisitTypeTraitExpr(const TypeTraitExpr *Node);
282
  void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node);
283
  void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node);
284
  void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node);
285
  void VisitExprWithCleanups(const ExprWithCleanups *Node);
286
  void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node);
287
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node);
288
  void
289
  VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node);
290
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node);
291
  void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node);
292
  void VisitObjCMessageExpr(const ObjCMessageExpr *Node);
293
  void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node);
294
  void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node);
295
  void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node);
296
  void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node);
297
  void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
298
  void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
299
  void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
300
  void VisitOMPIteratorExpr(const OMPIteratorExpr *Node);
301
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node);
302
  void VisitRequiresExpr(const RequiresExpr *Node);
303
304
  void VisitRValueReferenceType(const ReferenceType *T);
305
  void VisitArrayType(const ArrayType *T);
306
  void VisitConstantArrayType(const ConstantArrayType *T);
307
  void VisitVariableArrayType(const VariableArrayType *T);
308
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T);
309
  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T);
310
  void VisitVectorType(const VectorType *T);
311
  void VisitFunctionType(const FunctionType *T);
312
  void VisitFunctionProtoType(const FunctionProtoType *T);
313
  void VisitUnresolvedUsingType(const UnresolvedUsingType *T);
314
  void VisitUsingType(const UsingType *T);
315
  void VisitTypedefType(const TypedefType *T);
316
  void VisitUnaryTransformType(const UnaryTransformType *T);
317
  void VisitTagType(const TagType *T);
318
  void VisitTemplateTypeParmType(const TemplateTypeParmType *T);
319
  void VisitAutoType(const AutoType *T);
320
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T);
321
  void VisitInjectedClassNameType(const InjectedClassNameType *T);
322
  void VisitObjCInterfaceType(const ObjCInterfaceType *T);
323
  void VisitPackExpansionType(const PackExpansionType *T);
324
325
  void VisitLabelDecl(const LabelDecl *D);
326
  void VisitTypedefDecl(const TypedefDecl *D);
327
  void VisitEnumDecl(const EnumDecl *D);
328
  void VisitRecordDecl(const RecordDecl *D);
329
  void VisitEnumConstantDecl(const EnumConstantDecl *D);
330
  void VisitIndirectFieldDecl(const IndirectFieldDecl *D);
331
  void VisitFunctionDecl(const FunctionDecl *D);
332
  void VisitFieldDecl(const FieldDecl *D);
333
  void VisitVarDecl(const VarDecl *D);
334
  void VisitBindingDecl(const BindingDecl *D);
335
  void VisitCapturedDecl(const CapturedDecl *D);
336
  void VisitImportDecl(const ImportDecl *D);
337
  void VisitPragmaCommentDecl(const PragmaCommentDecl *D);
338
  void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D);
339
  void VisitOMPExecutableDirective(const OMPExecutableDirective *D);
340
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D);
341
  void VisitOMPRequiresDecl(const OMPRequiresDecl *D);
342
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D);
343
  void VisitNamespaceDecl(const NamespaceDecl *D);
344
  void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D);
345
  void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
346
  void VisitTypeAliasDecl(const TypeAliasDecl *D);
347
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D);
348
  void VisitCXXRecordDecl(const CXXRecordDecl *D);
349
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
350
  void VisitClassTemplateDecl(const ClassTemplateDecl *D);
351
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D);
352
  void VisitVarTemplateDecl(const VarTemplateDecl *D);
353
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
354
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
355
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
356
  void VisitUsingDecl(const UsingDecl *D);
357
  void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D);
358
  void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D);
359
  void VisitUsingEnumDecl(const UsingEnumDecl *D);
360
  void VisitUsingShadowDecl(const UsingShadowDecl *D);
361
  void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D);
362
  void VisitLinkageSpecDecl(const LinkageSpecDecl *D);
363
  void VisitAccessSpecDecl(const AccessSpecDecl *D);
364
  void VisitFriendDecl(const FriendDecl *D);
365
  void VisitObjCIvarDecl(const ObjCIvarDecl *D);
366
  void VisitObjCMethodDecl(const ObjCMethodDecl *D);
367
  void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D);
368
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D);
369
  void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D);
370
  void VisitObjCProtocolDecl(const ObjCProtocolDecl *D);
371
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D);
372
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D);
373
  void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D);
374
  void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
375
  void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
376
  void VisitBlockDecl(const BlockDecl *D);
377
  void VisitConceptDecl(const ConceptDecl *D);
378
  void
379
  VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D);
380
};
381
382
} // namespace clang
383
384
#endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H