clang-tools  10.0.0svn
Classes | Functions
clang::doc::serialize Namespace Reference

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)
 
llvm::SmallString< 128 > getInfoRelativePath (const llvm::SmallVectorImpl< doc::Reference > &Namespaces)
 
llvm::SmallString< 128 > getInfoRelativePath (const Decl *D)
 
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 bool shouldSerializeInfo (bool PublicOnly, bool IsInAnonymousNamespace, const NamedDecl *D)
 
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)
 
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, int LineNumber, StringRef Filename, bool IsFileInRootDir, bool &IsInAnonymousNamespace)
 
static void populateFunctionInfo (FunctionInfo &I, const FunctionDecl *D, const FullComment *FC, int LineNumber, StringRef Filename, bool IsFileInRootDir, 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, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const RecordDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const FunctionDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const CXXMethodDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const EnumDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const NamespaceDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const RecordDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const EnumDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const FunctionDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly)
 
std::pair< std::unique_ptr< Info >, std::unique_ptr< Info > > emitInfo (const CXXMethodDecl *D, const FullComment *FC, int LineNumber, StringRef File, bool IsFileInRootDir, bool PublicOnly)
 

Function Documentation

◆ emitInfo() [1/10]

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

◆ emitInfo() [2/10]

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

◆ emitInfo() [3/10]

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

◆ emitInfo() [4/10]

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

◆ emitInfo() [5/10]

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

◆ emitInfo() [6/10]

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

◆ emitInfo() [7/10]

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

◆ emitInfo() [8/10]

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

◆ emitInfo() [9/10]

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

◆ emitInfo() [10/10]

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

◆ getDeclForType()

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

Definition at line 217 of file Serialize.cpp.

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

◆ getFinalAccessSpecifier()

static AccessSpecifier clang::doc::serialize::getFinalAccessSpecifier ( AccessSpecifier  FirstAS,
AccessSpecifier  SecondAS 
)
static

Definition at line 258 of file Serialize.cpp.

Referenced by parseBases().

◆ getInfoRelativePath() [1/2]

llvm::SmallString<128> clang::doc::serialize::getInfoRelativePath ( const llvm::SmallVectorImpl< doc::Reference > &  Namespaces)

Definition at line 46 of file Serialize.cpp.

References Path.

Referenced by emitInfo(), getInfoRelativePath(), parseBases(), parseParameters(), and populateFunctionInfo().

◆ getInfoRelativePath() [2/2]

llvm::SmallString<128> clang::doc::serialize::getInfoRelativePath ( const Decl *  D)

Definition at line 53 of file Serialize.cpp.

References getInfoRelativePath(), and populateParentNamespaces().

◆ getUSRForDecl()

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

◆ hashUSR()

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

Definition at line 23 of file Serialize.cpp.

References D, and populateParentNamespaces().

Referenced by getUSRForDecl().

◆ isPublic()

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

Definition at line 223 of file Serialize.cpp.

Referenced by shouldSerializeInfo().

◆ parseBases() [1/2]

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

◆ parseBases() [2/2]

static void clang::doc::serialize::parseBases ( RecordInfo I,
const CXXRecordDecl *  D,
bool  IsFileInRootDir,
bool  PublicOnly,
bool  IsParent,
AccessSpecifier  ParentAccess = AccessSpecifier::AS_public 
)
static

◆ parseEnumerators()

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

Definition at line 302 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,
AccessSpecifier  Access = AccessSpecifier::AS_public 
)
static

Definition at line 274 of file Serialize.cpp.

Referenced by emitInfo(), and parseBases().

◆ parseFullComment()

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

◆ parseParameters()

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

◆ populateFunctionInfo()

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

◆ populateInfo()

template<typename T >
static void clang::doc::serialize::populateInfo ( Info I,
const T *  D,
const FullComment *  C,
bool &  IsInAnonymousNamespace 
)
static

◆ populateParentNamespaces()

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

◆ populateSymbolInfo()

template<typename T >
static void clang::doc::serialize::populateSymbolInfo ( SymbolInfo I,
const T *  D,
const FullComment *  C,
int  LineNumber,
StringRef  Filename,
bool  IsFileInRootDir,
bool &  IsInAnonymousNamespace 
)
static

◆ serialize() [1/2]

template<typename T >
static std::string clang::doc::serialize::serialize ( T &  I)
static

Definition at line 182 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)

◆ shouldSerializeInfo()

static bool clang::doc::serialize::shouldSerializeInfo ( bool  PublicOnly,
bool  IsInAnonymousNamespace,
const NamedDecl *  D 
)
static

Definition at line 233 of file Serialize.cpp.

References isPublic().

Referenced by emitInfo().