Coverage Report

Created: 2022-07-16 07:03

/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
49.5k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
49.5k
    return AddChild("", DoAddChild);
53
49.5k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
26.9k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
26.9k
    return AddChild("", DoAddChild);
53
26.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
855
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
855
    return AddChild("", DoAddChild);
53
855
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
191
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
191
    return AddChild("", DoAddChild);
53
191
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
5.45k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
5.45k
    return AddChild("", DoAddChild);
53
5.45k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
420
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
420
    return AddChild("", DoAddChild);
53
420
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
2.44k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
2.44k
    return AddChild("", DoAddChild);
53
2.44k
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)
Line
Count
Source
51
7
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
7
    return AddChild("", DoAddChild);
53
7
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())
Line
Count
Source
51
132
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
132
    return AddChild("", DoAddChild);
53
132
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
51
134
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
134
    return AddChild("", DoAddChild);
53
134
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())
Line
Count
Source
51
5
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
5
    return AddChild("", DoAddChild);
53
5
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
26
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
26
    return AddChild("", DoAddChild);
53
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
26
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
26
    return AddChild("", DoAddChild);
53
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
8
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
8
    return AddChild("", DoAddChild);
53
8
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::comments::Comment const*, clang::comments::FullComment const*)::'lambda'()>(clang::ASTDumper)
Line
Count
Source
51
647
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
647
    return AddChild("", DoAddChild);
53
647
  }
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.59k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.59k
    return AddChild("", DoAddChild);
53
1.59k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
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.49k
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
1.49k
    return AddChild("", DoAddChild);
53
1.49k
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16>(clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_16)
Line
Count
Source
51
118
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
118
    return AddChild("", DoAddChild);
53
118
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)
Line
Count
Source
51
15
  template <typename Fn> void AddChild(Fn DoAddChild) {
52
15
    return AddChild("", DoAddChild);
53
15
  }
54
55
  /// Add a child of the current node with an optional label.
56
  /// Calls DoAddChild without arguments.
57
85.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
85.9k
    if (TopLevel) {
61
1.81k
      TopLevel = false;
62
1.81k
      DoAddChild();
63
3.35k
      while (!Pending.empty()) {
64
1.54k
        Pending.back()(true);
65
1.54k
        Pending.pop_back();
66
1.54k
      }
67
1.81k
      Prefix.clear();
68
1.81k
      OS << "\n";
69
1.81k
      TopLevel = true;
70
1.81k
      return;
71
1.81k
    }
72
73
84.1k
    auto DumpWithIndent = [this, DoAddChild,
74
84.1k
                           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
84.1k
      {
88
84.1k
        OS << '\n';
89
84.1k
        ColorScope Color(OS, ShowColors, IndentColor);
90
84.1k
        OS << Prefix << (IsLastChild ? 
'`'42.4k
:
'|'41.7k
) << '-';
91
84.1k
        if (!Label.empty())
92
613
          OS << Label << ": ";
93
94
84.1k
        this->Prefix.push_back(IsLastChild ? 
' '42.4k
:
'|'41.7k
);
95
84.1k
        this->Prefix.push_back(' ');
96
84.1k
      }
97
98
84.1k
      FirstChild = true;
99
84.1k
      unsigned Depth = Pending.size();
100
101
84.1k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
125k
      while (Depth < Pending.size()) {
106
40.8k
        Pending.back()(true);
107
40.8k
        this->Pending.pop_back();
108
40.8k
      }
109
110
      // Restore the old prefix.
111
84.1k
      this->Prefix.resize(Prefix.size() - 2);
112
84.1k
    };
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
855
                           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
855
      {
88
855
        OS << '\n';
89
855
        ColorScope Color(OS, ShowColors, IndentColor);
90
855
        OS << Prefix << (IsLastChild ? 
'`'220
:
'|'635
) << '-';
91
855
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
855
        this->Prefix.push_back(IsLastChild ? 
' '220
:
'|'635
);
95
855
        this->Prefix.push_back(' ');
96
855
      }
97
98
855
      FirstChild = true;
99
855
      unsigned Depth = Pending.size();
100
101
855
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.54k
      while (Depth < Pending.size()) {
106
691
        Pending.back()(true);
107
691
        this->Pending.pop_back();
108
691
      }
109
110
      // Restore the old prefix.
111
855
      this->Prefix.resize(Prefix.size() - 2);
112
855
    };
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
191
                           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
191
      {
88
191
        OS << '\n';
89
191
        ColorScope Color(OS, ShowColors, IndentColor);
90
191
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
191
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
191
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
191
        this->Prefix.push_back(' ');
96
191
      }
97
98
191
      FirstChild = true;
99
191
      unsigned Depth = Pending.size();
100
101
191
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
382
      while (Depth < Pending.size()) {
106
191
        Pending.back()(true);
107
191
        this->Pending.pop_back();
108
191
      }
109
110
      // Restore the old prefix.
111
191
      this->Prefix.resize(Prefix.size() - 2);
112
191
    };
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
5.42k
                           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.42k
      {
88
5.42k
        OS << '\n';
89
5.42k
        ColorScope Color(OS, ShowColors, IndentColor);
90
5.42k
        OS << Prefix << (IsLastChild ? 
'`'5.22k
:
'|'209
) << '-';
91
5.42k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
5.42k
        this->Prefix.push_back(IsLastChild ? 
' '5.22k
:
'|'209
);
95
5.42k
        this->Prefix.push_back(' ');
96
5.42k
      }
97
98
5.42k
      FirstChild = true;
99
5.42k
      unsigned Depth = Pending.size();
100
101
5.42k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
8.13k
      while (Depth < Pending.size()) {
106
2.70k
        Pending.back()(true);
107
2.70k
        this->Pending.pop_back();
108
2.70k
      }
109
110
      // Restore the old prefix.
111
5.42k
      this->Prefix.resize(Prefix.size() - 2);
112
5.42k
    };
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
420
                           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
420
      {
88
420
        OS << '\n';
89
420
        ColorScope Color(OS, ShowColors, IndentColor);
90
420
        OS << Prefix << (IsLastChild ? 
'`'65
:
'|'355
) << '-';
91
420
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
420
        this->Prefix.push_back(IsLastChild ? 
' '65
:
'|'355
);
95
420
        this->Prefix.push_back(' ');
96
420
      }
