#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/Support/raw_ostream.h"
usingnamespaceclang;
namespace {
class DeclPrinter : public DeclVisitor<DeclPrinter> { … };
}
void Decl::print(raw_ostream &Out, unsigned Indentation,
bool PrintInstantiation) const { … }
void Decl::print(raw_ostream &Out, const PrintingPolicy &Policy,
unsigned Indentation, bool PrintInstantiation) const { … }
void TemplateParameterList::print(raw_ostream &Out, const ASTContext &Context,
bool OmitTemplateKW) const { … }
void TemplateParameterList::print(raw_ostream &Out, const ASTContext &Context,
const PrintingPolicy &Policy,
bool OmitTemplateKW) const { … }
static QualType GetBaseType(QualType T) { … }
static QualType getDeclType(Decl* D) { … }
void Decl::printGroup(Decl** Begin, unsigned NumDecls,
raw_ostream &Out, const PrintingPolicy &Policy,
unsigned Indentation) { … }
LLVM_DUMP_METHOD void DeclContext::dumpDeclContext() const { … }
raw_ostream& DeclPrinter::Indent(unsigned Indentation) { … }
static DeclPrinter::AttrPosAsWritten getPosAsWritten(const Attr *A,
const Decl *D) { … }
bool DeclPrinter::prettyPrintAttributes(const Decl *D,
AttrPosAsWritten Pos ) { … }
void DeclPrinter::prettyPrintPragmas(Decl *D) { … }
void DeclPrinter::printDeclType(QualType T, StringRef DeclName, bool Pack) { … }
void DeclPrinter::ProcessDeclGroup(SmallVectorImpl<Decl*>& Decls) { … }
void DeclPrinter::Print(AccessSpecifier AS) { … }
void DeclPrinter::PrintConstructorInitializers(CXXConstructorDecl *CDecl,
std::string &Proto) { … }
void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { … }
void DeclPrinter::VisitTranslationUnitDecl(TranslationUnitDecl *D) { … }
void DeclPrinter::VisitTypedefDecl(TypedefDecl *D) { … }
void DeclPrinter::VisitTypeAliasDecl(TypeAliasDecl *D) { … }
void DeclPrinter::VisitEnumDecl(EnumDecl *D) { … }
void DeclPrinter::VisitRecordDecl(RecordDecl *D) { … }
void DeclPrinter::VisitEnumConstantDecl(EnumConstantDecl *D) { … }
static void printExplicitSpecifier(ExplicitSpecifier ES, llvm::raw_ostream &Out,
PrintingPolicy &Policy, unsigned Indentation,
const ASTContext &Context) { … }
static void MaybePrintTagKeywordIfSupressingScopes(PrintingPolicy &Policy,
QualType T,
llvm::raw_ostream &Out) { … }
void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { … }
void DeclPrinter::VisitFriendDecl(FriendDecl *D) { … }
void DeclPrinter::VisitFieldDecl(FieldDecl *D) { … }
void DeclPrinter::VisitLabelDecl(LabelDecl *D) { … }
void DeclPrinter::VisitVarDecl(VarDecl *D) { … }
void DeclPrinter::VisitParmVarDecl(ParmVarDecl *D) { … }
void DeclPrinter::VisitFileScopeAsmDecl(FileScopeAsmDecl *D) { … }
void DeclPrinter::VisitTopLevelStmtDecl(TopLevelStmtDecl *D) { … }
void DeclPrinter::VisitImportDecl(ImportDecl *D) { … }
void DeclPrinter::VisitStaticAssertDecl(StaticAssertDecl *D) { … }
void DeclPrinter::VisitNamespaceDecl(NamespaceDecl *D) { … }
void DeclPrinter::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) { … }
void DeclPrinter::VisitNamespaceAliasDecl(NamespaceAliasDecl *D) { … }
void DeclPrinter::VisitEmptyDecl(EmptyDecl *D) { … }
void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) { … }
void DeclPrinter::VisitLinkageSpecDecl(LinkageSpecDecl *D) { … }
void DeclPrinter::printTemplateParameters(const TemplateParameterList *Params,
bool OmitTemplateKW) { … }
void DeclPrinter::printTemplateArguments(ArrayRef<TemplateArgument> Args,
const TemplateParameterList *Params) { … }
void DeclPrinter::printTemplateArguments(ArrayRef<TemplateArgumentLoc> Args,
const TemplateParameterList *Params) { … }
void DeclPrinter::VisitTemplateDecl(const TemplateDecl *D) { … }
void DeclPrinter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { … }
void DeclPrinter::VisitClassTemplateDecl(ClassTemplateDecl *D) { … }
void DeclPrinter::VisitClassTemplateSpecializationDecl(
ClassTemplateSpecializationDecl *D) { … }
void DeclPrinter::VisitClassTemplatePartialSpecializationDecl(
ClassTemplatePartialSpecializationDecl *D) { … }
void DeclPrinter::PrintObjCMethodType(ASTContext &Ctx,
Decl::ObjCDeclQualifier Quals,
QualType T) { … }
void DeclPrinter::PrintObjCTypeParams(ObjCTypeParamList *Params) { … }
void DeclPrinter::VisitObjCMethodDecl(ObjCMethodDecl *OMD) { … }
void DeclPrinter::VisitObjCImplementationDecl(ObjCImplementationDecl *OID) { … }
void DeclPrinter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *OID) { … }
void DeclPrinter::VisitObjCProtocolDecl(ObjCProtocolDecl *PID) { … }
void DeclPrinter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *PID) { … }
void DeclPrinter::VisitObjCCategoryDecl(ObjCCategoryDecl *PID) { … }
void DeclPrinter::VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *AID) { … }
void DeclPrinter::VisitObjCPropertyDecl(ObjCPropertyDecl *PDecl) { … }
void DeclPrinter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) { … }
void DeclPrinter::VisitUsingDecl(UsingDecl *D) { … }
void DeclPrinter::VisitUsingEnumDecl(UsingEnumDecl *D) { … }
void
DeclPrinter::VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D) { … }
void DeclPrinter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) { … }
void DeclPrinter::VisitUsingShadowDecl(UsingShadowDecl *D) { … }
void DeclPrinter::VisitOMPThreadPrivateDecl(OMPThreadPrivateDecl *D) { … }
void DeclPrinter::VisitHLSLBufferDecl(HLSLBufferDecl *D) { … }
void DeclPrinter::VisitOMPAllocateDecl(OMPAllocateDecl *D) { … }
void DeclPrinter::VisitOMPRequiresDecl(OMPRequiresDecl *D) { … }
void DeclPrinter::VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D) { … }
void DeclPrinter::VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D) { … }
void DeclPrinter::VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D) { … }
void DeclPrinter::VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *TTP) { … }
void DeclPrinter::VisitNonTypeTemplateParmDecl(
const NonTypeTemplateParmDecl *NTTP) { … }