clang API Documentation
#include <Decl.h>


Public Member Functions | |
| const Expr * | getInitExpr () const |
| Expr * | getInitExpr () |
| 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. | |
| EnumConstantDecl * | getCanonicalDecl () override |
| Retrieves the canonical declaration of this enumerator. | |
| const EnumConstantDecl * | getCanonicalDecl () const |
Static Public Member Functions | |
| static EnumConstantDecl * | Create (ASTContext &C, EnumDecl *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V) |
| static EnumConstantDecl * | CreateDeserialized (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 |
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.
| 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().
| 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.
| EnumConstantDecl * EnumConstantDecl::Create | ( | ASTContext & | C, |
| EnumDecl * | DC, | ||
| SourceLocation | L, | ||
| IdentifierInfo * | Id, | ||
| QualType | T, | ||
| Expr * | E, | ||
| const llvm::APSInt & | V | ||
| ) | [static] |
Definition at line 3822 of file Decl.cpp.
References AttributeLangSupport::C, and EnumConstantDecl().
Referenced by clang::ASTNodeImporter::VisitEnumConstantDecl().
| EnumConstantDecl * EnumConstantDecl::CreateDeserialized | ( | ASTContext & | C, |
| unsigned | ID | ||
| ) | [static] |
Definition at line 3830 of file Decl.cpp.
References AttributeLangSupport::C, and EnumConstantDecl().
| EnumConstantDecl* clang::EnumConstantDecl::getCanonicalDecl | ( | ) | [inline, override, virtual] |
Retrieves the canonical declaration of this enumerator.
Reimplemented from clang::Decl.
| const EnumConstantDecl* clang::EnumConstantDecl::getCanonicalDecl | ( | ) | const [inline] |
Reimplemented from clang::Decl.
| const Expr* clang::EnumConstantDecl::getInitExpr | ( | ) | const [inline] |
Definition at line 2370 of file Decl.h.
Referenced by clang::Sema::ActOnEnumBody(), CheckForDuplicateEnumValues(), ValidDuplicateEnum(), clang::ASTDeclWriter::VisitEnumConstantDecl(), and clang::ASTNodeImporter::VisitEnumConstantDecl().
| Expr* clang::EnumConstantDecl::getInitExpr | ( | ) | [inline] |
| const llvm::APSInt& clang::EnumConstantDecl::getInitVal | ( | ) | const [inline] |
Definition at line 2372 of file Decl.h.
Referenced by clang::Sema::ActOnEnumBody(), CheckForDuplicateEnumValues(), clang::ASTNodeImporter::IsStructuralMatch(), clang::ASTDeclWriter::VisitEnumConstantDecl(), and clang::ASTNodeImporter::VisitEnumConstantDecl().
| 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::setInitExpr | ( | Expr * | E | ) | [inline] |
Definition at line 2374 of file Decl.h.
Referenced by clang::Sema::ActOnEnumBody(), and clang::ASTDeclReader::VisitEnumConstantDecl().
| void clang::EnumConstantDecl::setInitVal | ( | const llvm::APSInt & | V | ) | [inline] |
Definition at line 2375 of file Decl.h.
Referenced by clang::Sema::ActOnEnumBody(), and clang::ASTDeclReader::VisitEnumConstantDecl().
friend class StmtIteratorBase [friend] |