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. More...
 
static AccessControl getAccessControl (const Decl *Decl)
 
static DeclarationFragments getFragmentsForNamespace (const NamespaceDecl *Decl)
 
static DeclarationFragments getFragmentsForVar (const VarDecl *)
 Build DeclarationFragments for a variable declaration VarDecl. More...
 
static DeclarationFragments getFragmentsForVarTemplate (const VarDecl *)
 
static DeclarationFragments getFragmentsForFunction (const FunctionDecl *)
 Build DeclarationFragments for a function declaration FunctionDecl. More...
 
static DeclarationFragments getFragmentsForEnumConstant (const EnumConstantDecl *)
 Build DeclarationFragments for an enum constant declaration EnumConstantDecl. More...
 
static DeclarationFragments getFragmentsForEnum (const EnumDecl *)
 Build DeclarationFragments for an enum declaration EnumDecl. More...
 
static DeclarationFragments getFragmentsForField (const FieldDecl *)
 Build DeclarationFragments for a field declaration FieldDecl. More...
 
static DeclarationFragments getFragmentsForRecordDecl (const RecordDecl *)
 Build DeclarationFragments for a struct/union record declaration RecordDecl. More...
 
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. More...
 
static DeclarationFragments getFragmentsForObjCInterface (const ObjCInterfaceDecl *)
 Build DeclarationFragments for an Objective-C interface declaration ObjCInterfaceDecl. More...
 
static DeclarationFragments getFragmentsForObjCMethod (const ObjCMethodDecl *)
 Build DeclarationFragments for an Objective-C method declaration ObjCMethodDecl. More...
 
static DeclarationFragments getFragmentsForObjCProperty (const ObjCPropertyDecl *)
 Build DeclarationFragments for an Objective-C property declaration ObjCPropertyDecl. More...
 
static DeclarationFragments getFragmentsForObjCProtocol (const ObjCProtocolDecl *)
 Build DeclarationFragments for an Objective-C protocol declaration ObjCProtocolDecl. More...
 
static DeclarationFragments getFragmentsForMacro (StringRef Name, const MacroDirective *MD)
 Build DeclarationFragments for a macro. More...
 
static DeclarationFragments getFragmentsForTypedef (const TypedefNameDecl *Decl)
 Build DeclarationFragments for a typedef TypedefNameDecl. More...
 
static DeclarationFragments getSubHeading (const NamedDecl *)
 Build sub-heading fragments for a NamedDecl. More...
 
static DeclarationFragments getSubHeading (const ObjCMethodDecl *)
 Build sub-heading fragments for an Objective-C method. More...
 
static DeclarationFragments getSubHeadingForMacro (StringRef Name)
 Build a sub-heading for macro Name. More...
 

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

Definition at line 866 of file DeclarationFragments.cpp.

◆ 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

Build DeclarationFragments for a macro.

Parameters
Namename of the macro.
MDthe associated MacroDirective.

Definition at line 1328 of file DeclarationFragments.cpp.

◆ 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

Definition at line 837 of file DeclarationFragments.cpp.

◆ getFragmentsForTemplateArguments()

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

Definition at line 1069 of file DeclarationFragments.cpp.

◆ 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

Build FunctionSignature for a function-like declaration FunctionT like FunctionDecl, ObjCMethodDecl, or CXXMethodDecl.

The logic and implementation of building a signature for a FunctionDecl, CXXMethodDecl, and ObjCMethodDecl are exactly the same, but they do not share a common base. This template helps reuse the code.

Definition at line 462 of file DeclarationFragments.h.

References clang::extractapi::FunctionSignature::addParameter(), clang::frontend::After, clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::begin(), clang::Function, and clang::extractapi::FunctionSignature::setReturnType().

◆ getSubHeading() [1/2]

DeclarationFragments DeclarationFragmentsBuilder::getSubHeading ( const NamedDecl Decl)
static

◆ 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 1635 of file DeclarationFragments.cpp.


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