clang-tools 22.0.0git
|
Classes | |
class | ClangDocCommentVisitor |
Functions | |
SymbolID | hashUSR (llvm::StringRef USR) |
template<typename T> | |
static void | populateParentNamespaces (llvm::SmallVector< Reference, 4 > &Namespaces, const T *D, bool &IsAnonymousNamespace) |
static void | populateMemberTypeInfo (MemberTypeInfo &I, const Decl *D) |
static void | populateMemberTypeInfo (RecordInfo &I, AccessSpecifier &Access, const DeclaratorDecl *D, bool IsStatic=false) |
static void | getTemplateParameters (const TemplateParameterList *TemplateParams, llvm::raw_ostream &Stream) |
static llvm::SmallString< 256 > | getFunctionPrototype (const FunctionDecl *FuncDecl) |
static llvm::SmallString< 16 > | getTypeAlias (const TypeAliasDecl *Alias) |
static llvm::SmallString< 16 > | getRecordPrototype (const CXXRecordDecl *CXXRD) |
static llvm::SmallString< 128 > | getInfoRelativePath (const llvm::SmallVectorImpl< doc::Reference > &Namespaces) |
static llvm::SmallString< 128 > | getInfoRelativePath (const Decl *D) |
static std::string | getSourceCode (const Decl *D, const SourceRange &R) |
template<typename T> | |
static std::string | serialize (T &I) |
std::string | serialize (std::unique_ptr< Info > &I) |
static void | parseFullComment (const FullComment *C, CommentInfo &CI) |
static SymbolID | getUSRForDecl (const Decl *D) |
static TagDecl * | getTagDeclForType (const QualType &T) |
static RecordDecl * | getRecordDeclForType (const QualType &T) |
static TypeInfo | getTypeInfoForType (const QualType &T, const PrintingPolicy &Policy) |
static bool | isPublic (const clang::AccessSpecifier AS, const clang::Linkage Link) |
static bool | shouldSerializeInfo (bool PublicOnly, bool IsInAnonymousNamespace, const NamedDecl *D) |
static void | InsertChild (ScopeChildren &Scope, const NamespaceInfo &Info) |
static void | InsertChild (ScopeChildren &Scope, const RecordInfo &Info) |
static void | InsertChild (ScopeChildren &Scope, EnumInfo Info) |
static void | InsertChild (ScopeChildren &Scope, FunctionInfo Info) |
static void | InsertChild (ScopeChildren &Scope, TypedefInfo Info) |
static void | InsertChild (ScopeChildren &Scope, ConceptInfo Info) |
static void | InsertChild (ScopeChildren &Scope, VarInfo Info) |
template<typename ChildType> | |
static std::unique_ptr< Info > | makeAndInsertIntoParent (ChildType Child) |
static AccessSpecifier | getFinalAccessSpecifier (AccessSpecifier FirstAS, AccessSpecifier SecondAS) |
static void | parseFields (RecordInfo &I, const RecordDecl *D, bool PublicOnly, AccessSpecifier Access=AccessSpecifier::AS_public) |
static void | parseEnumerators (EnumInfo &I, const EnumDecl *D) |
static void | parseParameters (FunctionInfo &I, const FunctionDecl *D) |
static void | parseBases (RecordInfo &I, const CXXRecordDecl *D) |
static void | populateTemplateParameters (std::optional< TemplateInfo > &TemplateInfo, const clang::Decl *D) |
static TemplateParamInfo | convertTemplateArgToInfo (const clang::Decl *D, const TemplateArgument &Arg) |
template<typename T> | |
static void | populateInfo (Info &I, const T *D, const FullComment *C, bool &IsInAnonymousNamespace) |
template<typename T> | |
static void | populateSymbolInfo (SymbolInfo &I, const T *D, const FullComment *C, Location Loc, bool &IsInAnonymousNamespace) |
static void | handleCompoundConstraints (const Expr *Constraint, std::vector< ConstraintInfo > &ConstraintInfos) |
static void | populateConstraints (TemplateInfo &I, const TemplateDecl *D) |
static void | populateFunctionInfo (FunctionInfo &I, const FunctionDecl *D, const FullComment *FC, Location Loc, bool &IsInAnonymousNamespace) |
static void | parseBases (RecordInfo &I, const CXXRecordDecl *D, bool IsFileInRootDir, bool PublicOnly, bool IsParent, AccessSpecifier ParentAccess=AccessSpecifier::AS_public) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const NamespaceDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
static void | parseFriends (RecordInfo &RI, const CXXRecordDecl *D) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const RecordDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const FunctionDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const CXXMethodDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
static void | extractCommentFromDecl (const Decl *D, TypedefInfo &Info) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const TypedefDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const TypeAliasDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const EnumDecl *D, const FullComment *FC, Location Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const ConceptDecl *D, const FullComment *FC, const Location &Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const VarDecl *D, const FullComment *FC, const Location &Loc, bool PublicOnly) |
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > | emitInfo (const VarDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly) |
|
static |
Definition at line 736 of file Serialize.cpp.
Referenced by emitInfo(), and populateFunctionInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const ConceptDecl * | D, |
const FullComment * | FC, | ||
const Location & | Loc, | ||
bool | PublicOnly ) |
Definition at line 1223 of file Serialize.cpp.
References getSourceCode(), makeAndInsertIntoParent(), populateInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const CXXMethodDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1109 of file Serialize.cpp.
References clang::doc::FunctionInfo::Access, getUSRForDecl(), clang::doc::FunctionInfo::IsMethod, clang::doc::SymbolInfo::IsStatic, clang::doc::IT_record, makeAndInsertIntoParent(), clang::doc::FunctionInfo::Parent, populateFunctionInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const EnumDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1202 of file Serialize.cpp.
References makeAndInsertIntoParent(), parseEnumerators(), populateSymbolInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const FunctionDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1095 of file Serialize.cpp.
References clang::doc::FunctionInfo::Access, makeAndInsertIntoParent(), populateFunctionInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const NamespaceDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 952 of file Serialize.cpp.
References getInfoRelativePath(), makeAndInsertIntoParent(), populateInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const RecordDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1022 of file Serialize.cpp.
References convertTemplateArgToInfo(), getInfoRelativePath(), getRecordPrototype(), getSourceCode(), getUSRForDecl(), makeAndInsertIntoParent(), parseBases(), parseFields(), parseFriends(), populateConstraints(), populateSymbolInfo(), populateTemplateParameters(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const TypeAliasDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1181 of file Serialize.cpp.
References extractCommentFromDecl(), getTypeAlias(), getTypeInfoForType(), makeAndInsertIntoParent(), populateInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const TypedefDecl * | D, |
const FullComment * | FC, | ||
Location | Loc, | ||
bool | PublicOnly ) |
Definition at line 1152 of file Serialize.cpp.
References extractCommentFromDecl(), getTypeInfoForType(), makeAndInsertIntoParent(), clang::doc::Info::Name, populateInfo(), PublicOnly(), and shouldSerializeInfo().
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const VarDecl * | D, |
const FullComment * | FC, | ||
const Location & | Loc, | ||
bool | PublicOnly ) |
Definition at line 1247 of file Serialize.cpp.
References getTypeInfoForType(), clang::doc::SymbolInfo::IsStatic, makeAndInsertIntoParent(), populateSymbolInfo(), PublicOnly(), shouldSerializeInfo(), and clang::doc::VarInfo::Type.
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > clang::doc::serialize::emitInfo | ( | const VarDecl * | D, |
const FullComment * | FC, | ||
int | LineNumber, | ||
StringRef | File, | ||
bool | IsFileInRootDir, | ||
bool | PublicOnly ) |
References PublicOnly(), and serialize().
|
static |
Definition at line 1137 of file Serialize.cpp.
References clang::doc::Info::Description, and parseFullComment().
Referenced by emitInfo(), and emitInfo().
|
static |
Definition at line 585 of file Serialize.cpp.
Referenced by parseBases(), and populateMemberTypeInfo().
|
static |
Definition at line 98 of file Serialize.cpp.
References FuncDecl, and getTemplateParameters().
Referenced by populateFunctionInfo().
|
static |
Definition at line 251 of file Serialize.cpp.
References getInfoRelativePath(), and populateParentNamespaces().
|
static |
Definition at line 244 of file Serialize.cpp.
Referenced by emitInfo(), emitInfo(), getInfoRelativePath(), getTypeInfoForType(), InsertChild(), InsertChild(), parseBases(), parseBases(), and parseFriends().
|
static |
Definition at line 435 of file Serialize.cpp.
Referenced by parseBases().
|
static |
Definition at line 182 of file Serialize.cpp.
Referenced by emitInfo().
|
static |
Definition at line 380 of file Serialize.cpp.
Referenced by emitInfo(), emitInfo(), parseEnumerators(), parseFriends(), parseParameters(), and populateTemplateParameters().
|
static |
Definition at line 429 of file Serialize.cpp.
Referenced by getTypeInfoForType().
|
static |
Definition at line 52 of file Serialize.cpp.
References getTemplateParameters().
Referenced by getFunctionPrototype(), getTemplateParameters(), and getTypeAlias().
|
static |
Definition at line 168 of file Serialize.cpp.
References getTemplateParameters().
Referenced by emitInfo().
|
static |
Definition at line 441 of file Serialize.cpp.
References getInfoRelativePath(), getTagDeclForType(), getUSRForDecl(), clang::doc::TypeInfo::IsBuiltIn, clang::doc::TypeInfo::IsTemplate, clang::doc::IT_default, clang::doc::IT_enum, and clang::doc::IT_record.
Referenced by emitInfo(), emitInfo(), emitInfo(), parseFriends(), parseParameters(), populateFunctionInfo(), and populateMemberTypeInfo().
|
static |
Definition at line 422 of file Serialize.cpp.
References hashUSR().
Referenced by emitInfo(), emitInfo(), getTypeInfoForType(), handleCompoundConstraints(), parseBases(), parseBases(), parseFriends(), populateConstraints(), populateFunctionInfo(), populateInfo(), and populateParentNamespaces().
|
static |
Definition at line 792 of file Serialize.cpp.
References clang::doc::ConstraintInfo::ConstraintExpr, getUSRForDecl(), and handleCompoundConstraints().
Referenced by handleCompoundConstraints(), and populateConstraints().
SymbolID clang::doc::serialize::hashUSR | ( | llvm::StringRef | USR | ) |
Definition at line 38 of file Serialize.cpp.
Referenced by getUSRForDecl().
|
static |
Definition at line 514 of file Serialize.cpp.
References clang::doc::ScopeChildren::Concepts.
|
static |
Definition at line 491 of file Serialize.cpp.
References getInfoRelativePath(), clang::doc::IT_namespace, clang::doc::Info::Name, clang::doc::Info::Namespace, clang::doc::ScopeChildren::Namespaces, and clang::doc::Info::USR.
Referenced by makeAndInsertIntoParent().
|
static |
Definition at line 496 of file Serialize.cpp.
References getInfoRelativePath(), clang::doc::IT_record, clang::doc::Info::Name, clang::doc::Info::Namespace, clang::doc::ScopeChildren::Records, and clang::doc::Info::USR.
|
static |
Definition at line 502 of file Serialize.cpp.
References clang::doc::ScopeChildren::Enums.
|
static |
Definition at line 506 of file Serialize.cpp.
References clang::doc::ScopeChildren::Functions.
|
static |
Definition at line 510 of file Serialize.cpp.
References clang::doc::ScopeChildren::Typedefs.
|
static |
Definition at line 518 of file Serialize.cpp.
References clang::doc::ScopeChildren::Variables.
|
static |
Definition at line 466 of file Serialize.cpp.
Referenced by shouldSerializeInfo().
|
static |
Definition at line 537 of file Serialize.cpp.
References InsertChild(), clang::doc::IT_concept, clang::doc::IT_default, clang::doc::IT_enum, clang::doc::IT_friend, clang::doc::IT_function, clang::doc::IT_namespace, clang::doc::IT_record, clang::doc::IT_typedef, and clang::doc::IT_variable.
Referenced by emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), and emitInfo().
|
static |
Definition at line 654 of file Serialize.cpp.
References getInfoRelativePath(), getRecordDeclForType(), getUSRForDecl(), clang::doc::IT_record, clang::doc::RecordInfo::Parents, and clang::doc::RecordInfo::VirtualParents.
Referenced by emitInfo(), and parseBases().
|
static |
Definition at line 897 of file Serialize.cpp.
References clang::doc::FunctionInfo::Access, clang::doc::RecordInfo::Bases, getFinalAccessSpecifier(), getInfoRelativePath(), getUSRForDecl(), clang::doc::FunctionInfo::IsMethod, clang::doc::SymbolInfo::IsStatic, clang::doc::MD(), parseBases(), parseFields(), populateFunctionInfo(), and PublicOnly().
|
static |
Definition at line 622 of file Serialize.cpp.
References clang::doc::EnumValueInfo::Description, getSourceCode(), clang::doc::EnumInfo::Members, and parseFullComment().
Referenced by emitInfo().
|
static |
Definition at line 601 of file Serialize.cpp.
References populateMemberTypeInfo(), PublicOnly(), and shouldSerializeInfo().
Referenced by emitInfo(), and parseBases().
|
static |
Definition at line 972 of file Serialize.cpp.
References clang::doc::RecordInfo::Friends, FuncDecl, getInfoRelativePath(), getSourceCode(), getTypeInfoForType(), getUSRForDecl(), clang::doc::FriendInfo::IsClass, clang::doc::IT_default, clang::doc::IT_friend, clang::doc::FriendInfo::Params, clang::doc::FunctionInfo::Params, parseParameters(), clang::doc::FriendInfo::Ref, clang::doc::FriendInfo::ReturnType, and clang::doc::FriendInfo::Template.
Referenced by emitInfo().
|
static |
Definition at line 417 of file Serialize.cpp.
References clang::doc::serialize::ClangDocCommentVisitor::parseComment().
Referenced by extractCommentFromDecl(), parseEnumerators(), populateInfo(), and populateMemberTypeInfo().
|
static |
Definition at line 643 of file Serialize.cpp.
References clang::doc::FieldTypeInfo::DefaultValue, getSourceCode(), getTypeInfoForType(), and clang::doc::FunctionInfo::Params.
Referenced by parseFriends(), and populateFunctionInfo().
|
static |
Definition at line 811 of file Serialize.cpp.
References clang::doc::ConstraintInfo::ConstraintExpr, clang::doc::TemplateInfo::Constraints, getUSRForDecl(), and handleCompoundConstraints().
Referenced by emitInfo(), and populateFunctionInfo().
|
static |
Definition at line 835 of file Serialize.cpp.
References convertTemplateArgToInfo(), getFunctionPrototype(), getTypeInfoForType(), getUSRForDecl(), clang::doc::SymbolInfo::IsStatic, parseParameters(), populateConstraints(), populateSymbolInfo(), populateTemplateParameters(), clang::doc::FunctionInfo::Prototype, clang::doc::FunctionInfo::ReturnType, and clang::doc::FunctionInfo::Template.
Referenced by emitInfo(), emitInfo(), and parseBases().
|
static |
Definition at line 747 of file Serialize.cpp.
References clang::doc::Info::Description, getUSRForDecl(), clang::doc::Info::Name, clang::doc::Info::Namespace, parseFullComment(), populateParentNamespaces(), and clang::doc::Info::USR.
Referenced by emitInfo(), emitInfo(), emitInfo(), emitInfo(), and populateSymbolInfo().
|
static |
Definition at line 868 of file Serialize.cpp.
References clang::doc::MemberTypeInfo::Description, and parseFullComment().
Referenced by parseFields(), and populateMemberTypeInfo().
|
static |
Definition at line 885 of file Serialize.cpp.
References getFinalAccessSpecifier(), getTypeInfoForType(), clang::doc::RecordInfo::Members, and populateMemberTypeInfo().
|
static |
Definition at line 685 of file Serialize.cpp.
References getUSRForDecl(), clang::doc::IT_enum, clang::doc::IT_function, clang::doc::IT_namespace, and clang::doc::IT_record.
Referenced by getInfoRelativePath(), and populateInfo().
|
static |
Definition at line 765 of file Serialize.cpp.
References clang::doc::SymbolInfo::DefLoc, clang::doc::SymbolInfo::Loc, clang::doc::SymbolInfo::MangledName, populateInfo(), and clang::doc::Info::USR.
Referenced by emitInfo(), emitInfo(), emitInfo(), and populateFunctionInfo().
|
static |
Definition at line 722 of file Serialize.cpp.
References getSourceCode(), and clang::doc::TemplateInfo::Params.
Referenced by emitInfo(), and populateFunctionInfo().
std::string clang::doc::serialize::serialize | ( | std::unique_ptr< Info > & | I | ) |
Definition at line 395 of file Serialize.cpp.
References clang::doc::IT_concept, clang::doc::IT_default, clang::doc::IT_enum, clang::doc::IT_friend, clang::doc::IT_function, clang::doc::IT_namespace, clang::doc::IT_record, clang::doc::IT_typedef, clang::doc::IT_variable, and serialize().
|
static |
Definition at line 387 of file Serialize.cpp.
References clang::doc::ClangDocBitcodeWriter::emitBlock(), and serialize().
Referenced by emitInfo(), serialize(), and serialize().
|
static |
Definition at line 475 of file Serialize.cpp.
References isPublic(), and PublicOnly().
Referenced by emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), emitInfo(), and parseFields().