clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::EnumConstantDecl Class Reference

#include <Decl.h>

Inheritance diagram for clang::EnumConstantDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::EnumConstantDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const ExprgetInitExpr () const
ExprgetInitExpr ()
const llvm::APSInt & getInitVal () const
void setInitExpr (Expr *E)
void setInitVal (const llvm::APSInt &V)
SourceRange getSourceRange () const override LLVM_READONLY
 Source range that this declaration covers.
EnumConstantDeclgetCanonicalDecl () override
 Retrieves the canonical declaration of this enumerator.
const EnumConstantDeclgetCanonicalDecl () const

Static Public Member Functions

static EnumConstantDeclCreate (ASTContext &C, EnumDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V)
static EnumConstantDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Protected Member Functions

 EnumConstantDecl (DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V)

Friends

class StmtIteratorBase

Detailed Description

EnumConstantDecl - An instance of this object exists for each enum constant that is defined. For example, in "enum X {a,b}", each of a/b are EnumConstantDecl's, X is an instance of EnumDecl, and the type of a/b is a TagType for the X EnumDecl.

Definition at line 2353 of file Decl.h.


Constructor & Destructor Documentation

clang::EnumConstantDecl::EnumConstantDecl ( DeclContext DC,
SourceLocation  L,
IdentifierInfo Id,
QualType  T,
Expr E,
const llvm::APSInt &  V 
) [inline, protected]

Definition at line 2357 of file Decl.h.

Referenced by Create(), and CreateDeserialized().


Member Function Documentation

static bool clang::EnumConstantDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::ValueDecl.

Definition at line 2384 of file Decl.h.

References clang::Decl::getKind().

static bool clang::EnumConstantDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::ValueDecl.

Definition at line 2385 of file Decl.h.

EnumConstantDecl * EnumConstantDecl::Create ( ASTContext C,
EnumDecl DC,
SourceLocation  L,
IdentifierInfo Id,
QualType  T,
Expr E,
const llvm::APSInt &  V 
) [static]

Definition at line 3830 of file Decl.cpp.

References AttributeLangSupport::C, and EnumConstantDecl().

Retrieves the canonical declaration of this enumerator.

Reimplemented from clang::Decl.

Definition at line 2380 of file Decl.h.

Reimplemented from clang::Decl.

Definition at line 2381 of file Decl.h.

const Expr* clang::EnumConstantDecl::getInitExpr ( ) const [inline]

Definition at line 2371 of file Decl.h.

const llvm::APSInt& clang::EnumConstantDecl::getInitVal ( ) const [inline]
SourceRange EnumConstantDecl::getSourceRange ( ) const [override, virtual]

Source range that this declaration covers.

Reimplemented from clang::Decl.

Definition at line 3851 of file Decl.cpp.

References clang::Decl::getLocation(), and clang::Stmt::getLocEnd().

void clang::EnumConstantDecl::setInitVal ( const llvm::APSInt &  V) [inline]

Friends And Related Function Documentation

friend class StmtIteratorBase [friend]

Definition at line 2387 of file Decl.h.


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