class JSONDumper
Declaration
class JSONDumper : 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/JSONNodeDumper.h:356
Inherits from: ASTNodeTraverser
Member Variables
- private clang::JSONNodeDumper NodeDumper
Method Overview
- public JSONDumper(llvm::raw_ostream & OS, const clang::SourceManager & SrcMgr, clang::ASTContext & Ctx, const clang::PrintingPolicy & PrintPolicy, const comments::CommandTraits * Traits)
- public void VisitClassTemplateDecl(const clang::ClassTemplateDecl * CTD)
- public void VisitFunctionTemplateDecl(const clang::FunctionTemplateDecl * FTD)
- public void VisitVarTemplateDecl(const clang::VarTemplateDecl * VTD)
- public clang::JSONNodeDumper & doGetNodeDelegate()
- private template <typename TemplateDecl>void writeTemplateDecl(const TemplateDecl * TD, bool DumpExplicitInst)
- private template <typename SpecializationDecl>void writeTemplateDeclSpecialization(const SpecializationDecl * SD, bool DumpExplicitInst, bool DumpRefOnly)
Methods
¶JSONDumper(
llvm::raw_ostream& OS,
const clang::SourceManager& SrcMgr,
clang::ASTContext& Ctx,
const clang::PrintingPolicy& PrintPolicy,
const comments::CommandTraits* Traits)
JSONDumper(
llvm::raw_ostream& OS,
const clang::SourceManager& SrcMgr,
clang::ASTContext& Ctx,
const clang::PrintingPolicy& PrintPolicy,
const comments::CommandTraits* Traits)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:420
Parameters
- llvm::raw_ostream& OS
- const clang::SourceManager& SrcMgr
- clang::ASTContext& Ctx
- const clang::PrintingPolicy& PrintPolicy
- const comments::CommandTraits* Traits
¶void VisitClassTemplateDecl(
const clang::ClassTemplateDecl* CTD)
void VisitClassTemplateDecl(
const clang::ClassTemplateDecl* CTD)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:430
Parameters
- const clang::ClassTemplateDecl* CTD
¶void VisitFunctionTemplateDecl(
const clang::FunctionTemplateDecl* FTD)
void VisitFunctionTemplateDecl(
const clang::FunctionTemplateDecl* FTD)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:427
Parameters
- const clang::FunctionTemplateDecl* FTD
¶void VisitVarTemplateDecl(
const clang::VarTemplateDecl* VTD)
void VisitVarTemplateDecl(
const clang::VarTemplateDecl* VTD)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:433
Parameters
- const clang::VarTemplateDecl* VTD
¶clang::JSONNodeDumper& doGetNodeDelegate()
clang::JSONNodeDumper& doGetNodeDelegate()
Declared at: clang/include/clang/AST/JSONNodeDumper.h:425
¶template <typename TemplateDecl>
void writeTemplateDecl(const TemplateDecl* TD,
bool DumpExplicitInst)
template <typename TemplateDecl>
void writeTemplateDecl(const TemplateDecl* TD,
bool DumpExplicitInst)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:403
Templates
- TemplateDecl
Parameters
- const TemplateDecl* TD
- bool DumpExplicitInst
¶template <typename SpecializationDecl>
void writeTemplateDeclSpecialization(
const SpecializationDecl* SD,
bool DumpExplicitInst,
bool DumpRefOnly)
template <typename SpecializationDecl>
void writeTemplateDeclSpecialization(
const SpecializationDecl* SD,
bool DumpExplicitInst,
bool DumpRefOnly)
Declared at: clang/include/clang/AST/JSONNodeDumper.h:360
Templates
- SpecializationDecl
Parameters
- const SpecializationDecl* SD
- bool DumpExplicitInst
- bool DumpRefOnly