clang-tools 8.0.0

Classes | Functions
clang::doc::serialize Namespace Reference

## Classes
class | ClangDocCommentVisitor

## Functions
SymbolID | hashUSR (llvm::StringRef USR)
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 RecordDecl * | getDeclForType (const QualType &T)
static bool | isPublic (const clang::AccessSpecifier AS, const clang::Linkage Link)
static void | parseFields (RecordInfo &I, const RecordDecl *D, bool PublicOnly)
static void | parseEnumerators (EnumInfo &I, const EnumDecl *D)
static void | parseParameters (FunctionInfo &I, const FunctionDecl *D)
static void | parseBases (RecordInfo &I, const CXXRecordDecl *D)
template<typename T >
static void | populateParentNamespaces (llvm::SmallVector< Reference, 4 > &Namespaces, const T *D)
template<typename T >
static void | populateInfo (Info &I, const T *D, const FullComment *C)
template<typename T >
static void | populateSymbolInfo (SymbolInfo &I, const T *D, const FullComment *C, int LineNumber, StringRef Filename)
static void | populateFunctionInfo (FunctionInfo &I, const FunctionDecl *D, const FullComment *FC, int LineNumber, StringRef Filename)
std::unique_ptr< Info > | emitInfo (const NamespaceDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const RecordDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const FunctionDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const CXXMethodDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const EnumDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const NamespaceDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const RecordDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const EnumDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const FunctionDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool PublicOnly)
std::unique_ptr< Info > | emitInfo (const CXXMethodDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool PublicOnly)

## Function Documentation

## ◆ emitInfo() [1/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const NamespaceDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | File,
|  | bool | PublicOnly
| ) |  |

## ◆ emitInfo() [2/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const RecordDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | File,
|  | bool | PublicOnly
| ) |  |

## ◆ emitInfo() [3/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const EnumDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | File,
|  | bool | PublicOnly
| ) |  |

## ◆ emitInfo() [4/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const FunctionDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | File,
|  | bool | PublicOnly
| ) |  |

## ◆ emitInfo() [5/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const CXXMethodDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | File,
|  | bool | PublicOnly
| ) |  |

## ◆ emitInfo() [6/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const NamespaceDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | llvm::StringRef | File,
|  | bool | PublicOnly
| ) |  |

Definition at line 327 of file Serialize.cpp.

References isPublic(), and populateInfo().

## ◆ emitInfo() [7/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const RecordDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | llvm::StringRef | File,
|  | bool | PublicOnly
| ) |  |

Definition at line 338 of file Serialize.cpp.

References isPublic(), parseBases(), parseFields(), and populateSymbolInfo().

## ◆ emitInfo() [8/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const FunctionDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | llvm::StringRef | File,
|  | bool | PublicOnly
| ) |  |

Definition at line 352 of file Serialize.cpp.

References clang::doc::FunctionInfo::Access, isPublic(), clang::doc::Info::Namespace, and populateFunctionInfo().

## ◆ emitInfo() [9/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const CXXMethodDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | llvm::StringRef | File,
|  | bool | PublicOnly
| ) |  |

Definition at line 371 of file Serialize.cpp.

References clang::doc::FunctionInfo::Access, getUSRForDecl(), clang::doc::FunctionInfo::IsMethod, isPublic(), clang::doc::IT_record, clang::doc::FunctionInfo::Parent, and populateFunctionInfo().

## ◆ emitInfo() [10/10]

std::unique_ptr<Info> clang::doc::serialize::emitInfo | ( | const EnumDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | llvm::StringRef | File,
|  | bool | PublicOnly
| ) |  |

Definition at line 392 of file Serialize.cpp.

References isPublic(), clang::doc::IT_namespace, clang::doc::IT_record, clang::doc::Info::Namespace, parseEnumerators(), populateSymbolInfo(), and clang::doc::EnumInfo::Scoped.

## ◆ getDeclForType()

static RecordDecl* clang::doc::serialize::getDeclForType | ( | const QualType & | T | ) |
| static

Definition at line 182 of file Serialize.cpp.

Referenced by parseBases(), parseFields(), parseParameters(), and populateFunctionInfo().

## ◆ getUSRForDecl()

static SymbolID clang::doc::serialize::getUSRForDecl | ( | const Decl * | D | ) |
| static

Definition at line 175 of file Serialize.cpp.

References hashUSR().

Referenced by emitInfo(), parseBases(), parseFields(), parseParameters(), populateFunctionInfo(), populateInfo(), and populateParentNamespaces().

## ◆ hashUSR()

SymbolID clang::doc::serialize::hashUSR | ( | llvm::StringRef | USR | ) |

Definition at line 24 of file Serialize.cpp.

Referenced by getUSRForDecl().

## ◆ isPublic()

static bool clang::doc::serialize::isPublic | ( | const clang::AccessSpecifier | AS,
|  | const clang::Linkage | Link
| ) |  |
| static

Definition at line 189 of file Serialize.cpp.

Referenced by emitInfo(), and parseFields().

## ◆ parseBases()

static void clang::doc::serialize::parseBases | ( | RecordInfo & | I,
|  | const CXXRecordDecl * | D
| ) |  |
| static

Definition at line 246 of file Serialize.cpp.

References getDeclForType(), getUSRForDecl(), clang::doc::IT_record, clang::doc::RecordInfo::Parents, and clang::doc::RecordInfo::VirtualParents.

Referenced by emitInfo().

## ◆ parseEnumerators()

static void clang::doc::serialize::parseEnumerators | ( | EnumInfo & | I,
|  | const EnumDecl * | D
| ) |  |
| static

Definition at line 223 of file Serialize.cpp.

References clang::doc::EnumInfo::Members.

Referenced by emitInfo().

## ◆ parseFields()

static void clang::doc::serialize::parseFields | ( | RecordInfo & | I,
|  | const RecordDecl * | D,
|  | bool | PublicOnly
| ) |  |
| static

Definition at line 199 of file Serialize.cpp.

References getDeclForType(), getUSRForDecl(), isPublic(), clang::doc::IT_enum, clang::doc::IT_record, and clang::doc::RecordInfo::Members.

Referenced by emitInfo().

## ◆ parseFullComment()

static void clang::doc::serialize::parseFullComment | ( | const FullComment * | C,
|  | CommentInfo & | CI
| ) |  |
| static

Definition at line 170 of file Serialize.cpp.

References clang::doc::serialize::ClangDocCommentVisitor::parseComment().

Referenced by populateInfo().

## ◆ parseParameters()

static void clang::doc::serialize::parseParameters | ( | FunctionInfo & | I,
|  | const FunctionDecl * | D
| ) |  |
| static

Definition at line 228 of file Serialize.cpp.

References getDeclForType(), getUSRForDecl(), clang::doc::IT_enum, clang::doc::IT_record, and clang::doc::FunctionInfo::Params.

Referenced by populateFunctionInfo().

## ◆ populateFunctionInfo()

static void clang::doc::serialize::populateFunctionInfo | ( | FunctionInfo & | I,
|  | const FunctionDecl * | D,
|  | const FullComment * | FC,
|  | int | LineNumber,
|  | StringRef | Filename
| ) |  |
| static

Definition at line 310 of file Serialize.cpp.

References getDeclForType(), getUSRForDecl(), clang::doc::IT_enum, clang::doc::IT_record, parseParameters(), populateSymbolInfo(), and clang::doc::FunctionInfo::ReturnType.

Referenced by emitInfo().

## ◆ populateInfo()

template<typename T >

static void clang::doc::serialize::populateInfo | ( | Info & | I,
|  | const T * | D,
|  | const FullComment * | C
| ) |  |
| static

Definition at line 290 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(), and populateSymbolInfo().

## ◆ populateParentNamespaces()

template<typename T >

static void clang::doc::serialize::populateParentNamespaces | ( | llvm::SmallVector< Reference, 4 > & | Namespaces,
|  | const T * | D
| ) |  |
| static

Definition at line 270 of file Serialize.cpp.

References D, getUSRForDecl(), clang::doc::IT_enum, clang::doc::IT_function, clang::doc::IT_namespace, and clang::doc::IT_record.

Referenced by populateInfo().

## ◆ populateSymbolInfo()

template<typename T >

static void clang::doc::serialize::populateSymbolInfo | ( | SymbolInfo & | I,
|  | const T * | D,
|  | const FullComment * | C,
|  | int | LineNumber,
|  | StringRef | Filename
| ) |  |
| static

Definition at line 301 of file Serialize.cpp.

References clang::doc::SymbolInfo::DefLoc, clang::doc::SymbolInfo::Loc, and populateInfo().

Referenced by emitInfo(), and populateFunctionInfo().

## ◆ serialize() [1/2]

template<typename T >

static std::string clang::doc::serialize::serialize | ( | T & | I | ) |
| static

Definition at line 147 of file Serialize.cpp.

References clang::doc::ClangDocBitcodeWriter::emitBlock().

Referenced by serialize().

## ◆ serialize() [2/2]

std::string clang::doc::serialize::serialize | ( | std::unique_ptr< Info > & | I | ) |

Definition at line 155 of file Serialize.cpp.

References clang::doc::IT_enum, clang::doc::IT_function, clang::doc::IT_namespace, clang::doc::IT_record, and serialize().