clang  3.9.0
Public Types | Public Member Functions | Friends | List of all members
clang::RawComment Class Reference

#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? More...
 
void setAttached ()
 
bool isTrailingComment () const LLVM_READONLY
 Returns true if it is a comment that should be put after a member: More...
 
bool isAlmostTrailingComment () const LLVM_READONLY
 Returns true if it is a probable typo: More...
 
bool isOrdinary () const LLVM_READONLY
 Returns true if this comment is not a documentation comment. More...
 
bool isDocumentation () const LLVM_READONLY
 Returns true if this comment any kind of a documentation comment. More...
 
bool isParseAllComments () const LLVM_READONLY
 Returns whether we are parsing all comments. More...
 
StringRef getRawText (const SourceManager &SourceMgr) const
 Returns raw comment text with comment markers. More...
 
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. More...
 

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

clang::RawComment::RawComment ( )
inline

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.

CommentKind clang::RawComment::getKind ( ) const
inline
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
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
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: