clang  6.0.0svn
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
clang::comments::Comment Class Reference

Any part of the comment. More...

#include "clang/AST/Comment.h"

Inheritance diagram for clang::comments::Comment:
Inheritance graph
[legend]
Collaboration diagram for clang::comments::Comment:
Collaboration graph
[legend]

Classes

class  BlockCommandCommentBitfields
 
class  CommentBitfields
 
class  HTMLStartTagCommentBitfields
 
class  HTMLTagCommentBitfields
 
class  InlineCommandCommentBitfields
 
class  InlineContentCommentBitfields
 
class  ParagraphCommentBitfields
 
class  ParamCommandCommentBitfields
 
class  TextCommentBitfields
 

Public Types

enum  CommentKind { NoCommentKind = 0 }
 
typedef Comment *const * child_iterator
 

Public Member Functions

 Comment (CommentKind K, SourceLocation LocBegin, SourceLocation LocEnd)
 
CommentKind getCommentKind () const
 
const char * getCommentKindName () const
 
void dump () const
 
void dumpColor () const
 
void dump (const ASTContext &Context) const
 
void dump (raw_ostream &OS, const CommandTraits *Traits, const SourceManager *SM) const
 
SourceRange getSourceRange () const LLVM_READONLY
 
SourceLocation getLocStart () const LLVM_READONLY
 
SourceLocation getLocEnd () const LLVM_READONLY
 
SourceLocation getLocation () const LLVM_READONLY
 
child_iterator child_begin () const
 
child_iterator child_end () const
 
unsigned child_count () const
 

Protected Types

enum  { NumCommentBits = 8 }
 
enum  { NumInlineContentCommentBits = NumCommentBits + 1 }
 
enum  { NumTextCommentBits = NumInlineContentCommentBits + 2 }
 
enum  { NumInlineCommandCommentBits }
 
enum  { NumHTMLTagCommentBits = NumInlineContentCommentBits + 1 }
 
enum  { NumHTMLStartTagCommentBits = NumHTMLTagCommentBits + 1 }
 
enum  { NumParagraphCommentBits = NumCommentBits + 2 }
 
enum  { NumBlockCommandCommentBits }
 
enum  { NumParamCommandCommentBits = NumBlockCommandCommentBits + 3 }
 

Protected Member Functions

void setSourceRange (SourceRange SR)
 
void setLocation (SourceLocation L)
 

Protected Attributes

SourceLocation Loc
 Preferred location to show caret. More...
 
SourceRange Range
 Source range of this AST node. More...
 
union {
   CommentBitfields   CommentBits
 
   InlineContentCommentBitfields   InlineContentCommentBits
 
   TextCommentBitfields   TextCommentBits
 
   InlineCommandCommentBitfields   InlineCommandCommentBits
 
   HTMLTagCommentBitfields   HTMLTagCommentBits
 
   HTMLStartTagCommentBitfields   HTMLStartTagCommentBits
 
   ParagraphCommentBitfields   ParagraphCommentBits
 
   BlockCommandCommentBitfields   BlockCommandCommentBits
 
   ParamCommandCommentBitfields   ParamCommandCommentBits
 
}; 
 

Detailed Description

Any part of the comment.

Abstract class.

Definition at line 53 of file Comment.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 228 of file Comment.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLStartTagCommentBits 

Definition at line 123 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParagraphCommentBits 

Definition at line 136 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumBlockCommandCommentBits 

Definition at line 149 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParamCommandCommentBits 

Definition at line 163 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumCommentBits 

Definition at line 67 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineContentCommentBits 

Definition at line 78 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumTextCommentBits 

Definition at line 91 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineCommandCommentBits 

Definition at line 101 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLTagCommentBits 

Definition at line 112 of file Comment.h.

◆ CommentKind

Enumerator
NoCommentKind 

Definition at line 186 of file Comment.h.

Constructor & Destructor Documentation

◆ Comment()

clang::comments::Comment::Comment ( CommentKind  K,
SourceLocation  LocBegin,
SourceLocation  LocEnd 
)
inline

