Coverage Report

Created: 2021-08-24 07:12

/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
41.7k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
41.7k
    return AddChild("", DoAddChild);
53
41.7k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
22.9k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
22.9k
    return AddChild("", DoAddChild);
53
22.9k
  }
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
582
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
582
    return AddChild("", DoAddChild);
53
582
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
142
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
142
    return AddChild("", DoAddChild);
53
142
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
4.52k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
4.52k
    return AddChild("", DoAddChild);
53
4.52k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
290
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
290
    return AddChild("", DoAddChild);
53
290
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
1.98k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.98k
    return AddChild("", DoAddChild);
53
1.98k
  }
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
133
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
133
    return AddChild("", DoAddChild);
53
133
  }
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
135
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
135
    return AddChild("", DoAddChild);
53
135
  }
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
24
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
24
    return AddChild("", DoAddChild);
53
24
  }
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
593
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
593
    return AddChild("", DoAddChild);
53
593
  }
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.33k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.33k
    return AddChild("", DoAddChild);
53
1.33k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
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.25k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.25k
    return AddChild("", DoAddChild);
53
1.25k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16)
Line
Count
Source
51
104
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
104
    return AddChild("", DoAddChild);
53
104
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)
Line
Count
Source
51
12
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
12
    return AddChild("", DoAddChild);
53
12
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)
Line
Count
Source
51
12
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
12
    return AddChild("", DoAddChild);
53
12
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)
Line
Count
Source
51
12
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
12
    return AddChild("", DoAddChild);
53
12
  }
54
55
  /// Add a child of the current node with an optional label.
56
  /// Calls DoAddChild without arguments.
57
71.1k
  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
71.1k
    if (TopLevel) {
61
1.60k
      TopLevel = false;
62
1.60k
      DoAddChild();
63
2.93k
      while (!Pending.empty()) {
64
1.33k
        Pending.back()(true);
65
1.33k
        Pending.pop_back();
66
1.33k
      }
67
1.60k
      Prefix.clear();
68
1.60k
      OS << "\n";
69
1.60k
      TopLevel = true;
70
1.60k
      return;
71
1.60k
    }
72
73
69.5k
    auto DumpWithIndent = [this, DoAddChild,
74
69.5k
                           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
69.5k
      {
88
69.5k
        OS << '\n';
89
69.5k
        ColorScope Color(OS, ShowColors, IndentColor);
90
69.5k
        OS << Prefix << (IsLastChild ? 
'`'34.7k
:
'|'34.7k
) << '-';
91
69.5k
        if (!Label.empty())
92
533
          OS << Label << ": ";
93
94
69.5k
        this->Prefix.push_back(IsLastChild ? 
' '34.7k
:
'|'34.7k
);
95
69.5k
        this->Prefix.push_back(' ');
96
69.5k
      }
97
98
69.5k
      FirstChild = true;
99
69.5k
      unsigned Depth = Pending.size();
100
101
69.5k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
103k
      while (Depth < Pending.size()) {
106
33.4k
        Pending.back()(true);
107
33.4k
        this->Pending.pop_back();
108
33.4k
      }
109
110
      // Restore the old prefix.
111
69.5k
      this->Prefix.resize(Prefix.size() - 2);
112
69.5k
    };
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
582
                           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
582
      {
88
582
        OS << '\n';
89
582
        ColorScope Color(OS, ShowColors, IndentColor);
90
582
        OS << Prefix << (IsLastChild ? 
'`'128
:
'|'454
) << '-';
91
582
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
582
        this->Prefix.push_back(IsLastChild ? 
' '128
:
'|'454
);
95
582
        this->Prefix.push_back(' ');
96
582
      }
97
98
582
      FirstChild = true;
99
582
      unsigned Depth = Pending.size();
100
101
582
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.06k
      while (Depth < Pending.size()) {
106
480
        Pending.back()(true);
107
480
        this->Pending.pop_back();
108
480
      }
109
110
      // Restore the old prefix.
111
582
      this->Prefix.resize(Prefix.size() - 2);
112
582
    };
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
142
                           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
142
      {
88
142
        OS << '\n';
89
142
        ColorScope Color(OS, ShowColors, IndentColor);
90
142
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
142
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
142
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
142
        this->Prefix.push_back(' ');
96
142
      }
97
98
142
      FirstChild = true;
99
142
      unsigned Depth = Pending.size();
100
101
142
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
284
      while (Depth < Pending.size()) {
106
142
        Pending.back()(true);
107
142
        this->Pending.pop_back();
108
142
      }
109
110
      // Restore the old prefix.
111
142
      this->Prefix.resize(Prefix.size() - 2);
112
142
    };
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.49k
                           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.49k
      {
88
4.49k
        OS << '\n';
89
4.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
4.49k
        OS << Prefix << (IsLastChild ? 
'`'4.39k
:
'|'105
) << '-';
91
4.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
4.49k
        this->Prefix.push_back(IsLastChild ? 
' '4.39k
:
'|'105
);
95
4.49k
        this->Prefix.push_back(' ');
96
4.49k
      }
97
98
4.49k
      FirstChild = true;
99
4.49k
      unsigned Depth = Pending.size();
100
101
4.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
6.65k
      while (Depth < Pending.size()) {
106
2.15k
        Pending.back()(true);
107
2.15k
        this->Pending.pop_back();
108
2.15k
      }
109
110
      // Restore the old prefix.
111
4.49k
      this->Prefix.resize(Prefix.size() - 2);
112
4.49k
    };
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
290
                           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
290
      {
88
290
        OS << '\n';
89
290
        ColorScope Color(OS, ShowColors, IndentColor);
90
290
        OS << Prefix << (IsLastChild ? 
'`'57
:
'|'233
) << '-';
91
290
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
290
        this->Prefix.push_back(IsLastChild ? 
' '57
:
'|'233
);
95
290
        this->Prefix.push_back(' ');
96
290
      }
97
98
290
      FirstChild = true;
99
290
      unsigned Depth = Pending.size();
100
101
290
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
569
      while (Depth < Pending.size()) {
106
279
        Pending.back()(true);
107
279
        this->Pending.pop_back();
108
279
      }
109
110
      // Restore the old prefix.
111
290
      this->Prefix.resize(Prefix.size() - 2);
112
290
    };
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
1.98k
                           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.98k
      {
88
1.98k
        OS << '\n';
89
1.98k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.98k
        OS << Prefix << (IsLastChild ? 
'`'1.12k
:
'|'859
) << '-';
91
1.98k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.98k
        this->Prefix.push_back(IsLastChild ? 
' '1.12k
:
'|'859
);
95
1.98k
        this->Prefix.push_back(' ');
96
1.98k
      }
97
98
1.98k
      FirstChild = true;
99
1.98k
      unsigned Depth = Pending.size();
100
101
1.98k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.22k
      while (Depth < Pending.size()) {
106
240
        Pending.back()(true);
107
240
        this->Pending.pop_back();
108
240
      }
109
110
      // Restore the old prefix.
111
1.98k
      this->Prefix.resize(Prefix.size() - 2);
112
1.98k
    };
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
21.4k
                           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
21.4k
      {
88
21.4k
        OS << '\n';
89
21.4k
        ColorScope Color(OS, ShowColors, IndentColor);
90
21.4k
        OS << Prefix << (IsLastChild ? 
'`'6.17k
:
'|'15.3k
) << '-';
91
21.4k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
21.4k
        this->Prefix.push_back(IsLastChild ? 
' '6.17k
:
'|'15.3k
);
95
21.4k
        this->Prefix.push_back(' ');
96
21.4k
      }
97
98
21.4k
      FirstChild = true;
99
21.4k
      unsigned Depth = Pending.size();
100
101
21.4k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
33.4k
      while (Depth < Pending.size()) {
106
11.9k
        Pending.back()(true);
107
11.9k
        this->Pending.pop_back();
108
11.9k
      }
109
110
      // Restore the old prefix.
111
21.4k
      this->Prefix.resize(Prefix.size() - 2);
112
21.4k
    };
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
135
                           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
135
      {
88
135
        OS << '\n';
89
135
        ColorScope Color(OS, ShowColors, IndentColor);
90
135
        OS << Prefix << (IsLastChild ? 
'`'107
:
'|'28
) << '-';
91
135
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
135
        this->Prefix.push_back(IsLastChild ? 
' '107
:
'|'28
);
95
135
        this->Prefix.push_back(' ');
96
135
      }
97
98
135
      FirstChild = true;
99
135
      unsigned Depth = Pending.size();
100
101
135
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
137
      while (Depth < Pending.size()) {
106
2
        Pending.back()(true);
107
2
        this->Pending.pop_back();
108
2
      }
109
110
      // Restore the old prefix.
111
135
      this->Prefix.resize(Prefix.size() - 2);
112
135
    };
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
133
                           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
133
      {
88
133
        OS << '\n';
89
133
        ColorScope Color(OS, ShowColors, IndentColor);
90
133
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'131
) << '-';
91
133
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
133
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'131
);
95
133
        this->Prefix.push_back(' ');
96
133
      }
97
98
133
      FirstChild = true;
99
133
      unsigned Depth = Pending.size();
100
101
133
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
240
      while (Depth < Pending.size()) {
106
107
        Pending.back()(true);
107
107
        this->Pending.pop_back();
108
107
      }
109
110
      // Restore the old prefix.
111
133
      this->Prefix.resize(Prefix.size() - 2);
112
133
    };
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
24
                           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
      {
88
24
        OS << '\n';
89
24
        ColorScope Color(OS, ShowColors, IndentColor);
90
24
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
24
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
24
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
24
        this->Prefix.push_back(' ');
96
24
      }
97
98
24
      FirstChild = true;
99
24
      unsigned Depth = Pending.size();
100
101
24
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
48
      while (Depth < Pending.size()) {
106
24
        Pending.back()(true);
107
24
        this->Pending.pop_back();
108
24
      }
109
110
      // Restore the old prefix.
111
24
      this->Prefix.resize(Prefix.size() - 2);
112
24
    };
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
28.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
28.8k
      {
88
28.8k
        OS << '\n';
89
28.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
28.8k
        OS << Prefix << (IsLastChild ? 
'`'19.9k
:
'|'8.99k
) << '-';
91
28.8k
        if (!Label.empty())
92
20
          OS << Label << ": ";
93
94
28.8k
        this->Prefix.push_back(IsLastChild ? 
' '19.9k
:
'|'8.99k
);
95
28.8k
        this->Prefix.push_back(' ');
96
28.8k
      }
97
98
28.8k
      FirstChild = true;
99
28.8k
      unsigned Depth = Pending.size();
100
101
28.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
45.2k
      while (Depth < Pending.size()) {
106
16.3k
        Pending.back()(true);
107
16.3k
        this->Pending.pop_back();
108
16.3k
      }
109
110
      // Restore the old prefix.
111
28.8k
      this->Prefix.resize(Prefix.size() - 2);
112
28.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
514
                           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
514
      {
88
514
        OS << '\n';
89
514
        ColorScope Color(OS, ShowColors, IndentColor);
90
514
        OS << Prefix << (IsLastChild ? 
'`'369
:
'|'145
) << '-';
91
514
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
514
        this->Prefix.push_back(IsLastChild ? 
' '369
:
'|'145
);
95
514
        this->Prefix.push_back(' ');
96
514
      }
97
98
514
      FirstChild = true;
99
514
      unsigned Depth = Pending.size();
100
101
514
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
770
      while (Depth < Pending.size()) {
106
256
        Pending.back()(true);
107
256
        this->Pending.pop_back();
108
256
      }
109
110
      // Restore the old prefix.
111
514
      this->Prefix.resize(Prefix.size() - 2);
112
514
    };
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.33k
                           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.33k
      {
88
1.33k
        OS << '\n';
89
1.33k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.33k
        OS << Prefix << (IsLastChild ? 
'`'1.10k
:
'|'233
) << '-';
91
1.33k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.33k
        this->Prefix.push_back(IsLastChild ? 
' '1.10k
:
'|'233
);
95
1.33k
        this->Prefix.push_back(' ');
96
1.33k
      }
97
98
1.33k
      FirstChild = true;
99
1.33k
      unsigned Depth = Pending.size();
100
101
1.33k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.33k
      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.33k
      this->Prefix.resize(Prefix.size() - 2);
112
1.33k
    };
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
284
                           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
284
      {
88
284
        OS << '\n';
89
284
        ColorScope Color(OS, ShowColors, IndentColor);
90
284
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
284
        if (!Label.empty())
92
284
          OS << Label << ": ";
93
94
284
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
284
        this->Prefix.push_back(' ');
96
284
      }
97
98
284
      FirstChild = true;
99
284
      unsigned Depth = Pending.size();
100
101
284
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
284
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
284
      this->Prefix.resize(Prefix.size() - 2);
112
284
    };
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
87
                           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
87
      {
88
87
        OS << '\n';
89
87
        ColorScope Color(OS, ShowColors, IndentColor);
90
87
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
87
        if (!Label.empty())
92
87
          OS << Label << ": ";
93
94
87
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
87
        this->Prefix.push_back(' ');
96
87
      }
97
98
87
      FirstChild = true;
99
87
      unsigned Depth = Pending.size();
100
101
87
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
127
      while (Depth < Pending.size()) {
106
40
        Pending.back()(true);
107
40
        this->Pending.pop_back();
108
40
      }
109
110
      // Restore the old prefix.
111
87
      this->Prefix.resize(Prefix.size() - 2);
112
87
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      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.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'1.25k
) << '-';
91
1.25k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'1.25k
);
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.51k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
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
104
                           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
104
      {
88
104
        OS << '\n';
89
104
        ColorScope Color(OS, ShowColors, IndentColor);
90
104
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
104
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
104
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
104
        this->Prefix.push_back(' ');
96
104
      }
97
98
104
      FirstChild = true;
99
104
      unsigned Depth = Pending.size();
100
101
104
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
104
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
104
      this->Prefix.resize(Prefix.size() - 2);
112
104
    };
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
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
0
          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
12
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
12
      this->Prefix.resize(Prefix.size() - 2);
112
12
    };
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
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
0
          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
12
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
12
      this->Prefix.resize(Prefix.size() - 2);
112
12
    };
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
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
0
          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
12
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
12
      this->Prefix.resize(Prefix.size() - 2);
112
12
    };
113
114
69.5k
    if (FirstChild) {
115
34.7k
      Pending.push_back(std::move(DumpWithIndent));
116
34.7k
    } else {
117
34.7k
      Pending.back()(false);
118
34.7k
      Pending.back() = std::move(DumpWithIndent);
119
34.7k
    }
120
69.5k
    FirstChild = false;
121
69.5k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
22.9k
  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
22.9k
    if (TopLevel) {
61
1.47k
      TopLevel = false;
62
1.47k
      DoAddChild();
63
2.70k
      while (!Pending.empty()) {
64
1.22k
        Pending.back()(true);
65
1.22k
        Pending.pop_back();
66
1.22k
      }
67
1.47k
      Prefix.clear();
68
1.47k
      OS << "\n";
69
1.47k
      TopLevel = true;
70
1.47k
      return;
71
1.47k
    }
72
73
21.4k
    auto DumpWithIndent = [this, DoAddChild,
74
21.4k
                           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
21.4k
      {
88
21.4k
        OS << '\n';
89
21.4k
        ColorScope Color(OS, ShowColors, IndentColor);
90
21.4k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
21.4k
        if (!Label.empty())
92
21.4k
          OS << Label << ": ";
93
94
21.4k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
21.4k
        this->Prefix.push_back(' ');
96
21.4k
      }
97
98
21.4k
      FirstChild = true;
99
21.4k
      unsigned Depth = Pending.size();
100
101
21.4k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
21.4k
      while (Depth < Pending.size()) {
106
21.4k
        Pending.back()(true);
107
21.4k
        this->Pending.pop_back();
108
21.4k
      }
109
110
      // Restore the old prefix.
111
21.4k
      this->Prefix.resize(Prefix.size() - 2);
112
21.4k
    };
113
114
21.4k
    if (FirstChild) {
115
5.49k
      Pending.push_back(std::move(DumpWithIndent));
116
16.0k
    } else {
117
16.0k
      Pending.back()(false);
118
16.0k
      Pending.back() = std::move(DumpWithIndent);
119
16.0k
    }
120
21.4k
    FirstChild = false;
121
21.4k
  }
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
582
  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
582
    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
582
    auto DumpWithIndent = [this, DoAddChild,
74
582
                           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
582
      {
88
582
        OS << '\n';
89
582
        ColorScope Color(OS, ShowColors, IndentColor);
90
582
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
582
        if (!Label.empty())
92
582
          OS << Label << ": ";
93
94
582
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
582
        this->Prefix.push_back(' ');
96
582
      }
97
98
582
      FirstChild = true;
99
582
      unsigned Depth = Pending.size();
100
101
582
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
582
      while (Depth < Pending.size()) {
106
582
        Pending.back()(true);
107
582
        this->Pending.pop_back();
108
582
      }
109
110
      // Restore the old prefix.
111
582
      this->Prefix.resize(Prefix.size() - 2);
112
582
    };
113
114
582
    if (FirstChild) {
115
303
      Pending.push_back(std::move(DumpWithIndent));
116
303
    } else {
117
279
      Pending.back()(false);
118
279
      Pending.back() = std::move(DumpWithIndent);
119
279
    }
120
582
    FirstChild = false;
121
582
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
142
  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
142
    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
142
    auto DumpWithIndent = [this, DoAddChild,
74
142
                           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
142
      {
88
142
        OS << '\n';
89
142
        ColorScope Color(OS, ShowColors, IndentColor);
90
142
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
142
        if (!Label.empty())
92
142
          OS << Label << ": ";
93
94
142
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
142
        this->Prefix.push_back(' ');
96
142
      }
97
98
142
      FirstChild = true;
99
142
      unsigned Depth = Pending.size();
100
101
142
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
142
      while (Depth < Pending.size()) {
106
142
        Pending.back()(true);
107
142
        this->Pending.pop_back();
108
142
      }
109
110
      // Restore the old prefix.
111
142
      this->Prefix.resize(Prefix.size() - 2);
112
142
    };
113
114
142
    if (FirstChild) {
115
36
      Pending.push_back(std::move(DumpWithIndent));
116
106
    } else {
117
106
      Pending.back()(false);
118
106
      Pending.back() = std::move(DumpWithIndent);
119
106
    }
