Coverage Report

Created: 2020-09-22 08:39

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