class EnumDecl
Declaration
class EnumDecl : public TagDecl { /* full declaration omitted */ };
Description
Represents an enum. In C++11, enums can be forward-declared with a fixed underlying type, and in C we allow them to be forward-declared with no underlying type as an extension.
Declared at: clang/include/clang/AST/Decl.h:3646
Inherits from: TagDecl
Member Variables
- private llvm::PointerUnion<const Type*, TypeSourceInfo*> IntegerType
- The underlying type of an enumeration never has any qualifiers, so we can get away with just storing a raw Type*, and thus save an extra pointer when TypeSourceInfo is needed.
- private clang::QualType PromotionType
- The integer type that values of this type should promote to. In C, enumerators are generally of an integer type directly, but gcc-style large enumerators (and all enumerators in C++) are of the enum type instead.
- private clang::MemberSpecializationInfo* SpecializationInfo = nullptr
- If this enumeration is an instantiation of a member enumeration of a class template specialization, this is the member specialization information.
- private unsigned int ODRHash
- Store the ODRHash after first calculation. The corresponding flag HasODRHash is in EnumDeclBits and can be accessed with the provided accessors.
Inherited from DeclContext:
- protected
- protected FirstDecl = nullptr
- protected LastDecl = nullptr
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::EnumDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::EnumDecl * PrevDecl, bool IsScoped, bool IsScopedUsingClassTag, bool IsFixed)
- public static clang::EnumDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private EnumDecl(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id, clang::EnumDecl * PrevDecl, bool Scoped, bool ScopedUsingClassTag, bool Fixed)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public void completeDefinition(clang::QualType NewType, clang::QualType PromotionType, unsigned int NumPositiveBits, unsigned int NumNegativeBits)
- public clang::EnumDecl::enumerator_iterator enumerator_begin() const
- public clang::EnumDecl::enumerator_iterator enumerator_end() const
- public clang::EnumDecl::enumerator_range enumerators() const
- public clang::EnumDecl * getCanonicalDecl()
- public const clang::EnumDecl * getCanonicalDecl() const
- public clang::EnumDecl * getDefinition() const
- public clang::EnumDecl * getInstantiatedFromMemberEnum() const
- public clang::QualType getIntegerType() const
- public clang::SourceRange getIntegerTypeRange() const
- public clang::TypeSourceInfo * getIntegerTypeSourceInfo() const
- public clang::MemberSpecializationInfo * getMemberSpecializationInfo() const
- public const clang::EnumDecl * getMostRecentDecl() const
- public clang::EnumDecl * getMostRecentDecl()
- public unsigned int getNumNegativeBits() const
- public unsigned int getNumPositiveBits() const
- public unsigned int getODRHash()
- public const clang::EnumDecl * getPreviousDecl() const
- public clang::EnumDecl * getPreviousDecl()
- public clang::QualType getPromotionType() const
- public clang::SourceRange getSourceRange() const
- public clang::EnumDecl * getTemplateInstantiationPattern() const
- public clang::TemplateSpecializationKind getTemplateSpecializationKind() const
- private bool hasODRHash() const
- public bool isClosed() const
- public bool isClosedFlag() const
- public bool isClosedNonFlag() const
- public bool isComplete() const
- public bool isFixed() const
- public bool isScoped() const
- public bool isScopedUsingClassTag() const
- public void setFixed(bool Fixed = true)
- private void setHasODRHash(bool Hash = true)
- public void setInstantiationOfMemberEnum(clang::EnumDecl * ED, clang::TemplateSpecializationKind TSK)
- private void setInstantiationOfMemberEnum(clang::ASTContext & C, clang::EnumDecl * ED, clang::TemplateSpecializationKind TSK)
- public void setIntegerType(clang::QualType T)
- public void setIntegerTypeSourceInfo(clang::TypeSourceInfo * TInfo)
- private void setNumNegativeBits(unsigned int Num)
- private void setNumPositiveBits(unsigned int Num)
- public void setPromotionType(clang::QualType T)
- public void setScoped(bool Scoped = true)
- public void setScopedUsingClassTag(bool ScopedUCT = true)
- public void setTemplateSpecializationKind(clang::TemplateSpecializationKind TSK, clang::SourceLocation PointOfInstantiation = clang::SourceLocation())
Inherited from TagDecl:
- public castFromDeclContext
- public castToDeclContext
- public classof
- public classofKind
- protected completeDefinition
- public demoteThisDefinitionToDeclaration
- public getBraceRange
- public getCanonicalDecl
- public getCanonicalDecl
- public getDefinition
- public getInnerLocStart
- public getKindName
- protected getMostRecentDeclImpl
- protected getNextRedeclarationImpl
- public getNumTemplateParameterLists
- public getOuterLocStart
- protected getPreviousDeclImpl
- public getQualifier
- public getQualifierLoc
- public getSourceRange
- public getTagKind
- public getTemplateParameterList
- public getTypedefNameForAnonDecl
- public hasNameForLinkage
- public isBeingDefined
- public isClass
- public isCompleteDefinition
- public isCompleteDefinitionRequired
- public isDependentType
- public isEmbeddedInDeclarator
- public isEnum
- public isFreeStanding
- public isInterface
- public isStruct
- public isThisDeclarationADefinition
- public isThisDeclarationADemotedDefinition
- public isUnion
- public mayHaveOutOfDateDef
- protected setBeingDefined
- public setBraceRange
- public setCompleteDefinition
- public setCompleteDefinitionRequired
- public setEmbeddedInDeclarator
- public setFreeStanding
- protected setMayHaveOutOfDateDef
- public setQualifierInfo
- public setTagKind
- public setTemplateParameterListsInfo
- public setTypedefNameForAnonDecl
- public startDefinition
Inherited from DeclContext:
- protected BuildDeclChain
- public Encloses
- public Equals
- public InEnclosingNamespaceSetOf
- public addDecl
- public addDeclInternal
- public addHiddenDecl
- public buildLookup
- public classof
- public classof
- public collectAllContexts
- public containsDecl
- public containsDeclAndLoad
- public ddiags
- public decls
- public decls_begin
- public decls_empty
- public decls_end
- public dumpDeclContext
- public dumpLookups
- public dumpLookups
- public getDeclKind
- public getDeclKindName
- public getEnclosingNamespaceContext
- public getEnclosingNamespaceContext
- public getExternCContext
- public getInnermostBlockDecl
- public getLexicalParent
- public getLexicalParent
- public getLookupParent
- public getLookupParent
- public getLookupPtr
- public getNonClosureAncestor
- public getNonClosureAncestor
- public getNonTransparentContext
- public getNonTransparentContext
- public getOuterLexicalRecordContext
- public getOuterLexicalRecordContext
- public getParent
- public getParent
- public getParentASTContext
- public getPrimaryContext
- public getPrimaryContext
- public getRedeclContext
- public getRedeclContext
- public hasExternalLexicalStorage
- public hasExternalVisibleStorage
- public isClosure
- public isDeclInLexicalTraversal
- public isDependentContext
- public isExternCContext
- public isExternCXXContext
- public isFileContext
- public isFunctionOrMethod
- public isInlineNamespace
- public isLookupContext
- public isNamespace
- public isObjCContainer
- public isRecord
- public isStdNamespace
- public isTranslationUnit
- public isTransparentContext
- public localUncachedLookup
- public lookup
- public lookups
- public lookups_begin
- public lookups_end
- public makeDeclVisibleInContext
- public noload_decls
- public noload_decls_begin
- public noload_decls_end
- public noload_lookup
- public noload_lookups
- public noload_lookups_begin
- public noload_lookups_end
- public removeDecl
- public setHasExternalLexicalStorage
- public setHasExternalVisibleStorage
- public setMustBuildLookupTable
- public setUseQualifiedLookup
- public shouldUseQualifiedLookup
- public using_directives
Inherited from TypeDecl:
- public classof
- public classofKind
- public getBeginLoc
- public getSourceRange
- public getTypeForDecl
- public setLocStart
- public setTypeForDecl
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::EnumDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::EnumDecl* PrevDecl,
bool IsScoped,
bool IsScopedUsingClassTag,
bool IsFixed)
static clang::EnumDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::EnumDecl* PrevDecl,
bool IsScoped,
bool IsScopedUsingClassTag,
bool IsFixed)
Declared at: clang/include/clang/AST/Decl.h:3753
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation StartLoc
- clang::SourceLocation IdLoc
- clang::IdentifierInfo* Id
- clang::EnumDecl* PrevDecl
- bool IsScoped
- bool IsScopedUsingClassTag
- bool IsFixed
¶static clang::EnumDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
static clang::EnumDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/Decl.h:3758
Parameters
- clang::ASTContext& C
- unsigned int ID
¶EnumDecl(clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::EnumDecl* PrevDecl,
bool Scoped,
bool ScopedUsingClassTag,
bool Fixed)
EnumDecl(clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation StartLoc,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id,
clang::EnumDecl* PrevDecl,
bool Scoped,
bool ScopedUsingClassTag,
bool Fixed)
Declared at: clang/include/clang/AST/Decl.h:3682
Parameters
- clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation StartLoc
- clang::SourceLocation IdLoc
- clang::IdentifierInfo* Id
- clang::EnumDecl* PrevDecl
- bool Scoped
- bool ScopedUsingClassTag
- bool Fixed
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/Decl.h:3686
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/Decl.h:3911
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/Decl.h:3912
Parameters
- clang::Decl::Kind K
¶void completeDefinition(
clang::QualType NewType,
clang::QualType PromotionType,
unsigned int NumPositiveBits,
unsigned int NumNegativeBits)
void completeDefinition(
clang::QualType NewType,
clang::QualType PromotionType,
unsigned int NumPositiveBits,
unsigned int NumNegativeBits)
Description
When created, the EnumDecl corresponds to a forward-declared enum. This method is used to mark the declaration as being defined; its enumerators have already been added (via DeclContext::addDecl). NewType is the new underlying type of the enumeration type.
Declared at: clang/include/clang/AST/Decl.h:3769
Parameters
- clang::QualType NewType
- clang::QualType PromotionType
- unsigned int NumPositiveBits
- unsigned int NumNegativeBits
¶clang::EnumDecl::enumerator_iterator
enumerator_begin() const
clang::EnumDecl::enumerator_iterator
enumerator_begin() const
Declared at: clang/include/clang/AST/Decl.h:3783
¶clang::EnumDecl::enumerator_iterator
enumerator_end() const
clang::EnumDecl::enumerator_iterator
enumerator_end() const
Declared at: clang/include/clang/AST/Decl.h:3790
¶clang::EnumDecl::enumerator_range enumerators()
const
clang::EnumDecl::enumerator_range enumerators()
const
Declared at: clang/include/clang/AST/Decl.h:3779
¶clang::EnumDecl* getCanonicalDecl()
clang::EnumDecl* getCanonicalDecl()
Description
Retrieves the "canonical" declaration of the given declaration.
Declared at: clang/include/clang/AST/Decl.h:3727
¶const clang::EnumDecl* getCanonicalDecl() const
const clang::EnumDecl* getCanonicalDecl() const
Declared at: clang/include/clang/AST/Decl.h:3730
¶clang::EnumDecl* getDefinition() const
clang::EnumDecl* getDefinition() const
Declared at: clang/include/clang/AST/Decl.h:3749
¶clang::EnumDecl* getInstantiatedFromMemberEnum()
const
clang::EnumDecl* getInstantiatedFromMemberEnum()
const
Description
Returns the enumeration (declared within the template) from which this enumeration type was instantiated, or NULL if this enumeration was not instantiated from any template.
Declared at: clang/include/clang/AST/Decl.h:3885
¶clang::QualType getIntegerType() const
clang::QualType getIntegerType() const
Description
Return the integer type this enum decl corresponds to. This returns a null QualType for an enum forward definition with no fixed underlying type.
Declared at: clang/include/clang/AST/Decl.h:3806
¶clang::SourceRange getIntegerTypeRange() const
clang::SourceRange getIntegerTypeRange() const
Description
Retrieve the source range that covers the underlying type if specified.
Declared at: clang/include/clang/AST/Decl.h:3828
¶clang::TypeSourceInfo* getIntegerTypeSourceInfo()
const
clang::TypeSourceInfo* getIntegerTypeSourceInfo()
const
Description
Return the type source info for the underlying integer type, if no type source info exists, return 0.
Declared at: clang/include/clang/AST/Decl.h:3822
¶clang::MemberSpecializationInfo*
getMemberSpecializationInfo() const
clang::MemberSpecializationInfo*
getMemberSpecializationInfo() const
Description
If this enumeration is an instantiation of a member enumeration of a class template specialization, retrieves the member specialization information.
Declared at: clang/include/clang/AST/Decl.h:3900
¶const clang::EnumDecl* getMostRecentDecl() const
const clang::EnumDecl* getMostRecentDecl() const
Declared at: clang/include/clang/AST/Decl.h:3745
¶clang::EnumDecl* getMostRecentDecl()
clang::EnumDecl* getMostRecentDecl()
Declared at: clang/include/clang/AST/Decl.h:3742
¶unsigned int getNumNegativeBits() const
unsigned int getNumNegativeBits() const
Description
Returns the width in bits required to store all the negative enumerators of this enum. These widths include the rightmost leading 1; that is: MOST NEGATIVE ENUMERATOR PATTERN NUM NEGATIVE BITS ------------------------ ------- ----------------- -1 1111111 1 -10 1110110 5 -101 1001011 8
Declared at: clang/include/clang/AST/Decl.h:3843
¶unsigned int getNumPositiveBits() const
unsigned int getNumPositiveBits() const
Description
Returns the width in bits required to store all the non-negative enumerators of this enum.
Declared at: clang/include/clang/AST/Decl.h:3832
¶unsigned int getODRHash()
unsigned int getODRHash()
Declared at: clang/include/clang/AST/Decl.h:3857
¶const clang::EnumDecl* getPreviousDecl() const
const clang::EnumDecl* getPreviousDecl() const
Declared at: clang/include/clang/AST/Decl.h:3738
¶clang::EnumDecl* getPreviousDecl()
clang::EnumDecl* getPreviousDecl()
Declared at: clang/include/clang/AST/Decl.h:3734
¶clang::QualType getPromotionType() const
clang::QualType getPromotionType() const
Description
Return the integer type that enumerators should promote to.
Declared at: clang/include/clang/AST/Decl.h:3798
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Overrides to provide correct range when there's an enum-base specifier with forward declarations.
Declared at: clang/include/clang/AST/Decl.h:3762
¶clang::EnumDecl* getTemplateInstantiationPattern()
const
clang::EnumDecl* getTemplateInstantiationPattern()
const
Description
Retrieve the enum definition from which this enumeration could be instantiated, if it is an instantiation (rather than a non-template).
Declared at: clang/include/clang/AST/Decl.h:3880
¶clang::TemplateSpecializationKind
getTemplateSpecializationKind() const
clang::TemplateSpecializationKind
getTemplateSpecializationKind() const
Description
If this enumeration is a member of a specialization of a templated class, determine what kind of template specialization or instantiation this is.
Declared at: clang/include/clang/AST/Decl.h:3890
¶bool hasODRHash() const
bool hasODRHash() const
Description
True if a valid hash is stored in ODRHash.
Declared at: clang/include/clang/AST/Decl.h:3721
¶bool isClosed() const
bool isClosed() const
Description
Returns true if this enum is either annotated with enum_extensibility(closed) or isn't annotated with enum_extensibility.
Declared at: clang/include/clang/AST/Decl.h:3868
¶bool isClosedFlag() const
bool isClosedFlag() const
Description
Returns true if this enum is annotated with flag_enum and isn't annotated with enum_extensibility(open).
Declared at: clang/include/clang/AST/Decl.h:3872
¶bool isClosedNonFlag() const
bool isClosedNonFlag() const
Description
Returns true if this enum is annotated with neither flag_enum nor enum_extensibility(open).
Declared at: clang/include/clang/AST/Decl.h:3876
¶bool isComplete() const
bool isComplete() const
Description
Returns true if this can be considered a complete type.
Declared at: clang/include/clang/AST/Decl.h:3860
¶bool isFixed() const
bool isFixed() const
Description
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying type.
Declared at: clang/include/clang/AST/Decl.h:3855
¶bool isScoped() const
bool isScoped() const
Description
Returns true if this is a C++11 scoped enumeration.
Declared at: clang/include/clang/AST/Decl.h:3846
¶bool isScopedUsingClassTag() const
bool isScopedUsingClassTag() const
Description
Returns true if this is a C++11 scoped enumeration.
Declared at: clang/include/clang/AST/Decl.h:3849
¶void setFixed(bool Fixed = true)
void setFixed(bool Fixed = true)
Description
True if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying type.
Declared at: clang/include/clang/AST/Decl.h:3717
Parameters
- bool Fixed = true
¶void setHasODRHash(bool Hash = true)
void setHasODRHash(bool Hash = true)
Declared at: clang/include/clang/AST/Decl.h:3722
Parameters
- bool Hash = true
¶void setInstantiationOfMemberEnum(
clang::EnumDecl* ED,
clang::TemplateSpecializationKind TSK)
void setInstantiationOfMemberEnum(
clang::EnumDecl* ED,
clang::TemplateSpecializationKind TSK)
Description
Specify that this enumeration is an instantiation of the member enumeration ED.
Declared at: clang/include/clang/AST/Decl.h:3906
Parameters
- clang::EnumDecl* ED
- clang::TemplateSpecializationKind TSK
¶void setInstantiationOfMemberEnum(
clang::ASTContext& C,
clang::EnumDecl* ED,
clang::TemplateSpecializationKind TSK)
void setInstantiationOfMemberEnum(
clang::ASTContext& C,
clang::EnumDecl* ED,
clang::TemplateSpecializationKind TSK)
Declared at: clang/include/clang/AST/Decl.h:3688
Parameters
- clang::ASTContext& C
- clang::EnumDecl* ED
- clang::TemplateSpecializationKind TSK
¶void setIntegerType(clang::QualType T)
void setIntegerType(clang::QualType T)
Description
Set the underlying integer type.
Declared at: clang/include/clang/AST/Decl.h:3815
Parameters
¶void setIntegerTypeSourceInfo(
clang::TypeSourceInfo* TInfo)
void setIntegerTypeSourceInfo(
clang::TypeSourceInfo* TInfo)
Description
Set the underlying integer type source info.
Declared at: clang/include/clang/AST/Decl.h:3818
Parameters
- clang::TypeSourceInfo* TInfo
¶void setNumNegativeBits(unsigned int Num)
void setNumNegativeBits(unsigned int Num)
Description
Returns the width in bits required to store all the negative enumerators of this enum. (see getNumNegativeBits)
Declared at: clang/include/clang/AST/Decl.h:3700
Parameters
- unsigned int Num
¶void setNumPositiveBits(unsigned int Num)
void setNumPositiveBits(unsigned int Num)
Description
Sets the width in bits required to store all the non-negative enumerators of this enum.
Declared at: clang/include/clang/AST/Decl.h:3693
Parameters
- unsigned int Num
¶void setPromotionType(clang::QualType T)
void setPromotionType(clang::QualType T)
Description
Set the promotion type.
Declared at: clang/include/clang/AST/Decl.h:3801
Parameters
¶void setScoped(bool Scoped = true)
void setScoped(bool Scoped = true)
Description
True if this tag declaration is a scoped enumeration. Only possible in C++11 mode.
Declared at: clang/include/clang/AST/Decl.h:3705
Parameters
- bool Scoped = true
¶void setScopedUsingClassTag(bool ScopedUCT = true)
void setScopedUsingClassTag(bool ScopedUCT = true)
Description
If this tag declaration is a scoped enum, then this is true if the scoped enum was declared using the class tag, false if it was declared with the struct tag. No meaning is associated if this tag declaration is not a scoped enum.
Declared at: clang/include/clang/AST/Decl.h:3711
Parameters
- bool ScopedUCT = true
¶void setTemplateSpecializationKind(
clang::TemplateSpecializationKind TSK,
clang::SourceLocation PointOfInstantiation =
clang::SourceLocation())
void setTemplateSpecializationKind(
clang::TemplateSpecializationKind TSK,
clang::SourceLocation PointOfInstantiation =
clang::SourceLocation())
Description
For an enumeration member that was instantiated from a member enumeration of a templated class, set the template specialiation kind.
Declared at: clang/include/clang/AST/Decl.h:3894
Parameters
- clang::TemplateSpecializationKind TSK
- clang::SourceLocation PointOfInstantiation = clang::SourceLocation()