clang API Documentation
#include <RawCommentList.h>
Public Types | |
enum | CommentKind { RCK_Invalid, RCK_OrdinaryBCPL, RCK_OrdinaryC, RCK_BCPLSlash, RCK_BCPLExcl, RCK_JavaDoc, RCK_Qt, RCK_Merged } |
Public Member Functions | |
RawComment () | |
RawComment (const SourceManager &SourceMgr, SourceRange SR, bool Merged, bool ParseAllComments) | |
CommentKind | getKind () const LLVM_READONLY |
bool | isInvalid () const LLVM_READONLY |
bool | isMerged () const LLVM_READONLY |
bool | isAttached () const LLVM_READONLY |
Is this comment attached to any declaration? | |
void | setAttached () |
bool | isTrailingComment () const LLVM_READONLY |
bool | isAlmostTrailingComment () const LLVM_READONLY |
bool | isOrdinary () const LLVM_READONLY |
Returns true if this comment is not a documentation comment. | |
bool | isDocumentation () const LLVM_READONLY |
Returns true if this comment any kind of a documentation comment. | |
bool | isParseAllComments () const LLVM_READONLY |
Returns whether we are parsing all comments. | |
StringRef | getRawText (const SourceManager &SourceMgr) const |
Returns raw comment text with comment markers. | |
SourceRange | getSourceRange () const LLVM_READONLY |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
const char * | getBriefText (const ASTContext &Context) const |
comments::FullComment * | parse (const ASTContext &Context, const Preprocessor *PP, const Decl *D) const |
Parse the comment, assuming it is attached to decl D . | |
Friends | |
class | ASTReader |
Definition at line 28 of file RawCommentList.h.
Definition at line 30 of file RawCommentList.h.
clang::RawComment::RawComment | ( | ) | [inline] |
Definition at line 41 of file RawCommentList.h.
RawComment::RawComment | ( | const SourceManager & | SourceMgr, |
SourceRange | SR, | ||
bool | Merged, | ||
bool | ParseAllComments | ||
) |
Definition at line 67 of file RawCommentList.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), getRawText(), RCK_Invalid, and RCK_Merged.
const char* clang::RawComment::getBriefText | ( | const ASTContext & | Context | ) | const [inline] |
Definition at line 114 of file RawCommentList.h.
CommentKind clang::RawComment::getKind | ( | ) | const [inline] |
Definition at line 46 of file RawCommentList.h.
Referenced by clang::Sema::ActOnComment().
SourceLocation clang::RawComment::getLocEnd | ( | ) | const [inline] |
Definition at line 112 of file RawCommentList.h.
References clang::SourceRange::getEnd().
Referenced by clang::RawCommentList::addComment().
SourceLocation clang::RawComment::getLocStart | ( | ) | const [inline] |
Definition at line 111 of file RawCommentList.h.
References clang::SourceRange::getBegin().
Referenced by clang::RawCommentList::addComment(), and clang::BeforeThanCompare< RawComment >::operator()().
StringRef clang::RawComment::getRawText | ( | const SourceManager & | SourceMgr | ) | const [inline] |
Returns raw comment text with comment markers.
Definition at line 101 of file RawCommentList.h.
Referenced by parse(), and RawComment().
SourceRange clang::RawComment::getSourceRange | ( | ) | const [inline] |
Definition at line 110 of file RawCommentList.h.
Referenced by clang::ASTContext::addComment(), and parse().
bool clang::RawComment::isAlmostTrailingComment | ( | ) | const [inline] |
Returns true if it is a probable typo:
//< stuff
/*< stuff */
Definition at line 80 of file RawCommentList.h.
Referenced by clang::Sema::ActOnComment().
bool clang::RawComment::isAttached | ( | ) | const [inline] |
Is this comment attached to any declaration?
Definition at line 59 of file RawCommentList.h.
bool clang::RawComment::isDocumentation | ( | ) | const [inline] |
Returns true if this comment any kind of a documentation comment.
Definition at line 91 of file RawCommentList.h.
References isInvalid(), and isOrdinary().
Referenced by clang::ASTContext::getRawCommentForAnyRedecl(), and isTrailingComment().
bool clang::RawComment::isInvalid | ( | ) | const [inline] |
Definition at line 50 of file RawCommentList.h.
References RCK_Invalid.
Referenced by clang::RawCommentList::addComment(), and isDocumentation().
bool clang::RawComment::isMerged | ( | ) | const [inline] |
Definition at line 54 of file RawCommentList.h.
References RCK_Merged.
bool clang::RawComment::isOrdinary | ( | ) | const [inline] |
Returns true if this comment is not a documentation comment.
Definition at line 85 of file RawCommentList.h.
References RCK_OrdinaryBCPL, and RCK_OrdinaryC.
Referenced by clang::RawCommentList::addComment(), and isDocumentation().
bool clang::RawComment::isParseAllComments | ( | ) | const [inline] |
Returns whether we are parsing all comments.
Definition at line 96 of file RawCommentList.h.
Referenced by clang::RawCommentList::addComment().
bool clang::RawComment::isTrailingComment | ( | ) | const [inline] |
Returns true if it is a comment that should be put after a member:
///< stuff
//!< stuff
/**< stuff */
/*!< stuff */
Definition at line 72 of file RawCommentList.h.
References isDocumentation().
Referenced by clang::RawCommentList::addComment().
comments::FullComment * RawComment::parse | ( | const ASTContext & | Context, |
const Preprocessor * | PP, | ||
const Decl * | D | ||
) | const |
Parse the comment, assuming it is attached to decl D
.
Definition at line 143 of file RawCommentList.cpp.
References clang::ASTContext::getAllocator(), clang::SourceRange::getBegin(), clang::ASTContext::getCommentCommandTraits(), clang::ASTContext::getDiagnostics(), getRawText(), clang::ASTContext::getSourceManager(), getSourceRange(), P, and S.
Referenced by clang::ASTContext::getCommentForDecl(), and clang::ASTContext::getLocalCommentForDeclUncached().
void clang::RawComment::setAttached | ( | ) | [inline] |
Definition at line 63 of file RawCommentList.h.
friend class ASTReader [friend] |
Definition at line 160 of file RawCommentList.h.