97
98
420
      FirstChild = true;
99
420
      unsigned Depth = Pending.size();
100
101
420
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
777
      while (Depth < Pending.size()) {
106
357
        Pending.back()(true);
107
357
        this->Pending.pop_back();
108
357
      }
109
110
      // Restore the old prefix.
111
420
      this->Prefix.resize(Prefix.size() - 2);
112
420
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
2.44k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
2.44k
      {
88
2.44k
        OS << '\n';
89
2.44k
        ColorScope Color(OS, ShowColors, IndentColor);
90
2.44k
        OS << Prefix << (IsLastChild ? 
'`'1.44k
:
'|'1.00k
) << '-';
91
2.44k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
2.44k
        this->Prefix.push_back(IsLastChild ? 
' '1.44k
:
'|'1.00k
);
95
2.44k
        this->Prefix.push_back(' ');
96
2.44k
      }
97
98
2.44k
      FirstChild = true;
99
2.44k
      unsigned Depth = Pending.size();
100
101
2.44k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.82k
      while (Depth < Pending.size()) {
106
383
        Pending.back()(true);
107
383
        this->Pending.pop_back();
108
383
      }
109
110
      // Restore the old prefix.
111
2.44k
      this->Prefix.resize(Prefix.size() - 2);
112
2.44k
    };
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
25.2k
                           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
25.2k
      {
88
25.2k
        OS << '\n';
89
25.2k
        ColorScope Color(OS, ShowColors, IndentColor);
90
25.2k
        OS << Prefix << (IsLastChild ? 
'`'7.29k
:
'|'17.9k
) << '-';
91
25.2k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
25.2k
        this->Prefix.push_back(IsLastChild ? 
' '7.29k
:
'|'17.9k
);
95
25.2k
        this->Prefix.push_back(' ');
96
25.2k
      }
97
98
25.2k
      FirstChild = true;
99
25.2k
      unsigned Depth = Pending.size();
100
101
25.2k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
39.3k
      while (Depth < Pending.size()) {
106
14.0k
        Pending.back()(true);
107
14.0k
        this->Pending.pop_back();
108
14.0k
      }
109
110
      // Restore the old prefix.
111
25.2k
      this->Prefix.resize(Prefix.size() - 2);
112
25.2k
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
134
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
134
      {
88
134
        OS << '\n';
89
134
        ColorScope Color(OS, ShowColors, IndentColor);
90
134
        OS << Prefix << (IsLastChild ? 
'`'106
:
'|'28
) << '-';
91
134
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
134
        this->Prefix.push_back(IsLastChild ? 
' '106
:
'|'28
);
95
134
        this->Prefix.push_back(' ');
96
134
      }
97
98
134
      FirstChild = true;
99
134
      unsigned Depth = Pending.size();
100
101
134
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
136
      while (Depth < Pending.size()) {
106
2
        Pending.back()(true);
107
2
        this->Pending.pop_back();
108
2
      }
109
110
      // Restore the old prefix.
111
134
      this->Prefix.resize(Prefix.size() - 2);
112
134
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
132
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
132
      {
88
132
        OS << '\n';
89
132
        ColorScope Color(OS, ShowColors, IndentColor);
90
132
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'130
) << '-';
91
132
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
132
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'130
);
95
132
        this->Prefix.push_back(' ');
96
132
      }
97
98
132
      FirstChild = true;
99
132
      unsigned Depth = Pending.size();
100
101
132
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
238
      while (Depth < Pending.size()) {
106
106
        Pending.back()(true);
107
106
        this->Pending.pop_back();
108
106
      }
109
110
      // Restore the old prefix.
111
132
      this->Prefix.resize(Prefix.size() - 2);
112
132
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
5
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
5
      {
88
5
        OS << '\n';
89
5
        ColorScope Color(OS, ShowColors, IndentColor);
90
5
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
5
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
5
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
5
        this->Prefix.push_back(' ');
96
5
      }
97
98
5
      FirstChild = true;
99
5
      unsigned Depth = Pending.size();
100
101
5
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
5
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
5
      this->Prefix.resize(Prefix.size() - 2);
112
5
    };
Unexecuted instantiation: ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)::'lambda'(bool)::operator()(bool) const
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? 
'`'24
:
'|'2
) << '-';
91
26
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? 
' '24
:
'|'2
);
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
52
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::GenericSelectionExpr::AssociationTy<true> const&)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? 
'`'14
:
'|'12
) << '-';
91
26
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? 
' '14
:
'|'12
);
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
52
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::concepts::Requirement const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
8
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
8
      {
88
8
        OS << '\n';
89
8
        ColorScope Color(OS, ShowColors, IndentColor);
90
8
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'6
) << '-';
91
8
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
8
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'6
);
95
8
        this->Prefix.push_back(' ');
96
8
      }
97
98
8
      FirstChild = true;
99
8
      unsigned Depth = Pending.size();
100
101
8
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
16
      while (Depth < Pending.size()) {
106
8
        Pending.back()(true);
107
8
        this->Pending.pop_back();
108
8
      }
109
110
      // Restore the old prefix.
111
8
      this->Prefix.resize(Prefix.size() - 2);
112
8
    };
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()>(llvm::StringRef, clang::ASTDumper)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
35.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
35.8k
      {
88
35.8k
        OS << '\n';
89
35.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
35.8k
        OS << Prefix << (IsLastChild ? 
'`'24.6k
:
'|'11.1k
) << '-';
91
35.8k
        if (!Label.empty())
92
25
          OS << Label << ": ";
93
94
35.8k
        this->Prefix.push_back(IsLastChild ? 
' '24.6k
:
'|'11.1k
);
95
35.8k
        this->Prefix.push_back(' ');
96
35.8k
      }
97
98
35.8k
      FirstChild = true;
99
35.8k
      unsigned Depth = Pending.size();
100
101
35.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
56.2k
      while (Depth < Pending.size()) {
106
20.4k
        Pending.back()(true);
107
20.4k
        this->Pending.pop_back();
108
20.4k
      }
109
110
      // Restore the old prefix.
111
35.8k
      this->Prefix.resize(Prefix.size() - 2);
112
35.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
568
                           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
568
      {
88
568
        OS << '\n';
89
568
        ColorScope Color(OS, ShowColors, IndentColor);
90
568
        OS << Prefix << (IsLastChild ? 
'`'401
:
'|'167
) << '-';
91
568
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
568
        this->Prefix.push_back(IsLastChild ? 
' '401
:
'|'167
);
95
568
        this->Prefix.push_back(' ');
96
568
      }
97
98
568
      FirstChild = true;
99
568
      unsigned Depth = Pending.size();
100
101
568
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
852
      while (Depth < Pending.size()) {
106
284
        Pending.back()(true);
107
284
        this->Pending.pop_back();
108
284
      }
109
110
      // Restore the old prefix.
111
568
      this->Prefix.resize(Prefix.size() - 2);
112
568
    };
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.59k
                           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.59k
      {
88
1.59k
        OS << '\n';
89
1.59k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.59k
        OS << Prefix << (IsLastChild ? 
'`'1.34k
:
'|'255
) << '-';
91
1.59k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.59k
        this->Prefix.push_back(IsLastChild ? 
' '1.34k
:
'|'255
);
95
1.59k
        this->Prefix.push_back(' ');
96
1.59k
      }
97
98
1.59k
      FirstChild = true;
99
1.59k
      unsigned Depth = Pending.size();
100
101
1.59k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.59k
      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.59k
      this->Prefix.resize(Prefix.size() - 2);
112
1.59k
    };
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
357
                           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
357
      {
88
357
        OS << '\n';
89
357
        ColorScope Color(OS, ShowColors, IndentColor);
90
357
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
357
        if (!Label.empty())
92
357
          OS << Label << ": ";
93
94
357
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
357
        this->Prefix.push_back(' ');
96
357
      }
97
98
357
      FirstChild = true;
99
357
      unsigned Depth = Pending.size();
100
101
357
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
357
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
357
      this->Prefix.resize(Prefix.size() - 2);
112
357
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12>(llvm::StringRef, clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
13
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
13
      {
88
13
        OS << '\n';
89
13
        ColorScope Color(OS, ShowColors, IndentColor);
90
13
        OS << Prefix << (IsLastChild ? 
'`'4
:
'|'9
) << '-';
91
13
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
13
        this->Prefix.push_back(IsLastChild ? 
' '4
:
'|'9
);
95
13
        this->Prefix.push_back(' ');
96
13
      }
97
98
13
      FirstChild = true;
99
13
      unsigned Depth = Pending.size();
100
101
13
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
13
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
13
      this->Prefix.resize(Prefix.size() - 2);
112
13
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13>(llvm::StringRef, clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
89
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
89
      {
88
89
        OS << '\n';
89
89
        ColorScope Color(OS, ShowColors, IndentColor);
90
89
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
89
        if (!Label.empty())
92
89
          OS << Label << ": ";
93
94
89
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
89
        this->Prefix.push_back(' ');
96
89
      }
97
98
89
      FirstChild = true;
99
89
      unsigned Depth = Pending.size();
100
101
89
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
129
      while (Depth < Pending.size()) {
106
40
        Pending.back()(true);
107
40
        this->Pending.pop_back();
108
40
      }
109
110
      // Restore the old prefix.
111
89
      this->Prefix.resize(Prefix.size() - 2);
112
89
    };
Unexecuted instantiation: TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14>(llvm::StringRef, clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14)::'lambda'(bool)::operator()(bool) const
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'()>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15::operator()() const::'lambda'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      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.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? 
'`'5
:
'|'1.48k
) << '-';
91
1.49k
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? 
' '5
:
'|'1.48k
);
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.98k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
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
118
                           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
118
      {
88
118
        OS << '\n';
89
118
        ColorScope Color(OS, ShowColors, IndentColor);
90
118
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
118
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
118
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
118
        this->Prefix.push_back(' ');
96
118
      }
97
98
118
      FirstChild = true;
99
118
      unsigned Depth = Pending.size();
100
101
118
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
118
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
118
      this->Prefix.resize(Prefix.size() - 2);
112
118
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)::'lambda'(bool)::operator()(bool) const
Line
Count
Source
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
91
15
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
84.1k
    if (FirstChild) {
115
42.4k
      Pending.push_back(std::move(DumpWithIndent));
116
42.4k
    } else {
117
41.7k
      Pending.back()(false);
118
41.7k
      Pending.back() = std::move(DumpWithIndent);
119
41.7k
    }
120
84.1k
    FirstChild = false;
121
84.1k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Decl const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
26.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
26.9k
    if (TopLevel) {
61
1.68k
      TopLevel = false;
62
1.68k
      DoAddChild();
63
3.11k
      while (!Pending.empty()) {
64
1.42k
        Pending.back()(true);
65
1.42k
        Pending.pop_back();
66
1.42k
      }
67
1.68k
      Prefix.clear();
68
1.68k
      OS << "\n";
69
1.68k
      TopLevel = true;
70
1.68k
      return;
71
1.68k
    }
72
73
25.2k
    auto DumpWithIndent = [this, DoAddChild,
74
25.2k
                           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
25.2k
      {
88
25.2k
        OS << '\n';
89
25.2k
        ColorScope Color(OS, ShowColors, IndentColor);
90
25.2k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
25.2k
        if (!Label.empty())
92
25.2k
          OS << Label << ": ";
93
94
25.2k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
25.2k
        this->Prefix.push_back(' ');
96
25.2k
      }
97
98
25.2k
      FirstChild = true;
99
25.2k
      unsigned Depth = Pending.size();
100
101
25.2k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
25.2k
      while (Depth < Pending.size()) {
106
25.2k
        Pending.back()(true);
107
25.2k
        this->Pending.pop_back();
108
25.2k
      }
109
110
      // Restore the old prefix.
111
25.2k
      this->Prefix.resize(Prefix.size() - 2);
112
25.2k
    };
113
114
25.2k
    if (FirstChild) {
115
6.57k
      Pending.push_back(std::move(DumpWithIndent));
116
18.6k
    } else {
117
18.6k
      Pending.back()(false);
118
18.6k
      Pending.back() = std::move(DumpWithIndent);
119
18.6k
    }
120
25.2k
    FirstChild = false;
121
25.2k
  }
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
855
  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
855
    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
855
    auto DumpWithIndent = [this, DoAddChild,
74
855
                           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
855
      {
88
855
        OS << '\n';
89
855
        ColorScope Color(OS, ShowColors, IndentColor);
90
855
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
855
        if (!Label.empty())
92
855
          OS << Label << ": ";
93
94
855
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
855
        this->Prefix.push_back(' ');
96
855
      }
97
98
855
      FirstChild = true;
99
855
      unsigned Depth = Pending.size();
100
101
855
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
855
      while (Depth < Pending.size()) {
106
855
        Pending.back()(true);
107
855
        this->Pending.pop_back();
108
855
      }
109
110
      // Restore the old prefix.
111
855
      this->Prefix.resize(Prefix.size() - 2);
112
855
    };
113
114
855
    if (FirstChild) {
115
446
      Pending.push_back(std::move(DumpWithIndent));
116
446
    } else {
117
409
      Pending.back()(false);
118
409
      Pending.back() = std::move(DumpWithIndent);
119
409
    }
120
855
    FirstChild = false;
121
855
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::CXXCtorInitializer const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
191
  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
191
    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
191
    auto DumpWithIndent = [this, DoAddChild,
74
191
                           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
191
      {
88
191
        OS << '\n';
89
191
        ColorScope Color(OS, ShowColors, IndentColor);
90
191
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
191
        if (!Label.empty())
92
191
          OS << Label << ": ";
93
94
191
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
191
        this->Prefix.push_back(' ');
96
191
      }
97
98
191
      FirstChild = true;
99
191
      unsigned Depth = Pending.size();
100
101
191
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
191
      while (Depth < Pending.size()) {
106
191
        Pending.back()(true);
107
191
        this->Pending.pop_back();
108
191
      }
109
110
      // Restore the old prefix.
111
191
      this->Prefix.resize(Prefix.size() - 2);
112
191
    };
113
114
191
    if (FirstChild) {
115
58
      Pending.push_back(std::move(DumpWithIndent));
116
133
    } else {
117
133
      Pending.back()(false);
118
133
      Pending.back() = std::move(DumpWithIndent);
119
133
    }
120
191
    FirstChild = false;
121
191
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Type const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
5.45k
  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.45k
    if (TopLevel) {
61
29
      TopLevel = false;
62
29
      DoAddChild();
63
52
      while (!Pending.empty()) {
64
23
        Pending.back()(true);
65
23
        Pending.pop_back();
66
23
      }
67
29
      Prefix.clear();
68
29
      OS << "\n";
69
29
      TopLevel = true;
70
29
      return;
71
29
    }
72
73
5.42k
    auto DumpWithIndent = [this, DoAddChild,
74
5.42k
                           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.42k
      {
88
5.42k
        OS << '\n';
89
5.42k
        ColorScope Color(OS, ShowColors, IndentColor);
90
5.42k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
5.42k
        if (!Label.empty())
92
5.42k
          OS << Label << ": ";
93
94
5.42k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
5.42k
        this->Prefix.push_back(' ');
96
5.42k
      }
97
98
5.42k
      FirstChild = true;
99
5.42k
      unsigned Depth = Pending.size();
100
101
5.42k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
5.42k
      while (Depth < Pending.size()) {
106
5.42k
        Pending.back()(true);
107
5.42k
        this->Pending.pop_back();
108
5.42k
      }
109
110
      // Restore the old prefix.
111
5.42k
      this->Prefix.resize(Prefix.size() - 2);
112
5.42k
    };
113
114
5.42k
    if (FirstChild) {
115
5.15k
      Pending.push_back(std::move(DumpWithIndent));
116
5.15k
    } else {
117
273
      Pending.back()(false);
118
273
      Pending.back() = std::move(DumpWithIndent);
119
273
    }
120
5.42k
    FirstChild = false;
121
5.42k
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::OMPClause const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
420
  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
420
    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
420
    auto DumpWithIndent = [this, DoAddChild,
74
420
                           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
420
      {
88
420
        OS << '\n';
89
420
        ColorScope Color(OS, ShowColors, IndentColor);
90
420
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
420
        if (!Label.empty())
92
420
          OS << Label << ": ";
93
94
420
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
420
        this->Prefix.push_back(' ');
96
420
      }
97
98
420
      FirstChild = true;
99
420
      unsigned Depth = Pending.size();
100
101
420
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
420
      while (Depth < Pending.size()) {
106
420
        Pending.back()(true);
107
420
        this->Pending.pop_back();
108
420
      }
109
110
      // Restore the old prefix.
111
420
      this->Prefix.resize(Prefix.size() - 2);
112
420
    };
113
114
420
    if (FirstChild) {
115
282
      Pending.push_back(std::move(DumpWithIndent));
116
282
    } else {
117
138
      Pending.back()(false);
118
138
      Pending.back() = std::move(DumpWithIndent);
119
138
    }
120
420
    FirstChild = false;
121
420
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Attr const*)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
2.44k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
2.44k
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
2.44k
    auto DumpWithIndent = [this, DoAddChild,
74
2.44k
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
2.44k
      {
88
2.44k
        OS << '\n';
89
2.44k
        ColorScope Color(OS, ShowColors, IndentColor);
90
2.44k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
2.44k
        if (!Label.empty())
92
2.44k
          OS << Label << ": ";
93
94
2.44k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
2.44k
        this->Prefix.push_back(' ');
96
2.44k
      }
97
98
2.44k
      FirstChild = true;
99
2.44k
      unsigned Depth = Pending.size();
100
101
2.44k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
2.44k
      while (Depth < Pending.size()) {
106
2.44k
        Pending.back()(true);
107
2.44k
        this->Pending.pop_back();
108
2.44k
      }
109
110
      // Restore the old prefix.
111
2.44k
      this->Prefix.resize(Prefix.size() - 2);
112
2.44k
    };
113
114
2.44k
    if (FirstChild) {
115
1.06k
      Pending.push_back(std::move(DumpWithIndent));
116
1.37k
    } else {
117
1.37k
      Pending.back()(false);
118
1.37k
      Pending.back() = std::move(DumpWithIndent);
119
1.37k
    }
120
2.44k
    FirstChild = false;
121
2.44k
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0)
Line
Count
Source
57
7
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
7
    if (TopLevel) {
61
7
      TopLevel = false;
62
7
      DoAddChild();
63
14
      while (!Pending.empty()) {
64
7
        Pending.back()(true);
65
7
        Pending.pop_back();
66
7
      }
67
7
      Prefix.clear();
68
7
      OS << "\n";
69
7
      TopLevel = true;
70
7
      return;
71
7
    }
72
73
0
    auto DumpWithIndent = [this, DoAddChild,
74
0
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
0
      {
88
0
        OS << '\n';
89
0
        ColorScope Color(OS, ShowColors, IndentColor);
90
0
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
0
        if (!Label.empty())
92
0
          OS << Label << ": ";
93
94
0
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
0
        this->Prefix.push_back(' ');
96
0
      }
97
98
0
      FirstChild = true;
99
0
      unsigned Depth = Pending.size();
100
101
0
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
0
      while (Depth < Pending.size()) {
106
0
        Pending.back()(true);
107
0
        this->Pending.pop_back();
108
0
      }
109
110
      // Restore the old prefix.
111
0
      this->Prefix.resize(Prefix.size() - 2);
112
0
    };
113
114
0
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
0
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
0
    FirstChild = false;
121
0
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'())
Line
Count
Source
57
132
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
132
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
132
    auto DumpWithIndent = [this, DoAddChild,
74
132
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
132
      {
88
132
        OS << '\n';
89
132
        ColorScope Color(OS, ShowColors, IndentColor);
90
132
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
132
        if (!Label.empty())
92
132
          OS << Label << ": ";
93
94
132
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
132
        this->Prefix.push_back(' ');
96
132
      }
97
98
132
      FirstChild = true;
99
132
      unsigned Depth = Pending.size();
100
101
132
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
132
      while (Depth < Pending.size()) {
106
132
        Pending.back()(true);
107
132
        this->Pending.pop_back();
108
132
      }
109
110
      // Restore the old prefix.
111
132
      this->Prefix.resize(Prefix.size() - 2);
112
132
    };
113
114
132
    if (FirstChild) {
115
7
      Pending.push_back(std::move(DumpWithIndent));
116
125
    } else {
117
125
      Pending.back()(false);
118
125
      Pending.back() = std::move(DumpWithIndent);
119
125
    }
120
132
    FirstChild = false;
121
132
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
57
134
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
134
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
134
    auto DumpWithIndent = [this, DoAddChild,
74
134
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
134
      {
88
134
        OS << '\n';
89
134
        ColorScope Color(OS, ShowColors, IndentColor);
90
134
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
134
        if (!Label.empty())
92
134
          OS << Label << ": ";
93
94
134
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
134
        this->Prefix.push_back(' ');
96
134
      }
97
98
134
      FirstChild = true;
99
134
      unsigned Depth = Pending.size();
100
101
134
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
134
      while (Depth < Pending.size()) {
106
134
        Pending.back()(true);
107
134
        this->Pending.pop_back();
108
134
      }
109
110
      // Restore the old prefix.
111
134
      this->Prefix.resize(Prefix.size() - 2);
112
134
    };
113
114
134
    if (FirstChild) {
115
106
      Pending.push_back(std::move(DumpWithIndent));
116
106
    } else {
117
28
      Pending.back()(false);
118
28
      Pending.back() = std::move(DumpWithIndent);
119
28
    }
120
134
    FirstChild = false;
121
134
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())
Line
Count
Source
57
5
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
5
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
5
    auto DumpWithIndent = [this, DoAddChild,
74
5
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
5
      {
88
5
        OS << '\n';
89
5
        ColorScope Color(OS, ShowColors, IndentColor);
90
5
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
5
        if (!Label.empty())
92
5
          OS << Label << ": ";
93
94
5
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
5
        this->Prefix.push_back(' ');
96
5
      }
97
98
5
      FirstChild = true;
99
5
      unsigned Depth = Pending.size();
100
101
5
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
5
      while (Depth < Pending.size()) {
106
5
        Pending.back()(true);
107
5
        this->Pending.pop_back();
108
5
      }
109
110
      // Restore the old prefix.
111
5
      this->Prefix.resize(Prefix.size() - 2);
112
5
    };
113
114
5
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
5
    } else {
117
5
      Pending.back()(false);
118
5
      Pending.back() = std::move(DumpWithIndent);
119
5
    }
120
5
    FirstChild = false;
121
5
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::QualType)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
26
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
26
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
26
    auto DumpWithIndent = [this, DoAddChild,
74
26
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
26
      {
88
26
        OS << '\n';
89
26
        ColorScope Color(OS, ShowColors, IndentColor);
90
26
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
26
        if (!Label.empty())
92
26
          OS << Label << ": ";
93
94
26
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
26
        this->Prefix.push_back(' ');
96
26
      }
97
98
26
      FirstChild = true;
99
26
      unsigned Depth = Pending.size();
100
101
26
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
26
      while (Depth < Pending.size()) {
106
26
        Pending.back()(true);
107
26
        this->Pending.pop_back();
108
26
      }
109
110
      // Restore the old prefix.
111
26
      this->Prefix.resize(Prefix.size() - 2);
112
26
    };
113
114
26
    if (FirstChild) {
115
20
      Pending.push_back(std::move(DumpWithIndent));
116
20
    } else {
117
6
      Pending.back()(false);
118
6
      Pending.back() = std::move(DumpWithIndent);
119
6
    }
120
26
    FirstChild = false;
121
26
  }
void clang::TextTreeStructure::AddChild<clang::ASTNodeTraverser<clang::ASTDumper, clang::TextNodeDumper>::Visit(clang::Stmt const*, llvm::StringRef)::'lambda'()>(llvm::StringRef, clang::ASTDumper)
Line
Count
Source
57
35.8k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
35.8k
    if (TopLevel) {
61
15
      TopLevel = false;
62
15
      DoAddChild();
63
21
      while (!Pending.empty()) {
64
6
        Pending.back()(true);
65
6
        Pending.pop_back();
66
6
      }
67
15
      Prefix.clear();
68
15
      OS << "\n";
69
15
      TopLevel = true;
70
15
      return;
71
15
    }
72
73
35.8k
    auto DumpWithIndent = [this, DoAddChild,
74
35.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
35.8k
      {
88
35.8k
        OS << '\n';
89
35.8k
        ColorScope Color(OS, ShowColors, IndentColor);
90
35.8k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
35.8k
        if (!Label.empty())
92
35.8k
          OS << Label << ": ";
93
94
35.8k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
35.8k
        this->Prefix.push_back(' ');
96
35.8k
      }
97
98
35.8k
      FirstChild = true;
99
35.8k
      unsigned Depth = Pending.size();
100
101
35.8k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
35.8k
      while (Depth < Pending.size()) {
106
35.8k
        Pending.back()(true);
107
35.8k
        this->Pending.pop_back();
108
35.8k
      }
109
110
      // Restore the old prefix.
111
35.8k
      this->Prefix.resize(Prefix.size() - 2);
112
35.8k
    };
113
114
35.8k
    if (FirstChild) {
115
23.3k
      Pending.push_back(std::move(DumpWithIndent));
116
23.3k
    } else {
117
12.4k
      Pending.back()(false);
118
12.4k
      Pending.back() = std::move(DumpWithIndent);
119
12.4k
    }
120
35.8k
    FirstChild = false;
121
35.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
647
  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
647
    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
568
    auto DumpWithIndent = [this, DoAddChild,
74
568
                           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
568
      {
88
568
        OS << '\n';
89
568
        ColorScope Color(OS, ShowColors, IndentColor);
90
568
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
568
        if (!Label.empty())
92
568
          OS << Label << ": ";
93
94
568
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
568
        this->Prefix.push_back(' ');
96
568
      }
97
98
568
      FirstChild = true;
99
568
      unsigned Depth = Pending.size();
100
101
568
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
568
      while (Depth < Pending.size()) {
106
568
        Pending.back()(true);
107
568
        this->Pending.pop_back();
108
568
      }
109
110
      // Restore the old prefix.
111
568
      this->Prefix.resize(Prefix.size() - 2);
112
568
    };
113
114
568
    if (FirstChild) {
115
391
      Pending.push_back(std::move(DumpWithIndent));
116
391
    } else {
117
177
      Pending.back()(false);
118
177
      Pending.back() = std::move(DumpWithIndent);
119
177
    }
120
568
    FirstChild = false;
121
568
  }
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.59k
  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.59k
    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.59k
    auto DumpWithIndent = [this, DoAddChild,
74
1.59k
                           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.59k
      {
88
1.59k
        OS << '\n';
89
1.59k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.59k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.59k
        if (!Label.empty())
92
1.59k
          OS << Label << ": ";
93
94
1.59k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.59k
        this->Prefix.push_back(' ');
96
1.59k
      }
97
98
1.59k
      FirstChild = true;
99
1.59k
      unsigned Depth = Pending.size();
100
101
1.59k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.59k
      while (Depth < Pending.size()) {
106
1.59k
        Pending.back()(true);
107
1.59k
        this->Pending.pop_back();
108
1.59k
      }
109
110
      // Restore the old prefix.
111
1.59k
      this->Prefix.resize(Prefix.size() - 2);
112
1.59k
    };
113
114
1.59k
    if (FirstChild) {
115
1.40k
      Pending.push_back(std::move(DumpWithIndent));
116
1.40k
    } else {
117
190
      Pending.back()(false);
118
190
      Pending.back() = std::move(DumpWithIndent);
119
190
    }
120
1.59k
    FirstChild = false;
121
1.59k
  }
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
357
  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
357
    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
357
    auto DumpWithIndent = [this, DoAddChild,
74
357
                           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
357
      {
88
357
        OS << '\n';
89
357
        ColorScope Color(OS, ShowColors, IndentColor);
90
357
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
357
        if (!Label.empty())
92
357
          OS << Label << ": ";
93
94
357
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
357
        this->Prefix.push_back(' ');
96
357
      }
97
98
357
      FirstChild = true;
99
357
      unsigned Depth = Pending.size();
100
101
357
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
357
      while (Depth < Pending.size()) {
106
357
        Pending.back()(true);
107
357
        this->Pending.pop_back();
108
357
      }
109
110
      // Restore the old prefix.
111
357
      this->Prefix.resize(Prefix.size() - 2);
112
357
    };
113
114
357
    if (FirstChild) {
115
357
      Pending.push_back(std::move(DumpWithIndent));
116
357
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
357
    FirstChild = false;
121
357
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12>(llvm::StringRef, clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_12)
Line
Count
Source
57
13
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
13
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
13
    auto DumpWithIndent = [this, DoAddChild,
74
13
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
13
      {
88
13
        OS << '\n';
89
13
        ColorScope Color(OS, ShowColors, IndentColor);
90
13
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
13
        if (!Label.empty())
92
13
          OS << Label << ": ";
93
94
13
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
13
        this->Prefix.push_back(' ');
96
13
      }
97
98
13
      FirstChild = true;
99
13
      unsigned Depth = Pending.size();
100
101
13
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
13
      while (Depth < Pending.size()) {
106
13
        Pending.back()(true);
107
13
        this->Pending.pop_back();
108
13
      }
109
110
      // Restore the old prefix.
111
13
      this->Prefix.resize(Prefix.size() - 2);
112
13
    };
113
114
13
    if (FirstChild) {
115
13
      Pending.push_back(std::move(DumpWithIndent));
116
13
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
13
    FirstChild = false;
121
13
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13>(llvm::StringRef, clang::TextNodeDumper::VisitVarDecl(clang::VarDecl const*)::$_13)
Line
Count
Source
57
89
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
89
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
89
    auto DumpWithIndent = [this, DoAddChild,
74
89
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
89
      {
88
89
        OS << '\n';
89
89
        ColorScope Color(OS, ShowColors, IndentColor);
90
89
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
89
        if (!Label.empty())
92
89
          OS << Label << ": ";
93
94
89
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
89
        this->Prefix.push_back(' ');
96
89
      }
97
98
89
      FirstChild = true;
99
89
      unsigned Depth = Pending.size();
100
101
89
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
89
      while (Depth < Pending.size()) {
106
89
        Pending.back()(true);
107
89
        this->Pending.pop_back();
108
89
      }
109
110
      // Restore the old prefix.
111
89
      this->Prefix.resize(Prefix.size() - 2);
112
89
    };
113
114
89
    if (FirstChild) {
115
89
      Pending.push_back(std::move(DumpWithIndent));
116
89
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
89
    FirstChild = false;
121
89
  }
Unexecuted instantiation: TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14>(llvm::StringRef, clang::TextNodeDumper::VisitOMPRequiresDecl(clang::OMPRequiresDecl const*)::$_14)
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15>(llvm::StringRef, clang::TextNodeDumper::VisitCXXRecordDecl(clang::CXXRecordDecl const*)::$_15)
Line
Count
Source
57
1.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
1.49k
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1
      Pending.back()(false);
118
1
      Pending.back() = std::move(DumpWithIndent);
119
1
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
1.49k
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1.49k
      Pending.back()(false);
118
1.49k
      Pending.back() = std::move(DumpWithIndent);
119
1.49k
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1.49k
      Pending.back()(false);
118
1.49k
      Pending.back() = std::move(DumpWithIndent);
119
1.49k
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1.49k
      Pending.back()(false);
118
1.49k
      Pending.back() = std::move(DumpWithIndent);
119
1.49k
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1.49k
      Pending.back()(false);
118
1.49k
      Pending.back() = std::move(DumpWithIndent);
119
1.49k
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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.49k
  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.49k
    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.49k
    auto DumpWithIndent = [this, DoAddChild,
74
1.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
1.49k
      {
88
1.49k
        OS << '\n';
89
1.49k
        ColorScope Color(OS, ShowColors, IndentColor);
90
1.49k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
1.49k
        if (!Label.empty())
92
1.49k
          OS << Label << ": ";
93
94
1.49k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
1.49k
        this->Prefix.push_back(' ');
96
1.49k
      }
97
98
1.49k
      FirstChild = true;
99
1.49k
      unsigned Depth = Pending.size();
100
101
1.49k
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
1.49k
      while (Depth < Pending.size()) {
106
1.49k
        Pending.back()(true);
107
1.49k
        this->Pending.pop_back();
108
1.49k
      }
109
110
      // Restore the old prefix.
111
1.49k
      this->Prefix.resize(Prefix.size() - 2);
112
1.49k
    };
113
114
1.49k
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
1.49k
    } else {
117
1.49k
      Pending.back()(false);
118
1.49k
      Pending.back() = std::move(DumpWithIndent);
119
1.49k
    }
120
1.49k
    FirstChild = false;
121
1.49k
  }
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
118
  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
118
    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
118
    auto DumpWithIndent = [this, DoAddChild,
74
118
                           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
118
      {
88
118
        OS << '\n';
89
118
        ColorScope Color(OS, ShowColors, IndentColor);
90
118
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
118
        if (!Label.empty())
92
118
          OS << Label << ": ";
93
94
118
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
118
        this->Prefix.push_back(' ');
96
118
      }
97
98
118
      FirstChild = true;
99
118
      unsigned Depth = Pending.size();
100
101
118
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
118
      while (Depth < Pending.size()) {
106
118
        Pending.back()(true);
107
118
        this->Pending.pop_back();
108
118
      }
109
110
      // Restore the old prefix.
111
118
      this->Prefix.resize(Prefix.size() - 2);
112
118
    };
113
114
118
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
118
    } else {
117
118
      Pending.back()(false);
118
118
      Pending.back() = std::move(DumpWithIndent);
119
118
    }
120
118
    FirstChild = false;
121
118
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_17)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
15
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
0
      Pending.back()(false);
118
0
      Pending.back() = std::move(DumpWithIndent);
119
0
    }
120
15
    FirstChild = false;
121
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_18)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
15
      Pending.back()(false);
118
15
      Pending.back() = std::move(DumpWithIndent);
119
15
    }
120
15
    FirstChild = false;
121
15
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19>(llvm::StringRef, clang::TextNodeDumper::VisitConstructorUsingShadowDecl(clang::ConstructorUsingShadowDecl const*)::$_19)
Line
Count
Source
57
15
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
58
    // If we're at the top level, there's nothing interesting to do; just
59
    // run the dumper.
60
15
    if (TopLevel) {
61
0
      TopLevel = false;
62
0
      DoAddChild();
63
0
      while (!Pending.empty()) {
64
0
        Pending.back()(true);
65
0
        Pending.pop_back();
66
0
      }
67
0
      Prefix.clear();
68
0
      OS << "\n";
69
0
      TopLevel = true;
70
0
      return;
71
0
    }
72
73
15
    auto DumpWithIndent = [this, DoAddChild,
74
15
                           Label(Label.str())](bool IsLastChild) {
75
      // Print out the appropriate tree structure and work out the prefix for
76
      // children of this node. For instance:
77
      //
78
      //   A        Prefix = ""
79
      //   |-B      Prefix = "| "
80
      //   | `-C    Prefix = "|   "
81
      //   `-D      Prefix = "  "
82
      //     |-E    Prefix = "  | "
83
      //     `-F    Prefix = "    "
84
      //   G        Prefix = ""
85
      //
86
      // Note that the first level gets no prefix.
87
15
      {
88
15
        OS << '\n';
89
15
        ColorScope Color(OS, ShowColors, IndentColor);
90
15
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
91
15
        if (!Label.empty())
92
15
          OS << Label << ": ";
93
94
15
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
95
15
        this->Prefix.push_back(' ');
96
15
      }
97
98
15
      FirstChild = true;
99
15
      unsigned Depth = Pending.size();
100
101
15
      DoAddChild();
102
103
      // If any children are left, they're the last at their nesting level.
104
      // Dump those ones out now.
105
15
      while (Depth < Pending.size()) {
106
15
        Pending.back()(true);
107
15
        this->Pending.pop_back();
108
15
      }
109
110
      // Restore the old prefix.
111
15
      this->Prefix.resize(Prefix.size() - 2);
112
15
    };
113
114
15
    if (FirstChild) {
115
0
      Pending.push_back(std::move(DumpWithIndent));
116
15
    } else {
117
15
      Pending.back()(false);
118
15
      Pending.back() = std::move(DumpWithIndent);
119
15
    }
120
15
    FirstChild = false;
121
15
  }
122
123
  TextTreeStructure(raw_ostream &OS, bool ShowColors)
124
1.89k
      : 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 VisitCompoundStmt(const CompoundStmt *Node);
250
  void VisitConstantExpr(const ConstantExpr *Node);
251
  void VisitCallExpr(const CallExpr *Node);
252
  void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node);
253
  void VisitCastExpr(const CastExpr *Node);
254
  void VisitImplicitCastExpr(const ImplicitCastExpr *Node);
255
  void VisitDeclRefExpr(const DeclRefExpr *Node);
256
  void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node);
257
  void VisitPredefinedExpr(const PredefinedExpr *Node);
258
  void VisitCharacterLiteral(const CharacterLiteral *Node);
259
  void VisitIntegerLiteral(const IntegerLiteral *Node);
260
  void VisitFixedPointLiteral(const FixedPointLiteral *Node);
261
  void VisitFloatingLiteral(const FloatingLiteral *Node);
262
  void VisitStringLiteral(const StringLiteral *Str);
263
  void VisitInitListExpr(const InitListExpr *ILE);
264
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E);
265
  void VisitUnaryOperator(const UnaryOperator *Node);
266
  void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node);
267
  void VisitMemberExpr(const MemberExpr *Node);
268
  void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node);
269
  void VisitBinaryOperator(const BinaryOperator *Node);
270
  void VisitCompoundAssignOperator(const CompoundAssignOperator *Node);
271
  void VisitAddrLabelExpr(const AddrLabelExpr *Node);
272
  void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node);
273
  void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node);
274
  void VisitCXXThisExpr(const CXXThisExpr *Node);
275
  void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node);
276
  void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node);
277
  void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node);
278
  void VisitCXXConstructExpr(const CXXConstructExpr *Node);
279
  void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node);
280
  void VisitCXXNewExpr(const CXXNewExpr *Node);
281
  void VisitCXXDeleteExpr(const CXXDeleteExpr *Node);
282
  void VisitTypeTraitExpr(const TypeTraitExpr *Node);
283
  void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node);
284
  void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node);
285
  void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node);
286
  void VisitExprWithCleanups(const ExprWithCleanups *Node);
287
  void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node);
288
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node);
289
  void
290
  VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node);
291
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node);
292
  void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node);
293
  void VisitObjCMessageExpr(const ObjCMessageExpr *Node);
294
  void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node);
295
  void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node);
296
  void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node);
297
  void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node);
298
  void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
299
  void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
300
  void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
301
  void VisitOMPIteratorExpr(const OMPIteratorExpr *Node);
302
  void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node);
303
  void VisitRequiresExpr(const RequiresExpr *Node);
304
305
  void VisitRValueReferenceType(const ReferenceType *T);
306
  void VisitArrayType(const ArrayType *T);
307
  void VisitConstantArrayType(const ConstantArrayType *T);
308
  void VisitVariableArrayType(const VariableArrayType *T);
309
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T);
310
  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T);
311
  void VisitVectorType(const VectorType *T);
312
  void VisitFunctionType(const FunctionType *T);
313
  void VisitFunctionProtoType(const FunctionProtoType *T);
314
  void VisitUnresolvedUsingType(const UnresolvedUsingType *T);
315
  void VisitUsingType(const UsingType *T);
316
  void VisitTypedefType(const TypedefType *T);
317
  void VisitUnaryTransformType(const UnaryTransformType *T);
318
  void VisitTagType(const TagType *T);
319
  void VisitTemplateTypeParmType(const TemplateTypeParmType *T);
320
  void VisitAutoType(const AutoType *T);
321
  void VisitDeducedTemplateSpecializationType(
322
      const DeducedTemplateSpecializationType *T);
323
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T);
324
  void VisitInjectedClassNameType(const InjectedClassNameType *T);
325
  void VisitObjCInterfaceType(const ObjCInterfaceType *T);
326
  void VisitPackExpansionType(const PackExpansionType *T);
327
328
  void VisitLabelDecl(const LabelDecl *D);
329
  void VisitTypedefDecl(const TypedefDecl *D);
330
  void VisitEnumDecl(const EnumDecl *D);
331
  void VisitRecordDecl(const RecordDecl *D);
332
  void VisitEnumConstantDecl(const EnumConstantDecl *D);
333
  void VisitIndirectFieldDecl(const IndirectFieldDecl *D);
334
  void VisitFunctionDecl(const FunctionDecl *D);
335
  void VisitFieldDecl(const FieldDecl *D);
336
  void VisitVarDecl(const VarDecl *D);
337
  void VisitBindingDecl(const BindingDecl *D);
338
  void VisitCapturedDecl(const CapturedDecl *D);
339
  void VisitImportDecl(const ImportDecl *D);
340
  void VisitPragmaCommentDecl(const PragmaCommentDecl *D);
341
  void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D);
342
  void VisitOMPExecutableDirective(const OMPExecutableDirective *D);
343
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D);
344
  void VisitOMPRequiresDecl(const OMPRequiresDecl *D);
345
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D);
346
  void VisitNamespaceDecl(const NamespaceDecl *D);
347
  void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D);
348
  void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
349
  void VisitTypeAliasDecl(const TypeAliasDecl *D);
350
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D);
351
  void VisitCXXRecordDecl(const CXXRecordDecl *D);
352
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
353
  void VisitClassTemplateDecl(const ClassTemplateDecl *D);
354
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D);
355
  void VisitVarTemplateDecl(const VarTemplateDecl *D);
356
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
357
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
358
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
359
  void VisitUsingDecl(const UsingDecl *D);
360
  void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D);
361
  void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D);
362
  void VisitUsingEnumDecl(const UsingEnumDecl *D);
363
  void VisitUsingShadowDecl(const UsingShadowDecl *D);
364
  void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D);
365
  void VisitLinkageSpecDecl(const LinkageSpecDecl *D);
366
  void VisitAccessSpecDecl(const AccessSpecDecl *D);
367
  void VisitFriendDecl(const FriendDecl *D);
368
  void VisitObjCIvarDecl(const ObjCIvarDecl *D);
369
  void VisitObjCMethodDecl(const ObjCMethodDecl *D);
370
  void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D);
371
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D);
372
  void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D);
373
  void VisitObjCProtocolDecl(const ObjCProtocolDecl *D);
374
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D);
375
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D);
376
  void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D);
377
  void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
378
  void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
379
  void VisitBlockDecl(const BlockDecl *D);
380
  void VisitConceptDecl(const ConceptDecl *D);
381
  void
382
  VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D);
383
};
384
385
} // namespace clang
386
387
#endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H