120
142
    FirstChild = false;
121
142
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
4.52k
  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.52k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
4.49k
                           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.49k
      {
88
4.49k
        OS << '\n';
89
4.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
4.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
4.49k
        if (!Label.empty())
92
4.49k
          OS << Label << ": ";
93
94
4.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
4.49k
        this->Prefix.push_back(' ');
96
4.49k
      }
97
98
4.49k
      FirstChild = true;
99
4.49k
      unsigned Depth = Pending.size();
100
101
4.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
4.49k
      while (Depth < Pending.size()) {
106
4.49k
        Pending.back()(true);
107
4.49k
        this->Pending.pop_back();
108
4.49k
      }
109
110
      // Restore the old prefix.
111
4.49k
      this->Prefix.resize(Prefix.size() - 2);
112
4.49k
    };
113
114
4.49k
    if (FirstChild) {
115
4.34k
      Pending.push_back(std::move(DumpWithIndent));
116
4.34k
    } else {
117
154
      Pending.back()(false);
118
154
      Pending.back() = std::move(DumpWithIndent);
119
154
    }
120
4.49k
    FirstChild = false;
121
4.49k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
290
  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
290
    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
290
    auto DumpWithIndent = [this, DoAddChild,
74
290
                           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
290
      {
88
290
        OS << '\n';
89
290
        ColorScope Color(OS, ShowColors, IndentColor);
90
290
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
290
        if (!Label.empty())
92
290
          OS << Label << ": ";
93
94
290
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
290
        this->Prefix.push_back(' ');
96
290
      }
97
98
290
      FirstChild = true;
99
290
      unsigned Depth = Pending.size();
100
101
290
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
290
      while (Depth < Pending.size()) {
106
290
        Pending.back()(true);
107
290
        this->Pending.pop_back();
108
290
      }
109
110
      // Restore the old prefix.
111
290
      this->Prefix.resize(Prefix.size() - 2);
112
290
    };
113
114
290
    if (FirstChild) {
115
220
      Pending.push_back(std::move(DumpWithIndent));
116
220
    } else {
117
70
      Pending.back()(false);
118
70
      Pending.back() = std::move(DumpWithIndent);
119
70
    }
120
290
    FirstChild = false;
121
290
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
1.98k
  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.98k
    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.98k
    auto DumpWithIndent = [this, DoAddChild,
74
1.98k
                           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.98k
      {
88
1.98k
        OS << '\n';
89
1.98k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.98k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.98k
        if (!Label.empty())
92
1.98k
          OS << Label << ": ";
93
94
1.98k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.98k
        this->Prefix.push_back(' ');
96
1.98k
      }
97
98
1.98k
      FirstChild = true;
99
1.98k
      unsigned Depth = Pending.size();
100
101
1.98k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.98k
      while (Depth < Pending.size()) {
106
1.98k
        Pending.back()(true);
107
1.98k
        this->Pending.pop_back();
108
1.98k
      }
109
110
      // Restore the old prefix.
111
1.98k
      this->Prefix.resize(Prefix.size() - 2);
112
1.98k
    };
113
114
1.98k
    if (FirstChild) {
115
962
      Pending.push_back(std::move(DumpWithIndent));
116
1.02k
    } else {
117
1.02k
      Pending.back()(false);
118
1.02k
      Pending.back() = std::move(DumpWithIndent);
119
1.02k
    }
120
1.98k
    FirstChild = false;
121
1.98k
  }
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
133
  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
133
    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
133
    auto DumpWithIndent = [this, DoAddChild,
74
133
                           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
133
      {
88
133
        OS << '\n';
89
133
        ColorScope Color(OS, ShowColors, IndentColor);
90
133
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
133
        if (!Label.empty())
92
133
          OS << Label << ": ";
93
94
133
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
133
        this->Prefix.push_back(' ');
96
133
      }
97
98
133
      FirstChild = true;
99
133
      unsigned Depth = Pending.size();
100
101
133
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
133
      while (Depth < Pending.size()) {
106
133
        Pending.back()(true);
107
133
        this->Pending.pop_back();
108
133
      }
109
110
      // Restore the old prefix.
111
133
      this->Prefix.resize(Prefix.size() - 2);
112
133
    };
113
114
133
    if (FirstChild) {
115
7
      Pending.push_back(std::move(DumpWithIndent));
116
126
    } else {
117
126
      Pending.back()(false);
118
126
      Pending.back() = std::move(DumpWithIndent);
119
126
    }
120
133
    FirstChild = false;
121
133
  }
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
135
  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
135
    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
