clang 19.0.0git
Static Public Member Functions | List of all members
clang::extractapi::DeclarationFragmentsBuilder Class Reference

A factory class to build DeclarationFragments for different kinds of Decl. More...

#include "clang/ExtractAPI/DeclarationFragments.h"

Static Public Member Functions

template<typename FunctionT >
static FunctionSignature getFunctionSignature (const FunctionT *Function)
 Build FunctionSignature for a function-like declaration FunctionT like FunctionDecl, ObjCMethodDecl, or CXXMethodDecl.
 
static AccessControl getAccessControl (const Decl *Decl)
 
static DeclarationFragments getFragmentsForNamespace (const NamespaceDecl *Decl)
 
static DeclarationFragments getFragmentsForVar (const VarDecl *)
 Build DeclarationFragments for a variable declaration VarDecl.
 
static DeclarationFragments getFragmentsForVarTemplate (const VarDecl *)
 
static DeclarationFragments getFragmentsForFunction (const FunctionDecl *)
 Build DeclarationFragments for a function declaration FunctionDecl.
 
static DeclarationFragments getFragmentsForEnumConstant (const EnumConstantDecl *)
 Build DeclarationFragments for an enum constant declaration EnumConstantDecl.
 
static DeclarationFragments getFragmentsForEnum (const EnumDecl *)
 Build DeclarationFragments for an enum declaration EnumDecl.
 
static DeclarationFragments getFragmentsForField (const FieldDecl *)
 Build DeclarationFragments for a field declaration FieldDecl.
 
static DeclarationFragments getFragmentsForRecordDecl (const RecordDecl *)
 Build DeclarationFragments for a struct/union record declaration RecordDecl.
 
static DeclarationFragments getFragmentsForCXXClass (const CXXRecordDecl *)
 
static DeclarationFragments getFragmentsForSpecialCXXMethod (const CXXMethodDecl *)
 
static DeclarationFragments getFragmentsForCXXMethod (const CXXMethodDecl *)
 
static DeclarationFragments getFragmentsForConversionFunction (const CXXConversionDecl *)
 
static DeclarationFragments getFragmentsForOverloadedOperator (const CXXMethodDecl *)
 
static DeclarationFragments getFragmentsForTemplateParameters (ArrayRef< NamedDecl * >)
 
static DeclarationFragments getFragmentsForTemplateArguments (const ArrayRef< TemplateArgument >, ASTContext &, const std::optional< ArrayRef< TemplateArgumentLoc > >)
 
static DeclarationFragments getFragmentsForConcept (const ConceptDecl *)
 
static DeclarationFragments getFragmentsForRedeclarableTemplate (const RedeclarableTemplateDecl *)
 
static DeclarationFragments getFragmentsForClassTemplateSpecialization (const ClassTemplateSpecializationDecl *)
 
static DeclarationFragments getFragmentsForClassTemplatePartialSpecialization (const ClassTemplatePartialSpecializationDecl *)
 
static DeclarationFragments getFragmentsForVarTemplateSpecialization (const VarTemplateSpecializationDecl *)
 
static DeclarationFragments getFragmentsForVarTemplatePartialSpecialization (const VarTemplatePartialSpecializationDecl *)
 
static DeclarationFragments getFragmentsForFunctionTemplate (const FunctionTemplateDecl *Decl)
 
static DeclarationFragments getFragmentsForFunctionTemplateSpecialization (const FunctionDecl *Decl)
 
static DeclarationFragments getFragmentsForObjCCategory (const ObjCCategoryDecl *)
 Build DeclarationFragments for an Objective-C category declaration ObjCCategoryDecl.
 
static DeclarationFragments getFragmentsForObjCInterface (const ObjCInterfaceDecl *)
 Build DeclarationFragments for an Objective-C interface declaration ObjCInterfaceDecl.
 
static DeclarationFragments getFragmentsForObjCMethod (const ObjCMethodDecl *)
 Build DeclarationFragments for an Objective-C method declaration ObjCMethodDecl.
 
static DeclarationFragments getFragmentsForObjCProperty (const ObjCPropertyDecl *)
 Build DeclarationFragments for an Objective-C property declaration ObjCPropertyDecl.
 
static DeclarationFragments getFragmentsForObjCProtocol (const ObjCProtocolDecl *)
 Build DeclarationFragments for an Objective-C protocol declaration ObjCProtocolDecl.
 
static DeclarationFragments getFragmentsForMacro (StringRef Name, const MacroDirective *MD)
 Build DeclarationFragments for a macro.
 
static DeclarationFragments getFragmentsForTypedef (const TypedefNameDecl *Decl)
 Build DeclarationFragments for a typedef TypedefNameDecl.
 
static DeclarationFragments getSubHeading (const NamedDecl *)
 Build sub-heading fragments for a NamedDecl.
 
static DeclarationFragments getSubHeading (const ObjCMethodDecl *)
 Build sub-heading fragments for an Objective-C method.
 
static DeclarationFragments getSubHeadingForMacro (StringRef Name)
 Build a sub-heading for macro Name.
 

Detailed Description

A factory class to build DeclarationFragments for different kinds of Decl.

Definition at line 294 of file DeclarationFragments.h.

Member Function Documentation

◆ getAccessControl()

static AccessControl clang::extractapi::DeclarationFragmentsBuilder::getAccessControl ( const Decl Decl)
inlinestatic

◆ getFragmentsForClassTemplatePartialSpecialization()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForClassTemplatePartialSpecialization ( const ClassTemplatePartialSpecializationDecl Decl)
static

◆ getFragmentsForClassTemplateSpecialization()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForClassTemplateSpecialization ( const ClassTemplateSpecializationDecl Decl)
static

◆ getFragmentsForConcept()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForConcept ( const ConceptDecl Concept)
static

◆ getFragmentsForConversionFunction()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForConversionFunction ( const CXXConversionDecl ConversionFunction)
static

◆ getFragmentsForCXXClass()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForCXXClass ( const CXXRecordDecl Record)
static

◆ getFragmentsForCXXMethod()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForCXXMethod ( const CXXMethodDecl Method)
static

◆ getFragmentsForEnum()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForEnum ( const EnumDecl EnumDecl)
static

◆ getFragmentsForEnumConstant()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForEnumConstant ( const EnumConstantDecl EnumConstDecl)
static

◆ getFragmentsForField()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForField ( const FieldDecl Field)
static

◆ getFragmentsForFunction()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForFunction ( const FunctionDecl Func)
static

◆ getFragmentsForFunctionTemplate()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForFunctionTemplate ( const FunctionTemplateDecl Decl)
static

◆ getFragmentsForFunctionTemplateSpecialization()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForFunctionTemplateSpecialization ( const FunctionDecl Decl)
static

◆ getFragmentsForMacro()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForMacro ( StringRef  Name,
const MacroDirective MD 
)
static

◆ getFragmentsForNamespace()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForNamespace ( const NamespaceDecl Decl)
static

◆ getFragmentsForObjCCategory()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCCategory ( const ObjCCategoryDecl Category)
static

◆ getFragmentsForObjCInterface()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCInterface ( const ObjCInterfaceDecl Interface)
static

◆ getFragmentsForObjCMethod()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCMethod ( const ObjCMethodDecl Method)
static

◆ getFragmentsForObjCProperty()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCProperty ( const ObjCPropertyDecl Property)
static

◆ getFragmentsForObjCProtocol()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForObjCProtocol ( const ObjCProtocolDecl Protocol)
static

◆ getFragmentsForOverloadedOperator()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForOverloadedOperator ( const CXXMethodDecl Method)
static

◆ getFragmentsForRecordDecl()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForRecordDecl ( const RecordDecl Record)
static

◆ getFragmentsForRedeclarableTemplate()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForRedeclarableTemplate ( const RedeclarableTemplateDecl RedeclarableTemplate)
static

◆ getFragmentsForSpecialCXXMethod()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForSpecialCXXMethod ( const CXXMethodDecl Method)
static

◆ getFragmentsForTemplateArguments()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForTemplateArguments ( const ArrayRef< TemplateArgument TemplateArguments,
ASTContext Context,
const std::optional< ArrayRef< TemplateArgumentLoc > >  TemplateArgumentLocs 
)
static

◆ getFragmentsForTemplateParameters()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForTemplateParameters ( ArrayRef< NamedDecl * >  ParameterArray)
static

◆ getFragmentsForTypedef()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForTypedef ( const TypedefNameDecl Decl)
static

◆ getFragmentsForVar()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForVar ( const VarDecl Var)
static

◆ getFragmentsForVarTemplate()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForVarTemplate ( const VarDecl Var)
static

◆ getFragmentsForVarTemplatePartialSpecialization()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForVarTemplatePartialSpecialization ( const VarTemplatePartialSpecializationDecl Decl)
static

◆ getFragmentsForVarTemplateSpecialization()

DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForVarTemplateSpecialization ( const VarTemplateSpecializationDecl Decl)
static

◆ getFunctionSignature()

template<typename FunctionT >
template FunctionSignature DeclarationFragmentsBuilder::getFunctionSignature ( const FunctionT *  Function)
static

◆ getSubHeading() [1/2]

DeclarationFragments DeclarationFragmentsBuilder::getSubHeading ( const NamedDecl Decl)
static

Build sub-heading fragments for a NamedDecl.

Definition at line 1437 of file DeclarationFragments.cpp.

References clang::extractapi::DeclarationFragments::append(), clang::getAsString(), clang::Decl::getDeclContext(), and clang::extractapi::DeclarationFragments::Identifier.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordEnumConstants(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCInstanceVariables(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCMethods(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCProperties(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitClassTemplatePartialSpecializationDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitClassTemplateSpecializationDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitConceptDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXConstructorDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXConversionDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXDestructorDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXMethodDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXRecordDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitEnumDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFieldDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionTemplateDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitNamespaceDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCCategoryDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCInterfaceDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCProtocolDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitRecordDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitTypedefNameDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplateDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplatePartialSpecializationDecl(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplateSpecializationDecl().

◆ getSubHeading() [2/2]

DeclarationFragments DeclarationFragmentsBuilder::getSubHeading ( const ObjCMethodDecl Method)
static

◆ getSubHeadingForMacro()

DeclarationFragments DeclarationFragmentsBuilder::getSubHeadingForMacro ( StringRef  Name)
static

Build a sub-heading for macro Name.

Definition at line 1472 of file DeclarationFragments.cpp.

References clang::extractapi::DeclarationFragments::append(), and clang::extractapi::DeclarationFragments::Identifier.


The documentation for this class was generated from the following files: