Coverage Report

Created: 2020-02-18 08:44

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