clang 17.0.0git
|
A factory class to build DeclarationFragments for different kinds of Decl. More...
#include "clang/ExtractAPI/DeclarationFragments.h"
A factory class to build DeclarationFragments for different kinds of Decl.
Definition at line 210 of file DeclarationFragments.h.
|
static |
Build DeclarationFragments for an enum declaration EnumDecl.
Definition at line 471 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::Decl::getASTContext(), getFragmentsForTypedef(), clang::EnumDecl::getIntegerType(), clang::NamedDecl::getName(), clang::TagDecl::getTypedefNameForAnonDecl(), clang::extractapi::DeclarationFragments::Identifier, clang::QualType::isNull(), clang::extractapi::DeclarationFragments::Keyword, and clang::extractapi::DeclarationFragments::Text.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitEnumDecl().
|
static |
Build DeclarationFragments for an enum constant declaration EnumConstantDecl.
Definition at line 463 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::NamedDecl::getName(), and clang::extractapi::DeclarationFragments::Identifier.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordEnumConstants().
|
static |
Build DeclarationFragments for a field declaration FieldDecl.
Definition at line 493 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), and clang::extractapi::DeclarationFragments::Identifier.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCInstanceVariables(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordStructFields().
|
static |
Build DeclarationFragments for a function declaration FunctionDecl.
Definition at line 421 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::Decl::getASTContext(), clang::NamedDecl::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getStorageClass(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, and clang::extractapi::DeclarationFragments::Text.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl().
|
static |
Build DeclarationFragments for a macro.
Name | name of the macro. |
MD | the associated MacroDirective. |
Definition at line 517 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::MacroDirective::getMacroInfo(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::InternalParam, clang::extractapi::DeclarationFragments::Keyword, and clang::extractapi::DeclarationFragments::Text.
|
static |
Build DeclarationFragments for an Objective-C category declaration ObjCCategoryDecl.
Definition at line 547 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), Category, clang::index::generateUSRForDecl(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, clang::extractapi::DeclarationFragments::Text, and clang::extractapi::DeclarationFragments::TypeIdentifier.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCCategoryDecl().
|
static |
Build DeclarationFragments for an Objective-C interface declaration ObjCInterfaceDecl.
Definition at line 568 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::index::generateUSRForDecl(), clang::NamedDecl::getName(), clang::ObjCInterfaceDecl::getSuperClass(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, clang::extractapi::DeclarationFragments::Text, and clang::extractapi::DeclarationFragments::TypeIdentifier.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCInterfaceDecl().
|
static |
Build DeclarationFragments for an Objective-C method declaration ObjCMethodDecl.
Definition at line 590 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::Decl::getASTContext(), clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), clang::ObjCMethodDecl::getParamDecl(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::extractapi::DeclarationFragments::Identifier, clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::param_size(), and clang::extractapi::DeclarationFragments::Text.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCMethods().
|
static |
Build DeclarationFragments for an Objective-C property declaration ObjCPropertyDecl.
Definition at line 634 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::First, clang::getNullabilitySpelling(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_class, clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_direct, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_noattr, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_null_resettable, clang::ObjCPropertyAttribute::kind_nullability, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_unsafe_unretained, clang::ObjCPropertyAttribute::kind_weak, clang::Property, clang::AttributedType::stripOuterNullability(), clang::extractapi::DeclarationFragments::Text, and clang::Unspecified.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCProperties().
|
static |
Build DeclarationFragments for an Objective-C protocol declaration ObjCProtocolDecl.
Definition at line 722 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::index::generateUSRForDecl(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, clang::extractapi::DeclarationFragments::Text, and clang::extractapi::DeclarationFragments::TypeIdentifier.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCProtocolDecl().
|
static |
Build DeclarationFragments for a struct record declaration RecordDecl.
Definition at line 502 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), getFragmentsForTypedef(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, and clang::extractapi::DeclarationFragments::Text.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitRecordDecl().
|
static |
Build DeclarationFragments for a typedef TypedefNameDecl
.
Definition at line 752 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::Decl::getASTContext(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, and clang::extractapi::DeclarationFragments::Text.
Referenced by getFragmentsForEnum(), getFragmentsForStruct(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitTypedefNameDecl().
|
static |
Build DeclarationFragments for a variable declaration VarDecl.
Definition at line 370 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::extractapi::DeclarationFragments::appendSpace(), clang::Decl::getASTContext(), clang::NamedDecl::getName(), clang::VarDecl::getStorageClass(), clang::VarDecl::getStorageClassSpecifierString(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ASTContext::getUnqualifiedObjCPointerType(), clang::extractapi::DeclarationFragments::Identifier, clang::extractapi::DeclarationFragments::Keyword, and clang::SC_None.
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl().
|
static |
Build FunctionSignature for a function-like declaration FunctionT
like FunctionDecl or ObjCMethodDecl.
The logic and implementation of building a signature for a FunctionDecl and an ObjCMethodDecl are exactly the same, but they do not share a common base. This template helps reuse the code.
Definition at line 768 of file DeclarationFragments.cpp.
References clang::extractapi::FunctionSignature::addParameter(), clang::extractapi::DeclarationFragments::append(), clang::NamedDecl::getName(), and clang::extractapi::FunctionSignature::setReturnType().
Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCMethods(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl().
|
static |
Build sub-heading fragments for a NamedDecl.
Definition at line 794 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), 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 >::recordStructFields(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitEnumDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl(), 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(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl().
|
static |
Build sub-heading fragments for an Objective-C method.
Definition at line 805 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), clang::NamedDecl::getNameAsString(), clang::extractapi::DeclarationFragments::Identifier, clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isInstanceMethod(), and clang::extractapi::DeclarationFragments::Text.
|
static |
Build a sub-heading for macro Name
.
Definition at line 818 of file DeclarationFragments.cpp.
References clang::extractapi::DeclarationFragments::append(), and clang::extractapi::DeclarationFragments::Identifier.