135
    auto DumpWithIndent = [this, DoAddChild,
74
135
                           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
135
      {
88
135
        OS << '\n';
89
135
        ColorScope Color(OS, ShowColors, IndentColor);
90
135
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
135
        if (!Label.empty())
92
135
          OS << Label << ": ";
93
94
135
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
135
        this->Prefix.push_back(' ');
96
135
      }
97
98
135
      FirstChild = true;
99
135
      unsigned Depth = Pending.size();
100
101
135
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
135
      while (Depth < Pending.size()) {
106
135
        Pending.back()(true);
107
135
        this->Pending.pop_back();
108
135
      }
109
110
      // Restore the old prefix.
111
135
      this->Prefix.resize(Prefix.size() - 2);
112
135
    };
113
114
135
    if (FirstChild) {
115
107
      Pending.push_back(std::move(DumpWithIndent));
116
107
    } else {
117
28
      Pending.back()(false);
118
28
      Pending.back() = std::move(DumpWithIndent);
119
28
    }
120
135
    FirstChild = false;
121
135
  }
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
24
  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
24
    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
24
    auto DumpWithIndent = [this, DoAddChild,
74
24
                           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
      {
88
24
        OS << '\n';
89
24
        ColorScope Color(OS, ShowColors, IndentColor);
90
24
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
24
        if (!Label.empty())
92
24
          OS << Label << ": ";
93
94
24
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
24
        this->Prefix.push_back(' ');
96
24
      }
97
98
24
      FirstChild = true;
99
24
      unsigned Depth = Pending.size();
100
101
24
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
24
      while (Depth < Pending.size()) {
106
24
        Pending.back()(true);
107
24
        this->Pending.pop_back();
108
24
      }
109
110
      // Restore the old prefix.
111
24
      this->Prefix.resize(Prefix.size() - 2);
112
24
    };
113
114
24
    if (FirstChild) {
115
18
      Pending.push_back(std::move(DumpWithIndent));
116
18
    } else {
117
6
      Pending.back()(false);
118
6
      Pending.back() = std::move(DumpWithIndent);
119
6
    }
120
24
    FirstChild = false;
121
24
  }
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
28.9k
  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
28.9k
    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
28.8k
    auto DumpWithIndent = [this, DoAddChild,
74
28.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
28.8k
      {
88
28.8k
        OS << '\n';
89
28.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
28.8k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
28.8k
        if (!Label.empty())
92
28.8k
          OS << Label << ": ";
93
94
28.8k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
28.8k
        this->Prefix.push_back(' ');
96
28.8k
      }
97
98
28.8k
      FirstChild = true;
99
28.8k
      unsigned Depth = Pending.size();
100
101
28.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
28.8k
      while (Depth < Pending.size()) {
106
28.8k
        Pending.back()(true);
107
28.8k
        this->Pending.pop_back();
108
28.8k
      }
109
110
      // Restore the old prefix.
111
28.8k
      this->Prefix.resize(Prefix.size() - 2);
112
28.8k
    };
113
114
28.8k
    if (FirstChild) {
115
18.7k
      Pending.push_back(std::move(DumpWithIndent));
116
18.7k
    } else {
117
10.1k
      Pending.back()(false);
118
10.1k
      Pending.back() = std::move(DumpWithIndent);
119
10.1k
    }
120
28.8k
    FirstChild = false;
121
28.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
593
  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
593
    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
514
    auto DumpWithIndent = [this, DoAddChild,
74
514
                           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
514
      {
88
514
        OS << '\n';
89
514
        ColorScope Color(OS, ShowColors, IndentColor);
90
514
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
514
        if (!Label.empty())
92
514
          OS << Label << ": ";
93
94
514
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
514
        this->Prefix.push_back(' ');
96
514
      }
97
98
514
      FirstChild = true;
99
514
      unsigned Depth = Pending.size();
100
101
514
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
514
      while (Depth < Pending.size()) {
106
514
        Pending.back()(true);
107
514
        this->Pending.pop_back();
108
514
      }
109
110
      // Restore the old prefix.
111
514
      this->Prefix.resize(Prefix.size() - 2);
112
514
    };
113
114
514
    if (FirstChild) {
115
359
      Pending.push_back(std::move(DumpWithIndent));
116
359
    } else {
117
155
      Pending.back()(false);
118
155
      Pending.back() = std::move(DumpWithIndent);
119
155
    }
120
514
    FirstChild = false;
121
514
  }
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.33k
  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.33k
    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.33k
    auto DumpWithIndent = [this, DoAddChild,
74
1.33k
                           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.33k
      {
88
1.33k
        OS << '\n';
89
1.33k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.33k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.33k
        if (!Label.empty())
92
1.33k
          OS << Label << ": ";
93
94
1.33k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.33k
        this->Prefix.push_back(' ');
96
1.33k
      }
97
98
1.33k
      FirstChild = true;
99
1.33k
      unsigned Depth = Pending.size();
100
101
1.33k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.33k
      while (Depth < Pending.size()) {
106
1.33k
        Pending.back()(true);
107
1.33k
        this->Pending.pop_back();
108
1.33k
      }
109
110
      // Restore the old prefix.
111
1.33k
      this->Prefix.resize(Prefix.size() - 2);
112
1.33k
    };
