clang-tools 23.0.0git
clang::doc Namespace Reference

Namespaces

namespace  serialize

Classes

struct  BaseRecordInfo
class  BenchmarkVisitor
struct  BitCodeConstants
class  ClangDocBitcodeReader
class  ClangDocBitcodeWriter
struct  ClangDocContext
struct  CommentInfo
struct  ConceptInfo
class  ConcurrentStringPool
struct  ConstraintInfo
struct  Context
struct  EnumInfo
struct  EnumValueInfo
struct  FieldTypeInfo
struct  FriendInfo
struct  FunctionInfo
class  Generator
struct  has_children
struct  has_children< T, std::void_t< decltype(std::declval< T >().Children)> >
struct  has_description
struct  has_description< T, std::void_t< decltype(std::declval< T >().Description)> >
class  HTMLGenerator
struct  Index
struct  Info
 A base struct for Infos. More...
struct  InfoNode
struct  is_valid_child
struct  is_valid_child< TargetChild, std::void_t< decltype(getList(std::declval< ScopeChildren & >(), std::declval< TargetChild * >()))> >
class  JSONGenerator
struct  Location
class  MapASTVisitor
class  MapperActionFactory
class  MDGenerator
 Generator for Markdown documentation. More...
struct  MDMustacheGenerator
struct  MemberTypeInfo
struct  MustacheGenerator
class  MustacheTemplateFile
struct  NamespaceInfo
struct  RecordInfo
struct  Reference
struct  ScopeChildren
struct  SymbolInfo
class  TableCommentWriter
 Writer for writing comments to a table cell in MD. More...
struct  TemplateInfo
struct  TemplateParamInfo
struct  TemplateSpecializationInfo
struct  TypedefInfo
struct  TypeInfo
struct  VarInfo
class  YAMLGenerator
 Generator for YAML documentation. More...

Typedefs

using Record = llvm::SmallVector<uint64_t, 1024>
typedef llvm::Registry< GeneratorGeneratorRegistry
typedef std::function< void(const Reference &, Object &)> ReferenceFunc
template<typename T>
using DocList = llvm::simple_ilist<InfoNode<T>>
using SymbolID = std::array<uint8_t, 20>

Enumerations

enum  BlockId {
  BI_VERSION_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID , BI_NAMESPACE_BLOCK_ID , BI_ENUM_BLOCK_ID , BI_ENUM_VALUE_BLOCK_ID ,
  BI_TYPE_BLOCK_ID , BI_FIELD_TYPE_BLOCK_ID , BI_MEMBER_TYPE_BLOCK_ID , BI_RECORD_BLOCK_ID ,
  BI_BASE_RECORD_BLOCK_ID , BI_FUNCTION_BLOCK_ID , BI_COMMENT_BLOCK_ID , BI_REFERENCE_BLOCK_ID ,
  BI_TEMPLATE_BLOCK_ID , BI_TEMPLATE_SPECIALIZATION_BLOCK_ID , BI_TEMPLATE_PARAM_BLOCK_ID , BI_CONSTRAINT_BLOCK_ID ,
  BI_TYPEDEF_BLOCK_ID , BI_CONCEPT_BLOCK_ID , BI_VAR_BLOCK_ID , BI_FRIEND_BLOCK_ID ,
  BI_LAST , BI_FIRST = BI_VERSION_BLOCK_ID
}
enum  RecordId {
  VERSION = 1 , FUNCTION_USR , FUNCTION_NAME , FUNCTION_DEFLOCATION ,
  FUNCTION_LOCATION , FUNCTION_ACCESS , FUNCTION_IS_METHOD , FUNCTION_IS_STATIC ,
  COMMENT_KIND , COMMENT_TEXT , COMMENT_NAME , COMMENT_DIRECTION ,
  COMMENT_PARAMNAME , COMMENT_CLOSENAME , COMMENT_SELFCLOSING , COMMENT_EXPLICIT ,
  COMMENT_ATTRKEY , COMMENT_ATTRVAL , COMMENT_ARG , TYPE_IS_BUILTIN ,
  TYPE_IS_TEMPLATE , FIELD_TYPE_NAME , FIELD_DEFAULT_VALUE , FIELD_TYPE_IS_BUILTIN ,
  FIELD_TYPE_IS_TEMPLATE , MEMBER_TYPE_NAME , MEMBER_TYPE_ACCESS , MEMBER_TYPE_IS_STATIC ,
  MEMBER_TYPE_IS_BUILTIN , MEMBER_TYPE_IS_TEMPLATE , NAMESPACE_USR , NAMESPACE_NAME ,
  NAMESPACE_PATH , NAMESPACE_PARENT_USR , ENUM_USR , ENUM_NAME ,
  ENUM_DEFLOCATION , ENUM_LOCATION , ENUM_SCOPED , ENUM_VALUE_NAME ,
  ENUM_VALUE_VALUE , ENUM_VALUE_EXPR , RECORD_USR , RECORD_NAME ,
  RECORD_PATH , RECORD_DEFLOCATION , RECORD_LOCATION , RECORD_TAG_TYPE ,
  RECORD_IS_TYPE_DEF , RECORD_MANGLED_NAME , RECORD_PARENT_USR , BASE_RECORD_USR ,
  BASE_RECORD_NAME , BASE_RECORD_PATH , BASE_RECORD_TAG_TYPE , BASE_RECORD_IS_VIRTUAL ,
  BASE_RECORD_ACCESS , BASE_RECORD_IS_PARENT , REFERENCE_USR , REFERENCE_NAME ,
  REFERENCE_QUAL_NAME , REFERENCE_TYPE , REFERENCE_PATH , REFERENCE_FIELD ,
  REFERENCE_FILE , TEMPLATE_PARAM_CONTENTS , TEMPLATE_SPECIALIZATION_OF , TYPEDEF_USR ,
  TYPEDEF_NAME , TYPEDEF_DEFLOCATION , TYPEDEF_IS_USING , CONCEPT_USR ,
  CONCEPT_NAME , CONCEPT_IS_TYPE , CONCEPT_CONSTRAINT_EXPRESSION , CONCEPT_DEFLOCATION ,
  CONSTRAINT_EXPRESSION , VAR_USR , VAR_NAME , VAR_DEFLOCATION ,
  VAR_IS_STATIC , FRIEND_IS_CLASS , RI_LAST , RI_FIRST = VERSION
}
enum class  FieldId {
  F_default , F_namespace , F_parent , F_vparent ,
  F_type , F_child_namespace , F_child_record , F_concept ,
  F_friend
}
enum class  InfoType {
  IT_default , IT_namespace , IT_record , IT_function ,
  IT_enum , IT_typedef , IT_concept , IT_variable ,
  IT_friend
}
enum class  CommentKind {
  CK_FullComment , CK_ParagraphComment , CK_TextComment , CK_InlineCommandComment ,
  CK_HTMLStartTagComment , CK_HTMLEndTagComment , CK_BlockCommandComment , CK_ParamCommandComment ,
  CK_TParamCommandComment , CK_VerbatimBlockComment , CK_VerbatimBlockLineComment , CK_VerbatimLineComment ,
  CK_Unknown
}
enum  OutputFormatTy {
  md , yaml , html , json ,
  md_mustache
}

Functions

static void BM_EmitInfoFunction (benchmark::State &State)
 BENCHMARK (BM_EmitInfoFunction)
