clang API Documentation

Public Member Functions
clang::comments::Sema Class Reference

#include <CommentSema.h>

List of all members.

Public Member Functions

 Sema (llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr, DiagnosticsEngine &Diags, CommandTraits &Traits, const Preprocessor *PP)
void setDecl (const Decl *D)
template<typename T >
ArrayRef< T > copyArray (ArrayRef< T > Source)
 Returns a copy of array, owned by Sema's allocator.
ParagraphCommentactOnParagraphComment (ArrayRef< InlineContentComment * > Content)
BlockCommandCommentactOnBlockCommandStart (SourceLocation LocBegin, SourceLocation LocEnd, unsigned CommandID, CommandMarkerKind CommandMarker)
void actOnBlockCommandArgs (BlockCommandComment *Command, ArrayRef< BlockCommandComment::Argument > Args)
void actOnBlockCommandFinish (BlockCommandComment *Command, ParagraphComment *Paragraph)
ParamCommandCommentactOnParamCommandStart (SourceLocation LocBegin, SourceLocation LocEnd, unsigned CommandID, CommandMarkerKind CommandMarker)
void actOnParamCommandDirectionArg (ParamCommandComment *Command, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg)
void actOnParamCommandParamNameArg (ParamCommandComment *Command, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg)
void actOnParamCommandFinish (ParamCommandComment *Command, ParagraphComment *Paragraph)
TParamCommandCommentactOnTParamCommandStart (SourceLocation LocBegin, SourceLocation LocEnd, unsigned CommandID, CommandMarkerKind CommandMarker)
void actOnTParamCommandParamNameArg (TParamCommandComment *Command, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg)
void actOnTParamCommandFinish (TParamCommandComment *Command, ParagraphComment *Paragraph)
InlineCommandCommentactOnInlineCommand (SourceLocation CommandLocBegin, SourceLocation CommandLocEnd, unsigned CommandID)
InlineCommandCommentactOnInlineCommand (SourceLocation CommandLocBegin, SourceLocation CommandLocEnd, unsigned CommandID, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg)
InlineContentCommentactOnUnknownCommand (SourceLocation LocBegin, SourceLocation LocEnd, StringRef CommandName)
InlineContentCommentactOnUnknownCommand (SourceLocation LocBegin, SourceLocation LocEnd, unsigned CommandID)
TextCommentactOnText (SourceLocation LocBegin, SourceLocation LocEnd, StringRef Text)
VerbatimBlockCommentactOnVerbatimBlockStart (SourceLocation Loc, unsigned CommandID)
VerbatimBlockLineCommentactOnVerbatimBlockLine (SourceLocation Loc, StringRef Text)
void actOnVerbatimBlockFinish (VerbatimBlockComment *Block, SourceLocation CloseNameLocBegin, StringRef CloseName, ArrayRef< VerbatimBlockLineComment * > Lines)
VerbatimLineCommentactOnVerbatimLine (SourceLocation LocBegin, unsigned CommandID, SourceLocation TextBegin, StringRef Text)
HTMLStartTagCommentactOnHTMLStartTagStart (SourceLocation LocBegin, StringRef TagName)
void actOnHTMLStartTagFinish (HTMLStartTagComment *Tag, ArrayRef< HTMLStartTagComment::Attribute > Attrs, SourceLocation GreaterLoc, bool IsSelfClosing)
HTMLEndTagCommentactOnHTMLEndTag (SourceLocation LocBegin, SourceLocation LocEnd, StringRef TagName)
FullCommentactOnFullComment (ArrayRef< BlockContentComment * > Blocks)
void checkBlockCommandEmptyParagraph (BlockCommandComment *Command)
void checkReturnsCommand (const BlockCommandComment *Command)
void checkBlockCommandDuplicate (const BlockCommandComment *Command)
void checkDeprecatedCommand (const BlockCommandComment *Comment)
void checkFunctionDeclVerbatimLine (const BlockCommandComment *Comment)
void checkContainerDeclVerbatimLine (const BlockCommandComment *Comment)
void checkContainerDecl (const BlockCommandComment *Comment)
void resolveParamCommandIndexes (const FullComment *FC)
bool isFunctionDecl ()
bool isAnyFunctionDecl ()
bool isFunctionPointerVarDecl ()
bool isFunctionOrMethodVariadic ()
bool isObjCMethodDecl ()
bool isObjCPropertyDecl ()
bool isTemplateOrSpecialization ()
bool isRecordLikeDecl ()
bool isClassOrStructDecl ()
bool isUnionDecl ()
bool isObjCInterfaceDecl ()
bool isObjCProtocolDecl ()
bool isClassTemplateDecl ()
bool isFunctionTemplateDecl ()
ArrayRef< const ParmVarDecl * > getParamVars ()
void inspectThisDecl ()
unsigned resolveParmVarReference (StringRef Name, ArrayRef< const ParmVarDecl * > ParamVars)
 Returns index of a function parameter with a given name.
unsigned correctTypoInParmVarReference (StringRef Typo, ArrayRef< const ParmVarDecl * > ParamVars)
bool resolveTParamReference (StringRef Name, const TemplateParameterList *TemplateParameters, SmallVectorImpl< unsigned > *Position)
StringRef correctTypoInTParamReference (StringRef Typo, const TemplateParameterList *TemplateParameters)
InlineCommandComment::RenderKind getInlineCommandRenderKind (StringRef Name) const

Detailed Description

Definition at line 33 of file CommentSema.h.


Constructor & Destructor Documentation

clang::comments::Sema::Sema ( llvm::BumpPtrAllocator &  Allocator,
const SourceManager SourceMgr,
DiagnosticsEngine Diags,
CommandTraits Traits,
const Preprocessor PP 
)

Definition at line 28 of file CommentSema.cpp.


Member Function Documentation

Definition at line 50 of file CommentSema.cpp.

References checkContainerDecl().

Referenced by clang::comments::Parser::parseBlockCommand().

void clang::comments::Sema::actOnHTMLStartTagFinish ( HTMLStartTagComment Tag,
ArrayRef< HTMLStartTagComment::Attribute Attrs,
SourceLocation  GreaterLoc,
bool  IsSelfClosing 
)

Definition at line 460 of file CommentSema.cpp.

Referenced by clang::comments::Parser::parseHTMLStartTag().

InlineCommandComment * clang::comments::Sema::actOnInlineCommand ( SourceLocation  CommandLocBegin,
SourceLocation  CommandLocEnd,
unsigned  CommandID,
SourceLocation  ArgLocBegin,
SourceLocation  ArgLocEnd,
StringRef  Arg 
)
void clang::comments::Sema::actOnParamCommandDirectionArg ( ParamCommandComment Command,
SourceLocation  ArgLocBegin,
SourceLocation  ArgLocEnd,
StringRef  Arg 
)
void clang::comments::Sema::actOnParamCommandParamNameArg ( ParamCommandComment Command,
SourceLocation  ArgLocBegin,
SourceLocation  ArgLocEnd,
StringRef  Arg 
)
TextComment * clang::comments::Sema::actOnText ( SourceLocation  LocBegin,
SourceLocation  LocEnd,
StringRef  Text 
)
void clang::comments::Sema::actOnTParamCommandParamNameArg ( TParamCommandComment Command,
SourceLocation  ArgLocBegin,
SourceLocation  ArgLocEnd,
StringRef  Arg 
)
void clang::comments::Sema::actOnVerbatimBlockFinish ( VerbatimBlockComment Block,
SourceLocation  CloseNameLocBegin,
StringRef  CloseName,
ArrayRef< VerbatimBlockLineComment * >  Lines 
)

Definition at line 431 of file CommentSema.cpp.

Referenced by clang::comments::Parser::parseVerbatimBlock().

VerbatimLineComment * clang::comments::Sema::actOnVerbatimLine ( SourceLocation  LocBegin,
unsigned  CommandID,
SourceLocation  TextBegin,
StringRef  Text 
)
template<typename T >
ArrayRef<T> clang::comments::Sema::copyArray ( ArrayRef< T >  Source) [inline]
unsigned clang::comments::Sema::correctTypoInParmVarReference ( StringRef  Typo,
ArrayRef< const ParmVarDecl * >  ParamVars 
)

Returns index of a function parameter with the name closest to a given typo.

Definition at line 1007 of file CommentSema.cpp.

References clang::comments::ParamCommandComment::InvalidParamIndex.

Referenced by resolveParamCommandIndexes().

StringRef clang::comments::Sema::correctTypoInTParamReference ( StringRef  Typo,
const TemplateParameterList TemplateParameters 
)

Definition at line 1072 of file CommentSema.cpp.

References clang::IdentifierInfo::getName().

Referenced by actOnTParamCommandParamNameArg().

unsigned clang::comments::Sema::resolveParmVarReference ( StringRef  Name,
ArrayRef< const ParmVarDecl * >  ParamVars 
)
bool clang::comments::Sema::resolveTParamReference ( StringRef  Name,
const TemplateParameterList TemplateParameters,
SmallVectorImpl< unsigned > *  Position 
)

Definition at line 1045 of file CommentSema.cpp.

Referenced by actOnTParamCommandParamNameArg().

void clang::comments::Sema::setDecl ( const Decl D)

The documentation for this class was generated from the following files: