clang 22.0.0git
Static Public Member Functions | List of all members
clang::KeywordHelpers Struct Reference

Provides a few static helpers for converting and printing elaborated type keyword and tag type kind enumerations. More...

#include "clang/AST/TypeBase.h"

Inheritance diagram for clang::KeywordHelpers:
[legend]

Static Public Member Functions

static ElaboratedTypeKeyword getKeywordForTypeSpec (unsigned TypeSpec)
 Converts a type specifier (DeclSpec::TST) into an elaborated type keyword.
 
static TagTypeKind getTagTypeKindForTypeSpec (unsigned TypeSpec)
 Converts a type specifier (DeclSpec::TST) into a tag type kind.
 
static ElaboratedTypeKeyword getKeywordForTagTypeKind (TagTypeKind Tag)
 Converts a TagTypeKind into an elaborated type keyword.
 
static TagTypeKind getTagTypeKindForKeyword (ElaboratedTypeKeyword Keyword)
 Converts an elaborated type keyword into a TagTypeKind.
 
static bool KeywordIsTagTypeKind (ElaboratedTypeKeyword Keyword)
 
static StringRef getKeywordName (ElaboratedTypeKeyword Keyword)
 
static StringRef getTagTypeKindName (TagTypeKind Kind)
 

Detailed Description

Provides a few static helpers for converting and printing elaborated type keyword and tag type kind enumerations.

Definition at line 5925 of file TypeBase.h.

Member Function Documentation

◆ getKeywordForTagTypeKind()

ElaboratedTypeKeyword KeywordHelpers::getKeywordForTagTypeKind ( TagTypeKind  Tag)
static

◆ getKeywordForTypeSpec()

ElaboratedTypeKeyword KeywordHelpers::getKeywordForTypeSpec ( unsigned  TypeSpec)
static

◆ getKeywordName()

StringRef KeywordHelpers::getKeywordName ( ElaboratedTypeKeyword  Keyword)
static

◆ getTagTypeKindForKeyword()

TagTypeKind KeywordHelpers::getTagTypeKindForKeyword ( ElaboratedTypeKeyword  Keyword)
static

Converts an elaborated type keyword into a TagTypeKind.

It is an error to provide an elaborated type keyword which isn't a tag kind here.

Definition at line 3281 of file Type.cpp.

References clang::Class, clang::Enum, clang::Interface, clang::Keyword, clang::None, clang::Struct, clang::Typename, and clang::Union.

Referenced by clang::Sema::CheckTemplateIdType(), and clang::TreeTransform< Derived >::RebuildDependentNameType().

◆ getTagTypeKindForTypeSpec()

TagTypeKind KeywordHelpers::getTagTypeKindForTypeSpec ( unsigned  TypeSpec)
static

◆ getTagTypeKindName()

static StringRef clang::KeywordHelpers::getTagTypeKindName ( TagTypeKind  Kind)
inlinestatic

◆ KeywordIsTagTypeKind()

bool KeywordHelpers::KeywordIsTagTypeKind ( ElaboratedTypeKeyword  Keyword)
static

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