static void BM_Mapper_Scale (benchmark::State &State)
 BENCHMARK (BM_Mapper_Scale) -> Range(10, 10000)
static void BM_SerializeFunctionInfo (benchmark::State &State)
 BENCHMARK (BM_SerializeFunctionInfo)
static void BM_MergeInfos_Scale (benchmark::State &State)
 BENCHMARK (BM_MergeInfos_Scale) -> Range(2, 10000)
static void BM_BitcodeReader_Scale (benchmark::State &State)
 BENCHMARK (BM_BitcodeReader_Scale) -> Range(10, 10000)
static void BM_JSONGenerator_Scale (benchmark::State &State)
 BENCHMARK (BM_JSONGenerator_Scale) -> Range(10, 10000)
static void BM_Index_Insertion (benchmark::State &State)
 BENCHMARK (BM_Index_Insertion) -> Range(10, 10000)
static llvm::ExitOnError ExitOnErr ("clang-doc error: ")
static llvm::Error decodeRecord (const Record &R, llvm::SmallVectorImpl< char > &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, llvm::StringRef &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, SymbolID &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, bool &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, AccessSpecifier &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, TagTypeKind &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, std::optional< Location > &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, InfoType &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, FieldId &Field, llvm::StringRef Blob)
static llvm::Error decodeRecord (const Record &R, DocList< Location > &Field, llvm::StringRef Blob)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, const unsigned VersionNo)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, NamespaceInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, RecordInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, BaseRecordInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, EnumInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, TypedefInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, EnumValueInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, FunctionInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, TypeInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, FieldTypeInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, MemberTypeInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, CommentInfo *I, llvm::SmallVectorImpl< StringRef > &AttrKeys, llvm::SmallVectorImpl< StringRef > &AttrValues, llvm::SmallVectorImpl< StringRef > &Args)
template<typename T>
static llvm::Error addReference (T I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (VarInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (TypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FieldTypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (MemberTypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (EnumInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (TypedefInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (NamespaceInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FunctionInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (RecordInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (ConstraintInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FriendInfo *Friend, Reference &&R, FieldId F)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, Reference *I, FieldId &F)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, TemplateInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, TemplateSpecializationInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, TemplateParamInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, ConceptInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, ConstraintInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, llvm::StringRef Blob, VarInfo *I)
static llvm::Error parseRecord (const Record &R, unsigned ID, StringRef Blob, FriendInfo *F)
template<typename T>
static llvm::Expected< CommentInfo * > getCommentInfo (T I)
template<typename T, typename TTypeInfo>
static llvm::Error addTypeInfo (T I, TTypeInfo &&TI)
template<>
llvm::Error addTypeInfo (FunctionInfo *I, TypeInfo &&T)
template<>
llvm::Error addTypeInfo (FriendInfo *I, TypeInfo &&T)
template<>
llvm::Error addTypeInfo (EnumInfo *I, TypeInfo &&T)
template<>
llvm::Error addTypeInfo (TypedefInfo *I, TypeInfo &&T)
template<>
llvm::Error addTypeInfo (VarInfo *I, TypeInfo &&T)
template<>
llvm::Error addReference (VarInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (TypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FieldTypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (MemberTypeInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (EnumInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (TypedefInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (NamespaceInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FunctionInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (RecordInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (ConstraintInfo *I, Reference &&R, FieldId F)
template<>
llvm::Error addReference (FriendInfo *Friend, Reference &&R, FieldId F)
static auto & getList (ScopeChildren &C, FunctionInfo *)
static auto & getList (ScopeChildren &C, EnumInfo *)
static auto & getList (ScopeChildren &C, TypedefInfo *)
static auto & getList (ScopeChildren &C, ConceptInfo *)
static auto & getList (ScopeChildren &C, VarInfo *)
template<typename Target, typename Child>
static void addChild (Target I, Child &&R)
template<typename Target, typename Child>
static void addChildPtr (Target I, Child *Node)
template<typename T>
static void addTemplateParam (T I, TemplateParamInfo &&P)
template<typename T>
static void addTemplate (T I, TemplateInfo &&P)
template<>
void addTemplate (RecordInfo *I, TemplateInfo &&P)
template<>
void addTemplate (FunctionInfo *I, TemplateInfo &&P)
template<>
void addTemplate (ConceptInfo *I, TemplateInfo &&P)
template<>
void addTemplate (FriendInfo *I, TemplateInfo &&P)
template<>
void addTemplate (TypedefInfo *I, TemplateInfo &&P)
template<typename T>
static void addTemplateSpecialization (T I, TemplateSpecializationInfo &&TSI)
template<>
void addTemplateSpecialization (TemplateInfo *I, TemplateSpecializationInfo &&TSI)
template<typename T>
static void addConstraint (T I, ConstraintInfo &&C)
std::unique_ptr< tooling::FrontendActionFactory > newMapperActionFactory (ClangDocContext CDCtx)
llvm::Expected< std::unique_ptr< Generator > > findGeneratorByName (llvm::StringRef Format)
llvm::StringRef getTagType (TagTypeKind AS)
Error createFileOpenError (StringRef FileName, std::error_code EC)
static GeneratorRegistry::Add< HTMLGeneratorHTML (HTMLGenerator::Format, "Generator for mustache HTML output.")
template<typename Container, typename SerializationFunc>
static void serializeArray (const Container &Records, Object &Obj, const StringRef Key, SerializationFunc SerializeInfo, const StringRef EndKey="End", function_ref< void(Object &)> UpdateJson=[](Object &Obj) {})
static constexpr unsigned getMaxParamWrapLimit ()
static void insertNonEmpty (StringRef Key, StringRef Value, Object &Obj)
static std::string infoTypeToString (InfoType IT)
static void insertComment (Object &Description, json::Value &Comment, StringRef Key)
 Insert comments into a key in the Description object.
static json::Value extractTextComments (Object *ParagraphComment)
 Takes the nested "Children" array from a comment Object.
static json::Value extractVerbatimComments (json::Array VerbatimLines)
static Object serializeComment (const CommentInfo &I, Object &Description)
static void serializeDescription (const DocList< CommentInfo > &Description, json::Object &Obj, StringRef Key="")
static void serializeTemplateSpecialization (TemplateInfo Template, Object &TemplateObj)
static void insertArray (Object &Obj, json::Value &Array, StringRef Key)
static std::vector< IndexpreprocessCDCtxIndex (Index CDCtxIndex)
static GeneratorRegistry::Add< JSONGeneratorJSON (JSONGenerator::Format, "Generator for JSON output.")
template<typename T>
static bool isTypedefAnonRecord (const T *D)
static std::string genItalic (const Twine &Text)
static std::string genEmphasis (const Twine &Text)
static std::string genReferenceList (llvm::ArrayRef< Reference > Refs)
static void writeLine (const Twine &Text, raw_ostream &OS)
static void writeNewLine (raw_ostream &OS)
static void writeHeader (const Twine &Text, unsigned int Num, raw_ostream &OS)
static void writeSourceFileRef (const ClangDocContext &CDCtx, const Location &L, raw_ostream &OS)
static void maybeWriteSourceFileRef (llvm::raw_ostream &OS, const ClangDocContext &CDCtx, const std::optional< Location > &DefLoc)
static void writeDescription (const CommentInfo &I, raw_ostream &OS)
static void writeNameLink (const StringRef &CurrentPath, const Reference &R, llvm::raw_ostream &OS)
static void genMarkdown (const ClangDocContext &CDCtx, const EnumInfo &I, llvm::raw_ostream &OS)
static void genMarkdown (const ClangDocContext &CDCtx, const FunctionInfo &I, llvm::raw_ostream &OS)
static void genMarkdown (const ClangDocContext &CDCtx, const NamespaceInfo &I, llvm::raw_ostream &OS)
static void genMarkdown (const ClangDocContext &CDCtx, const RecordInfo &I, llvm::raw_ostream &OS)
static void genMarkdown (const ClangDocContext &CDCtx, const TypedefInfo &I, llvm::raw_ostream &OS)
static void serializeReference (llvm::raw_fd_ostream &OS, const Index &I, int Level)
static llvm::Error serializeIndex (ClangDocContext &CDCtx)
static llvm::Error genIndex (ClangDocContext &CDCtx)
static GeneratorRegistry::Add< MDGeneratorMD (MDGenerator::Format, "Generator for MD output.")
static GeneratorRegistry::Add< MDMustacheGeneratorMDMustache (MDMustacheGenerator::Format, "Generator for mustache Markdown output.")
ConcurrentStringPoolgetGlobalStringPool ()
CommentKind stringToCommentKind (llvm::StringRef KindStr)
llvm::StringRef commentKindToString (CommentKind Kind)
template<typename T>
static llvm::Expected< Info * > reduce (SmallVectorImpl< Info * > &Values)
template<typename T>
static void reduceChildren (DocList< T > &Children, DocList< T > &&ChildrenToMerge)
template<>
void reduceChildren< Reference > (DocList< Reference > &Children, DocList< Reference > &&ChildrenToMerge)
template<typename T>
static void mergeUnkeyed (DocList< T > &Target, DocList< T > &&Source)
template<>
void mergeUnkeyed< CommentInfo > (DocList< CommentInfo > &Target, DocList< CommentInfo > &&Source)
llvm::Error mergeSingleInfo (doc::Info *&Reduced, doc::Info *NewInfo, llvm::BumpPtrAllocator &Arena)
llvm::Expected< Info * > mergeInfos (SmallVectorImpl< Info * > &Values)
static llvm::SmallString< 64 > calculateRelativeFilePath (const InfoType &Type, const StringRef &Path, const StringRef &Name, const StringRef &CurrentPath)
StringRef internString (const Twine &T)
template<typename T>
llvm::ArrayRef< T > allocateArray (llvm::SmallVectorImpl< T > &V, llvm::BumpPtrAllocator &Alloc)
template<typename T>
llvm::ArrayRef< T > allocateArray (llvm::ArrayRef< T > V, llvm::BumpPtrAllocator &Alloc)
template<typename T>
llvm::ArrayRef< T > deepCopyArray (llvm::ArrayRef< T > V, llvm::BumpPtrAllocator &Alloc)
template<typename T, typename... Args>
T * allocateTransient (Args &&...args)
template<typename T, typename... Args>
T * allocatePersistent (Args &&...args)
template<typename T, typename... Args>
T * allocatePtr (llvm::BumpPtrAllocator &Alloc, Args &&...args)
template<typename T, typename... Args>
InfoNode< T > * allocateListNode (llvm::BumpPtrAllocator &Alloc, Args &&...args)
template<typename T, typename... Args>
InfoNode< T > * allocateListNodeTransient (Args &&...args)
template<typename T>
InfoNode< T > * allocateListNode (llvm::BumpPtrAllocator &Alloc, T *Item)
template<typename T>
InfoNode< T > * allocateListNodeTransient (T *Item)
template<typename T, typename... Args>
InfoNode< T > * allocateListNodePersistent (Args &&...args)
template<typename T>
InfoNode< T > * allocateListNodePersistent (T *Item)
llvm::Error copyFile (llvm::StringRef FilePath, llvm::StringRef OutDirectory)
llvm::SmallString< 128 > computeRelativePath (llvm::StringRef Destination, llvm::StringRef Origin)
static GeneratorRegistry::Add< YAMLGeneratorYAML (YAMLGenerator::Format, "Generator for YAML output.")

Variables

static const unsigned VersionNumber = 3
static constexpr unsigned BlockIdCount = BI_LAST - BI_FIRST
static constexpr unsigned RecordIdCount = RI_LAST - RI_FIRST
static int YAMLGeneratorAnchorDest = YAMLGeneratorAnchorSource
static int MDGeneratorAnchorDest = MDGeneratorAnchorSource
static int HTMLGeneratorAnchorDest = HTMLGeneratorAnchorSource
static int JSONGeneratorAnchorDest = JSONGeneratorAnchorSource
static int MDMustacheGeneratorAnchorDest
volatile int YAMLGeneratorAnchorSource = 0
volatile int MDGeneratorAnchorSource = 0
volatile int HTMLGeneratorAnchorSource = 0
volatile int JSONGeneratorAnchorSource = 0
volatile int MDMustacheGeneratorAnchorSource = 0
static std::unique_ptr< MustacheTemplateFileNamespaceTemplate = nullptr
static std::unique_ptr< MustacheTemplateFileRecordTemplate = nullptr
static std::unique_ptr< MustacheTemplateFileIndexTemplate = nullptr
static auto SerializeTemplateParam
static llvm::StringSet USRVisited
static llvm::sys::SmartMutex< true > USRVisitedGuard
static std::unique_ptr< MustacheTemplateFileRecordTemplate = nullptr
static std::unique_ptr< MustacheTemplateFileNamespaceTemplate = nullptr
static std::unique_ptr< MustacheTemplateFileAllFilesTemplate = nullptr
static std::unique_ptr< MustacheTemplateFileIndexTemplate = nullptr
thread_local llvm::BumpPtrAllocator TransientArena
thread_local llvm::BumpPtrAllocator PersistentArena
const SymbolID EmptySID = SymbolID()
constexpr SymbolID GlobalNamespaceID

Typedef Documentation

◆ DocList

template<typename T>
using clang::doc::DocList = llvm::simple_ilist<InfoNode<T>>

Definition at line 182 of file Representation.h.

◆ GeneratorRegistry

typedef llvm::Registry<Generator> clang::doc::GeneratorRegistry

Definition at line 50 of file Generators.h.

◆ Record

using clang::doc::Record = llvm::SmallVector<uint64_t, 1024>

Definition at line 22 of file BitcodeReader.cpp.

◆ ReferenceFunc

typedef std::function<void(const Reference &, Object &)> clang::doc::ReferenceFunc

Definition at line 38 of file JSONGenerator.cpp.

◆ SymbolID

using clang::doc::SymbolID = std::array<uint8_t, 20>

Definition at line 185 of file Representation.h.

Enumeration Type Documentation

◆ BlockId

Enumerator
BI_VERSION_BLOCK_ID 
BI_NAMESPACE_BLOCK_ID 
BI_ENUM_BLOCK_ID 
BI_ENUM_VALUE_BLOCK_ID 
BI_TYPE_BLOCK_ID 
BI_FIELD_TYPE_BLOCK_ID 
BI_MEMBER_TYPE_BLOCK_ID 
BI_RECORD_BLOCK_ID 
BI_BASE_RECORD_BLOCK_ID 
BI_FUNCTION_BLOCK_ID 
BI_COMMENT_BLOCK_ID 
BI_REFERENCE_BLOCK_ID 
BI_TEMPLATE_BLOCK_ID 
BI_TEMPLATE_SPECIALIZATION_BLOCK_ID 
BI_TEMPLATE_PARAM_BLOCK_ID 
BI_CONSTRAINT_BLOCK_ID 
BI_TYPEDEF_BLOCK_ID 
BI_CONCEPT_BLOCK_ID 
BI_VAR_BLOCK_ID 
BI_FRIEND_BLOCK_ID 
BI_LAST 
BI_FIRST 

Definition at line 49 of file BitcodeWriter.h.

◆ CommentKind

enum class clang::doc::CommentKind
strong
Enumerator
CK_FullComment 
CK_ParagraphComment 
CK_TextComment 
CK_InlineCommandComment 
CK_HTMLStartTagComment 
CK_HTMLEndTagComment 
CK_BlockCommandComment 
CK_ParamCommandComment 
CK_TParamCommandComment 
CK_VerbatimBlockComment 
CK_VerbatimBlockLineComment 
CK_VerbatimLineComment 
CK_Unknown 

Definition at line 210 of file Representation.h.

◆ FieldId

enum class clang::doc::FieldId
strong
Enumerator
F_default 
F_namespace 
F_parent 
F_vparent 
F_type 
F_child_namespace 
F_child_record 
F_concept 
F_friend 

Definition at line 167 of file BitcodeWriter.h.

◆ InfoType

enum class clang::doc::InfoType
strong
Enumerator
IT_default 
IT_namespace 
IT_record 
IT_function 
IT_enum 
IT_typedef 
IT_concept 
IT_variable 
IT_friend 

Definition at line 198 of file Representation.h.

◆ OutputFormatTy

Enumerator
md 
yaml 
html 
json 
md_mustache 

Definition at line 226 of file Representation.h.

◆ RecordId

Enumerator
VERSION 
FUNCTION_USR 
FUNCTION_NAME 
FUNCTION_DEFLOCATION 
FUNCTION_LOCATION 
FUNCTION_ACCESS 
FUNCTION_IS_METHOD 
FUNCTION_IS_STATIC 
COMMENT_KIND 
COMMENT_TEXT 
COMMENT_NAME 
COMMENT_DIRECTION 
COMMENT_PARAMNAME 
COMMENT_CLOSENAME 
COMMENT_SELFCLOSING 
COMMENT_EXPLICIT 
COMMENT_ATTRKEY 
COMMENT_ATTRVAL 
COMMENT_ARG 
TYPE_IS_BUILTIN 
TYPE_IS_TEMPLATE 
FIELD_TYPE_NAME 
FIELD_DEFAULT_VALUE 
FIELD_TYPE_IS_BUILTIN 
FIELD_TYPE_IS_TEMPLATE 
MEMBER_TYPE_NAME 
MEMBER_TYPE_ACCESS 
MEMBER_TYPE_IS_STATIC 
MEMBER_TYPE_IS_BUILTIN 
MEMBER_TYPE_IS_TEMPLATE 
NAMESPACE_USR 
NAMESPACE_NAME 
NAMESPACE_PATH 
NAMESPACE_PARENT_USR 
ENUM_USR 
ENUM_NAME 
ENUM_DEFLOCATION 
ENUM_LOCATION 
ENUM_SCOPED 
ENUM_VALUE_NAME 
ENUM_VALUE_VALUE 
ENUM_VALUE_EXPR 
RECORD_USR 
RECORD_NAME 
RECORD_PATH 
RECORD_DEFLOCATION 
RECORD_LOCATION 
RECORD_TAG_TYPE 
RECORD_IS_TYPE_DEF 
RECORD_MANGLED_NAME 
RECORD_PARENT_USR 
BASE_RECORD_USR 
BASE_RECORD_NAME 
BASE_RECORD_PATH 
BASE_RECORD_TAG_TYPE 
BASE_RECORD_IS_VIRTUAL 
BASE_RECORD_ACCESS 
BASE_RECORD_IS_PARENT 
REFERENCE_USR 
REFERENCE_NAME 
REFERENCE_QUAL_NAME 
REFERENCE_TYPE 
REFERENCE_PATH 
REFERENCE_FIELD 
REFERENCE_FILE 
TEMPLATE_PARAM_CONTENTS 
TEMPLATE_SPECIALIZATION_OF 
TYPEDEF_USR 
TYPEDEF_NAME 
TYPEDEF_DEFLOCATION 
TYPEDEF_IS_USING 
CONCEPT_USR 
CONCEPT_NAME 
CONCEPT_IS_TYPE 
CONCEPT_CONSTRAINT_EXPRESSION 
CONCEPT_DEFLOCATION 
CONSTRAINT_EXPRESSION 
VAR_USR 
VAR_NAME 
VAR_DEFLOCATION 
VAR_IS_STATIC 
FRIEND_IS_CLASS 
RI_LAST 
RI_FIRST 

Definition at line 76 of file BitcodeWriter.h.

Function Documentation

◆ addChild()

template<typename Target, typename Child>
void clang::doc::addChild ( Target I,
Child && R )
static

Definition at line 1096 of file BitcodeReader.cpp.

References allocateListNodeTransient(), ExitOnErr, and getList().

◆ addChildPtr()

template<typename Target, typename Child>
void clang::doc::addChildPtr ( Target I,
Child * Node )
static

Definition at line 1114 of file BitcodeReader.cpp.

References allocateListNodeTransient(), ExitOnErr, and getList().

◆ addConstraint()

template<typename T>
void clang::doc::addConstraint ( T I,
ConstraintInfo && C )
static

Definition at line 1170 of file BitcodeReader.cpp.

References ExitOnErr.

◆ addReference() [1/23]

template<>
llvm::Error clang::doc::addReference ( ConstraintInfo * I,
Reference && R,
FieldId F )

Definition at line 1056 of file BitcodeReader.cpp.

References clang::doc::ConstraintInfo::ConceptRef, and F_concept.

◆ addReference() [2/23]

template<>
llvm::Error clang::doc::addReference ( ConstraintInfo * I,
Reference && R,
FieldId F )

Definition at line 1056 of file BitcodeReader.cpp.

References clang::doc::ConstraintInfo::ConceptRef, and F_concept.

◆ addReference() [3/23]

template<>
llvm::Error clang::doc::addReference ( EnumInfo * I,
Reference && R,
FieldId F )

Definition at line 1004 of file BitcodeReader.cpp.

◆ addReference() [4/23]

template<>
llvm::Error clang::doc::addReference ( EnumInfo * I,
Reference && R,
FieldId F )

Definition at line 1004 of file BitcodeReader.cpp.

◆ addReference() [5/23]

template<>
llvm::Error clang::doc::addReference ( FieldTypeInfo * I,
Reference && R,
FieldId F )

Definition at line 981 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [6/23]

template<>
llvm::Error clang::doc::addReference ( FieldTypeInfo * I,
Reference && R,
FieldId F )

Definition at line 981 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [7/23]

template<>
llvm::Error clang::doc::addReference ( FriendInfo * Friend,
Reference && R,
FieldId F )

Definition at line 1067 of file BitcodeReader.cpp.

References F_friend, and clang::doc::FriendInfo::Ref.

◆ addReference() [8/23]

template<>
llvm::Error clang::doc::addReference ( FriendInfo * Friend,
Reference && R,
FieldId F )

Definition at line 1067 of file BitcodeReader.cpp.

References F_friend, and clang::doc::FriendInfo::Ref.

◆ addReference() [9/23]

template<>
llvm::Error clang::doc::addReference ( FunctionInfo * I,
Reference && R,
FieldId F )

Definition at line 1032 of file BitcodeReader.cpp.

References F_parent, and clang::doc::FunctionInfo::Parent.

◆ addReference() [10/23]

template<>
llvm::Error clang::doc::addReference ( FunctionInfo * I,
Reference && R,
FieldId F )

Definition at line 1032 of file BitcodeReader.cpp.

References F_parent, and clang::doc::FunctionInfo::Parent.

◆ addReference() [11/23]

template<>
llvm::Error clang::doc::addReference ( MemberTypeInfo * I,
Reference && R,
FieldId F )

Definition at line 993 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [12/23]

template<>
llvm::Error clang::doc::addReference ( MemberTypeInfo * I,
Reference && R,
FieldId F )

Definition at line 993 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [13/23]

◆ addReference() [14/23]

◆ addReference() [15/23]

template<>
llvm::Error clang::doc::addReference ( RecordInfo * I,
Reference && R,
FieldId F )

◆ addReference() [16/23]

template<>
llvm::Error clang::doc::addReference ( RecordInfo * I,
Reference && R,
FieldId F )

◆ addReference() [17/23]

template<typename T>
llvm::Error clang::doc::addReference ( T I,
Reference && R,
FieldId F )
static

Definition at line 959 of file BitcodeReader.cpp.

◆ addReference() [18/23]

template<>
llvm::Error clang::doc::addReference ( TypedefInfo * I,
Reference && R,
FieldId F )

Definition at line 1009 of file BitcodeReader.cpp.

◆ addReference() [19/23]

template<>
llvm::Error clang::doc::addReference ( TypedefInfo * I,
Reference && R,
FieldId F )

Definition at line 1009 of file BitcodeReader.cpp.

◆ addReference() [20/23]

template<>
llvm::Error clang::doc::addReference ( TypeInfo * I,
Reference && R,
FieldId F )

Definition at line 969 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [21/23]

template<>
llvm::Error clang::doc::addReference ( TypeInfo * I,
Reference && R,
FieldId F )

Definition at line 969 of file BitcodeReader.cpp.

References F_type, and clang::doc::TypeInfo::Type.

◆ addReference() [22/23]

template<>
llvm::Error clang::doc::addReference ( VarInfo * I,
Reference && R,
FieldId F )

Definition at line 964 of file BitcodeReader.cpp.

◆ addReference() [23/23]

template<>
llvm::Error clang::doc::addReference ( VarInfo * I,
Reference && R,
FieldId F )

Definition at line 964 of file BitcodeReader.cpp.

◆ addTemplate() [1/6]

template<>
void clang::doc::addTemplate ( ConceptInfo * I,
TemplateInfo && P )

Definition at line 1147 of file BitcodeReader.cpp.

References clang::doc::ConceptInfo::Template.

◆ addTemplate() [2/6]

template<>
void clang::doc::addTemplate ( FriendInfo * I,
TemplateInfo && P )

Definition at line 1150 of file BitcodeReader.cpp.

References clang::doc::FriendInfo::Template.

◆ addTemplate() [3/6]

template<>
void clang::doc::addTemplate ( FunctionInfo * I,
TemplateInfo && P )

Definition at line 1144 of file BitcodeReader.cpp.

References clang::doc::FunctionInfo::Template.

◆ addTemplate() [4/6]

template<>
void clang::doc::addTemplate ( RecordInfo * I,
TemplateInfo && P )

Definition at line 1141 of file BitcodeReader.cpp.

References clang::doc::RecordInfo::Template.

◆ addTemplate() [5/6]

template<typename T>
void clang::doc::addTemplate ( T I,
TemplateInfo && P )
static

Definition at line 1137 of file BitcodeReader.cpp.

References ExitOnErr.

◆ addTemplate() [6/6]

template<>
void clang::doc::addTemplate ( TypedefInfo * I,
TemplateInfo && P )

Definition at line 1153 of file BitcodeReader.cpp.

References clang::doc::TypedefInfo::Template.

◆ addTemplateParam()

template<typename T>
void clang::doc::addTemplateParam ( T I,
TemplateParamInfo && P )
static

Definition at line 1130 of file BitcodeReader.cpp.

References ExitOnErr.

◆ addTemplateSpecialization() [1/2]

template<typename T>
void clang::doc::addTemplateSpecialization ( T I,
TemplateSpecializationInfo && TSI )
static

Definition at line 1159 of file BitcodeReader.cpp.

References ExitOnErr.

◆ addTemplateSpecialization() [2/2]

template<>
void clang::doc::addTemplateSpecialization ( TemplateInfo * I,
TemplateSpecializationInfo && TSI )

Definition at line 1165 of file BitcodeReader.cpp.

References clang::doc::TemplateInfo::Specialization.

◆ addTypeInfo() [1/6]

template<>
llvm::Error clang::doc::addTypeInfo ( EnumInfo * I,
TypeInfo && T )

Definition at line 943 of file BitcodeReader.cpp.

References clang::doc::EnumInfo::BaseType.

◆ addTypeInfo() [2/6]

template<>
llvm::Error clang::doc::addTypeInfo ( FriendInfo * I,
TypeInfo && T )

Definition at line 938 of file BitcodeReader.cpp.

References clang::doc::FriendInfo::ReturnType.

◆ addTypeInfo() [3/6]

template<>
llvm::Error clang::doc::addTypeInfo ( FunctionInfo * I,
TypeInfo && T )

Definition at line 933 of file BitcodeReader.cpp.

References clang::doc::FunctionInfo::ReturnType.

◆ addTypeInfo() [4/6]

template<typename T, typename TTypeInfo>
llvm::Error clang::doc::addTypeInfo ( T I,
TTypeInfo && TI )
static

Definition at line 928 of file BitcodeReader.cpp.

◆ addTypeInfo() [5/6]

template<>
llvm::Error clang::doc::addTypeInfo ( TypedefInfo * I,
TypeInfo && T )

Definition at line 948 of file BitcodeReader.cpp.

References clang::doc::TypedefInfo::Underlying.

◆ addTypeInfo() [6/6]

template<>
llvm::Error clang::doc::addTypeInfo ( VarInfo * I,
TypeInfo && T )

Definition at line 953 of file BitcodeReader.cpp.

References clang::doc::VarInfo::Type.

◆ allocateArray() [1/2]

template<typename T>
llvm::ArrayRef< T > clang::doc::allocateArray ( llvm::ArrayRef< T > V,
llvm::BumpPtrAllocator & Alloc )

Definition at line 86 of file Representation.h.

◆ allocateArray() [2/2]

◆ allocateListNode() [1/2]

template<typename T, typename... Args>
InfoNode< T > * clang::doc::allocateListNode ( llvm::BumpPtrAllocator & Alloc,
Args &&... args )

◆ allocateListNode() [2/2]

template<typename T>
InfoNode< T > * clang::doc::allocateListNode ( llvm::BumpPtrAllocator & Alloc,
T * Item )

Definition at line 163 of file Representation.h.

References allocatePtr().

◆ allocateListNodePersistent() [1/2]

template<typename T, typename... Args>
InfoNode< T > * clang::doc::allocateListNodePersistent ( Args &&... args)

◆ allocateListNodePersistent() [2/2]

template<typename T>
InfoNode< T > * clang::doc::allocateListNodePersistent ( T * Item)

Definition at line 176 of file Representation.h.

References allocateListNode(), and PersistentArena.

◆ allocateListNodeTransient() [1/2]

template<typename T, typename... Args>
InfoNode< T > * clang::doc::allocateListNodeTransient ( Args &&... args)

◆ allocateListNodeTransient() [2/2]

template<typename T>
InfoNode< T > * clang::doc::allocateListNodeTransient ( T * Item)

Definition at line 167 of file Representation.h.

References allocateListNode(), and TransientArena.

◆ allocatePersistent()

template<typename T, typename... Args>
T * clang::doc::allocatePersistent ( Args &&... args)

Definition at line 114 of file Representation.h.

References PersistentArena.

◆ allocatePtr()

template<typename T, typename... Args>
T * clang::doc::allocatePtr ( llvm::BumpPtrAllocator & Alloc,
Args &&... args )

◆ allocateTransient()

◆ BENCHMARK() [1/7]

clang::doc::BENCHMARK ( BM_BitcodeReader_Scale ) -> Range(10, 10000)

◆ BENCHMARK() [2/7]

clang::doc::BENCHMARK ( BM_EmitInfoFunction )

References BM_EmitInfoFunction().

◆ BENCHMARK() [3/7]

clang::doc::BENCHMARK ( BM_Index_Insertion ) -> Range(10, 10000)

References BM_Index_Insertion().

◆ BENCHMARK() [4/7]

clang::doc::BENCHMARK ( BM_JSONGenerator_Scale ) -> Range(10, 10000)

◆ BENCHMARK() [5/7]

clang::doc::BENCHMARK ( BM_Mapper_Scale ) -> Range(10, 10000)

References BM_Mapper_Scale().

◆ BENCHMARK() [6/7]

clang::doc::BENCHMARK ( BM_MergeInfos_Scale ) -> Range(2, 10000)

References BM_MergeInfos_Scale().

◆ BENCHMARK() [7/7]

clang::doc::BENCHMARK ( BM_SerializeFunctionInfo )

◆ BM_BitcodeReader_Scale()

void clang::doc::BM_BitcodeReader_Scale ( benchmark::State & State)
static

◆ BM_EmitInfoFunction()

void clang::doc::BM_EmitInfoFunction ( benchmark::State & State)
static

Definition at line 51 of file ClangDocBenchmark.cpp.

References clang::doc::serialize::Serializer::emitInfo().

Referenced by BENCHMARK().

◆ BM_Index_Insertion()

void clang::doc::BM_Index_Insertion ( benchmark::State & State)
static

◆ BM_JSONGenerator_Scale()

void clang::doc::BM_JSONGenerator_Scale ( benchmark::State & State)
static

◆ BM_Mapper_Scale()

void clang::doc::BM_Mapper_Scale ( benchmark::State & State)
static

Definition at line 70 of file ClangDocBenchmark.cpp.

References json, and newMapperActionFactory().

Referenced by BENCHMARK().

◆ BM_MergeInfos_Scale()

void clang::doc::BM_MergeInfos_Scale ( benchmark::State & State)
static

Definition at line 114 of file ClangDocBenchmark.cpp.

References allocateTransient(), and mergeInfos().

Referenced by BENCHMARK().

◆ BM_SerializeFunctionInfo()

void clang::doc::BM_SerializeFunctionInfo ( benchmark::State & State)
static

Definition at line 94 of file ClangDocBenchmark.cpp.

References allocateTransient(), IT_function, and clang::doc::serialize::serialize().

Referenced by BENCHMARK().

◆ calculateRelativeFilePath()

llvm::SmallString< 64 > clang::doc::calculateRelativeFilePath ( const InfoType & Type,
const StringRef & Path,
const StringRef & Name,
const StringRef & CurrentPath )
static

◆ commentKindToString()

◆ computeRelativePath()

llvm::SmallString< 128 > clang::doc::computeRelativePath ( llvm::StringRef Destination,
llvm::StringRef Origin )

Definition at line 37 of file File.cpp.

Referenced by clang::doc::MustacheGenerator::getRelativePathToRoot().

◆ copyFile()

llvm::Error clang::doc::copyFile ( llvm::StringRef FilePath,
llvm::StringRef OutDirectory )

Definition at line 21 of file File.cpp.

References OutDirectory().

Referenced by clang::doc::HTMLGenerator::createResources().

◆ createFileOpenError()

llvm::Error clang::doc::createFileOpenError ( StringRef FileName,
std::error_code EC )

◆ decodeRecord() [1/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
AccessSpecifier & Field,
llvm::StringRef Blob )
static

Definition at line 66 of file BitcodeReader.cpp.

◆ decodeRecord() [2/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
bool & Field,
llvm::StringRef Blob )
static

Definition at line 57 of file BitcodeReader.cpp.

◆ decodeRecord() [3/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
DocList< Location > & Field,
llvm::StringRef Blob )
static

Definition at line 157 of file BitcodeReader.cpp.

References allocateListNodeTransient().

◆ decodeRecord() [4/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
FieldId & Field,
llvm::StringRef Blob )
static

◆ decodeRecord() [5/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
InfoType & Field,
llvm::StringRef Blob )
static

◆ decodeRecord() [6/10]

◆ decodeRecord() [7/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
llvm::StringRef & Field,
llvm::StringRef Blob )
static

Definition at line 32 of file BitcodeReader.cpp.

References internString().

◆ decodeRecord() [8/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
std::optional< Location > & Field,
llvm::StringRef Blob )
static

Definition at line 100 of file BitcodeReader.cpp.

◆ decodeRecord() [9/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
SymbolID & Field,
llvm::StringRef Blob )
static

Definition at line 38 of file BitcodeReader.cpp.

References clang::doc::BitCodeConstants::USRHashSize.

◆ decodeRecord() [10/10]

llvm::Error clang::doc::decodeRecord ( const Record & R,
TagTypeKind & Field,
llvm::StringRef Blob )
static

Definition at line 82 of file BitcodeReader.cpp.

◆ deepCopyArray()

template<typename T>
llvm::ArrayRef< T > clang::doc::deepCopyArray ( llvm::ArrayRef< T > V,
llvm::BumpPtrAllocator & Alloc )

◆ ExitOnErr()

llvm::ExitOnError clang::doc::ExitOnErr ( "clang-doc error: " )
static

◆ extractTextComments()

json::Value clang::doc::extractTextComments ( Object * ParagraphComment)
static

Takes the nested "Children" array from a comment Object.

Returns
a json::Array of comments, possible json::Value::Kind::Null

Definition at line 187 of file JSONGenerator.cpp.

Referenced by serializeComment(), and serializeDescription().

◆ extractVerbatimComments()

json::Value clang::doc::extractVerbatimComments ( json::Array VerbatimLines)
static

Definition at line 208 of file JSONGenerator.cpp.

Referenced by serializeComment().

◆ findGeneratorByName()

llvm::Expected< std::unique_ptr< Generator > > clang::doc::findGeneratorByName ( llvm::StringRef Format)

◆ genEmphasis()

std::string clang::doc::genEmphasis ( const Twine & Text)
static

Definition at line 30 of file MDGenerator.cpp.

Referenced by writeDescription().

◆ genIndex()

◆ genItalic()

std::string clang::doc::genItalic ( const Twine & Text)
static

Definition at line 26 of file MDGenerator.cpp.

Referenced by genMarkdown().

◆ genMarkdown() [1/5]

◆ genMarkdown() [2/5]

◆ genMarkdown() [3/5]

◆ genMarkdown() [4/5]

◆ genMarkdown() [5/5]

void clang::doc::genMarkdown ( const ClangDocContext & CDCtx,
const TypedefInfo & I,
llvm::raw_ostream & OS )
static

Definition at line 408 of file MDGenerator.cpp.

◆ genReferenceList()

std::string clang::doc::genReferenceList ( llvm::ArrayRef< Reference > Refs)
static

Definition at line 34 of file MDGenerator.cpp.

Referenced by genMarkdown().

◆ getCommentInfo()

template<typename T>
llvm::Expected< CommentInfo * > clang::doc::getCommentInfo ( T I)
static

Definition at line 911 of file BitcodeReader.cpp.

References allocateListNodeTransient().

◆ getGlobalStringPool()

ConcurrentStringPool & clang::doc::getGlobalStringPool ( )

Definition at line 35 of file Representation.cpp.

Referenced by internString().

◆ getList() [1/5]

auto & clang::doc::getList ( ScopeChildren & C,
ConceptInfo *  )
static

Definition at line 1079 of file BitcodeReader.cpp.

◆ getList() [2/5]

auto & clang::doc::getList ( ScopeChildren & C,
EnumInfo *  )
static

Definition at line 1077 of file BitcodeReader.cpp.

◆ getList() [3/5]

auto & clang::doc::getList ( ScopeChildren & C,
FunctionInfo *  )
static

Definition at line 1076 of file BitcodeReader.cpp.

Referenced by addChild(), and addChildPtr().

◆ getList() [4/5]

auto & clang::doc::getList ( ScopeChildren & C,
TypedefInfo *  )
static

Definition at line 1078 of file BitcodeReader.cpp.

◆ getList() [5/5]

auto & clang::doc::getList ( ScopeChildren & C,
VarInfo *  )
static

Definition at line 1080 of file BitcodeReader.cpp.

◆ getMaxParamWrapLimit()

constexpr unsigned clang::doc::getMaxParamWrapLimit ( )
staticconstexpr

Definition at line 36 of file JSONGenerator.cpp.

Referenced by serializeTemplateSpecialization().

◆ getTagType()

llvm::StringRef clang::doc::getTagType ( TagTypeKind AS)

Definition at line 35 of file Generators.cpp.

Referenced by genMarkdown().

◆ HTML()

GeneratorRegistry::Add< HTMLGenerator > clang::doc::HTML ( HTMLGenerator::Format ,
"Generator for mustache HTML output."  )
static

◆ infoTypeToString()

std::string clang::doc::infoTypeToString ( InfoType IT)
static

◆ insertArray()

void clang::doc::insertArray ( Object & Obj,
json::Value & Array,
StringRef Key )
static

Definition at line 720 of file JSONGenerator.cpp.

◆ insertComment()

void clang::doc::insertComment ( Object & Description,
json::Value & Comment,
StringRef Key )
static

Insert comments into a key in the Description object.

Parameters
CommentEither an Object or Array, depending on the comment type
KeyThe type (Brief, Code, etc.) of comment to be inserted

Definition at line 158 of file JSONGenerator.cpp.

Referenced by serializeComment(), and serializeDescription().

◆ insertNonEmpty()

void clang::doc::insertNonEmpty ( StringRef Key,
StringRef Value,
Object & Obj )
static

Definition at line 104 of file JSONGenerator.cpp.

◆ internString()

StringRef clang::doc::internString ( const Twine & T)
inline

◆ isTypedefAnonRecord()

template<typename T>
bool clang::doc::isTypedefAnonRecord ( const T * D)
static

Definition at line 24 of file Mapper.cpp.

◆ JSON()

◆ maybeWriteSourceFileRef()

void clang::doc::maybeWriteSourceFileRef ( llvm::raw_ostream & OS,
const ClangDocContext & CDCtx,
const std::optional< Location > & DefLoc )
static

Definition at line 144 of file MDGenerator.cpp.

References writeSourceFileRef().

Referenced by genMarkdown(), genMarkdown(), and genMarkdown().

◆ MD()

GeneratorRegistry::Add< MDGenerator > clang::doc::MD ( MDGenerator::Format ,
"Generator for MD output."  )
static

◆ MDMustache()

GeneratorRegistry::Add< MDMustacheGenerator > clang::doc::MDMustache ( MDMustacheGenerator::Format ,
"Generator for mustache Markdown output."  )
static

◆ mergeInfos()

llvm::Expected< Info * > clang::doc::mergeInfos ( SmallVectorImpl< Info * > & Values)

◆ mergeSingleInfo()

llvm::Error clang::doc::mergeSingleInfo ( doc::Info *& Reduced,
doc::Info * NewInfo,
llvm::BumpPtrAllocator & Arena )

◆ mergeUnkeyed()

template<typename T>
void clang::doc::mergeUnkeyed ( DocList< T > & Target,
DocList< T > && Source )
static

◆ mergeUnkeyed< CommentInfo >()

template<>
void clang::doc::mergeUnkeyed< CommentInfo > ( DocList< CommentInfo > & Target,
DocList< CommentInfo > && Source )

Definition at line 162 of file Representation.cpp.

References allocateListNodePersistent(), and PersistentArena.

◆ newMapperActionFactory()

std::unique_ptr< tooling::FrontendActionFactory > clang::doc::newMapperActionFactory ( ClangDocContext CDCtx)

Definition at line 52 of file ClangDoc.cpp.

Referenced by BM_Mapper_Scale().

◆ parseRecord() [1/20]

◆ parseRecord() [2/20]

◆ parseRecord() [3/20]

◆ parseRecord() [4/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
const unsigned VersionNo )
static

◆ parseRecord() [5/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
ConstraintInfo * I )
static

◆ parseRecord() [6/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
EnumInfo * I )
static

◆ parseRecord() [7/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
EnumValueInfo * I )
static

◆ parseRecord() [8/20]

◆ parseRecord() [9/20]

◆ parseRecord() [10/20]

◆ parseRecord() [11/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
NamespaceInfo * I )
static

◆ parseRecord() [12/20]

◆ parseRecord() [13/20]

◆ parseRecord() [14/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
TemplateInfo * I )
static

Definition at line 830 of file BitcodeReader.cpp.

◆ parseRecord() [15/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
TemplateParamInfo * I )
static

◆ parseRecord() [16/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
TemplateSpecializationInfo * I )
static

◆ parseRecord() [17/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
TypedefInfo * I )
static

◆ parseRecord() [18/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
TypeInfo * I )
static

◆ parseRecord() [19/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
llvm::StringRef Blob,
VarInfo * I )
static

◆ parseRecord() [20/20]

llvm::Error clang::doc::parseRecord ( const Record & R,
unsigned ID,
StringRef Blob,
FriendInfo * F )
static

◆ preprocessCDCtxIndex()

std::vector< Index > clang::doc::preprocessCDCtxIndex ( Index CDCtxIndex)
static
Parameters
CDCtxIndexPassed by copy since clang-doc's context is passed to the generator as const

Definition at line 880 of file JSONGenerator.cpp.

References clang::doc::Index::Children, clang::doc::Reference::getFileBaseName(), clang::doc::Reference::getRelativeFilePath(), clang::doc::Index::getSortedChildren(), internString(), clang::doc::Reference::Path, and clang::doc::Index::sort().

◆ reduce()

template<typename T>
llvm::Expected< Info * > clang::doc::reduce ( SmallVectorImpl< Info * > & Values)
static

Definition at line 98 of file Representation.cpp.

References allocateTransient().

Referenced by mergeInfos().

◆ reduceChildren()

template<typename T>
void clang::doc::reduceChildren ( DocList< T > & Children,
DocList< T > && ChildrenToMerge )
static

◆ reduceChildren< Reference >()

template<>
void clang::doc::reduceChildren< Reference > ( DocList< Reference > & Children,
DocList< Reference > && ChildrenToMerge )

◆ serializeArray()

template<typename Container, typename SerializationFunc>
void clang::doc::serializeArray ( const Container & Records,
Object & Obj,
const StringRef Key,
SerializationFunc SerializeInfo,
const StringRef EndKey = "End",
function_ref< void(Object &)> UpdateJson = [](Object &Obj) {} )
static

Definition at line 557 of file JSONGenerator.cpp.

Referenced by serializeTemplateSpecialization().

◆ serializeComment()

◆ serializeDescription()

void clang::doc::serializeDescription ( const DocList< CommentInfo > & Description,
json::Object & Obj,
StringRef Key = "" )
static

Definition at line 406 of file JSONGenerator.cpp.

References extractTextComments(), insertComment(), and serializeComment().

◆ serializeIndex()

◆ serializeReference()

void clang::doc::serializeReference ( llvm::raw_fd_ostream & OS,
const Index & I,
int Level )
static

Definition at line 413 of file MDGenerator.cpp.

References writeNameLink().

Referenced by serializeIndex().

◆ serializeTemplateSpecialization()

void clang::doc::serializeTemplateSpecialization ( TemplateInfo Template,
Object & TemplateObj )
static

◆ stringToCommentKind()

◆ writeDescription()

◆ writeHeader()

void clang::doc::writeHeader ( const Twine & Text,
unsigned int Num,
raw_ostream & OS )
static

Definition at line 51 of file MDGenerator.cpp.

Referenced by genMarkdown(), genMarkdown(), and genMarkdown().

◆ writeLine()

void clang::doc::writeLine ( const Twine & Text,
raw_ostream & OS )
static

Definition at line 45 of file MDGenerator.cpp.

Referenced by genMarkdown(), genMarkdown(), and writeDescription().

◆ writeNameLink()

void clang::doc::writeNameLink ( const StringRef & CurrentPath,
const Reference & R,
llvm::raw_ostream & OS )
static

◆ writeNewLine()

void clang::doc::writeNewLine ( raw_ostream & OS)
static

Definition at line 49 of file MDGenerator.cpp.

Referenced by genMarkdown(), genMarkdown(), and writeDescription().

◆ writeSourceFileRef()

void clang::doc::writeSourceFileRef ( const ClangDocContext & CDCtx,
const Location & L,
raw_ostream & OS )
static

◆ YAML()

GeneratorRegistry::Add< YAMLGenerator > clang::doc::YAML ( YAMLGenerator::Format ,
"Generator for YAML output."  )
static

Variable Documentation

◆ AllFilesTemplate

std::unique_ptr<MustacheTemplateFile> clang::doc::AllFilesTemplate = nullptr
static

◆ BlockIdCount

unsigned clang::doc::BlockIdCount = BI_LAST - BI_FIRST
staticconstexpr

Definition at line 163 of file BitcodeWriter.h.

◆ EmptySID

◆ GlobalNamespaceID

SymbolID clang::doc::GlobalNamespaceID
constexpr
Initial value:
= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 187 of file Representation.h.

◆ HTMLGeneratorAnchorDest

int clang::doc::HTMLGeneratorAnchorDest = HTMLGeneratorAnchorSource
static

Definition at line 253 of file Generators.cpp.

◆ HTMLGeneratorAnchorSource

volatile int clang::doc::HTMLGeneratorAnchorSource = 0

Definition at line 201 of file HTMLGenerator.cpp.

◆ IndexTemplate [1/2]

◆ IndexTemplate [2/2]

std::unique_ptr<MustacheTemplateFile> clang::doc::IndexTemplate = nullptr
static

Definition at line 28 of file MDMustacheGenerator.cpp.

◆ JSONGeneratorAnchorDest

int clang::doc::JSONGeneratorAnchorDest = JSONGeneratorAnchorSource
static

Definition at line 254 of file Generators.cpp.

◆ JSONGeneratorAnchorSource

volatile int clang::doc::JSONGeneratorAnchorSource = 0

Definition at line 1083 of file JSONGenerator.cpp.

◆ MDGeneratorAnchorDest

int clang::doc::MDGeneratorAnchorDest = MDGeneratorAnchorSource
static

Definition at line 252 of file Generators.cpp.

◆ MDGeneratorAnchorSource

volatile int clang::doc::MDGeneratorAnchorSource = 0

Definition at line 608 of file MDGenerator.cpp.

◆ MDMustacheGeneratorAnchorDest

int clang::doc::MDMustacheGeneratorAnchorDest
static
Initial value:

Definition at line 255 of file Generators.cpp.

◆ MDMustacheGeneratorAnchorSource

volatile int clang::doc::MDMustacheGeneratorAnchorSource = 0

Definition at line 115 of file MDMustacheGenerator.cpp.

◆ NamespaceTemplate [1/2]

◆ NamespaceTemplate [2/2]

std::unique_ptr<MustacheTemplateFile> clang::doc::NamespaceTemplate = nullptr
static

Definition at line 24 of file MDMustacheGenerator.cpp.

◆ PersistentArena

◆ RecordIdCount

unsigned clang::doc::RecordIdCount = RI_LAST - RI_FIRST
staticconstexpr

Definition at line 164 of file BitcodeWriter.h.

◆ RecordTemplate [1/2]

◆ RecordTemplate [2/2]

std::unique_ptr<MustacheTemplateFile> clang::doc::RecordTemplate = nullptr
static

Definition at line 22 of file MDMustacheGenerator.cpp.

◆ SerializeTemplateParam

auto clang::doc::SerializeTemplateParam
static
Initial value:
= [](const TemplateParamInfo &Param,
Object &JsonObj) {
JsonObj["Param"] = Param.Contents;
}

Definition at line 464 of file JSONGenerator.cpp.

Referenced by serializeTemplateSpecialization().

◆ TransientArena

◆ USRVisited

llvm::StringSet clang::doc::USRVisited
static

Definition at line 21 of file Mapper.cpp.

◆ USRVisitedGuard

llvm::sys::SmartMutex<true> clang::doc::USRVisitedGuard
static

Definition at line 22 of file Mapper.cpp.

◆ VersionNumber

const unsigned clang::doc::VersionNumber = 3
static

Definition at line 29 of file BitcodeWriter.h.

Referenced by clang::doc::ClangDocBitcodeReader::readBitcode().

◆ YAMLGeneratorAnchorDest

int clang::doc::YAMLGeneratorAnchorDest = YAMLGeneratorAnchorSource
static

Definition at line 251 of file Generators.cpp.

◆ YAMLGeneratorAnchorSource

volatile int clang::doc::YAMLGeneratorAnchorSource = 0

Definition at line 600 of file YAMLGenerator.cpp.