clang 18.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
clang::extractapi::APISet Class Reference

APISet holds the set of API records collected from given inputs. More...

#include "clang/ExtractAPI/API.h"

Public Types

template<typename RecordTy , typename = std::enable_if_t<std::is_base_of<APIRecord, RecordTy>::value>>
using RecordMap = llvm::MapVector< StringRef, std::unique_ptr< RecordTy > >
 A mapping type to store a set of APIRecords with the USR as the key.
 

Public Member Functions

NamespaceRecordaddNamespace (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeaderg)
 
GlobalVariableRecordaddGlobalVar (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeadin, bool IsFromSystemHeaderg)
 Create and add a global variable record into the API set.
 
GlobalVariableTemplateRecordaddGlobalVariableTemplate (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, Template Template, bool IsFromSystemHeader)
 
GlobalFunctionRecordaddGlobalFunction (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, bool IsFromSystemHeader)
 Create and add a function record into the API set.
 
GlobalFunctionTemplateRecordaddGlobalFunctionTemplate (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, Template Template, bool IsFromSystemHeader)
 
GlobalFunctionTemplateSpecializationRecordaddGlobalFunctionTemplateSpecialization (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, bool IsFromSystemHeader)
 
EnumConstantRecordaddEnumConstant (EnumRecord *Enum, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create and add an enum constant record into the API set.
 
EnumRecordaddEnum (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create and add an enum record into the API set.
 
StructFieldRecordaddStructField (StructRecord *Struct, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create and add a struct field record into the API set.
 
StructRecordaddStruct (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create and add a struct record into the API set.
 
StaticFieldRecordaddStaticField (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availabilities, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, SymbolReference Context, AccessControl Access, bool IsFromSystemHeaderg)
 
CXXFieldRecordaddCXXField (APIRecord *CXXClass, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availabilities, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, AccessControl Access, bool IsFromSystemHeader)
 
CXXFieldTemplateRecordaddCXXFieldTemplate (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, AccessControl Access, Template Template, bool IsFromSystemHeader)
 
CXXClassRecordaddCXXClass (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, APIRecord::RecordKind Kind, AccessControl Access, bool IsFromSystemHeader)
 
ClassTemplateRecordaddClassTemplate (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, Template Template, AccessControl Access, bool IsFromSystemHeader)
 
ClassTemplateSpecializationRecordaddClassTemplateSpecialization (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, AccessControl Access, bool IsFromSystemHeader)
 
ClassTemplatePartialSpecializationRecordaddClassTemplatePartialSpecialization (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, Template Template, AccessControl Access, bool IsFromSystemHeader)
 
GlobalVariableTemplateSpecializationRecordaddGlobalVariableTemplateSpecialization (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 
GlobalVariableTemplatePartialSpecializationRecordaddGlobalVariableTemplatePartialSpecialization (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, Template Template, bool IsFromSystemHeader)
 
CXXMethodRecordaddCXXInstanceMethod (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, AccessControl Access, bool IsFromSystemHeader)
 
CXXMethodRecordaddCXXStaticMethod (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, AccessControl Access, bool IsFromSystemHeader)
 
CXXMethodRecordaddCXXSpecialMethod (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, AccessControl Access, bool IsFromSystemHeader)
 
CXXMethodTemplateRecordaddCXXMethodTemplate (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, AccessControl Access, Template Template, bool IsFromSystemHeader)
 
CXXMethodTemplateSpecializationRecordaddCXXMethodTemplateSpec (APIRecord *Parent, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, AccessControl Access, bool IsFromSystemHeader)
 
ConceptRecordaddConcept (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, Template Template, bool IsFromSystemHeader)
 
ObjCCategoryRecordaddObjCCategory (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, SymbolReference Interface, bool IsFromSystemHeader, bool IsFromExternalModule)
 Create and add an Objective-C category record into the API set.
 
ObjCInterfaceRecordaddObjCInterface (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, LinkageInfo Linkage, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, SymbolReference SuperClass, bool IsFromSystemHeader)
 Create and add an Objective-C interface record into the API set.
 
ObjCMethodRecordaddObjCMethod (ObjCContainerRecord *Container, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, FunctionSignature Signature, bool IsInstanceMethod, bool IsFromSystemHeader)
 Create and add an Objective-C method record into the API set.
 
ObjCPropertyRecordaddObjCProperty (ObjCContainerRecord *Container, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, ObjCPropertyRecord::AttributeKind Attributes, StringRef GetterName, StringRef SetterName, bool IsOptional, bool IsInstanceProperty, bool IsFromSystemHeader)
 Create and add an Objective-C property record into the API set.
 
ObjCInstanceVariableRecordaddObjCInstanceVariable (ObjCContainerRecord *Container, StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, ObjCInstanceVariableRecord::AccessControl Access, bool IsFromSystemHeader)
 Create and add an Objective-C instance variable record into the API set.
 
ObjCProtocolRecordaddObjCProtocol (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create and add an Objective-C protocol record into the API set.
 
MacroDefinitionRecordaddMacroDefinition (StringRef Name, StringRef USR, PresumedLoc Loc, DeclarationFragments Declaration, DeclarationFragments SubHeading, bool IsFromSystemHeader)
 Create a macro definition record into the API set.
 
TypedefRecordaddTypedef (StringRef Name, StringRef USR, PresumedLoc Loc, AvailabilitySet Availability, const DocComment &Comment, DeclarationFragments Declaration, DeclarationFragments SubHeading, SymbolReference UnderlyingType, bool IsFromSystemHeader)
 Create a typedef record into the API set.
 
const llvm::Triple & getTarget () const
 Get the target triple for the ExtractAPI invocation.
 
Language getLanguage () const
 Get the language used by the APIs.
 
const RecordMap< NamespaceRecord > & getNamespaces () const
 
const RecordMap< GlobalFunctionRecord > & getGlobalFunctions () const
 
const RecordMap< GlobalFunctionTemplateRecord > & getGlobalFunctionTemplates () const
 
const RecordMap< GlobalFunctionTemplateSpecializationRecord > & getGlobalFunctionTemplateSpecializations () const
 
const RecordMap< GlobalVariableRecord > & getGlobalVariables () const
 
const RecordMap< GlobalVariableTemplateRecord > & getGlobalVariableTemplates () const
 
const RecordMap< StaticFieldRecord > & getStaticFields () const
 
const RecordMap< GlobalVariableTemplateSpecializationRecord > & getGlobalVariableTemplateSpecializations () const
 
const RecordMap< GlobalVariableTemplatePartialSpecializationRecord > & getGlobalVariableTemplatePartialSpecializations () const
 
const RecordMap< EnumRecord > & getEnums () const
 
const RecordMap< StructRecord > & getStructs () const
 
const RecordMap< CXXClassRecord > & getCXXClasses () const
 
const RecordMap< CXXMethodTemplateRecord > & getCXXMethodTemplates () const
 
const RecordMap< CXXInstanceMethodRecord > & getCXXInstanceMethods () const
 
const RecordMap< CXXStaticMethodRecord > & getCXXStaticMethods () const
 
const RecordMap< CXXFieldRecord > & getCXXFields () const
 
const RecordMap< CXXMethodTemplateSpecializationRecord > & getCXXMethodTemplateSpecializations () const
 
const RecordMap< CXXFieldTemplateRecord > & getCXXFieldTemplates () const
 
const RecordMap< ConceptRecord > & getConcepts () const
 
const RecordMap< ClassTemplateRecord > & getClassTemplates () const
 
const RecordMap< ClassTemplateSpecializationRecord > & getClassTemplateSpecializations () const
 
const RecordMap< ClassTemplatePartialSpecializationRecord > & getClassTemplatePartialSpecializations () const
 
const RecordMap< ConceptRecord > & getRecords () const
 
const RecordMap< ObjCCategoryRecord > & getObjCCategories () const
 
const RecordMap< ObjCInterfaceRecord > & getObjCInterfaces () const
 
const RecordMap< ObjCProtocolRecord > & getObjCProtocols () const
 
const RecordMap< MacroDefinitionRecord > & getMacros () const
 
const RecordMap< TypedefRecord > & getTypedefs () const
 
APIRecordfindRecordForUSR (StringRef USR) const
 Finds the APIRecord for a given USR.
 
StringRef recordUSR (const Decl *D)
 Generate and store the USR of declaration D.
 
StringRef recordUSRForMacro (StringRef Name, SourceLocation SL, const SourceManager &SM)
 Generate and store the USR for a macro Name.
 
StringRef copyString (StringRef String)
 Copy String into the Allocator in this APISet.
 
 APISet (const llvm::Triple &Target, Language Lang, const std::string &ProductName)
 

Public Attributes

const std::string ProductName
 

Detailed Description

APISet holds the set of API records collected from given inputs.

Definition at line 1190 of file API.h.

Member Typedef Documentation

◆ RecordMap

template<typename RecordTy , typename = std::enable_if_t<std::is_base_of<APIRecord, RecordTy>::value>>
using clang::extractapi::APISet::RecordMap = llvm::MapVector<StringRef, std::unique_ptr<RecordTy> >

A mapping type to store a set of APIRecords with the USR as the key.

Definition at line 1509 of file API.h.

Constructor & Destructor Documentation

◆ APISet()

clang::extractapi::APISet::APISet ( const llvm::Triple &  Target,
Language  Lang,
const std::string &  ProductName 
)
inline

Definition at line 1617 of file API.h.

References clang::Target.

Member Function Documentation

◆ addClassTemplate()

ClassTemplateRecord * APISet::addClassTemplate ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
Template  Template,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addClassTemplatePartialSpecialization()

ClassTemplatePartialSpecializationRecord * APISet::addClassTemplatePartialSpecialization ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
Template  Template,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addClassTemplateSpecialization()

ClassTemplateSpecializationRecord * APISet::addClassTemplateSpecialization ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addConcept()

ConceptRecord * APISet::addConcept ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addCXXClass()

CXXClassRecord * APISet::addCXXClass ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
APIRecord::RecordKind  Kind,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addCXXField()

CXXFieldRecord * APISet::addCXXField ( APIRecord CXXClass,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availabilities,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addCXXFieldTemplate()

CXXFieldTemplateRecord * APISet::addCXXFieldTemplate ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
AccessControl  Access,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addCXXInstanceMethod()

CXXMethodRecord * APISet::addCXXInstanceMethod ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addCXXMethodTemplate()

CXXMethodTemplateRecord * APISet::addCXXMethodTemplate ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
AccessControl  Access,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addCXXMethodTemplateSpec()

CXXMethodTemplateSpecializationRecord * APISet::addCXXMethodTemplateSpec ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addCXXSpecialMethod()

CXXMethodRecord * clang::extractapi::APISet::addCXXSpecialMethod ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addCXXStaticMethod()

CXXMethodRecord * APISet::addCXXStaticMethod ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
AccessControl  Access,
bool  IsFromSystemHeader 
)

◆ addEnum()

EnumRecord * APISet::addEnum ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create and add an enum record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 137 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitEnumDecl().

◆ addEnumConstant()

EnumConstantRecord * APISet::addEnumConstant ( EnumRecord Enum,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create and add an enum constant record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 121 of file API.cpp.

References clang::Declaration, and clang::Enum.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordEnumConstants().

◆ addGlobalFunction()

GlobalFunctionRecord * APISet::addGlobalFunction ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
bool  IsFromSystemHeader 
)

Create and add a function record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 84 of file API.cpp.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl().

◆ addGlobalFunctionTemplate()

GlobalFunctionTemplateRecord * APISet::addGlobalFunctionTemplate ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addGlobalFunctionTemplateSpecialization()

GlobalFunctionTemplateSpecializationRecord * APISet::addGlobalFunctionTemplateSpecialization ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
bool  IsFromSystemHeader 
)

◆ addGlobalVar()

GlobalVariableRecord * APISet::addGlobalVar ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeadin,
bool  IsFromSystemHeaderg 
)

Create and add a global variable record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 63 of file API.cpp.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl().

◆ addGlobalVariableTemplate()

GlobalVariableTemplateRecord * APISet::addGlobalVariableTemplate ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addGlobalVariableTemplatePartialSpecialization()

GlobalVariableTemplatePartialSpecializationRecord * APISet::addGlobalVariableTemplatePartialSpecialization ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
Template  Template,
bool  IsFromSystemHeader 
)

◆ addGlobalVariableTemplateSpecialization()

GlobalVariableTemplateSpecializationRecord * APISet::addGlobalVariableTemplateSpecialization ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

◆ addMacroDefinition()

MacroDefinitionRecord * APISet::addMacroDefinition ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create a macro definition record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSRForMacro(StringRef Name, SourceLocation SL, const SourceManager &SM) is a helper method to generate the USR for the macro and keep it alive in APISet.

Definition at line 489 of file API.cpp.

References clang::Declaration.

◆ addNamespace()

NamespaceRecord * APISet::addNamespace ( APIRecord Parent,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeaderg 
)

◆ addObjCCategory()

ObjCCategoryRecord * APISet::addObjCCategory ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
SymbolReference  Interface,
bool  IsFromSystemHeader,
bool  IsFromExternalModule 
)

Create and add an Objective-C category record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 382 of file API.cpp.

References clang::Declaration, and clang::Interface.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCCategoryDecl().

◆ addObjCInstanceVariable()

ObjCInstanceVariableRecord * APISet::addObjCInstanceVariable ( ObjCContainerRecord Container,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
ObjCInstanceVariableRecord::AccessControl  Access,
bool  IsFromSystemHeader 
)

Create and add an Objective-C instance variable record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 462 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCInstanceVariables().

◆ addObjCInterface()

ObjCInterfaceRecord * APISet::addObjCInterface ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
SymbolReference  SuperClass,
bool  IsFromSystemHeader 
)

Create and add an Objective-C interface record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 404 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCInterfaceDecl().

◆ addObjCMethod()

ObjCMethodRecord * APISet::addObjCMethod ( ObjCContainerRecord Container,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
FunctionSignature  Signature,
bool  IsInstanceMethod,
bool  IsFromSystemHeader 
)

Create and add an Objective-C method record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 416 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCMethods().

◆ addObjCProperty()

ObjCPropertyRecord * APISet::addObjCProperty ( ObjCContainerRecord Container,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
ObjCPropertyRecord::AttributeKind  Attributes,
StringRef  GetterName,
StringRef  SetterName,
bool  IsOptional,
bool  IsInstanceProperty,
bool  IsFromSystemHeader 
)

Create and add an Objective-C property record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 438 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCProperties().

◆ addObjCProtocol()

ObjCProtocolRecord * APISet::addObjCProtocol ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create and add an Objective-C protocol record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 476 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCProtocolDecl().

◆ addStaticField()

StaticFieldRecord * APISet::addStaticField ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availabilities,
LinkageInfo  Linkage,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
SymbolReference  Context,
AccessControl  Access,
bool  IsFromSystemHeaderg 
)

◆ addStruct()

StructRecord * APISet::addStruct ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create and add a struct record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 164 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitRecordDecl().

◆ addStructField()

StructFieldRecord * APISet::addStructField ( StructRecord Struct,
StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
bool  IsFromSystemHeader 
)

Create and add a struct field record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 148 of file API.cpp.

References clang::Declaration, and clang::Struct.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordStructFields().

◆ addTypedef()

TypedefRecord * APISet::addTypedef ( StringRef  Name,
StringRef  USR,
PresumedLoc  Loc,
AvailabilitySet  Availability,
const DocComment Comment,
DeclarationFragments  Declaration,
DeclarationFragments  SubHeading,
SymbolReference  UnderlyingType,
bool  IsFromSystemHeader 
)

Create a typedef record into the API set.

Note: the caller is responsible for keeping the StringRef Name and USR alive. APISet::copyString provides a way to copy strings into APISet itself, and APISet::recordUSR(const Decl *D) is a helper method to generate the USR for D and keep it alive in APISet.

Definition at line 498 of file API.cpp.

References clang::Declaration.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitTypedefNameDecl().

◆ copyString()

StringRef APISet::copyString ( StringRef  String)

◆ findRecordForUSR()

APIRecord * APISet::findRecordForUSR ( StringRef  USR) const

◆ getClassTemplatePartialSpecializations()

const RecordMap< ClassTemplatePartialSpecializationRecord > & clang::extractapi::APISet::getClassTemplatePartialSpecializations ( ) const
inline

◆ getClassTemplates()

const RecordMap< ClassTemplateRecord > & clang::extractapi::APISet::getClassTemplates ( ) const
inline

◆ getClassTemplateSpecializations()

const RecordMap< ClassTemplateSpecializationRecord > & clang::extractapi::APISet::getClassTemplateSpecializations ( ) const
inline

◆ getConcepts()

const RecordMap< ConceptRecord > & clang::extractapi::APISet::getConcepts ( ) const
inline

◆ getCXXClasses()

const RecordMap< CXXClassRecord > & clang::extractapi::APISet::getCXXClasses ( ) const
inline

◆ getCXXFields()

const RecordMap< CXXFieldRecord > & clang::extractapi::APISet::getCXXFields ( ) const
inline

◆ getCXXFieldTemplates()

const RecordMap< CXXFieldTemplateRecord > & clang::extractapi::APISet::getCXXFieldTemplates ( ) const
inline

◆ getCXXInstanceMethods()

const RecordMap< CXXInstanceMethodRecord > & clang::extractapi::APISet::getCXXInstanceMethods ( ) const
inline

◆ getCXXMethodTemplates()

const RecordMap< CXXMethodTemplateRecord > & clang::extractapi::APISet::getCXXMethodTemplates ( ) const
inline

◆ getCXXMethodTemplateSpecializations()

const RecordMap< CXXMethodTemplateSpecializationRecord > & clang::extractapi::APISet::getCXXMethodTemplateSpecializations ( ) const
inline

◆ getCXXStaticMethods()

const RecordMap< CXXStaticMethodRecord > & clang::extractapi::APISet::getCXXStaticMethods ( ) const
inline

◆ getEnums()

const RecordMap< EnumRecord > & clang::extractapi::APISet::getEnums ( ) const
inline

◆ getGlobalFunctions()

const RecordMap< GlobalFunctionRecord > & clang::extractapi::APISet::getGlobalFunctions ( ) const
inline

◆ getGlobalFunctionTemplates()

const RecordMap< GlobalFunctionTemplateRecord > & clang::extractapi::APISet::getGlobalFunctionTemplates ( ) const
inline

◆ getGlobalFunctionTemplateSpecializations()

const RecordMap< GlobalFunctionTemplateSpecializationRecord > & clang::extractapi::APISet::getGlobalFunctionTemplateSpecializations ( ) const
inline

◆ getGlobalVariables()

const RecordMap< GlobalVariableRecord > & clang::extractapi::APISet::getGlobalVariables ( ) const
inline

◆ getGlobalVariableTemplatePartialSpecializations()

const RecordMap< GlobalVariableTemplatePartialSpecializationRecord > & clang::extractapi::APISet::getGlobalVariableTemplatePartialSpecializations ( ) const
inline

◆ getGlobalVariableTemplates()

const RecordMap< GlobalVariableTemplateRecord > & clang::extractapi::APISet::getGlobalVariableTemplates ( ) const
inline

◆ getGlobalVariableTemplateSpecializations()

const RecordMap< GlobalVariableTemplateSpecializationRecord > & clang::extractapi::APISet::getGlobalVariableTemplateSpecializations ( ) const
inline

◆ getLanguage()

Language clang::extractapi::APISet::getLanguage ( ) const
inline

◆ getMacros()

const RecordMap< MacroDefinitionRecord > & clang::extractapi::APISet::getMacros ( ) const
inline

◆ getNamespaces()

const RecordMap< NamespaceRecord > & clang::extractapi::APISet::getNamespaces ( ) const
inline

◆ getObjCCategories()

const RecordMap< ObjCCategoryRecord > & clang::extractapi::APISet::getObjCCategories ( ) const
inline

◆ getObjCInterfaces()

const RecordMap< ObjCInterfaceRecord > & clang::extractapi::APISet::getObjCInterfaces ( ) const
inline

◆ getObjCProtocols()

const RecordMap< ObjCProtocolRecord > & clang::extractapi::APISet::getObjCProtocols ( ) const
inline

◆ getRecords()

const RecordMap< ConceptRecord > & clang::extractapi::APISet::getRecords ( ) const
inline

Definition at line 1579 of file API.h.

◆ getStaticFields()

const RecordMap< StaticFieldRecord > & clang::extractapi::APISet::getStaticFields ( ) const
inline

◆ getStructs()

const RecordMap< StructRecord > & clang::extractapi::APISet::getStructs ( ) const
inline

◆ getTarget()

const llvm::Triple & clang::extractapi::APISet::getTarget ( ) const
inline

Get the target triple for the ExtractAPI invocation.

Definition at line 1512 of file API.h.

◆ getTypedefs()

const RecordMap< TypedefRecord > & clang::extractapi::APISet::getTypedefs ( ) const
inline

◆ recordUSR()

StringRef APISet::recordUSR ( const Decl D)

Generate and store the USR of declaration D.

Note: The USR string is stored in and owned by Allocator.

Returns
a StringRef of the generated USR string.

Definition at line 515 of file API.cpp.

References copyString(), and clang::index::generateUSRForDecl().

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 >::recordObjCProtocols(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordStructFields(), 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().

◆ recordUSRForMacro()

StringRef APISet::recordUSRForMacro ( StringRef  Name,
SourceLocation  SL,
const SourceManager SM 
)

Generate and store the USR for a macro Name.

Note: The USR string is stored in and owned by Allocator.

Returns
a StringRef to the generate USR string.

Definition at line 521 of file API.cpp.

References copyString(), clang::index::generateUSRForMacro(), and SM.

Member Data Documentation

◆ ProductName

const std::string clang::extractapi::APISet::ProductName

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