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