class ASTDumper

Declaration

class ASTDumper : public ASTNodeTraverser { /* full declaration omitted */ };

Description

ASTNodeTraverser traverses the Clang AST for dumping purposes. The `Derived::doGetNodeDelegate()` method is required to be an accessible member which returns a reference of type `NodeDelegateType & ` which implements the following interface: struct { template <typename Fn> void AddChild(Fn DoAddChild); template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild); void Visit(const comments::Comment *C, const comments::FullComment *FC); void Visit(const Attr *A); void Visit(const TemplateArgument &TA , SourceRange R = {}, const Decl *From = nullptr, StringRef Label = {}); void Visit(const Stmt *Node); void Visit(const Type *T); void Visit(QualType T); void Visit(const Decl *D); void Visit(const CXXCtorInitializer *Init); void Visit(const OMPClause *C); void Visit(const BlockDecl::Capture &C ); void Visit(const GenericSelectionExpr::ConstAssociation &A ); void Visit(const concepts::Requirement *R); void Visit(const APValue &Value , QualType Ty); };

Declared at: clang/include/clang/AST/ASTDumper.h:18

Inherits from: ASTNodeTraverser

Member Variables

private clang::TextNodeDumper NodeDumper
private llvm::raw_ostream& OS
private const bool ShowColors

Method Overview

Methods

ASTDumper(llvm::raw_ostream& OS,
          const clang::ASTContext& Context,
          bool ShowColors)

Declared at: clang/include/clang/AST/ASTDumper.h:27

Parameters

llvm::raw_ostream& OS
const clang::ASTContext& Context
bool ShowColors

ASTDumper(llvm::raw_ostream& OS, bool ShowColors)

Declared at: clang/include/clang/AST/ASTDumper.h:30

Parameters

llvm::raw_ostream& OS
bool ShowColors

void VisitClassTemplateDecl(
    const clang::ClassTemplateDecl* D)

Declared at: clang/include/clang/AST/ASTDumper.h:44

Parameters

const clang::ClassTemplateDecl* D

void VisitFunctionTemplateDecl(
    const clang::FunctionTemplateDecl* D)

Declared at: clang/include/clang/AST/ASTDumper.h:43

Parameters

const clang::FunctionTemplateDecl* D

void VisitVarTemplateDecl(
    const clang::VarTemplateDecl* D)

Declared at: clang/include/clang/AST/ASTDumper.h:45

Parameters

const clang::VarTemplateDecl* D

clang::TextNodeDumper& doGetNodeDelegate()

Declared at: clang/include/clang/AST/ASTDumper.h:33

void dumpLookups(const clang::DeclContext* DC,
                 bool DumpDecls)

Declared at: clang/include/clang/AST/ASTDumper.h:35

Parameters

const clang::DeclContext* DC
bool DumpDecls

template <typename TemplateDecl>
void dumpTemplateDecl(const TemplateDecl* D,
                      bool DumpExplicitInst)

Declared at: clang/include/clang/AST/ASTDumper.h:41

Templates

TemplateDecl

Parameters

const TemplateDecl* D
bool DumpExplicitInst

template <typename SpecializationDecl>
void dumpTemplateDeclSpecialization(
    const SpecializationDecl* D,
    bool DumpExplicitInst,
    bool DumpRefOnly)

Declared at: clang/include/clang/AST/ASTDumper.h:38

Templates

SpecializationDecl

Parameters

const SpecializationDecl* D
bool DumpExplicitInst
bool DumpRefOnly