clang  10.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 getBeginLoc () const LLVM_READONLY
 
SourceLocation getEndLoc () 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 52 of file Comment.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 223 of file Comment.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParagraphCommentBits 

Definition at line 135 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumBlockCommandCommentBits 

Definition at line 148 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParamCommandCommentBits 

Definition at line 162 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumCommentBits 

Definition at line 66 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineContentCommentBits 

Definition at line 77 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumTextCommentBits 

Definition at line 90 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineCommandCommentBits 

Definition at line 100 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLTagCommentBits 

Definition at line 111 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLStartTagCommentBits 

Definition at line 122 of file Comment.h.

◆ CommentKind

Enumerator
NoCommentKind 

Definition at line 185 of file Comment.h.

Constructor & Destructor Documentation

◆ Comment()

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

Definition at line 196 of file Comment.h.

References CommentBits.

Member Function Documentation

◆ child_begin()

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

◆ child_count()

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

Definition at line 230 of file Comment.h.

References child_begin(), and child_end().

◆ child_end()

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

◆ dump() [1/3]

LLVM_DUMP_METHOD void Comment::dump ( ) const

Definition at line 257 of file ASTDumper.cpp.

Referenced by getCommentKind().

◆ dump() [2/3]

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

Definition at line 261 of file ASTDumper.cpp.

◆ dump() [3/3]

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

◆ dumpColor()

LLVM_DUMP_METHOD void Comment::dumpColor ( ) const

◆ getBeginLoc()

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

◆ getCommentKind()

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

◆ getCommentKindName()

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

◆ getEndLoc()

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

◆ getLocation()

SourceLocation clang::comments::Comment::getLocation ( ) 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

◆ @14

union { ... }

◆ BlockCommandCommentBits

BlockCommandCommentBitfields clang::comments::Comment::BlockCommandCommentBits

◆ CommentBits

CommentBitfields clang::comments::Comment::CommentBits

Definition at line 165 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 55 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 58 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: