clang API Documentation
#include <Type.h>
Classes | |
class | CannotCastToThisType |
Public Member Functions | |
ElaboratedTypeKeyword | getKeyword () const |
Static Public Member Functions | |
static ElaboratedTypeKeyword | getKeywordForTypeSpec (unsigned TypeSpec) |
static TagTypeKind | getTagTypeKindForTypeSpec (unsigned TypeSpec) |
static ElaboratedTypeKeyword | getKeywordForTagTypeKind (TagTypeKind Tag) |
static TagTypeKind | getTagTypeKindForKeyword (ElaboratedTypeKeyword Keyword) |
getTagTypeKindForKeyword - Converts an elaborated type keyword into | |
static bool | KeywordIsTagTypeKind (ElaboratedTypeKeyword Keyword) |
static StringRef | getKeywordName (ElaboratedTypeKeyword Keyword) |
static StringRef | getTagTypeKindName (TagTypeKind Kind) |
static CannotCastToThisType | classof (const Type *) |
Protected Member Functions | |
TypeWithKeyword (ElaboratedTypeKeyword Keyword, TypeClass tc, QualType Canonical, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack) |
A helper class for Type nodes having an ElaboratedTypeKeyword. The keyword in stored in the free bits of the base class. Also provides a few static helpers for converting and printing elaborated type keyword and tag type kind enumerations.
clang::TypeWithKeyword::TypeWithKeyword | ( | ElaboratedTypeKeyword | Keyword, |
TypeClass | tc, | ||
QualType | Canonical, | ||
bool | Dependent, | ||
bool | InstantiationDependent, | ||
bool | VariablyModified, | ||
bool | ContainsUnexpandedParameterPack | ||
) | [inline, protected] |
static CannotCastToThisType clang::TypeWithKeyword::classof | ( | const Type * | ) | [static] |
Reimplemented in clang::DependentTemplateSpecializationType, clang::DependentNameType, and clang::ElaboratedType.
ElaboratedTypeKeyword clang::TypeWithKeyword::getKeyword | ( | ) | const [inline] |
Definition at line 3979 of file Type.h.
Referenced by IsStructurallyEquivalent(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), and clang::ASTNodeImporter::VisitElaboratedType().
getKeywordForTagDeclKind - Converts a TagTypeKind into an elaborated type keyword.
Definition at line 1393 of file Type.cpp.
References clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_Struct, clang::ETK_Union, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.
Referenced by clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTagTemplateIdType(), and clang::Sema::ActOnTemplatedFriendTag().
ElaboratedTypeKeyword TypeWithKeyword::getKeywordForTypeSpec | ( | unsigned | TypeSpec | ) | [static] |
getKeywordForTypeSpec - Converts a type specifier (DeclSpec::TST) into an elaborated type keyword.
Definition at line 1367 of file Type.cpp.
References clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_None, clang::ETK_Struct, clang::ETK_Typename, clang::ETK_Union, clang::TST_class, clang::TST_enum, clang::TST_interface, clang::TST_struct, clang::TST_typename, and clang::TST_union.
Referenced by ConvertDeclSpecToType().
StringRef TypeWithKeyword::getKeywordName | ( | ElaboratedTypeKeyword | Keyword | ) | [static] |
Definition at line 1435 of file Type.cpp.
References clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_None, clang::ETK_Struct, clang::ETK_Typename, and clang::ETK_Union.
TagTypeKind TypeWithKeyword::getTagTypeKindForKeyword | ( | ElaboratedTypeKeyword | Keyword | ) | [static] |
getTagTypeKindForKeyword - Converts an elaborated type keyword into
which *isn't* a tag kind here.
Definition at line 1405 of file Type.cpp.
References clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_None, clang::ETK_Struct, clang::ETK_Typename, clang::ETK_Union, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.
Referenced by clang::TreeTransform< Derived >::RebuildDependentNameType().
TagTypeKind TypeWithKeyword::getTagTypeKindForTypeSpec | ( | unsigned | TypeSpec | ) | [static] |
getTagTypeKindForTypeSpec - Converts a type specifier (DeclSpec::TST) into a tag type kind. It is an error to provide a type specifier which *isn't* a tag kind here.
Definition at line 1380 of file Type.cpp.
References clang::TST_class, clang::TST_enum, clang::TST_interface, clang::TST_struct, clang::TST_union, clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplatedFriendTag(), and clang::Sema::CheckClassTemplate().
static StringRef clang::TypeWithKeyword::getTagTypeKindName | ( | TagTypeKind | Kind | ) | [inline, static] |
Definition at line 4005 of file Type.h.
Referenced by clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::TagDecl::getKindName(), and clang::Sema::isAcceptableTagRedeclaration().
bool TypeWithKeyword::KeywordIsTagTypeKind | ( | ElaboratedTypeKeyword | Keyword | ) | [static] |
Definition at line 1420 of file Type.cpp.
References clang::ETK_Class, clang::ETK_Enum, clang::ETK_Interface, clang::ETK_None, clang::ETK_Struct, clang::ETK_Typename, and clang::ETK_Union.
Referenced by clang::Type::isElaboratedTypeSpecifier().