clang 19.0.0git
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]

Classes

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

Public Types

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 (raw_ostream &OS, const ASTContext &Context) 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.
 
SourceRange Range
 Source range of this AST node.
 
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 65 of file Comment.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 251 of file Comment.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLStartTagCommentBits 

Definition at line 149 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParagraphCommentBits 

Definition at line 165 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumBlockCommandCommentBits 

Definition at line 181 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParamCommandCommentBits 

Definition at line 198 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumCommentBits 

Definition at line 80 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineContentCommentBits 

Definition at line 93 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumTextCommentBits 

Definition at line 109 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineCommandCommentBits 

Definition at line 123 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLTagCommentBits 

Definition at line 136 of file Comment.h.

Constructor & Destructor Documentation

◆ Comment()

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

Definition at line 226 of file Comment.h.

References CommentBits.

Member Function Documentation

◆ child_begin()

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

Definition at line 83 of file Comment.cpp.

References getCommentKind(), and clang::comments::None.

Referenced by child_count().

◆ child_count()

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

Definition at line 258 of file Comment.h.

References child_begin(), and child_end().

◆ child_end()

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

Definition at line 98 of file Comment.cpp.

References getCommentKind(), and clang::comments::None.

Referenced by child_count().

◆ dump() [1/2]

LLVM_DUMP_METHOD void Comment::dump ( ) const

◆ dump() [2/2]

LLVM_DUMP_METHOD void Comment::dump ( raw_ostream &  OS,
const ASTContext Context 
) 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

Definition at line 233 of file Comment.h.

References CommentBits.

Referenced by child_begin(), child_end(), and getCommentKindName().

◆ getCommentKindName()

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

Definition at line 35 of file Comment.cpp.

References getCommentKind(), and clang::comments::None.

◆ 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

◆ 

union { ... } clang::comments::Comment::@15

◆ BlockCommandCommentBits

BlockCommandCommentBitfields clang::comments::Comment::BlockCommandCommentBits

◆ CommentBits

CommentBitfields clang::comments::Comment::CommentBits

Definition at line 201 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 68 of file Comment.h.

Referenced by getLocation(), and setLocation().

◆ ParagraphCommentBits

ParagraphCommentBitfields clang::comments::Comment::ParagraphCommentBits

◆ ParamCommandCommentBits

ParamCommandCommentBitfields clang::comments::Comment::ParamCommandCommentBits

◆ Range

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

◆ TextCommentBits

TextCommentBitfields clang::comments::Comment::TextCommentBits

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