113
114
1.33k
    if (FirstChild) {
115
1.16k
      Pending.push_back(std::move(DumpWithIndent));
116
1.16k
    } else {
117
171
      Pending.back()(false);
118
171
      Pending.back() = std::move(DumpWithIndent);
119
171
    }
120
1.33k
    FirstChild = false;
121
1.33k
  }
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
284
  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
284
    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
284
    auto DumpWithIndent = [this, DoAddChild,
74
284
                           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
284
      {
88
284
        OS << '\n';
89
284
        ColorScope Color(OS, ShowColors, IndentColor);
90
284
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
284
        if (!Label.empty())
92
284
          OS << Label << ": ";
93
94
284
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
284
        this->Prefix.push_back(' ');
96
284
      }
97
98
284
      FirstChild = true;
99
284
      unsigned Depth = Pending.size();
100
101
284
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
284
      while (Depth < Pending.size()) {
106
284
        Pending.back()(true);
107
284
        this->Pending.pop_back();
108
284
      }
109
110
      // Restore the old prefix.
111
284
      this->Prefix.resize(Prefix.size() - 2);
112
284
    };
113
114
284
    if (FirstChild) {
115
284
      Pending.push_back(std::move(DumpWithIndent));
116
284
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
284
    FirstChild = false;
121
284
  }
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
87
  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
87
    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
87
    auto DumpWithIndent = [this, DoAddChild,
74
87
                           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
87
      {
88
87
        OS << '\n';
89
87
        ColorScope Color(OS, ShowColors, IndentColor);
90
87
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
87
        if (!Label.empty())
92
87
          OS << Label << ": ";
93
94
87
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
87
        this->Prefix.push_back(' ');
96
87
      }
97
98
87
      FirstChild = true;
99
87
      unsigned Depth = Pending.size();
100
101
87
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
87
      while (Depth < Pending.size()) {
106
87
        Pending.back()(true);
107
87
        this->Pending.pop_back();
108
87
      }
109
110
      // Restore the old prefix.
111
87
      this->Prefix.resize(Prefix.size() - 2);
112
87
    };
113
114
87
    if (FirstChild) {
115
87
      Pending.push_back(std::move(DumpWithIndent));
116
87
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
87
    FirstChild = false;
121
87
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
1.25k
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1
      Pending.back()(false);
118
1
      Pending.back() = std::move(DumpWithIndent);
119
1
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
1.25k
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1.25k
      Pending.back()(false);
118
1.25k
      Pending.back() = std::move(DumpWithIndent);
119
1.25k
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1.25k
      Pending.back()(false);
118
1.25k
      Pending.back() = std::move(DumpWithIndent);
119
1.25k
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1.25k
      Pending.back()(false);
118
1.25k
      Pending.back() = std::move(DumpWithIndent);
119
1.25k
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1.25k
      Pending.back()(false);
118
1.25k
      Pending.back() = std::move(DumpWithIndent);
119
1.25k
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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.25k
  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.25k
    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.25k
    auto DumpWithIndent = [this, DoAddChild,
74
1.25k
                           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.25k
      {
88
1.25k
        OS << '\n';
89
1.25k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.25k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.25k
        if (!Label.empty())
92
1.25k
          OS << Label << ": ";
93
94
1.25k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.25k
        this->Prefix.push_back(' ');
96
1.25k
      }
97
98
1.25k
      FirstChild = true;
99
1.25k
      unsigned Depth = Pending.size();
100
101
1.25k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.25k
      while (Depth < Pending.size()) {
106
1.25k
        Pending.back()(true);
107
1.25k
        this->Pending.pop_back();
108
1.25k
      }
109
110
      // Restore the old prefix.
111
1.25k
      this->Prefix.resize(Prefix.size() - 2);
112
1.25k
    };
113
114
1.25k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.25k
    } else {
117
1.25k
      Pending.back()(false);
118
1.25k
      Pending.back() = std::move(DumpWithIndent);
119
1.25k
    }
120
1.25k
    FirstChild = false;
121
1.25k
  }
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
104
  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
104
    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
