clang API Documentation

Public Types | Public Member Functions | Friends
clang::RawComment Class Reference

#include <RawCommentList.h>

List of all members.

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::FullCommentparse (const ASTContext &Context, const Preprocessor *PP, const Decl *D) const
 Parse the comment, assuming it is attached to decl D.

Friends

class ASTReader

Detailed Description

Definition at line 28 of file RawCommentList.h.


Member Enumeration Documentation

Enumerator:
RCK_Invalid 

Invalid comment.

RCK_OrdinaryBCPL 

Any normal BCPL comments.

RCK_OrdinaryC 

Any normal C comment.

RCK_BCPLSlash 
 /// stuff 
RCK_BCPLExcl 
 //! stuff 
RCK_JavaDoc 
 /** stuff */ 
RCK_Qt 
 /*! stuff */ 

, also used by HeaderDoc

RCK_Merged 

Two or more documentation comments merged together.

Definition at line 30 of file RawCommentList.h.


Constructor & Destructor Documentation

Definition at line 41 of file RawCommentList.h.

RawComment::RawComment ( const SourceManager SourceMgr,
SourceRange  SR,
bool  Merged,
bool  ParseAllComments 
)

Member Function Documentation

const char* clang::RawComment::getBriefText ( const ASTContext Context) const [inline]

Definition at line 114 of file RawCommentList.h.

Definition at line 46 of file RawCommentList.h.

Referenced by clang::Sema::ActOnComment().

Definition at line 112 of file RawCommentList.h.

References clang::SourceRange::getEnd().

Referenced by clang::RawCommentList::addComment().

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().

Definition at line 110 of file RawCommentList.h.

Referenced by clang::ASTContext::addComment(), and parse().

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.

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().

Returns whether we are parsing all comments.

Definition at line 96 of file RawCommentList.h.

Referenced by clang::RawCommentList::addComment().

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
void clang::RawComment::setAttached ( ) [inline]

Definition at line 63 of file RawCommentList.h.


Friends And Related Function Documentation

friend class ASTReader [friend]

Definition at line 160 of file RawCommentList.h.


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