10b57cec5SDimitry Andric //===--- TextNodeDumper.h - Printing of AST nodes -------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file implements AST dumping of components of individual AST nodes. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #ifndef LLVM_CLANG_AST_TEXTNODEDUMPER_H 140b57cec5SDimitry Andric #define LLVM_CLANG_AST_TEXTNODEDUMPER_H 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric #include "clang/AST/ASTContext.h" 170b57cec5SDimitry Andric #include "clang/AST/ASTDumperUtils.h" 180b57cec5SDimitry Andric #include "clang/AST/AttrVisitor.h" 190b57cec5SDimitry Andric #include "clang/AST/CommentCommandTraits.h" 200b57cec5SDimitry Andric #include "clang/AST/CommentVisitor.h" 210b57cec5SDimitry Andric #include "clang/AST/DeclVisitor.h" 22fe6060f1SDimitry Andric #include "clang/AST/ExprConcepts.h" 230b57cec5SDimitry Andric #include "clang/AST/ExprCXX.h" 240b57cec5SDimitry Andric #include "clang/AST/StmtVisitor.h" 250b57cec5SDimitry Andric #include "clang/AST/TemplateArgumentVisitor.h" 265ffd83dbSDimitry Andric #include "clang/AST/Type.h" 27*0fca6ea1SDimitry Andric #include "clang/AST/TypeLocVisitor.h" 280b57cec5SDimitry Andric #include "clang/AST/TypeVisitor.h" 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric namespace clang { 310b57cec5SDimitry Andric 325ffd83dbSDimitry Andric class APValue; 335ffd83dbSDimitry Andric 340b57cec5SDimitry Andric class TextTreeStructure { 350b57cec5SDimitry Andric raw_ostream &OS; 360b57cec5SDimitry Andric const bool ShowColors; 370b57cec5SDimitry Andric 380b57cec5SDimitry Andric /// Pending[i] is an action to dump an entity at level i. 390b57cec5SDimitry Andric llvm::SmallVector<std::function<void(bool IsLastChild)>, 32> Pending; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric /// Indicates whether we're at the top level. 420b57cec5SDimitry Andric bool TopLevel = true; 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric /// Indicates if we're handling the first child after entering a new depth. 450b57cec5SDimitry Andric bool FirstChild = true; 460b57cec5SDimitry Andric 470b57cec5SDimitry Andric /// Prefix for currently-being-dumped entity. 480b57cec5SDimitry Andric std::string Prefix; 490b57cec5SDimitry Andric 500b57cec5SDimitry Andric public: 510b57cec5SDimitry Andric /// Add a child of the current node. Calls DoAddChild without arguments 520b57cec5SDimitry Andric template <typename Fn> void AddChild(Fn DoAddChild) { 530b57cec5SDimitry Andric return AddChild("", DoAddChild); 540b57cec5SDimitry Andric } 550b57cec5SDimitry Andric 560b57cec5SDimitry Andric /// Add a child of the current node with an optional label. 570b57cec5SDimitry Andric /// Calls DoAddChild without arguments. 580b57cec5SDimitry Andric template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) { 590b57cec5SDimitry Andric // If we're at the top level, there's nothing interesting to do; just 600b57cec5SDimitry Andric // run the dumper. 610b57cec5SDimitry Andric if (TopLevel) { 620b57cec5SDimitry Andric TopLevel = false; 630b57cec5SDimitry Andric DoAddChild(); 640b57cec5SDimitry Andric while (!Pending.empty()) { 650b57cec5SDimitry Andric Pending.back()(true); 660b57cec5SDimitry Andric Pending.pop_back(); 670b57cec5SDimitry Andric } 680b57cec5SDimitry Andric Prefix.clear(); 690b57cec5SDimitry Andric OS << "\n"; 700b57cec5SDimitry Andric TopLevel = true; 710b57cec5SDimitry Andric return; 720b57cec5SDimitry Andric } 730b57cec5SDimitry Andric 74fe6060f1SDimitry Andric auto DumpWithIndent = [this, DoAddChild, 75fe6060f1SDimitry Andric Label(Label.str())](bool IsLastChild) { 760b57cec5SDimitry Andric // Print out the appropriate tree structure and work out the prefix for 770b57cec5SDimitry Andric // children of this node. For instance: 780b57cec5SDimitry Andric // 790b57cec5SDimitry Andric // A Prefix = "" 800b57cec5SDimitry Andric // |-B Prefix = "| " 810b57cec5SDimitry Andric // | `-C Prefix = "| " 820b57cec5SDimitry Andric // `-D Prefix = " " 830b57cec5SDimitry Andric // |-E Prefix = " | " 840b57cec5SDimitry Andric // `-F Prefix = " " 850b57cec5SDimitry Andric // G Prefix = "" 860b57cec5SDimitry Andric // 870b57cec5SDimitry Andric // Note that the first level gets no prefix. 880b57cec5SDimitry Andric { 890b57cec5SDimitry Andric OS << '\n'; 900b57cec5SDimitry Andric ColorScope Color(OS, ShowColors, IndentColor); 910b57cec5SDimitry Andric OS << Prefix << (IsLastChild ? '`' : '|') << '-'; 92fe6060f1SDimitry Andric if (!Label.empty()) 93fe6060f1SDimitry Andric OS << Label << ": "; 940b57cec5SDimitry Andric 950b57cec5SDimitry Andric this->Prefix.push_back(IsLastChild ? ' ' : '|'); 960b57cec5SDimitry Andric this->Prefix.push_back(' '); 970b57cec5SDimitry Andric } 980b57cec5SDimitry Andric 990b57cec5SDimitry Andric FirstChild = true; 1000b57cec5SDimitry Andric unsigned Depth = Pending.size(); 1010b57cec5SDimitry Andric 1020b57cec5SDimitry Andric DoAddChild(); 1030b57cec5SDimitry Andric 1040b57cec5SDimitry Andric // If any children are left, they're the last at their nesting level. 1050b57cec5SDimitry Andric // Dump those ones out now. 1060b57cec5SDimitry Andric while (Depth < Pending.size()) { 1070b57cec5SDimitry Andric Pending.back()(true); 1080b57cec5SDimitry Andric this->Pending.pop_back(); 1090b57cec5SDimitry Andric } 1100b57cec5SDimitry Andric 1110b57cec5SDimitry Andric // Restore the old prefix. 1120b57cec5SDimitry Andric this->Prefix.resize(Prefix.size() - 2); 1130b57cec5SDimitry Andric }; 1140b57cec5SDimitry Andric 1150b57cec5SDimitry Andric if (FirstChild) { 1160b57cec5SDimitry Andric Pending.push_back(std::move(DumpWithIndent)); 1170b57cec5SDimitry Andric } else { 1180b57cec5SDimitry Andric Pending.back()(false); 1190b57cec5SDimitry Andric Pending.back() = std::move(DumpWithIndent); 1200b57cec5SDimitry Andric } 1210b57cec5SDimitry Andric FirstChild = false; 1220b57cec5SDimitry Andric } 1230b57cec5SDimitry Andric 1240b57cec5SDimitry Andric TextTreeStructure(raw_ostream &OS, bool ShowColors) 1250b57cec5SDimitry Andric : OS(OS), ShowColors(ShowColors) {} 1260b57cec5SDimitry Andric }; 1270b57cec5SDimitry Andric 1280b57cec5SDimitry Andric class TextNodeDumper 1290b57cec5SDimitry Andric : public TextTreeStructure, 1300b57cec5SDimitry Andric public comments::ConstCommentVisitor<TextNodeDumper, void, 1310b57cec5SDimitry Andric const comments::FullComment *>, 1320b57cec5SDimitry Andric public ConstAttrVisitor<TextNodeDumper>, 1330b57cec5SDimitry Andric public ConstTemplateArgumentVisitor<TextNodeDumper>, 1340b57cec5SDimitry Andric public ConstStmtVisitor<TextNodeDumper>, 1350b57cec5SDimitry Andric public TypeVisitor<TextNodeDumper>, 136*0fca6ea1SDimitry Andric public TypeLocVisitor<TextNodeDumper>, 1370b57cec5SDimitry Andric public ConstDeclVisitor<TextNodeDumper> { 1380b57cec5SDimitry Andric raw_ostream &OS; 1390b57cec5SDimitry Andric const bool ShowColors; 1400b57cec5SDimitry Andric 1410b57cec5SDimitry Andric /// Keep track of the last location we print out so that we can 1420b57cec5SDimitry Andric /// print out deltas from then on out. 1430b57cec5SDimitry Andric const char *LastLocFilename = ""; 1440b57cec5SDimitry Andric unsigned LastLocLine = ~0U; 1450b57cec5SDimitry Andric 1465ffd83dbSDimitry Andric /// \p Context, \p SM, and \p Traits can be null. This is because we want 1475ffd83dbSDimitry Andric /// to be able to call \p dump() in a debugger without having to pass the 1485ffd83dbSDimitry Andric /// \p ASTContext to \p dump. Not all parts of the AST dump output will be 1495ffd83dbSDimitry Andric /// available without the \p ASTContext. 1505ffd83dbSDimitry Andric const ASTContext *Context = nullptr; 1515ffd83dbSDimitry Andric const SourceManager *SM = nullptr; 1520b57cec5SDimitry Andric 1530b57cec5SDimitry Andric /// The policy to use for printing; can be defaulted. 1545ffd83dbSDimitry Andric PrintingPolicy PrintPolicy = LangOptions(); 1550b57cec5SDimitry Andric 1565ffd83dbSDimitry Andric const comments::CommandTraits *Traits = nullptr; 1570b57cec5SDimitry Andric 1580b57cec5SDimitry Andric const char *getCommandName(unsigned CommandID); 159e8d8bef9SDimitry Andric void printFPOptions(FPOptionsOverride FPO); 1600b57cec5SDimitry Andric 1615ffd83dbSDimitry Andric void dumpAPValueChildren(const APValue &Value, QualType Ty, 1625ffd83dbSDimitry Andric const APValue &(*IdxToChildFun)(const APValue &, 1635ffd83dbSDimitry Andric unsigned), 1645ffd83dbSDimitry Andric unsigned NumChildren, StringRef LabelSingular, 1655ffd83dbSDimitry Andric StringRef LabelPlurial); 1665ffd83dbSDimitry Andric 1670b57cec5SDimitry Andric public: 1685ffd83dbSDimitry Andric TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors); 1695ffd83dbSDimitry Andric TextNodeDumper(raw_ostream &OS, bool ShowColors); 1700b57cec5SDimitry Andric 1710b57cec5SDimitry Andric void Visit(const comments::Comment *C, const comments::FullComment *FC); 1720b57cec5SDimitry Andric 1730b57cec5SDimitry Andric void Visit(const Attr *A); 1740b57cec5SDimitry Andric 1750b57cec5SDimitry Andric void Visit(const TemplateArgument &TA, SourceRange R, 1760b57cec5SDimitry Andric const Decl *From = nullptr, StringRef Label = {}); 1770b57cec5SDimitry Andric 1780b57cec5SDimitry Andric void Visit(const Stmt *Node); 1790b57cec5SDimitry Andric 1800b57cec5SDimitry Andric void Visit(const Type *T); 1810b57cec5SDimitry Andric 1820b57cec5SDimitry Andric void Visit(QualType T); 1830b57cec5SDimitry Andric 184*0fca6ea1SDimitry Andric void Visit(TypeLoc); 185*0fca6ea1SDimitry Andric 1860b57cec5SDimitry Andric void Visit(const Decl *D); 1870b57cec5SDimitry Andric 1880b57cec5SDimitry Andric void Visit(const CXXCtorInitializer *Init); 1890b57cec5SDimitry Andric 1900b57cec5SDimitry Andric void Visit(const OMPClause *C); 1910b57cec5SDimitry Andric 192*0fca6ea1SDimitry Andric void Visit(const OpenACCClause *C); 193*0fca6ea1SDimitry Andric 1940b57cec5SDimitry Andric void Visit(const BlockDecl::Capture &C); 1950b57cec5SDimitry Andric 1960b57cec5SDimitry Andric void Visit(const GenericSelectionExpr::ConstAssociation &A); 1970b57cec5SDimitry Andric 1985f757f3fSDimitry Andric void Visit(const ConceptReference *); 1995f757f3fSDimitry Andric 200fe6060f1SDimitry Andric void Visit(const concepts::Requirement *R); 201fe6060f1SDimitry Andric 2025ffd83dbSDimitry Andric void Visit(const APValue &Value, QualType Ty); 2035ffd83dbSDimitry Andric 2040b57cec5SDimitry Andric void dumpPointer(const void *Ptr); 2050b57cec5SDimitry Andric void dumpLocation(SourceLocation Loc); 2060b57cec5SDimitry Andric void dumpSourceRange(SourceRange R); 2070b57cec5SDimitry Andric void dumpBareType(QualType T, bool Desugar = true); 2080b57cec5SDimitry Andric void dumpType(QualType T); 2090b57cec5SDimitry Andric void dumpBareDeclRef(const Decl *D); 2100b57cec5SDimitry Andric void dumpName(const NamedDecl *ND); 2110b57cec5SDimitry Andric void dumpAccessSpecifier(AccessSpecifier AS); 2125ffd83dbSDimitry Andric void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C); 2135f757f3fSDimitry Andric void dumpTemplateSpecializationKind(TemplateSpecializationKind TSK); 2145f757f3fSDimitry Andric void dumpNestedNameSpecifier(const NestedNameSpecifier *NNS); 2155f757f3fSDimitry Andric void dumpConceptReference(const ConceptReference *R); 216*0fca6ea1SDimitry Andric void dumpTemplateArgument(const TemplateArgument &TA); 217*0fca6ea1SDimitry Andric void dumpBareTemplateName(TemplateName TN); 218*0fca6ea1SDimitry Andric void dumpTemplateName(TemplateName TN, StringRef Label = {}); 2190b57cec5SDimitry Andric 2200b57cec5SDimitry Andric void dumpDeclRef(const Decl *D, StringRef Label = {}); 2210b57cec5SDimitry Andric 2220b57cec5SDimitry Andric void visitTextComment(const comments::TextComment *C, 2230b57cec5SDimitry Andric const comments::FullComment *); 2240b57cec5SDimitry Andric void visitInlineCommandComment(const comments::InlineCommandComment *C, 2250b57cec5SDimitry Andric const comments::FullComment *); 2260b57cec5SDimitry Andric void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, 2270b57cec5SDimitry Andric const comments::FullComment *); 2280b57cec5SDimitry Andric void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, 2290b57cec5SDimitry Andric const comments::FullComment *); 2300b57cec5SDimitry Andric void visitBlockCommandComment(const comments::BlockCommandComment *C, 2310b57cec5SDimitry Andric const comments::FullComment *); 2320b57cec5SDimitry Andric void visitParamCommandComment(const comments::ParamCommandComment *C, 2330b57cec5SDimitry Andric const comments::FullComment *FC); 2340b57cec5SDimitry Andric void visitTParamCommandComment(const comments::TParamCommandComment *C, 2350b57cec5SDimitry Andric const comments::FullComment *FC); 2360b57cec5SDimitry Andric void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, 2370b57cec5SDimitry Andric const comments::FullComment *); 2380b57cec5SDimitry Andric void 2390b57cec5SDimitry Andric visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, 2400b57cec5SDimitry Andric const comments::FullComment *); 2410b57cec5SDimitry Andric void visitVerbatimLineComment(const comments::VerbatimLineComment *C, 2420b57cec5SDimitry Andric const comments::FullComment *); 2430b57cec5SDimitry Andric 2440b57cec5SDimitry Andric // Implements Visit methods for Attrs. 2450b57cec5SDimitry Andric #include "clang/AST/AttrTextNodeDump.inc" 2460b57cec5SDimitry Andric 2470b57cec5SDimitry Andric void VisitNullTemplateArgument(const TemplateArgument &TA); 2480b57cec5SDimitry Andric void VisitTypeTemplateArgument(const TemplateArgument &TA); 2490b57cec5SDimitry Andric void VisitDeclarationTemplateArgument(const TemplateArgument &TA); 2500b57cec5SDimitry Andric void VisitNullPtrTemplateArgument(const TemplateArgument &TA); 2510b57cec5SDimitry Andric void VisitIntegralTemplateArgument(const TemplateArgument &TA); 2520b57cec5SDimitry Andric void VisitTemplateTemplateArgument(const TemplateArgument &TA); 2530b57cec5SDimitry Andric void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA); 2540b57cec5SDimitry Andric void VisitExpressionTemplateArgument(const TemplateArgument &TA); 2550b57cec5SDimitry Andric void VisitPackTemplateArgument(const TemplateArgument &TA); 2560b57cec5SDimitry Andric 2570b57cec5SDimitry Andric void VisitIfStmt(const IfStmt *Node); 2580b57cec5SDimitry Andric void VisitSwitchStmt(const SwitchStmt *Node); 2590b57cec5SDimitry Andric void VisitWhileStmt(const WhileStmt *Node); 2600b57cec5SDimitry Andric void VisitLabelStmt(const LabelStmt *Node); 2610b57cec5SDimitry Andric void VisitGotoStmt(const GotoStmt *Node); 2620b57cec5SDimitry Andric void VisitCaseStmt(const CaseStmt *Node); 2635f757f3fSDimitry Andric void VisitReturnStmt(const ReturnStmt *Node); 2641db9f3b2SDimitry Andric void VisitCoawaitExpr(const CoawaitExpr *Node); 2651db9f3b2SDimitry Andric void VisitCoreturnStmt(const CoreturnStmt *Node); 26681ad6265SDimitry Andric void VisitCompoundStmt(const CompoundStmt *Node); 2670b57cec5SDimitry Andric void VisitConstantExpr(const ConstantExpr *Node); 2680b57cec5SDimitry Andric void VisitCallExpr(const CallExpr *Node); 2695ffd83dbSDimitry Andric void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node); 2700b57cec5SDimitry Andric void VisitCastExpr(const CastExpr *Node); 2710b57cec5SDimitry Andric void VisitImplicitCastExpr(const ImplicitCastExpr *Node); 2720b57cec5SDimitry Andric void VisitDeclRefExpr(const DeclRefExpr *Node); 2735f757f3fSDimitry Andric void VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *Node); 274fe6060f1SDimitry Andric void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node); 2750b57cec5SDimitry Andric void VisitPredefinedExpr(const PredefinedExpr *Node); 2760b57cec5SDimitry Andric void VisitCharacterLiteral(const CharacterLiteral *Node); 2770b57cec5SDimitry Andric void VisitIntegerLiteral(const IntegerLiteral *Node); 2780b57cec5SDimitry Andric void VisitFixedPointLiteral(const FixedPointLiteral *Node); 2790b57cec5SDimitry Andric void VisitFloatingLiteral(const FloatingLiteral *Node); 2800b57cec5SDimitry Andric void VisitStringLiteral(const StringLiteral *Str); 2810b57cec5SDimitry Andric void VisitInitListExpr(const InitListExpr *ILE); 2820b57cec5SDimitry Andric void VisitGenericSelectionExpr(const GenericSelectionExpr *E); 2830b57cec5SDimitry Andric void VisitUnaryOperator(const UnaryOperator *Node); 2840b57cec5SDimitry Andric void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node); 2850b57cec5SDimitry Andric void VisitMemberExpr(const MemberExpr *Node); 2860b57cec5SDimitry Andric void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node); 2870b57cec5SDimitry Andric void VisitBinaryOperator(const BinaryOperator *Node); 2880b57cec5SDimitry Andric void VisitCompoundAssignOperator(const CompoundAssignOperator *Node); 2890b57cec5SDimitry Andric void VisitAddrLabelExpr(const AddrLabelExpr *Node); 2900b57cec5SDimitry Andric void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node); 2910b57cec5SDimitry Andric void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node); 2920b57cec5SDimitry Andric void VisitCXXThisExpr(const CXXThisExpr *Node); 2930b57cec5SDimitry Andric void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node); 294e8d8bef9SDimitry Andric void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node); 2950b57cec5SDimitry Andric void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node); 2960b57cec5SDimitry Andric void VisitCXXConstructExpr(const CXXConstructExpr *Node); 2970b57cec5SDimitry Andric void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node); 2980b57cec5SDimitry Andric void VisitCXXNewExpr(const CXXNewExpr *Node); 2990b57cec5SDimitry Andric void VisitCXXDeleteExpr(const CXXDeleteExpr *Node); 3005ffd83dbSDimitry Andric void VisitTypeTraitExpr(const TypeTraitExpr *Node); 3015ffd83dbSDimitry Andric void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node); 3025ffd83dbSDimitry Andric void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node); 303*0fca6ea1SDimitry Andric void VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *Node); 304*0fca6ea1SDimitry Andric void VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *Node); 3050b57cec5SDimitry Andric void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node); 3060b57cec5SDimitry Andric void VisitExprWithCleanups(const ExprWithCleanups *Node); 3070b57cec5SDimitry Andric void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node); 3080b57cec5SDimitry Andric void VisitSizeOfPackExpr(const SizeOfPackExpr *Node); 3090b57cec5SDimitry Andric void 3100b57cec5SDimitry Andric VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node); 3110b57cec5SDimitry Andric void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node); 3120b57cec5SDimitry Andric void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node); 3130b57cec5SDimitry Andric void VisitObjCMessageExpr(const ObjCMessageExpr *Node); 3140b57cec5SDimitry Andric void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node); 3150b57cec5SDimitry Andric void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node); 3160b57cec5SDimitry Andric void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node); 3170b57cec5SDimitry Andric void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node); 3180b57cec5SDimitry Andric void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node); 3190b57cec5SDimitry Andric void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node); 3200b57cec5SDimitry Andric void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node); 3215ffd83dbSDimitry Andric void VisitOMPIteratorExpr(const OMPIteratorExpr *Node); 322e8d8bef9SDimitry Andric void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node); 323fe6060f1SDimitry Andric void VisitRequiresExpr(const RequiresExpr *Node); 3240b57cec5SDimitry Andric 3250b57cec5SDimitry Andric void VisitRValueReferenceType(const ReferenceType *T); 3260b57cec5SDimitry Andric void VisitArrayType(const ArrayType *T); 3270b57cec5SDimitry Andric void VisitConstantArrayType(const ConstantArrayType *T); 3280b57cec5SDimitry Andric void VisitVariableArrayType(const VariableArrayType *T); 3290b57cec5SDimitry Andric void VisitDependentSizedArrayType(const DependentSizedArrayType *T); 3300b57cec5SDimitry Andric void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T); 3310b57cec5SDimitry Andric void VisitVectorType(const VectorType *T); 3320b57cec5SDimitry Andric void VisitFunctionType(const FunctionType *T); 3330b57cec5SDimitry Andric void VisitFunctionProtoType(const FunctionProtoType *T); 3340b57cec5SDimitry Andric void VisitUnresolvedUsingType(const UnresolvedUsingType *T); 3350eae32dcSDimitry Andric void VisitUsingType(const UsingType *T); 3360b57cec5SDimitry Andric void VisitTypedefType(const TypedefType *T); 3370b57cec5SDimitry Andric void VisitUnaryTransformType(const UnaryTransformType *T); 3380b57cec5SDimitry Andric void VisitTagType(const TagType *T); 3390b57cec5SDimitry Andric void VisitTemplateTypeParmType(const TemplateTypeParmType *T); 340bdd1243dSDimitry Andric void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T); 341bdd1243dSDimitry Andric void 342bdd1243dSDimitry Andric VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T); 3430b57cec5SDimitry Andric void VisitAutoType(const AutoType *T); 34481ad6265SDimitry Andric void VisitDeducedTemplateSpecializationType( 34581ad6265SDimitry Andric const DeducedTemplateSpecializationType *T); 3460b57cec5SDimitry Andric void VisitTemplateSpecializationType(const TemplateSpecializationType *T); 3470b57cec5SDimitry Andric void VisitInjectedClassNameType(const InjectedClassNameType *T); 3480b57cec5SDimitry Andric void VisitObjCInterfaceType(const ObjCInterfaceType *T); 3490b57cec5SDimitry Andric void VisitPackExpansionType(const PackExpansionType *T); 3500b57cec5SDimitry Andric 351*0fca6ea1SDimitry Andric void VisitTypeLoc(TypeLoc TL); 352*0fca6ea1SDimitry Andric 3530b57cec5SDimitry Andric void VisitLabelDecl(const LabelDecl *D); 3540b57cec5SDimitry Andric void VisitTypedefDecl(const TypedefDecl *D); 3550b57cec5SDimitry Andric void VisitEnumDecl(const EnumDecl *D); 3560b57cec5SDimitry Andric void VisitRecordDecl(const RecordDecl *D); 3570b57cec5SDimitry Andric void VisitEnumConstantDecl(const EnumConstantDecl *D); 3580b57cec5SDimitry Andric void VisitIndirectFieldDecl(const IndirectFieldDecl *D); 3590b57cec5SDimitry Andric void VisitFunctionDecl(const FunctionDecl *D); 360*0fca6ea1SDimitry Andric void VisitCXXDeductionGuideDecl(const CXXDeductionGuideDecl *D); 3610b57cec5SDimitry Andric void VisitFieldDecl(const FieldDecl *D); 3620b57cec5SDimitry Andric void VisitVarDecl(const VarDecl *D); 3630b57cec5SDimitry Andric void VisitBindingDecl(const BindingDecl *D); 3640b57cec5SDimitry Andric void VisitCapturedDecl(const CapturedDecl *D); 3650b57cec5SDimitry Andric void VisitImportDecl(const ImportDecl *D); 3660b57cec5SDimitry Andric void VisitPragmaCommentDecl(const PragmaCommentDecl *D); 3670b57cec5SDimitry Andric void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D); 3680b57cec5SDimitry Andric void VisitOMPExecutableDirective(const OMPExecutableDirective *D); 3690b57cec5SDimitry Andric void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D); 3700b57cec5SDimitry Andric void VisitOMPRequiresDecl(const OMPRequiresDecl *D); 3710b57cec5SDimitry Andric void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D); 3720b57cec5SDimitry Andric void VisitNamespaceDecl(const NamespaceDecl *D); 3730b57cec5SDimitry Andric void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D); 3740b57cec5SDimitry Andric void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D); 3750b57cec5SDimitry Andric void VisitTypeAliasDecl(const TypeAliasDecl *D); 3760b57cec5SDimitry Andric void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D); 3770b57cec5SDimitry Andric void VisitCXXRecordDecl(const CXXRecordDecl *D); 3780b57cec5SDimitry Andric void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D); 3790b57cec5SDimitry Andric void VisitClassTemplateDecl(const ClassTemplateDecl *D); 3800b57cec5SDimitry Andric void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D); 3810b57cec5SDimitry Andric void VisitVarTemplateDecl(const VarTemplateDecl *D); 3820b57cec5SDimitry Andric void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D); 3830b57cec5SDimitry Andric void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D); 3840b57cec5SDimitry Andric void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D); 3850b57cec5SDimitry Andric void VisitUsingDecl(const UsingDecl *D); 3860b57cec5SDimitry Andric void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D); 3870b57cec5SDimitry Andric void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D); 388fe6060f1SDimitry Andric void VisitUsingEnumDecl(const UsingEnumDecl *D); 3890b57cec5SDimitry Andric void VisitUsingShadowDecl(const UsingShadowDecl *D); 3900b57cec5SDimitry Andric void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D); 3910b57cec5SDimitry Andric void VisitLinkageSpecDecl(const LinkageSpecDecl *D); 3920b57cec5SDimitry Andric void VisitAccessSpecDecl(const AccessSpecDecl *D); 3930b57cec5SDimitry Andric void VisitFriendDecl(const FriendDecl *D); 3940b57cec5SDimitry Andric void VisitObjCIvarDecl(const ObjCIvarDecl *D); 3950b57cec5SDimitry Andric void VisitObjCMethodDecl(const ObjCMethodDecl *D); 3960b57cec5SDimitry Andric void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D); 3970b57cec5SDimitry Andric void VisitObjCCategoryDecl(const ObjCCategoryDecl *D); 3980b57cec5SDimitry Andric void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D); 3990b57cec5SDimitry Andric void VisitObjCProtocolDecl(const ObjCProtocolDecl *D); 4000b57cec5SDimitry Andric void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D); 4010b57cec5SDimitry Andric void VisitObjCImplementationDecl(const ObjCImplementationDecl *D); 4020b57cec5SDimitry Andric void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D); 4030b57cec5SDimitry Andric void VisitObjCPropertyDecl(const ObjCPropertyDecl *D); 4040b57cec5SDimitry Andric void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D); 4050b57cec5SDimitry Andric void VisitBlockDecl(const BlockDecl *D); 4060b57cec5SDimitry Andric void VisitConceptDecl(const ConceptDecl *D); 407480093f4SDimitry Andric void 408480093f4SDimitry Andric VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D); 409bdd1243dSDimitry Andric void VisitHLSLBufferDecl(const HLSLBufferDecl *D); 410*0fca6ea1SDimitry Andric void VisitOpenACCConstructStmt(const OpenACCConstructStmt *S); 411*0fca6ea1SDimitry Andric void VisitOpenACCLoopConstruct(const OpenACCLoopConstruct *S); 412*0fca6ea1SDimitry Andric void VisitEmbedExpr(const EmbedExpr *S); 4130b57cec5SDimitry Andric }; 4140b57cec5SDimitry Andric 4150b57cec5SDimitry Andric } // namespace clang 4160b57cec5SDimitry Andric 4170b57cec5SDimitry Andric #endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H 418