104
    auto DumpWithIndent = [this, DoAddChild,
74
104
                           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
104
      {
88
104
        OS << '\n';
89
104
        ColorScope Color(OS, ShowColors, IndentColor);
90
104
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
104
        if (!Label.empty())
92
104
          OS << Label << ": ";
93
94
104
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
104
        this->Prefix.push_back(' ');
96
104
      }
97
98
104
      FirstChild = true;
99
104
      unsigned Depth = Pending.size();
100
101
104
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
104
      while (Depth < Pending.size()) {
106
104
        Pending.back()(true);
107
104
        this->Pending.pop_back();
108
104
      }
109
110
      // Restore the old prefix.
111
104
      this->Prefix.resize(Prefix.size() - 2);
112
104
    };
113
114
104
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
104
    } else {
117
104
      Pending.back()(false);
118
104
      Pending.back() = std::move(DumpWithIndent);
119
104
    }
120
104
    FirstChild = false;
121
104
  }
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
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
12
      Pending.push_back(std::move(DumpWithIndent));
116
12
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
12
    FirstChild = false;
121
12
  }
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
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
0
      Pending.push_back(std::move(DumpWithIndent));
116
12
    } else {
117
12
      Pending.back()(false);
118
12
      Pending.back() = std::move(DumpWithIndent);
119
12
    }
120
12
    FirstChild = false;
121
12
  }
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
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
0
      Pending.push_back(std::move(DumpWithIndent));
116
12
    } else {
117
12
      Pending.back()(false);
118
12
      Pending.back() = std::move(DumpWithIndent);
119
12
    }
120
12
    FirstChild = false;
121
12
  }
122
123
  TextTreeStructure(raw_ostream &OS, bool ShowColors)
124
1.68k
      : 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 VisitTypedefType(const TypedefType *T);
315
  void VisitUnaryTransformType(const UnaryTransformType *T);
316
  void VisitTagType(const TagType *T);
317
  void VisitTemplateTypeParmType(const TemplateTypeParmType *T);
318
  void VisitAutoType(const AutoType *T);
319
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T);
320
  void VisitInjectedClassNameType(const InjectedClassNameType *T);
321
  void VisitObjCInterfaceType(const ObjCInterfaceType *T);
322
  void VisitPackExpansionType(const PackExpansionType *T);
323
324
  void VisitLabelDecl(const LabelDecl *D);
325
  void VisitTypedefDecl(const TypedefDecl *D);
326
  void VisitEnumDecl(const EnumDecl *D);
327
  void VisitRecordDecl(const RecordDecl *D);
328
  void VisitEnumConstantDecl(const EnumConstantDecl *D);
329
  void VisitIndirectFieldDecl(const IndirectFieldDecl *D);
330
  void VisitFunctionDecl(const FunctionDecl *D);
331
  void VisitFieldDecl(const FieldDecl *D);
332
  void VisitVarDecl(const VarDecl *D);
333
  void VisitBindingDecl(const BindingDecl *D);
334
  void VisitCapturedDecl(const CapturedDecl *D);
335
  void VisitImportDecl(const ImportDecl *D);
336
  void VisitPragmaCommentDecl(const PragmaCommentDecl *D);
337
  void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D);
338
  void VisitOMPExecutableDirective(const OMPExecutableDirective *D);
339
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D);
340
  void VisitOMPRequiresDecl(const OMPRequiresDecl *D);
341
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D);
342
  void VisitNamespaceDecl(const NamespaceDecl *D);
343
  void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D);
344
  void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
345
  void VisitTypeAliasDecl(const TypeAliasDecl *D);
346
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D);
347
  void VisitCXXRecordDecl(const CXXRecordDecl *D);
348
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
349
  void VisitClassTemplateDecl(const ClassTemplateDecl *D);
350
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D);
351
  void VisitVarTemplateDecl(const VarTemplateDecl *D);
352
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
353
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
354
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
355
  void VisitUsingDecl(const UsingDecl *D);
356
  void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D);
357
  void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D);
358
  void VisitUsingEnumDecl(const UsingEnumDecl *D);
359
  void VisitUsingShadowDecl(const UsingShadowDecl *D);
360
  void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D);
361
  void VisitLinkageSpecDecl(const LinkageSpecDecl *D);
362
  void VisitAccessSpecDecl(const AccessSpecDecl *D);
363
  void VisitFriendDecl(const FriendDecl *D);
364
  void VisitObjCIvarDecl(const ObjCIvarDecl *D);
365
  void VisitObjCMethodDecl(const ObjCMethodDecl *D);
366
  void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D);
367
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D);
368
  void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D);
369
  void VisitObjCProtocolDecl(const ObjCProtocolDecl *D);
370
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D);
371
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D);
372
  void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D);
373
  void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
374
  void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
375
  void VisitBlockDecl(const BlockDecl *D);
376
  void VisitConceptDecl(const ConceptDecl *D);
377
  void
378
  VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D);
379
};
380
381
} // namespace clang
382
383
#endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H