clang 22.0.0git
clang::comments::Comment Class Reference

Any part of the comment. More...

#include "clang/AST/Comment.h"

Inheritance diagram for clang::comments::Comment:
[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 66 of file Comment.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 257 of file Comment.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineCommandCommentBits 

Definition at line 129 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParamCommandCommentBits 

Definition at line 204 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumCommentBits 

Definition at line 81 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumParagraphCommentBits 

Definition at line 171 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLStartTagCommentBits 

Definition at line 155 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumTextCommentBits 

Definition at line 110 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumHTMLTagCommentBits 

Definition at line 142 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumBlockCommandCommentBits 

Definition at line 187 of file Comment.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
NumInlineContentCommentBits 

Definition at line 94 of file Comment.h.

Constructor & Destructor Documentation

◆ Comment()

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

◆ getCommentKind()

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

Definition at line 239 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()

◆ getLocation()

◆ getSourceRange()

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

◆ setLocation()

◆ setSourceRange()

Member Data Documentation

◆ [union]

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

◆ BlockCommandCommentBits

◆ CommentBits

CommentBitfields clang::comments::Comment::CommentBits

Definition at line 207 of file Comment.h.

Referenced by Comment(), and getCommentKind().

◆ HTMLStartTagCommentBits

◆ HTMLTagCommentBits

◆ InlineCommandCommentBits

◆ InlineContentCommentBits

◆ Loc

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

Preferred location to show caret.

Definition at line 69 of file Comment.h.

Referenced by Comment(), getLocation(), and setLocation().

◆ ParagraphCommentBits

ParagraphCommentBitfields clang::comments::Comment::ParagraphCommentBits

◆ 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: