Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/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
22.0k
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
22.0k
    return AddChild("", DoAddChild);
49
22.0k
  }
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
13.3k
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
13.3k
    return AddChild("", DoAddChild);
49
13.3k
  }
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
206
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
206
    return AddChild("", DoAddChild);
49
206
  }
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
1.48k
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
1.48k
    return AddChild("", DoAddChild);
49
1.48k
  }
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.04k
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
1.04k
    return AddChild("", DoAddChild);
49
1.04k
  }
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
133
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
133
    return AddChild("", DoAddChild);
49
133
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
47
170
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
170
    return AddChild("", DoAddChild);
49
170
  }
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
513
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
513
    return AddChild("", DoAddChild);
49
513
  }
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
546
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
546
    return AddChild("", DoAddChild);
49
546
  }
TextNodeDumper.cpp:void clang::TextTreeStructure::AddChild<clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_3>(clang::TextNodeDumper::VisitFunctionDecl(clang::FunctionDecl const*)::$_3)
Line
Count
Source
47
10
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
10
    return AddChild("", DoAddChild);
49
10
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
598
  template <typename Fn> void AddChild(Fn DoAddChild) {
48
598
    return AddChild("", DoAddChild);
49
598
  }
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
40.2k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
40.2k
    // If we're at the top level, there's nothing interesting to do; just
55
40.2k
    // run the dumper.
56
40.2k
    if (TopLevel) {
57
954
      TopLevel = false;
58
954
      DoAddChild();
59
1.77k
      while (!Pending.empty()) {
60
823
        Pending.back()(true);
61
823
        Pending.pop_back();
62
823
      }
63
954
      Prefix.clear();
64
954
      OS << "\n";
65
954
      TopLevel = true;
66
954
      return;
67
954
    }
68
39.3k
69
39.3k
    // We need to capture an owning-string in the lambda because the lambda
70
39.3k
    // is invoked in a deferred manner.
71
39.3k
    std::string LabelStr = Label;
72
39.3k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
39.3k
      // Print out the appropriate tree structure and work out the prefix for
74
39.3k
      // children of this node. For instance:
75
39.3k
      //
76
39.3k
      //   A        Prefix = ""
77
39.3k
      //   |-B      Prefix = "| "
78
39.3k
      //   | `-C    Prefix = "|   "
79
39.3k
      //   `-D      Prefix = "  "
80
39.3k
      //     |-E    Prefix = "  | "
81
39.3k
      //     `-F    Prefix = "    "
82
39.3k
      //   G        Prefix = ""
83
39.3k
      //
84
39.3k
      // Note that the first level gets no prefix.
85
39.3k
      {
86
39.3k
        OS << '\n';
87
39.3k
        ColorScope Color(OS, ShowColors, IndentColor);
88
39.3k
        OS << Prefix << (IsLastChild ? 
'`'19.3k
:
'|'19.9k
) << '-';
89
39.3k
        if (!LabelStr.empty())
90
9
          OS << LabelStr << ": ";
91
39.3k
92
39.3k
        this->Prefix.push_back(IsLastChild ? 
' '19.3k
:
'|'19.9k
);
93
39.3k
        this->Prefix.push_back(' ');
94
39.3k
      }
95
39.3k
96
39.3k
      FirstChild = true;
97
39.3k
      unsigned Depth = Pending.size();
98
39.3k
99
39.3k
      DoAddChild();
100
39.3k
101
39.3k
      // If any children are left, they're the last at their nesting level.
102
39.3k
      // Dump those ones out now.
103
57.8k
      while (Depth < Pending.size()) {
104
18.5k
        Pending.back()(true);
105
18.5k
        this->Pending.pop_back();
106
18.5k
      }
107
39.3k
108
39.3k
      // Restore the old prefix.
109
39.3k
      this->Prefix.resize(Prefix.size() - 2);
110
39.3k
    };
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
206
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
206
      // Print out the appropriate tree structure and work out the prefix for
74
206
      // children of this node. For instance:
75
206
      //
76
206
      //   A        Prefix = ""
77
206
      //   |-B      Prefix = "| "
78
206
      //   | `-C    Prefix = "|   "
79
206
      //   `-D      Prefix = "  "
80
206
      //     |-E    Prefix = "  | "
81
206
      //     `-F    Prefix = "    "
82
206
      //   G        Prefix = ""
83
206
      //
84
206
      // Note that the first level gets no prefix.
85
206
      {
86
206
        OS << '\n';
87
206
        ColorScope Color(OS, ShowColors, IndentColor);
88
206
        OS << Prefix << (IsLastChild ? 
'`'38
:
'|'168
) << '-';
89
206
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
206
92
206
        this->Prefix.push_back(IsLastChild ? 
' '38
:
'|'168
);
93
206
        this->Prefix.push_back(' ');
94
206
      }
95
206
96
206
      FirstChild = true;
97
206
      unsigned Depth = Pending.size();
98
206
99
206
      DoAddChild();
100
206
101
206
      // If any children are left, they're the last at their nesting level.
102
206
      // Dump those ones out now.
103
228
      while (Depth < Pending.size()) {
104
22
        Pending.back()(true);
105
22
        this->Pending.pop_back();
106
22
      }
107
206
108
206
      // Restore the old prefix.
109
206
      this->Prefix.resize(Prefix.size() - 2);
110
206
    };
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
1.48k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
1.48k
      // Print out the appropriate tree structure and work out the prefix for
74
1.48k
      // children of this node. For instance:
75
1.48k
      //
76
1.48k
      //   A        Prefix = ""
77
1.48k
      //   |-B      Prefix = "| "
78
1.48k
      //   | `-C    Prefix = "|   "
79
1.48k
      //   `-D      Prefix = "  "
80
1.48k
      //     |-E    Prefix = "  | "
81
1.48k
      //     `-F    Prefix = "    "
82
1.48k
      //   G        Prefix = ""
83
1.48k
      //
84
1.48k
      // Note that the first level gets no prefix.
85
1.48k
      {
86
1.48k
        OS << '\n';
87
1.48k
        ColorScope Color(OS, ShowColors, IndentColor);
88
1.48k
        OS << Prefix << (IsLastChild ? 
'`'1.45k
:
'|'21
) << '-';
89
1.48k
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
1.48k
92
1.48k
        this->Prefix.push_back(IsLastChild ? 
' '1.45k
:
'|'21
);
93
1.48k
        this->Prefix.push_back(' ');
94
1.48k
      }
95
1.48k
96
1.48k
      FirstChild = true;
97
1.48k
      unsigned Depth = Pending.size();
98
1.48k
99
1.48k
      DoAddChild();
100
1.48k
101
1.48k
      // If any children are left, they're the last at their nesting level.
102
1.48k
      // Dump those ones out now.
103
2.28k
      while (Depth < Pending.size()) {
104
800
        Pending.back()(true);
105
800
        this->Pending.pop_back();
106
800
      }
107
1.48k
108
1.48k
      // Restore the old prefix.
109
1.48k
      this->Prefix.resize(Prefix.size() - 2);
110
1.48k
    };
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.04k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
1.04k
      // Print out the appropriate tree structure and work out the prefix for
74
1.04k
      // children of this node. For instance:
75
1.04k
      //
76
1.04k
      //   A        Prefix = ""
77
1.04k
      //   |-B      Prefix = "| "
78
1.04k
      //   | `-C    Prefix = "|   "
79
1.04k
      //   `-D      Prefix = "  "
80
1.04k
      //     |-E    Prefix = "  | "
81
1.04k
      //     `-F    Prefix = "    "
82
1.04k
      //   G        Prefix = ""
83
1.04k
      //
84
1.04k
      // Note that the first level gets no prefix.
85
1.04k
      {
86
1.04k
        OS << '\n';
87
1.04k
        ColorScope Color(OS, ShowColors, IndentColor);
88
1.04k
        OS << Prefix << (IsLastChild ? 
'`'623
:
'|'425
) << '-';
89
1.04k
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
1.04k
92
1.04k
        this->Prefix.push_back(IsLastChild ? 
' '623
:
'|'425
);
93
1.04k
        this->Prefix.push_back(' ');
94
1.04k
      }
95
1.04k
96
1.04k
      FirstChild = true;
97
1.04k
      unsigned Depth = Pending.size();
98
1.04k
99
1.04k
      DoAddChild();
100
1.04k
101
1.04k
      // If any children are left, they're the last at their nesting level.
102
1.04k
      // Dump those ones out now.
103
1.07k
      while (Depth < Pending.size()) {
104
24
        Pending.back()(true);
105
24
        this->Pending.pop_back();
106
24
      }
107
1.04k
108
1.04k
      // Restore the old prefix.
109
1.04k
      this->Prefix.resize(Prefix.size() - 2);
110
1.04k
    };
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
12.4k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
12.4k
      // Print out the appropriate tree structure and work out the prefix for
74
12.4k
      // children of this node. For instance:
75
12.4k
      //
76
12.4k
      //   A        Prefix = ""
77
12.4k
      //   |-B      Prefix = "| "
78
12.4k
      //   | `-C    Prefix = "|   "
79
12.4k
      //   `-D      Prefix = "  "
80
12.4k
      //     |-E    Prefix = "  | "
81
12.4k
      //     `-F    Prefix = "    "
82
12.4k
      //   G        Prefix = ""
83
12.4k
      //
84
12.4k
      // Note that the first level gets no prefix.
85
12.4k
      {
86
12.4k
        OS << '\n';
87
12.4k
        ColorScope Color(OS, ShowColors, IndentColor);
88
12.4k
        OS << Prefix << (IsLastChild ? 
'`'3.79k
:
'|'8.68k
) << '-';
89
12.4k
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
12.4k
92
12.4k
        this->Prefix.push_back(IsLastChild ? 
' '3.79k
:
'|'8.68k
);
93
12.4k
        this->Prefix.push_back(' ');
94
12.4k
      }
95
12.4k
96
12.4k
      FirstChild = true;
97
12.4k
      unsigned Depth = Pending.size();
98
12.4k
99
12.4k
      DoAddChild();
100
12.4k
101
12.4k
      // If any children are left, they're the last at their nesting level.
102
12.4k
      // Dump those ones out now.
103
19.1k
      while (Depth < Pending.size()) {
104
6.68k
        Pending.back()(true);
105
6.68k
        this->Pending.pop_back();
106
6.68k
      }
107
12.4k
108
12.4k
      // Restore the old prefix.
109
12.4k
      this->Prefix.resize(Prefix.size() - 2);
110
12.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
170
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
170
      // Print out the appropriate tree structure and work out the prefix for
74
170
      // children of this node. For instance:
75
170
      //
76
170
      //   A        Prefix = ""
77
170
      //   |-B      Prefix = "| "
78
170
      //   | `-C    Prefix = "|   "
79
170
      //   `-D      Prefix = "  "
80
170
      //     |-E    Prefix = "  | "
81
170
      //     `-F    Prefix = "    "
82
170
      //   G        Prefix = ""
83
170
      //
84
170
      // Note that the first level gets no prefix.
85
170
      {
86
170
        OS << '\n';
87
170
        ColorScope Color(OS, ShowColors, IndentColor);
88
170
        OS << Prefix << (IsLastChild ? 
'`'107
:
'|'63
) << '-';
89
170
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
170
92
170
        this->Prefix.push_back(IsLastChild ? 
' '107
:
'|'63
);
93
170
        this->Prefix.push_back(' ');
94
170
      }
95
170
96
170
      FirstChild = true;
97
170
      unsigned Depth = Pending.size();
98
170
99
170
      DoAddChild();
100
170
101
170
      // If any children are left, they're the last at their nesting level.
102
170
      // Dump those ones out now.
103
172
      while (Depth < Pending.size()) {
104
2
        Pending.back()(true);
105
2
        this->Pending.pop_back();
106
2
      }
107
170
108
170
      // Restore the old prefix.
109
170
      this->Prefix.resize(Prefix.size() - 2);
110
170
    };
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
133
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
133
      // Print out the appropriate tree structure and work out the prefix for
74
133
      // children of this node. For instance:
75
133
      //
76
133
      //   A        Prefix = ""
77
133
      //   |-B      Prefix = "| "
78
133
      //   | `-C    Prefix = "|   "
79
133
      //   `-D      Prefix = "  "
80
133
      //     |-E    Prefix = "  | "
81
133
      //     `-F    Prefix = "    "
82
133
      //   G        Prefix = ""
83
133
      //
84
133
      // Note that the first level gets no prefix.
85
133
      {
86
133
        OS << '\n';
87
133
        ColorScope Color(OS, ShowColors, IndentColor);
88
133
        OS << Prefix << (IsLastChild ? 
'`'2
:
'|'131
) << '-';
89
133
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
133
92
133
        this->Prefix.push_back(IsLastChild ? 
' '2
:
'|'131
);
93
133
        this->Prefix.push_back(' ');
94
133
      }
95
133
96
133
      FirstChild = true;
97
133
      unsigned Depth = Pending.size();
98
133
99
133
      DoAddChild();
100
133
101
133
      // If any children are left, they're the last at their nesting level.
102
133
      // Dump those ones out now.
103
240
      while (Depth < Pending.size()) {
104
107
        Pending.back()(true);
105
107
        this->Pending.pop_back();
106
107
      }
107
133
108
133
      // Restore the old prefix.
109
133
      this->Prefix.resize(Prefix.size() - 2);
110
133
    };
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda0'())::'lambda'(bool)::operator()(bool) const
Line
Count
Source
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.2k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
18.2k
      // Print out the appropriate tree structure and work out the prefix for
74
18.2k
      // children of this node. For instance:
75
18.2k
      //
76
18.2k
      //   A        Prefix = ""
77
18.2k
      //   |-B      Prefix = "| "
78
18.2k
      //   | `-C    Prefix = "|   "
79
18.2k
      //   `-D      Prefix = "  "
80
18.2k
      //     |-E    Prefix = "  | "
81
18.2k
      //     `-F    Prefix = "    "
82
18.2k
      //   G        Prefix = ""
83
18.2k
      //
84
18.2k
      // Note that the first level gets no prefix.
85
18.2k
      {
86
18.2k
        OS << '\n';
87
18.2k
        ColorScope Color(OS, ShowColors, IndentColor);
88
18.2k
        OS << Prefix << (IsLastChild ? 
'`'11.9k
:
'|'6.31k
) << '-';
89
18.2k
        if (!LabelStr.empty())
90
9
          OS << LabelStr << ": ";
91
18.2k
92
18.2k
        this->Prefix.push_back(IsLastChild ? 
' '11.9k
:
'|'6.31k
);
93
18.2k
        this->Prefix.push_back(' ');
94
18.2k
      }
95
18.2k
96
18.2k
      FirstChild = true;
97
18.2k
      unsigned Depth = Pending.size();
98
18.2k
99
18.2k
      DoAddChild();
100
18.2k
101
18.2k
      // If any children are left, they're the last at their nesting level.
102
18.2k
      // Dump those ones out now.
103
28.0k
      while (Depth < Pending.size()) {
104
9.80k
        Pending.back()(true);
105
9.80k
        this->Pending.pop_back();
106
9.80k
      }
107
18.2k
108
18.2k
      // Restore the old prefix.
109
18.2k
      this->Prefix.resize(Prefix.size() - 2);
110
18.2k
    };
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
434
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
434
      // Print out the appropriate tree structure and work out the prefix for
74
434
      // children of this node. For instance:
75
434
      //
76
434
      //   A        Prefix = ""
77
434
      //   |-B      Prefix = "| "
78
434
      //   | `-C    Prefix = "|   "
79
434
      //   `-D      Prefix = "  "
80
434
      //     |-E    Prefix = "  | "
81
434
      //     `-F    Prefix = "    "
82
434
      //   G        Prefix = ""
83
434
      //
84
434
      // Note that the first level gets no prefix.
85
434
      {
86
434
        OS << '\n';
87
434
        ColorScope Color(OS, ShowColors, IndentColor);
88
434
        OS << Prefix << (IsLastChild ? 
'`'308
:
'|'126
) << '-';
89
434
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
434
92
434
        this->Prefix.push_back(IsLastChild ? 
' '308
:
'|'126
);
93
434
        this->Prefix.push_back(' ');
94
434
      }
95
434
96
434
      FirstChild = true;
97
434
      unsigned Depth = Pending.size();
98
434
99
434
      DoAddChild();
100
434
101
434
      // If any children are left, they're the last at their nesting level.
102
434
      // Dump those ones out now.
103
645
      while (Depth < Pending.size()) {
104
211
        Pending.back()(true);
105
211
        this->Pending.pop_back();
106
211
      }
107
434
108
434
      // Restore the old prefix.
109
434
      this->Prefix.resize(Prefix.size() - 2);
110
434
    };
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
546
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
546
      // Print out the appropriate tree structure and work out the prefix for
74
546
      // children of this node. For instance:
75
546
      //
76
546
      //   A        Prefix = ""
77
546
      //   |-B      Prefix = "| "
78
546
      //   | `-C    Prefix = "|   "
79
546
      //   `-D      Prefix = "  "
80
546
      //     |-E    Prefix = "  | "
81
546
      //     `-F    Prefix = "    "
82
546
      //   G        Prefix = ""
83
546
      //
84
546
      // Note that the first level gets no prefix.
85
546
      {
86
546
        OS << '\n';
87
546
        ColorScope Color(OS, ShowColors, IndentColor);
88
546
        OS << Prefix << (IsLastChild ? 
'`'434
:
'|'112
) << '-';
89
546
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
546
92
546
        this->Prefix.push_back(IsLastChild ? 
' '434
:
'|'112
);
93
546
        this->Prefix.push_back(' ');
94
546
      }
95
546
96
546
      FirstChild = true;
97
546
      unsigned Depth = Pending.size();
98
546
99
546
      DoAddChild();
100
546
101
546
      // If any children are left, they're the last at their nesting level.
102
546
      // Dump those ones out now.
103
546
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
546
108
546
      // Restore the old prefix.
109
546
      this->Prefix.resize(Prefix.size() - 2);
110
546
    };
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
10
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
10
      // Print out the appropriate tree structure and work out the prefix for
74
10
      // children of this node. For instance:
75
10
      //
76
10
      //   A        Prefix = ""
77
10
      //   |-B      Prefix = "| "
78
10
      //   | `-C    Prefix = "|   "
79
10
      //   `-D      Prefix = "  "
80
10
      //     |-E    Prefix = "  | "
81
10
      //     `-F    Prefix = "    "
82
10
      //   G        Prefix = ""
83
10
      //
84
10
      // Note that the first level gets no prefix.
85
10
      {
86
10
        OS << '\n';
87
10
        ColorScope Color(OS, ShowColors, IndentColor);
88
10
        OS << Prefix << (IsLastChild ? 
'`'3
:
'|'7
) << '-';
89
10
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
10
92
10
        this->Prefix.push_back(IsLastChild ? 
' '3
:
'|'7
);
93
10
        this->Prefix.push_back(' ');
94
10
      }
95
10
96
10
      FirstChild = true;
97
10
      unsigned Depth = Pending.size();
98
10
99
10
      DoAddChild();
100
10
101
10
      // If any children are left, they're the last at their nesting level.
102
10
      // Dump those ones out now.
103
10
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
10
108
10
      // Restore the old prefix.
109
10
      this->Prefix.resize(Prefix.size() - 2);
110
10
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'0
: '|') << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '0
: '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : 
'|'0
) << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : 
'|'0
);
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
0
        Pending.back()(true);
105
0
        this->Pending.pop_back();
106
0
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? 
'`'1
:
'|'597
) << '-';
89
598
        if (!LabelStr.empty())
90
0
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? 
' '1
:
'|'597
);
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
1.19k
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
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
39.3k
112
39.3k
    if (FirstChild) {
113
19.3k
      Pending.push_back(std::move(DumpWithIndent));
114
19.9k
    } else {
115
19.9k
      Pending.back()(false);
116
19.9k
      Pending.back() = std::move(DumpWithIndent);
117
19.9k
    }
118
39.3k
    FirstChild = false;
119
39.3k
  }
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
13.3k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
13.3k
    // If we're at the top level, there's nothing interesting to do; just
55
13.3k
    // run the dumper.
56
13.3k
    if (TopLevel) {
57
856
      TopLevel = false;
58
856
      DoAddChild();
59
1.59k
      while (!Pending.empty()) {
60
735
        Pending.back()(true);
61
735
        Pending.pop_back();
62
735
      }
63
856
      Prefix.clear();
64
856
      OS << "\n";
65
856
      TopLevel = true;
66
856
      return;
67
856
    }
68
12.4k
69
12.4k
    // We need to capture an owning-string in the lambda because the lambda
70
12.4k
    // is invoked in a deferred manner.
71
12.4k
    std::string LabelStr = Label;
72
12.4k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
12.4k
      // Print out the appropriate tree structure and work out the prefix for
74
12.4k
      // children of this node. For instance:
75
12.4k
      //
76
12.4k
      //   A        Prefix = ""
77
12.4k
      //   |-B      Prefix = "| "
78
12.4k
      //   | `-C    Prefix = "|   "
79
12.4k
      //   `-D      Prefix = "  "
80
12.4k
      //     |-E    Prefix = "  | "
81
12.4k
      //     `-F    Prefix = "    "
82
12.4k
      //   G        Prefix = ""
83
12.4k
      //
84
12.4k
      // Note that the first level gets no prefix.
85
12.4k
      {
86
12.4k
        OS << '\n';
87
12.4k
        ColorScope Color(OS, ShowColors, IndentColor);
88
12.4k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
12.4k
        if (!LabelStr.empty())
90
12.4k
          OS << LabelStr << ": ";
91
12.4k
92
12.4k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
12.4k
        this->Prefix.push_back(' ');
94
12.4k
      }
95
12.4k
96
12.4k
      FirstChild = true;
97
12.4k
      unsigned Depth = Pending.size();
98
12.4k
99
12.4k
      DoAddChild();
100
12.4k
101
12.4k
      // If any children are left, they're the last at their nesting level.
102
12.4k
      // Dump those ones out now.
103
12.4k
      while (Depth < Pending.size()) {
104
12.4k
        Pending.back()(true);
105
12.4k
        this->Pending.pop_back();
106
12.4k
      }
107
12.4k
108
12.4k
      // Restore the old prefix.
109
12.4k
      this->Prefix.resize(Prefix.size() - 2);
110
12.4k
    };
111
12.4k
112
12.4k
    if (FirstChild) {
113
3.19k
      Pending.push_back(std::move(DumpWithIndent));
114
9.28k
    } else {
115
9.28k
      Pending.back()(false);
116
9.28k
      Pending.back() = std::move(DumpWithIndent);
117
9.28k
    }
118
12.4k
    FirstChild = false;
119
12.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
206
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
206
    // If we're at the top level, there's nothing interesting to do; just
55
206
    // run the dumper.
56
206
    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
206
69
206
    // We need to capture an owning-string in the lambda because the lambda
70
206
    // is invoked in a deferred manner.
71
206
    std::string LabelStr = Label;
72
206
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
206
      // Print out the appropriate tree structure and work out the prefix for
74
206
      // children of this node. For instance:
75
206
      //
76
206
      //   A        Prefix = ""
77
206
      //   |-B      Prefix = "| "
78
206
      //   | `-C    Prefix = "|   "
79
206
      //   `-D      Prefix = "  "
80
206
      //     |-E    Prefix = "  | "
81
206
      //     `-F    Prefix = "    "
82
206
      //   G        Prefix = ""
83
206
      //
84
206
      // Note that the first level gets no prefix.
85
206
      {
86
206
        OS << '\n';
87
206
        ColorScope Color(OS, ShowColors, IndentColor);
88
206
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
206
        if (!LabelStr.empty())
90
206
          OS << LabelStr << ": ";
91
206
92
206
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
206
        this->Prefix.push_back(' ');
94
206
      }
95
206
96
206
      FirstChild = true;
97
206
      unsigned Depth = Pending.size();
98
206
99
206
      DoAddChild();
100
206
101
206
      // If any children are left, they're the last at their nesting level.
102
206
      // Dump those ones out now.
103
206
      while (Depth < Pending.size()) {
104
206
        Pending.back()(true);
105
206
        this->Pending.pop_back();
106
206
      }
107
206
108
206
      // Restore the old prefix.
109
206
      this->Prefix.resize(Prefix.size() - 2);
110
206
    };
111
206
112
206
    if (FirstChild) {
113
83
      Pending.push_back(std::move(DumpWithIndent));
114
123
    } else {
115
123
      Pending.back()(false);
116
123
      Pending.back() = std::move(DumpWithIndent);
117
123
    }
118
206
    FirstChild = false;
119
206
  }
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
1.48k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
1.48k
    // If we're at the top level, there's nothing interesting to do; just
55
1.48k
    // run the dumper.
56
1.48k
    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.48k
69
1.48k
    // We need to capture an owning-string in the lambda because the lambda
70
1.48k
    // is invoked in a deferred manner.
71
1.48k
    std::string LabelStr = Label;
72
1.48k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
1.48k
      // Print out the appropriate tree structure and work out the prefix for
74
1.48k
      // children of this node. For instance:
75
1.48k
      //
76
1.48k
      //   A        Prefix = ""
77
1.48k
      //   |-B      Prefix = "| "
78
1.48k
      //   | `-C    Prefix = "|   "
79
1.48k
      //   `-D      Prefix = "  "
80
1.48k
      //     |-E    Prefix = "  | "
81
1.48k
      //     `-F    Prefix = "    "
82
1.48k
      //   G        Prefix = ""
83
1.48k
      //
84
1.48k
      // Note that the first level gets no prefix.
85
1.48k
      {
86
1.48k
        OS << '\n';
87
1.48k
        ColorScope Color(OS, ShowColors, IndentColor);
88
1.48k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
1.48k
        if (!LabelStr.empty())
90
1.48k
          OS << LabelStr << ": ";
91
1.48k
92
1.48k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
1.48k
        this->Prefix.push_back(' ');
94
1.48k
      }
95
1.48k
96
1.48k
      FirstChild = true;
97
1.48k
      unsigned Depth = Pending.size();
98
1.48k
99
1.48k
      DoAddChild();
100
1.48k
101
1.48k
      // If any children are left, they're the last at their nesting level.
102
1.48k
      // Dump those ones out now.
103
1.48k
      while (Depth < Pending.size()) {
104
1.48k
        Pending.back()(true);
105
1.48k
        this->Pending.pop_back();
106
1.48k
      }
107
1.48k
108
1.48k
      // Restore the old prefix.
109
1.48k
      this->Prefix.resize(Prefix.size() - 2);
110
1.48k
    };
111
1.48k
112
1.48k
    if (FirstChild) {
113
1.43k
      Pending.push_back(std::move(DumpWithIndent));
114
1.43k
    } else {
115
43
      Pending.back()(false);
116
43
      Pending.back() = std::move(DumpWithIndent);
117
43
    }
118
1.48k
    FirstChild = false;
119
1.48k
  }
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.04k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
1.04k
    // If we're at the top level, there's nothing interesting to do; just
55
1.04k
    // run the dumper.
56
1.04k
    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.04k
69
1.04k
    // We need to capture an owning-string in the lambda because the lambda
70
1.04k
    // is invoked in a deferred manner.
71
1.04k
    std::string LabelStr = Label;
72
1.04k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
1.04k
      // Print out the appropriate tree structure and work out the prefix for
74
1.04k
      // children of this node. For instance:
75
1.04k
      //
76
1.04k
      //   A        Prefix = ""
77
1.04k
      //   |-B      Prefix = "| "
78
1.04k
      //   | `-C    Prefix = "|   "
79
1.04k
      //   `-D      Prefix = "  "
80
1.04k
      //     |-E    Prefix = "  | "
81
1.04k
      //     `-F    Prefix = "    "
82
1.04k
      //   G        Prefix = ""
83
1.04k
      //
84
1.04k
      // Note that the first level gets no prefix.
85
1.04k
      {
86
1.04k
        OS << '\n';
87
1.04k
        ColorScope Color(OS, ShowColors, IndentColor);
88
1.04k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
1.04k
        if (!LabelStr.empty())
90
1.04k
          OS << LabelStr << ": ";
91
1.04k
92
1.04k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
1.04k
        this->Prefix.push_back(' ');
94
1.04k
      }
95
1.04k
96
1.04k
      FirstChild = true;
97
1.04k
      unsigned Depth = Pending.size();
98
1.04k
99
1.04k
      DoAddChild();
100
1.04k
101
1.04k
      // If any children are left, they're the last at their nesting level.
102
1.04k
      // Dump those ones out now.
103
1.04k
      while (Depth < Pending.size()) {
104
1.04k
        Pending.back()(true);
105
1.04k
        this->Pending.pop_back();
106
1.04k
      }
107
1.04k
108
1.04k
      // Restore the old prefix.
109
1.04k
      this->Prefix.resize(Prefix.size() - 2);
110
1.04k
    };
111
1.04k
112
1.04k
    if (FirstChild) {
113
742
      Pending.push_back(std::move(DumpWithIndent));
114
742
    } else {
115
306
      Pending.back()(false);
116
306
      Pending.back() = std::move(DumpWithIndent);
117
306
    }
118
1.04k
    FirstChild = false;
119
1.04k
  }
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
133
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
133
    // If we're at the top level, there's nothing interesting to do; just
55
133
    // run the dumper.
56
133
    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
133
69
133
    // We need to capture an owning-string in the lambda because the lambda
70
133
    // is invoked in a deferred manner.
71
133
    std::string LabelStr = Label;
72
133
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
133
      // Print out the appropriate tree structure and work out the prefix for
74
133
      // children of this node. For instance:
75
133
      //
76
133
      //   A        Prefix = ""
77
133
      //   |-B      Prefix = "| "
78
133
      //   | `-C    Prefix = "|   "
79
133
      //   `-D      Prefix = "  "
80
133
      //     |-E    Prefix = "  | "
81
133
      //     `-F    Prefix = "    "
82
133
      //   G        Prefix = ""
83
133
      //
84
133
      // Note that the first level gets no prefix.
85
133
      {
86
133
        OS << '\n';
87
133
        ColorScope Color(OS, ShowColors, IndentColor);
88
133
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
133
        if (!LabelStr.empty())
90
133
          OS << LabelStr << ": ";
91
133
92
133
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
133
        this->Prefix.push_back(' ');
94
133
      }
95
133
96
133
      FirstChild = true;
97
133
      unsigned Depth = Pending.size();
98
133
99
133
      DoAddChild();
100
133
101
133
      // If any children are left, they're the last at their nesting level.
102
133
      // Dump those ones out now.
103
133
      while (Depth < Pending.size()) {
104
133
        Pending.back()(true);
105
133
        this->Pending.pop_back();
106
133
      }
107
133
108
133
      // Restore the old prefix.
109
133
      this->Prefix.resize(Prefix.size() - 2);
110
133
    };
111
133
112
133
    if (FirstChild) {
113
7
      Pending.push_back(std::move(DumpWithIndent));
114
126
    } else {
115
126
      Pending.back()(false);
116
126
      Pending.back() = std::move(DumpWithIndent);
117
126
    }
118
133
    FirstChild = false;
119
133
  }
ASTDumper.cpp:void clang::TextTreeStructure::AddChild<clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'()>(llvm::StringRef, clang::ASTDumper::dumpLookups(clang::DeclContext const*, bool)::$_0::operator()() const::'lambda'()::operator()() const::'lambda'())
Line
Count
Source
53
170
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
170
    // If we're at the top level, there's nothing interesting to do; just
55
170
    // run the dumper.
56
170
    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
170
69
170
    // We need to capture an owning-string in the lambda because the lambda
70
170
    // is invoked in a deferred manner.
71
170
    std::string LabelStr = Label;
72
170
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
170
      // Print out the appropriate tree structure and work out the prefix for
74
170
      // children of this node. For instance:
75
170
      //
76
170
      //   A        Prefix = ""
77
170
      //   |-B      Prefix = "| "
78
170
      //   | `-C    Prefix = "|   "
79
170
      //   `-D      Prefix = "  "
80
170
      //     |-E    Prefix = "  | "
81
170
      //     `-F    Prefix = "    "
82
170
      //   G        Prefix = ""
83
170
      //
84
170
      // Note that the first level gets no prefix.
85
170
      {
86
170
        OS << '\n';
87
170
        ColorScope Color(OS, ShowColors, IndentColor);
88
170
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
170
        if (!LabelStr.empty())
90
170
          OS << LabelStr << ": ";
91
170
92
170
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
170
        this->Prefix.push_back(' ');
94
170
      }
95
170
96
170
      FirstChild = true;
97
170
      unsigned Depth = Pending.size();
98
170
99
170
      DoAddChild();
100
170
101
170
      // If any children are left, they're the last at their nesting level.
102
170
      // Dump those ones out now.
103
170
      while (Depth < Pending.size()) {
104
170
        Pending.back()(true);
105
170
        this->Pending.pop_back();
106
170
      }
107
170
108
170
      // Restore the old prefix.
109
170
      this->Prefix.resize(Prefix.size() - 2);
110
170
    };
111
170
112
170
    if (FirstChild) {
113
107
      Pending.push_back(std::move(DumpWithIndent));
114
107
    } else {
115
63
      Pending.back()(false);
116
63
      Pending.back() = std::move(DumpWithIndent);
117
63
    }
118
170
    FirstChild = false;
119
170
  }
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.2k
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
18.2k
    // If we're at the top level, there's nothing interesting to do; just
55
18.2k
    // run the dumper.
56
18.2k
    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.2k
69
18.2k
    // We need to capture an owning-string in the lambda because the lambda
70
18.2k
    // is invoked in a deferred manner.
71
18.2k
    std::string LabelStr = Label;
72
18.2k
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
18.2k
      // Print out the appropriate tree structure and work out the prefix for
74
18.2k
      // children of this node. For instance:
75
18.2k
      //
76
18.2k
      //   A        Prefix = ""
77
18.2k
      //   |-B      Prefix = "| "
78
18.2k
      //   | `-C    Prefix = "|   "
79
18.2k
      //   `-D      Prefix = "  "
80
18.2k
      //     |-E    Prefix = "  | "
81
18.2k
      //     `-F    Prefix = "    "
82
18.2k
      //   G        Prefix = ""
83
18.2k
      //
84
18.2k
      // Note that the first level gets no prefix.
85
18.2k
      {
86
18.2k
        OS << '\n';
87
18.2k
        ColorScope Color(OS, ShowColors, IndentColor);
88
18.2k
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
18.2k
        if (!LabelStr.empty())
90
18.2k
          OS << LabelStr << ": ";
91
18.2k
92
18.2k
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
18.2k
        this->Prefix.push_back(' ');
94
18.2k
      }
95
18.2k
96
18.2k
      FirstChild = true;
97
18.2k
      unsigned Depth = Pending.size();
98
18.2k
99
18.2k
      DoAddChild();
100
18.2k
101
18.2k
      // If any children are left, they're the last at their nesting level.
102
18.2k
      // Dump those ones out now.
103
18.2k
      while (Depth < Pending.size()) {
104
18.2k
        Pending.back()(true);
105
18.2k
        this->Pending.pop_back();
106
18.2k
      }
107
18.2k
108
18.2k
      // Restore the old prefix.
109
18.2k
      this->Prefix.resize(Prefix.size() - 2);
110
18.2k
    };
111
18.2k
112
18.2k
    if (FirstChild) {
113
11.6k
      Pending.push_back(std::move(DumpWithIndent));
114
11.6k
    } else {
115
6.62k
      Pending.back()(false);
116
6.62k
      Pending.back() = std::move(DumpWithIndent);
117
6.62k
    }
118
18.2k
    FirstChild = false;
119
18.2k
  }
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
513
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
513
    // If we're at the top level, there's nothing interesting to do; just
55
513
    // run the dumper.
56
513
    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
434
69
434
    // We need to capture an owning-string in the lambda because the lambda
70
434
    // is invoked in a deferred manner.
71
434
    std::string LabelStr = Label;
72
434
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
434
      // Print out the appropriate tree structure and work out the prefix for
74
434
      // children of this node. For instance:
75
434
      //
76
434
      //   A        Prefix = ""
77
434
      //   |-B      Prefix = "| "
78
434
      //   | `-C    Prefix = "|   "
79
434
      //   `-D      Prefix = "  "
80
434
      //     |-E    Prefix = "  | "
81
434
      //     `-F    Prefix = "    "
82
434
      //   G        Prefix = ""
83
434
      //
84
434
      // Note that the first level gets no prefix.
85
434
      {
86
434
        OS << '\n';
87
434
        ColorScope Color(OS, ShowColors, IndentColor);
88
434
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
434
        if (!LabelStr.empty())
90
434
          OS << LabelStr << ": ";
91
434
92
434
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
434
        this->Prefix.push_back(' ');
94
434
      }
95
434
96
434
      FirstChild = true;
97
434
      unsigned Depth = Pending.size();
98
434
99
434
      DoAddChild();
100
434
101
434
      // If any children are left, they're the last at their nesting level.
102
434
      // Dump those ones out now.
103
434
      while (Depth < Pending.size()) {
104
434
        Pending.back()(true);
105
434
        this->Pending.pop_back();
106
434
      }
107
434
108
434
      // Restore the old prefix.
109
434
      this->Prefix.resize(Prefix.size() - 2);
110
434
    };
111
434
112
434
    if (FirstChild) {
113
304
      Pending.push_back(std::move(DumpWithIndent));
114
304
    } else {
115
130
      Pending.back()(false);
116
130
      Pending.back() = std::move(DumpWithIndent);
117
130
    }
118
434
    FirstChild = false;
119
434
  }
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
546
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
546
    // If we're at the top level, there's nothing interesting to do; just
55
546
    // run the dumper.
56
546
    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
546
69
546
    // We need to capture an owning-string in the lambda because the lambda
70
546
    // is invoked in a deferred manner.
71
546
    std::string LabelStr = Label;
72
546
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
546
      // Print out the appropriate tree structure and work out the prefix for
74
546
      // children of this node. For instance:
75
546
      //
76
546
      //   A        Prefix = ""
77
546
      //   |-B      Prefix = "| "
78
546
      //   | `-C    Prefix = "|   "
79
546
      //   `-D      Prefix = "  "
80
546
      //     |-E    Prefix = "  | "
81
546
      //     `-F    Prefix = "    "
82
546
      //   G        Prefix = ""
83
546
      //
84
546
      // Note that the first level gets no prefix.
85
546
      {
86
546
        OS << '\n';
87
546
        ColorScope Color(OS, ShowColors, IndentColor);
88
546
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
546
        if (!LabelStr.empty())
90
546
          OS << LabelStr << ": ";
91
546
92
546
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
546
        this->Prefix.push_back(' ');
94
546
      }
95
546
96
546
      FirstChild = true;
97
546
      unsigned Depth = Pending.size();
98
546
99
546
      DoAddChild();
100
546
101
546
      // If any children are left, they're the last at their nesting level.
102
546
      // Dump those ones out now.
103
546
      while (Depth < Pending.size()) {
104
546
        Pending.back()(true);
105
546
        this->Pending.pop_back();
106
546
      }
107
546
108
546
      // Restore the old prefix.
109
546
      this->Prefix.resize(Prefix.size() - 2);
110
546
    };
111
546
112
546
    if (FirstChild) {
113
459
      Pending.push_back(std::move(DumpWithIndent));
114
459
    } else {
115
87
      Pending.back()(false);
116
87
      Pending.back() = std::move(DumpWithIndent);
117
87
    }
118
546
    FirstChild = false;
119
546
  }
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
10
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
10
    // If we're at the top level, there's nothing interesting to do; just
55
10
    // run the dumper.
56
10
    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
10
69
10
    // We need to capture an owning-string in the lambda because the lambda
70
10
    // is invoked in a deferred manner.
71
10
    std::string LabelStr = Label;
72
10
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
10
      // Print out the appropriate tree structure and work out the prefix for
74
10
      // children of this node. For instance:
75
10
      //
76
10
      //   A        Prefix = ""
77
10
      //   |-B      Prefix = "| "
78
10
      //   | `-C    Prefix = "|   "
79
10
      //   `-D      Prefix = "  "
80
10
      //     |-E    Prefix = "  | "
81
10
      //     `-F    Prefix = "    "
82
10
      //   G        Prefix = ""
83
10
      //
84
10
      // Note that the first level gets no prefix.
