Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/AST/TextNodeDumper.h
Show All 13 Lines | |||||
#define LLVM_CLANG_AST_TEXTNODEDUMPER_H | #define LLVM_CLANG_AST_TEXTNODEDUMPER_H | ||||
#include "clang/AST/ASTContext.h" | #include "clang/AST/ASTContext.h" | ||||
#include "clang/AST/ASTDumperUtils.h" | #include "clang/AST/ASTDumperUtils.h" | ||||
#include "clang/AST/AttrVisitor.h" | #include "clang/AST/AttrVisitor.h" | ||||
#include "clang/AST/CommentCommandTraits.h" | #include "clang/AST/CommentCommandTraits.h" | ||||
#include "clang/AST/CommentVisitor.h" | #include "clang/AST/CommentVisitor.h" | ||||
#include "clang/AST/DeclVisitor.h" | #include "clang/AST/DeclVisitor.h" | ||||
#include "clang/AST/ExprConcepts.h" | |||||
#include "clang/AST/ExprCXX.h" | #include "clang/AST/ExprCXX.h" | ||||
#include "clang/AST/ExprConcepts.h" | |||||
#include "clang/AST/StmtVisitor.h" | #include "clang/AST/StmtVisitor.h" | ||||
#include "clang/AST/TemplateArgumentVisitor.h" | #include "clang/AST/TemplateArgumentVisitor.h" | ||||
#include "clang/AST/Type.h" | #include "clang/AST/Type.h" | ||||
#include "clang/AST/TypeLocVisitor.h" | |||||
#include "clang/AST/TypeVisitor.h" | #include "clang/AST/TypeVisitor.h" | ||||
namespace clang { | namespace clang { | ||||
class APValue; | class APValue; | ||||
class TextTreeStructure { | class TextTreeStructure { | ||||
raw_ostream &OS; | raw_ostream &OS; | ||||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
class TextNodeDumper | class TextNodeDumper | ||||
: public TextTreeStructure, | : public TextTreeStructure, | ||||
public comments::ConstCommentVisitor<TextNodeDumper, void, | public comments::ConstCommentVisitor<TextNodeDumper, void, | ||||
const comments::FullComment *>, | const comments::FullComment *>, | ||||
public ConstAttrVisitor<TextNodeDumper>, | public ConstAttrVisitor<TextNodeDumper>, | ||||
public ConstTemplateArgumentVisitor<TextNodeDumper>, | public ConstTemplateArgumentVisitor<TextNodeDumper>, | ||||
public ConstStmtVisitor<TextNodeDumper>, | public ConstStmtVisitor<TextNodeDumper>, | ||||
public TypeVisitor<TextNodeDumper>, | public TypeVisitor<TextNodeDumper>, | ||||
public TypeLocVisitor<TextNodeDumper>, | |||||
public ConstDeclVisitor<TextNodeDumper> { | public ConstDeclVisitor<TextNodeDumper> { | ||||
raw_ostream &OS; | raw_ostream &OS; | ||||
const bool ShowColors; | const bool ShowColors; | ||||
/// Keep track of the last location we print out so that we can | /// Keep track of the last location we print out so that we can | ||||
/// print out deltas from then on out. | /// print out deltas from then on out. | ||||
const char *LastLocFilename = ""; | const char *LastLocFilename = ""; | ||||
unsigned LastLocLine = ~0U; | unsigned LastLocLine = ~0U; | ||||
Show All 31 Lines | void Visit(const TemplateArgument &TA, SourceRange R, | ||||
const Decl *From = nullptr, StringRef Label = {}); | const Decl *From = nullptr, StringRef Label = {}); | ||||
void Visit(const Stmt *Node); | void Visit(const Stmt *Node); | ||||
void Visit(const Type *T); | void Visit(const Type *T); | ||||
void Visit(QualType T); | void Visit(QualType T); | ||||
void Visit(TypeLoc TL); | |||||
void Visit(const Decl *D); | void Visit(const Decl *D); | ||||
void Visit(const CXXCtorInitializer *Init); | void Visit(const CXXCtorInitializer *Init); | ||||
void Visit(const OMPClause *C); | void Visit(const OMPClause *C); | ||||
void Visit(const BlockDecl::Capture &C); | void Visit(const BlockDecl::Capture &C); | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | #include "clang/AST/AttrTextNodeDump.inc" | ||||
void VisitAutoType(const AutoType *T); | void VisitAutoType(const AutoType *T); | ||||
void VisitDeducedTemplateSpecializationType( | void VisitDeducedTemplateSpecializationType( | ||||
const DeducedTemplateSpecializationType *T); | const DeducedTemplateSpecializationType *T); | ||||
void VisitTemplateSpecializationType(const TemplateSpecializationType *T); | void VisitTemplateSpecializationType(const TemplateSpecializationType *T); | ||||
void VisitInjectedClassNameType(const InjectedClassNameType *T); | void VisitInjectedClassNameType(const InjectedClassNameType *T); | ||||
void VisitObjCInterfaceType(const ObjCInterfaceType *T); | void VisitObjCInterfaceType(const ObjCInterfaceType *T); | ||||
void VisitPackExpansionType(const PackExpansionType *T); | void VisitPackExpansionType(const PackExpansionType *T); | ||||
void VisitQualifiedTypeLoc(QualifiedTypeLoc TL); | |||||
void VisitRValueReferenceTypeLoc(ReferenceTypeLoc TL); | |||||
void VisitArrayTypeLoc(ArrayTypeLoc TL); | |||||
void VisitConstantArrayTypeLoc(ConstantArrayTypeLoc TL); | |||||
void VisitVariableArrayTypeLoc(VariableArrayTypeLoc TL); | |||||
aaron.ballman: Should you also handle `IncompleteArrayTypeLoc` as well? | |||||
Not Done ReplyInline ActionsNot sure about this one, since it has no additional metadata - the type location visitor already prints out the type class name upsj: Not sure about this one, since it has no additional metadata - the type location visitor… | |||||
void VisitDependentSizedArrayTypeLoc(DependentSizedArrayTypeLoc TL); | |||||
void VisitDependentSizedExtVectorTypeLoc(DependentSizedExtVectorTypeLoc TL); | |||||
void VisitVectorTypeLoc(VectorTypeLoc TL); | |||||
void VisitFunctionTypeLoc(FunctionTypeLoc TL); | |||||
void VisitFunctionProtoTypeLoc(FunctionProtoTypeLoc TL); | |||||
void VisitUnresolvedUsingTypeLoc(UnresolvedUsingTypeLoc TL); | |||||
void VisitUsingTypeLoc(UsingTypeLoc TL); | |||||
void VisitTypedefTypeLoc(TypedefTypeLoc TL); | |||||
void VisitUnaryTransformTypeLoc(UnaryTransformTypeLoc TL); | |||||
void VisitTagTypeLoc(TagTypeLoc TL); | |||||
void VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TL); | |||||
void VisitSubstTemplateTypeParmTypeLoc(SubstTemplateTypeParmTypeLoc TL); | |||||
void VisitAutoTypeLoc(AutoTypeLoc TL); | |||||
void VisitDeducedTemplateSpecializationTypeLoc( | |||||
DeducedTemplateSpecializationTypeLoc TL); | |||||
void VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL); | |||||
void VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL); | |||||
void VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL); | |||||
void VisitPackExpansionTypeLoc(PackExpansionTypeLoc TL); | |||||
void VisitLabelDecl(const LabelDecl *D); | void VisitLabelDecl(const LabelDecl *D); | ||||
void VisitTypedefDecl(const TypedefDecl *D); | void VisitTypedefDecl(const TypedefDecl *D); | ||||
void VisitEnumDecl(const EnumDecl *D); | void VisitEnumDecl(const EnumDecl *D); | ||||
void VisitRecordDecl(const RecordDecl *D); | void VisitRecordDecl(const RecordDecl *D); | ||||
void VisitEnumConstantDecl(const EnumConstantDecl *D); | void VisitEnumConstantDecl(const EnumConstantDecl *D); | ||||
void VisitIndirectFieldDecl(const IndirectFieldDecl *D); | void VisitIndirectFieldDecl(const IndirectFieldDecl *D); | ||||
void VisitFunctionDecl(const FunctionDecl *D); | void VisitFunctionDecl(const FunctionDecl *D); | ||||
void VisitFieldDecl(const FieldDecl *D); | void VisitFieldDecl(const FieldDecl *D); | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |
Should you also handle IncompleteArrayTypeLoc as well?