clang
6.0.0
|
Classes | |
class | CodegenNameGenerator |
class | CommentToXMLConverter |
class | IndexDataConsumer |
class | IndexingContext |
struct | IndexingOptions |
class | SimpleFormatContext |
A small class to be used by libclang clients to format a declaration string in memory. More... | |
struct | SymbolInfo |
struct | SymbolRelation |
Represents a relation to another symbol for a symbol occurrence. More... | |
Typedefs | |
typedef uint8_t | SymbolPropertySet |
typedef unsigned | SymbolRoleSet |
Functions | |
std::unique_ptr< FrontendAction > | createIndexingAction (std::shared_ptr< IndexDataConsumer > DataConsumer, IndexingOptions Opts, std::unique_ptr< FrontendAction > WrappedAction) |
void | indexASTUnit (ASTUnit &Unit, std::shared_ptr< IndexDataConsumer > DataConsumer, IndexingOptions Opts) |
void | indexTopLevelDecls (ASTContext &Ctx, ArrayRef< const Decl *> Decls, std::shared_ptr< IndexDataConsumer > DataConsumer, IndexingOptions Opts) |
void | indexModuleFile (serialization::ModuleFile &Mod, ASTReader &Reader, std::shared_ptr< IndexDataConsumer > DataConsumer, IndexingOptions Opts) |
SymbolInfo | getSymbolInfo (const Decl *D) |
bool | isFunctionLocalSymbol (const Decl *D) |
void | applyForEachSymbolRole (SymbolRoleSet Roles, llvm::function_ref< void(SymbolRole)> Fn) |
bool | applyForEachSymbolRoleInterruptible (SymbolRoleSet Roles, llvm::function_ref< bool(SymbolRole)> Fn) |
void | printSymbolRoles (SymbolRoleSet Roles, raw_ostream &OS) |
bool | printSymbolName (const Decl *D, const LangOptions &LO, raw_ostream &OS) |
StringRef | getSymbolKindString (SymbolKind K) |
StringRef | getSymbolSubKindString (SymbolSubKind K) |
StringRef | getSymbolLanguageString (SymbolLanguage K) |
void | applyForEachSymbolProperty (SymbolPropertySet Props, llvm::function_ref< void(SymbolProperty)> Fn) |
void | printSymbolProperties (SymbolPropertySet Props, raw_ostream &OS) |
static StringRef | getUSRSpacePrefix () |
bool | generateUSRForDecl (const Decl *D, SmallVectorImpl< char > &Buf) |
Generate a USR for a Decl, including the USR prefix. More... | |
void | generateUSRForObjCClass (StringRef Cls, raw_ostream &OS, StringRef ExtSymbolDefinedIn="", StringRef CategoryContextExtSymbolDefinedIn="") |
Generate a USR fragment for an Objective-C class. More... | |
void | generateUSRForObjCCategory (StringRef Cls, StringRef Cat, raw_ostream &OS, StringRef ClsExtSymbolDefinedIn="", StringRef CatExtSymbolDefinedIn="") |
Generate a USR fragment for an Objective-C class category. More... | |
void | generateUSRForObjCIvar (StringRef Ivar, raw_ostream &OS) |
Generate a USR fragment for an Objective-C instance variable. More... | |
void | generateUSRForObjCMethod (StringRef Sel, bool IsInstanceMethod, raw_ostream &OS) |
Generate a USR fragment for an Objective-C method. More... | |
void | generateUSRForObjCProperty (StringRef Prop, bool isClassProp, raw_ostream &OS) |
Generate a USR fragment for an Objective-C property. More... | |
void | generateUSRForObjCProtocol (StringRef Prot, raw_ostream &OS, StringRef ExtSymbolDefinedIn="") |
Generate a USR fragment for an Objective-C protocol. More... | |
void | generateUSRForGlobalEnum (StringRef EnumName, raw_ostream &OS, StringRef ExtSymbolDefinedIn="") |
Generate USR fragment for a global (non-nested) enum. More... | |
void | generateUSRForEnumConstant (StringRef EnumConstantName, raw_ostream &OS) |
Generate a USR fragment for an enum constant. More... | |
bool | generateUSRForMacro (const MacroDefinitionRecord *MD, const SourceManager &SM, SmallVectorImpl< char > &Buf) |
Generate a USR for a macro, including the USR prefix. More... | |
bool | generateUSRForMacro (StringRef MacroName, SourceLocation Loc, const SourceManager &SM, SmallVectorImpl< char > &Buf) |
Variables | |
static const unsigned | SymbolPropertyBitNum = 8 |
static const unsigned | SymbolRoleBitNum = 19 |
typedef uint8_t clang::index::SymbolPropertySet |
Definition at line 77 of file IndexSymbol.h.
typedef unsigned clang::index::SymbolRoleSet |
Definition at line 116 of file IndexSymbol.h.
|
strong |
Definition at line 23 of file IndexSymbol.h.
|
strong |
Enumerator | |
---|---|
C | |
ObjC | |
CXX | |
Swift |
Definition at line 59 of file IndexSymbol.h.
|
strong |
Set of properties that provide additional info about a symbol.
Enumerator | |
---|---|
Generic | |
TemplatePartialSpecialization | |
TemplateSpecialization | |
UnitTest | |
IBAnnotated | |
IBOutletCollection | |
GKInspectable | |
Local |
Definition at line 79 of file IndexSymbol.h.
|
strong |
Set of roles that are attributed to symbol occurrences.
Definition at line 92 of file IndexSymbol.h.
|
strong |
Language specific sub-kinds.
Enumerator | |
---|---|
None | |
CXXCopyConstructor | |
CXXMoveConstructor | |
AccessorGetter | |
AccessorSetter | |
UsingTypename | |
UsingValue |
Definition at line 67 of file IndexSymbol.h.
void clang::index::applyForEachSymbolProperty | ( | SymbolPropertySet | Props, |
llvm::function_ref< void(SymbolProperty)> | Fn | ||
) |
Definition at line 496 of file IndexSymbol.cpp.
References APPLY_FOR_PROPERTY, Generic, GKInspectable, IBAnnotated, IBOutletCollection, Local, TemplatePartialSpecialization, TemplateSpecialization, and UnitTest.
Referenced by printSymbolProperties().
void clang::index::applyForEachSymbolRole | ( | SymbolRoleSet | Roles, |
llvm::function_ref< void(SymbolRole)> | Fn | ||
) |
Definition at line 383 of file IndexSymbol.cpp.
References applyForEachSymbolRoleInterruptible().
Referenced by printSymbolRoles().
bool clang::index::applyForEachSymbolRoleInterruptible | ( | SymbolRoleSet | Roles, |
llvm::function_ref< bool(SymbolRole)> | Fn | ||
) |
Definition at line 351 of file IndexSymbol.cpp.
References AddressOf, APPLY_FOR_ROLE, Call, Declaration, Definition, Dynamic, Implicit, Read, Reference, RelationAccessorOf, RelationBaseOf, RelationCalledBy, RelationChildOf, RelationContainedBy, RelationExtendedBy, RelationIBTypeOf, RelationOverrideOf, RelationReceivedBy, RelationSpecializationOf, and Write.
Referenced by applyForEachSymbolRole(), and shouldReportOccurrenceForSystemDeclOnlyMode().
std::unique_ptr< FrontendAction > clang::index::createIndexingAction | ( | std::shared_ptr< IndexDataConsumer > | DataConsumer, |
IndexingOptions | Opts, | ||
std::unique_ptr< FrontendAction > | WrappedAction | ||
) |
WrappedAction | another frontend action to wrap over or null. |
Definition at line 155 of file IndexingAction.cpp.
bool clang::index::generateUSRForDecl | ( | const Decl * | D, |
SmallVectorImpl< char > & | Buf | ||
) |
Generate a USR for a Decl, including the USR prefix.
Definition at line 1026 of file USRGeneration.cpp.
Referenced by clang::cross_tu::CrossTranslationUnitContext::getLookupName(), clang::tooling::getUSRForDecl(), and getUSRSpacePrefix().
void clang::index::generateUSRForEnumConstant | ( | StringRef | EnumConstantName, |
raw_ostream & | OS | ||
) |
Generate a USR fragment for an enum constant.
Definition at line 1021 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForGlobalEnum | ( | StringRef | EnumName, |
raw_ostream & | OS, | ||
StringRef | ExtSymbolDefinedIn = "" |
||
) |
Generate USR fragment for a global (non-nested) enum.
Definition at line 1014 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
bool clang::index::generateUSRForMacro | ( | const MacroDefinitionRecord * | MD, |
const SourceManager & | SM, | ||
SmallVectorImpl< char > & | Buf | ||
) |
Generate a USR for a macro, including the USR prefix.
Definition at line 1039 of file USRGeneration.cpp.
References clang::MacroDefinitionRecord::getLocation(), clang::IdentifierInfo::getName(), clang::MacroDefinitionRecord::getName(), and SM.
Referenced by getUSRSpacePrefix().
bool clang::index::generateUSRForMacro | ( | StringRef | MacroName, |
SourceLocation | Loc, | ||
const SourceManager & | SM, | ||
SmallVectorImpl< char > & | Buf | ||
) |
Definition at line 1049 of file USRGeneration.cpp.
References getUSRSpacePrefix(), clang::SourceManager::isInSystemHeader(), clang::SourceLocation::isInvalid(), and printLoc().
void clang::index::generateUSRForObjCCategory | ( | StringRef | Cls, |
StringRef | Cat, | ||
raw_ostream & | OS, | ||
StringRef | ClsExtSymbolDefinedIn = "" , |
||
StringRef | CatExtSymbolDefinedIn = "" |
||
) |
Generate a USR fragment for an Objective-C class category.
Definition at line 984 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForObjCClass | ( | StringRef | Cls, |
raw_ostream & | OS, | ||
StringRef | ExtSymbolDefinedIn = "" , |
||
StringRef | CategoryContextExtSymbolDefinedIn = "" |
||
) |
Generate a USR fragment for an Objective-C class.
Definition at line 976 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForObjCIvar | ( | StringRef | Ivar, |
raw_ostream & | OS | ||
) |
Generate a USR fragment for an Objective-C instance variable.
The complete USR can be created by concatenating the USR for the encompassing class with this USR fragment.
Definition at line 992 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForObjCMethod | ( | StringRef | Sel, |
bool | IsInstanceMethod, | ||
raw_ostream & | OS | ||
) |
Generate a USR fragment for an Objective-C method.
Definition at line 996 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForObjCProperty | ( | StringRef | Prop, |
bool | isClassProp, | ||
raw_ostream & | OS | ||
) |
Generate a USR fragment for an Objective-C property.
Definition at line 1002 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
void clang::index::generateUSRForObjCProtocol | ( | StringRef | Prot, |
raw_ostream & | OS, | ||
StringRef | ExtSymbolDefinedIn = "" |
||
) |
Generate a USR fragment for an Objective-C protocol.
Definition at line 1007 of file USRGeneration.cpp.
Referenced by getUSRSpacePrefix().
SymbolInfo clang::index::getSymbolInfo | ( | const Decl * | D | ) |
Definition at line 87 of file IndexSymbol.cpp.
References AccessorGetter, AccessorSetter, C, checkForIBOutlets(), Class, ClassMethod, Constructor, ConversionFunction, CXX, CXXCopyConstructor, CXXMoveConstructor, Destructor, Enum, EnumConstant, Extension, Field, Function, Generic, clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::Decl::getKind(), GKInspectable, clang::Decl::hasAttr(), IBAnnotated, clang::if(), InstanceMethod, InstanceProperty, isFunctionLocalSymbol(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::CXXMethodDecl::isStatic(), isUnitTest(), isUnitTestCase(), clang::index::SymbolInfo::Kind, clang::index::SymbolInfo::Lang, Local, Module, Namespace, NamespaceAlias, None, ObjC, clang::ObjCMethodDecl::param_size(), Parameter, clang::index::SymbolInfo::Properties, Protocol, StaticMethod, StaticProperty, Struct, clang::index::SymbolInfo::SubKind, Swift, TemplatePartialSpecialization, TemplateSpecialization, clang::FunctionDecl::TK_FunctionTemplateSpecialization, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, clang::TTK_Union, TypeAlias, Union, UnitTest, Unknown, Using, UsingTypename, UsingValue, and Variable.
StringRef clang::index::getSymbolKindString | ( | SymbolKind | K | ) |
Definition at line 440 of file IndexSymbol.cpp.
References Class, ClassMethod, ClassProperty, Constructor, ConversionFunction, Destructor, Enum, EnumConstant, Extension, Field, Function, InstanceMethod, InstanceProperty, Macro, Module, Namespace, NamespaceAlias, Parameter, Protocol, StaticMethod, StaticProperty, Struct, TypeAlias, Union, Unknown, Using, and Variable.
StringRef clang::index::getSymbolLanguageString | ( | SymbolLanguage | K | ) |
StringRef clang::index::getSymbolSubKindString | ( | SymbolSubKind | K | ) |
Definition at line 473 of file IndexSymbol.cpp.
References AccessorGetter, AccessorSetter, CXXCopyConstructor, CXXMoveConstructor, None, UsingTypename, and UsingValue.
|
inlinestatic |
Definition at line 24 of file USRGeneration.h.
References generateUSRForDecl(), generateUSRForEnumConstant(), generateUSRForGlobalEnum(), generateUSRForMacro(), generateUSRForObjCCategory(), generateUSRForObjCClass(), generateUSRForObjCIvar(), generateUSRForObjCMethod(), generateUSRForObjCProperty(), generateUSRForObjCProtocol(), and SM.
Referenced by generateUSRForMacro().
void clang::index::indexASTUnit | ( | ASTUnit & | Unit, |
std::shared_ptr< IndexDataConsumer > | DataConsumer, | ||
IndexingOptions | Opts | ||
) |
Definition at line 175 of file IndexingAction.cpp.
References clang::ASTUnit::getASTContext(), clang::ASTUnit::getPreprocessorPtr(), indexTranslationUnit(), and clang::index::IndexingContext::setASTContext().
void clang::index::indexModuleFile | ( | serialization::ModuleFile & | Mod, |
ASTReader & | Reader, | ||
std::shared_ptr< IndexDataConsumer > | DataConsumer, | ||
IndexingOptions | Opts | ||
) |
Definition at line 198 of file IndexingAction.cpp.
References clang::ASTReader::getContext(), clang::ASTReader::getModuleFileLevelDecls(), clang::index::IndexingContext::indexTopLevelDecl(), and clang::index::IndexingContext::setASTContext().
void clang::index::indexTopLevelDecls | ( | ASTContext & | Ctx, |
ArrayRef< const Decl *> | Decls, | ||
std::shared_ptr< IndexDataConsumer > | DataConsumer, | ||
IndexingOptions | Opts | ||
) |
Definition at line 186 of file IndexingAction.cpp.
References clang::index::IndexingContext::indexTopLevelDecl(), and clang::index::IndexingContext::setASTContext().
Definition at line 52 of file IndexSymbol.cpp.
References clang::ExternalLinkage, clang::Decl::getParentFunctionOrMethod(), clang::InternalLinkage, clang::ModuleInternalLinkage, clang::ModuleLinkage, clang::NoLinkage, clang::UniqueExternalLinkage, and clang::VisibleNoLinkage.
Referenced by getSymbolInfo(), clang::index::IndexingContext::handleReference(), clang::index::IndexingContext::indexTagDecl(), and shouldReportOccurrenceForSystemDeclOnlyMode().
bool clang::index::printSymbolName | ( | const Decl * | D, |
const LangOptions & | LO, | ||
raw_ostream & | OS | ||
) |
Definition at line 422 of file IndexSymbol.cpp.
References clang::DeclarationName::isEmpty(), clang::DeclarationName::print(), and clang::PrintingPolicy::SuppressTemplateArgsInCXXConstructors.
void clang::index::printSymbolProperties | ( | SymbolPropertySet | Props, |
raw_ostream & | OS | ||
) |
Definition at line 514 of file IndexSymbol.cpp.
References applyForEachSymbolProperty(), Generic, GKInspectable, IBAnnotated, IBOutletCollection, Local, TemplatePartialSpecialization, TemplateSpecialization, and UnitTest.
void clang::index::printSymbolRoles | ( | SymbolRoleSet | Roles, |
raw_ostream & | OS | ||
) |
Definition at line 391 of file IndexSymbol.cpp.
References AddressOf, applyForEachSymbolRole(), Call, Declaration, Definition, Dynamic, Implicit, Read, Reference, RelationAccessorOf, RelationBaseOf, RelationCalledBy, RelationChildOf, RelationContainedBy, RelationExtendedBy, RelationIBTypeOf, RelationOverrideOf, RelationReceivedBy, RelationSpecializationOf, and Write.
|
static |
Definition at line 89 of file IndexSymbol.h.
|
static |
Definition at line 115 of file IndexSymbol.h.