85
10
      {
86
10
        OS << '\n';
87
10
        ColorScope Color(OS, ShowColors, IndentColor);
88
10
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
10
        if (!LabelStr.empty())
90
10
          OS << LabelStr << ": ";
91
10
92
10
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
10
        this->Prefix.push_back(' ');
94
10
      }
95
10
96
10
      FirstChild = true;
97
10
      unsigned Depth = Pending.size();
98
10
99
10
      DoAddChild();
100
10
101
10
      // If any children are left, they're the last at their nesting level.
102
10
      // Dump those ones out now.
103
10
      while (Depth < Pending.size()) {
104
10
        Pending.back()(true);
105
10
        this->Pending.pop_back();
106
10
      }
107
10
108
10
      // Restore the old prefix.
109
10
      this->Prefix.resize(Prefix.size() - 2);
110
10
    };
111
10
112
10
    if (FirstChild) {
113
10
      Pending.push_back(std::move(DumpWithIndent));
114
10
    } else {
115
0
      Pending.back()(false);
116
0
      Pending.back() = std::move(DumpWithIndent);
117
0
    }
118
10
    FirstChild = false;
119
10
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
598
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
0
      Pending.back()(false);
116
0
      Pending.back() = std::move(DumpWithIndent);
117
0
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
598
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
0
      Pending.back()(false);
116
0
      Pending.back() = std::move(DumpWithIndent);
117
0
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
0
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
598
      Pending.back()(false);
116
598
      Pending.back() = std::move(DumpWithIndent);
117
598
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
0
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
598
      Pending.back()(false);
116
598
      Pending.back() = std::move(DumpWithIndent);
117
598
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
0
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
598
      Pending.back()(false);
116
598
      Pending.back() = std::move(DumpWithIndent);
117
598
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
0
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
598
      Pending.back()(false);
116
598
      Pending.back() = std::move(DumpWithIndent);
117
598
    }
118
598
    FirstChild = false;
119
598
  }
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
598
  template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54
598
    // If we're at the top level, there's nothing interesting to do; just
55
598
    // run the dumper.
56
598
    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
598
69
598
    // We need to capture an owning-string in the lambda because the lambda
70
598
    // is invoked in a deferred manner.
71
598
    std::string LabelStr = Label;
72
598
    auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73
598
      // Print out the appropriate tree structure and work out the prefix for
74
598
      // children of this node. For instance:
75
598
      //
76
598
      //   A        Prefix = ""
77
598
      //   |-B      Prefix = "| "
78
598
      //   | `-C    Prefix = "|   "
79
598
      //   `-D      Prefix = "  "
80
598
      //     |-E    Prefix = "  | "
81
598
      //     `-F    Prefix = "    "
82
598
      //   G        Prefix = ""
83
598
      //
84
598
      // Note that the first level gets no prefix.
85
598
      {
86
598
        OS << '\n';
87
598
        ColorScope Color(OS, ShowColors, IndentColor);
88
598
        OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89
598
        if (!LabelStr.empty())
90
598
          OS << LabelStr << ": ";
91
598
92
598
        this->Prefix.push_back(IsLastChild ? ' ' : '|');
93
598
        this->Prefix.push_back(' ');
94
598
      }
95
598
96
598
      FirstChild = true;
97
598
      unsigned Depth = Pending.size();
98
598
99
598
      DoAddChild();
100
598
101
598
      // If any children are left, they're the last at their nesting level.
102
598
      // Dump those ones out now.
103
598
      while (Depth < Pending.size()) {
104
598
        Pending.back()(true);
105
598
        this->Pending.pop_back();
106
598
      }
107
598
108
598
      // Restore the old prefix.
109
598
      this->Prefix.resize(Prefix.size() - 2);
110
598
    };
111
598
112
598
    if (FirstChild) {
113
0
      Pending.push_back(std::move(DumpWithIndent));
114
598
    } else {
115
598
      Pending.back()(false);
116
598
      Pending.back() = std::move(DumpWithIndent);
117
598
    }
118
598
    FirstChild = false;
119
598
  }
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
968
      : 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 ASTContext *Context;
150
151
  const char *getCommandName(unsigned CommandID);
152
153
public:
154
  TextNodeDumper(raw_ostream &OS, bool ShowColors, const SourceManager *SM,
155
                 const PrintingPolicy &PrintPolicy,
156
                 const comments::CommandTraits *Traits);
157
158
  void Visit(const comments::Comment *C, const comments::FullComment *FC);
159
160
  void Visit(const Attr *A);
161
162
  void Visit(const TemplateArgument &TA, SourceRange R,
163
             const Decl *From = nullptr, StringRef Label = {});
164
165
  void Visit(const Stmt *Node);
166
167
  void Visit(const Type *T);
168
169
  void Visit(QualType T);
170
171
  void Visit(const Decl *D);
172
173
  void Visit(const CXXCtorInitializer *Init);
174
175
  void Visit(const OMPClause *C);
176
177
  void Visit(const BlockDecl::Capture &C);
178
179
  void Visit(const GenericSelectionExpr::ConstAssociation &A);
180
181
  void dumpPointer(const void *Ptr);
182
  void dumpLocation(SourceLocation Loc);
183
  void dumpSourceRange(SourceRange R);
184
  void dumpBareType(QualType T, bool Desugar = true);
185
  void dumpType(QualType T);
186
  void dumpBareDeclRef(const Decl *D);
187
  void dumpName(const NamedDecl *ND);
188
  void dumpAccessSpecifier(AccessSpecifier AS);
189
190
  void dumpDeclRef(const Decl *D, StringRef Label = {});
191
192
  void visitTextComment(const comments::TextComment *C,
193
                        const comments::FullComment *);
194
  void visitInlineCommandComment(const comments::InlineCommandComment *C,
195
                                 const comments::FullComment *);
196
  void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C,
197
                                const comments::FullComment *);
198
  void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C,
199
                              const comments::FullComment *);
200
  void visitBlockCommandComment(const comments::BlockCommandComment *C,
201
                                const comments::FullComment *);
202
  void visitParamCommandComment(const comments::ParamCommandComment *C,
203
                                const comments::FullComment *FC);
204
  void visitTParamCommandComment(const comments::TParamCommandComment *C,
205
                                 const comments::FullComment *FC);
206
  void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C,
207
                                 const comments::FullComment *);
208
  void
209
  visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C,
210
                                const comments::FullComment *);
211
  void visitVerbatimLineComment(const comments::VerbatimLineComment *C,
212
                                const comments::FullComment *);
213
214
// Implements Visit methods for Attrs.
215
#include "clang/AST/AttrTextNodeDump.inc"
216
217
  void VisitNullTemplateArgument(const TemplateArgument &TA);
218
  void VisitTypeTemplateArgument(const TemplateArgument &TA);
219
  void VisitDeclarationTemplateArgument(const TemplateArgument &TA);
220
  void VisitNullPtrTemplateArgument(const TemplateArgument &TA);
221
  void VisitIntegralTemplateArgument(const TemplateArgument &TA);
222
  void VisitTemplateTemplateArgument(const TemplateArgument &TA);
223
  void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA);
224
  void VisitExpressionTemplateArgument(const TemplateArgument &TA);
225
  void VisitPackTemplateArgument(const TemplateArgument &TA);
226
227
  void VisitIfStmt(const IfStmt *Node);
228
  void VisitSwitchStmt(const SwitchStmt *Node);
229
  void VisitWhileStmt(const WhileStmt *Node);
230
  void VisitLabelStmt(const LabelStmt *Node);
231
  void VisitGotoStmt(const GotoStmt *Node);
232
  void VisitCaseStmt(const CaseStmt *Node);
233
  void VisitConstantExpr(const ConstantExpr *Node);
234
  void VisitCallExpr(const CallExpr *Node);
235
  void VisitCastExpr(const CastExpr *Node);
236
  void VisitImplicitCastExpr(const ImplicitCastExpr *Node);
237
  void VisitDeclRefExpr(const DeclRefExpr *Node);
238
  void VisitPredefinedExpr(const PredefinedExpr *Node);
239
  void VisitCharacterLiteral(const CharacterLiteral *Node);
240
  void VisitIntegerLiteral(const IntegerLiteral *Node);
241
  void VisitFixedPointLiteral(const FixedPointLiteral *Node);
242
  void VisitFloatingLiteral(const FloatingLiteral *Node);
243
  void VisitStringLiteral(const StringLiteral *Str);
244
  void VisitInitListExpr(const InitListExpr *ILE);
245
  void VisitGenericSelectionExpr(const GenericSelectionExpr *E);
246
  void VisitUnaryOperator(const UnaryOperator *Node);
247
  void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node);
248
  void VisitMemberExpr(const MemberExpr *Node);
249
  void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node);
250
  void VisitBinaryOperator(const BinaryOperator *Node);
251
  void VisitCompoundAssignOperator(const CompoundAssignOperator *Node);
252
  void VisitAddrLabelExpr(const AddrLabelExpr *Node);
253
  void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node);
254
  void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node);
255
  void VisitCXXThisExpr(const CXXThisExpr *Node);
256
  void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node);
257
  void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node);
258
  void VisitCXXConstructExpr(const CXXConstructExpr *Node);
259
  void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node);
260
  void VisitCXXNewExpr(const CXXNewExpr *Node);
261
  void VisitCXXDeleteExpr(const CXXDeleteExpr *Node);
262
  void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node);
263
  void VisitExprWithCleanups(const ExprWithCleanups *Node);
264
  void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node);
265
  void VisitSizeOfPackExpr(const SizeOfPackExpr *Node);
266
  void
267
  VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node);
268
  void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node);
269
  void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node);
270
  void VisitObjCMessageExpr(const ObjCMessageExpr *Node);
271
  void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node);
272
  void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node);
273
  void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node);
274
  void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node);
275
  void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
276
  void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
277
  void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
278
279
  void VisitRValueReferenceType(const ReferenceType *T);
280
  void VisitArrayType(const ArrayType *T);
281
  void VisitConstantArrayType(const ConstantArrayType *T);
282
  void VisitVariableArrayType(const VariableArrayType *T);
283
  void VisitDependentSizedArrayType(const DependentSizedArrayType *T);
284
  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T);
285
  void VisitVectorType(const VectorType *T);
286
  void VisitFunctionType(const FunctionType *T);
287
  void VisitFunctionProtoType(const FunctionProtoType *T);
288
  void VisitUnresolvedUsingType(const UnresolvedUsingType *T);
289
  void VisitTypedefType(const TypedefType *T);
290
  void VisitUnaryTransformType(const UnaryTransformType *T);
291
  void VisitTagType(const TagType *T);
292
  void VisitTemplateTypeParmType(const TemplateTypeParmType *T);
293
  void VisitAutoType(const AutoType *T);
294
  void VisitTemplateSpecializationType(const TemplateSpecializationType *T);
295
  void VisitInjectedClassNameType(const InjectedClassNameType *T);
296
  void VisitObjCInterfaceType(const ObjCInterfaceType *T);
297
  void VisitPackExpansionType(const PackExpansionType *T);
298
299
  void VisitLabelDecl(const LabelDecl *D);
300
  void VisitTypedefDecl(const TypedefDecl *D);
301
  void VisitEnumDecl(const EnumDecl *D);
302
  void VisitRecordDecl(const RecordDecl *D);
303
  void VisitEnumConstantDecl(const EnumConstantDecl *D);
304
  void VisitIndirectFieldDecl(const IndirectFieldDecl *D);
305
  void VisitFunctionDecl(const FunctionDecl *D);
306
  void VisitFieldDecl(const FieldDecl *D);
307
  void VisitVarDecl(const VarDecl *D);
308
  void VisitBindingDecl(const BindingDecl *D);
309
  void VisitCapturedDecl(const CapturedDecl *D);
310
  void VisitImportDecl(const ImportDecl *D);
311
  void VisitPragmaCommentDecl(const PragmaCommentDecl *D);
312
  void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D);
313
  void VisitOMPExecutableDirective(const OMPExecutableDirective *D);
314
  void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D);
315
  void VisitOMPRequiresDecl(const OMPRequiresDecl *D);
316
  void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D);
317
  void VisitNamespaceDecl(const NamespaceDecl *D);
318
  void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D);
319
  void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
320
  void VisitTypeAliasDecl(const TypeAliasDecl *D);
321
  void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D);
322
  void VisitCXXRecordDecl(const CXXRecordDecl *D);
323
  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
324
  void VisitClassTemplateDecl(const ClassTemplateDecl *D);
325
  void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D);
326
  void VisitVarTemplateDecl(const VarTemplateDecl *D);
327
  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
328
  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
329
  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
330
  void VisitUsingDecl(const UsingDecl *D);
331
  void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D);
332
  void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D);
333
  void VisitUsingShadowDecl(const UsingShadowDecl *D);
334
  void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D);
335
  void VisitLinkageSpecDecl(const LinkageSpecDecl *D);
336
  void VisitAccessSpecDecl(const AccessSpecDecl *D);
337
  void VisitFriendDecl(const FriendDecl *D);
338
  void VisitObjCIvarDecl(const ObjCIvarDecl *D);
339
  void VisitObjCMethodDecl(const ObjCMethodDecl *D);
340
  void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D);
341
  void VisitObjCCategoryDecl(const ObjCCategoryDecl *D);
342
  void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D);
343
  void VisitObjCProtocolDecl(const ObjCProtocolDecl *D);
344
  void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D);
345
  void VisitObjCImplementationDecl(const ObjCImplementationDecl *D);
346
  void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D);
347
  void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
348
  void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
349
  void VisitBlockDecl(const BlockDecl *D);
350
  void VisitConceptDecl(const ConceptDecl *D);
351
};
352
353
} // namespace clang
354
355
#endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H