Definition at line 197 of file Comment.h.

References CommentBits.

Member Function Documentation

◆ child_begin()

Comment::child_iterator clang::comments::Comment::child_begin ( ) const

Definition at line 68 of file Comment.cpp.

References getCommentKind(), and NoCommentKind.

Referenced by child_count().

◆ child_count()

unsigned clang::comments::Comment::child_count ( ) const
inline

Definition at line 235 of file Comment.h.

References child_begin(), and child_end().

◆ child_end()

Comment::child_iterator clang::comments::Comment::child_end ( ) const

Definition at line 82 of file Comment.cpp.

References getCommentKind(), and NoCommentKind.

Referenced by child_count().

◆ dump() [1/3]

LLVM_DUMP_METHOD void Comment::dump ( ) const

Definition at line 2746 of file ASTDumper.cpp.

References dump().

Referenced by getCommentKind().

◆ dump() [2/3]

LLVM_DUMP_METHOD void Comment::dump ( const ASTContext Context) const

Definition at line 2750 of file ASTDumper.cpp.

◆ dump() [3/3]

void Comment::dump ( raw_ostream &  OS,
const CommandTraits Traits,
const SourceManager SM 
) const

Definition at line 2755 of file ASTDumper.cpp.

◆ dumpColor()

LLVM_DUMP_METHOD void Comment::dumpColor ( ) const

Definition at line 2762 of file ASTDumper.cpp.

Referenced by getCommentKind().

◆ getCommentKind()

CommentKind clang::comments::Comment::getCommentKind ( ) const
inline

◆ getCommentKindName()

const char * clang::comments::Comment::getCommentKindName ( ) const

Definition at line 21 of file Comment.cpp.

References getCommentKind(), NoCommentKind, and clang::T.

Referenced by getCommentKind().

◆ getLocation()

SourceLocation clang::comments::Comment::getLocation ( ) const
inline

◆ getLocEnd()

SourceLocation clang::comments::Comment::getLocEnd ( ) const
inline

◆ getLocStart()

SourceLocation clang::comments::Comment::getLocStart ( ) const
inline

◆ getSourceRange()

SourceRange clang::comments::Comment::getSourceRange ( ) const
inline

◆ setLocation()

void clang::comments::Comment::setLocation ( SourceLocation  L)
inlineprotected

◆ setSourceRange()

void clang::comments::Comment::setSourceRange ( SourceRange  SR)
inlineprotected

Member Data Documentation

◆ @15

union { ... }

◆ BlockCommandCommentBits

BlockCommandCommentBitfields clang::comments::Comment::BlockCommandCommentBits

◆ CommentBits

CommentBitfields clang::comments::Comment::CommentBits

Definition at line 166 of file Comment.h.

Referenced by Comment(), and getCommentKind().

◆ HTMLStartTagCommentBits

HTMLStartTagCommentBitfields clang::comments::Comment::HTMLStartTagCommentBits

◆ HTMLTagCommentBits

HTMLTagCommentBitfields clang::comments::Comment::HTMLTagCommentBits

◆ InlineCommandCommentBits

InlineCommandCommentBitfields clang::comments::Comment::InlineCommandCommentBits

◆ InlineContentCommentBits

InlineContentCommentBitfields clang::comments::Comment::InlineContentCommentBits

◆ Loc

SourceLocation clang::comments::Comment::Loc
protected

Preferred location to show caret.

Definition at line 56 of file Comment.h.

Referenced by getLocation().

◆ ParagraphCommentBits

ParagraphCommentBitfields clang::comments::Comment::ParagraphCommentBits

◆ ParamCommandCommentBits

ParamCommandCommentBitfields clang::comments::Comment::ParamCommandCommentBits

◆ Range

SourceRange clang::comments::Comment::Range
protected

Source range of this AST node.

Definition at line 59 of file Comment.h.

Referenced by getSourceRange(), clang::comments::HTMLStartTagComment::setAttrs(), and clang::comments::HTMLStartTagComment::setGreaterLoc().

◆ TextCommentBits

TextCommentBitfields clang::comments::Comment::TextCommentBits

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