clang: clang::DeclSpec Class Reference (original) (raw)

Captures information about "declaration specifiers". More...

#include "[clang/Sema/DeclSpec.h](DeclSpec%5F8h%5Fsource.html)"

Public Types
enum SCS { SCS_unspecified = 0 , SCS_typedef, SCS_extern, SCS_static, SCS_auto, SCS_register, SCS_private_extern, SCS_mutable }
storage-class-specifier More...
enum TSC { TSC_unspecified, TSC_imaginary, TSC_complex }
enum TQ { TQ_unspecified = 0 , TQ_const = 1 , TQ_restrict = 2 , TQ_volatile = 4 , TQ_unaligned = 8 , TQ_atomic = 16 }
enum ParsedSpecifiers { PQ_None = 0 , PQ_StorageClassSpecifier = 1 , PQ_TypeSpecifier = 2 , PQ_TypeQualifier = 4 , PQ_FunctionSpecifier = 8 }
ParsedSpecifiers - Flags to query which specifiers were applied. More...
enum FriendSpecified : bool { No, Yes }
typedef ThreadStorageClassSpecifier TSCS
typedef TypeSpecifierType TST
Public Member Functions
DeclSpec (AttributeFactory &attrFactory)
SCS getStorageClassSpec () const
TSCS getThreadStorageClassSpec () const
bool isExternInLinkageSpec () const
void setExternInLinkageSpec (bool Value)
SourceLocation getStorageClassSpecLoc () const
SourceLocation getThreadStorageClassSpecLoc () const
void ClearStorageClassSpecs ()
void ClearTypeSpecType ()
TypeSpecifierWidth getTypeSpecWidth () const
TSC getTypeSpecComplex () const
TypeSpecifierSign getTypeSpecSign () const
TST getTypeSpecType () const
bool isTypeAltiVecVector () const
bool isTypeAltiVecPixel () const
bool isTypeAltiVecBool () const
bool isTypeSpecOwned () const
bool isTypeRep () const
bool isTypeSpecPipe () const
bool isTypeSpecSat () const
bool isConstrainedAuto () const
ParsedType getRepAsType () const
Decl * getRepAsDecl () const
Expr * getRepAsExpr () const
Expr * getPackIndexingExpr () const
TemplateIdAnnotation * getRepAsTemplateId () const
CXXScopeSpec & getTypeSpecScope ()
const CXXScopeSpec & getTypeSpecScope () const
SourceRange getSourceRange () const LLVM_READONLY
SourceLocation getBeginLoc () const LLVM_READONLY
SourceLocation getEndLoc () const LLVM_READONLY
SourceLocation getTypeSpecWidthLoc () const
SourceRange getTypeSpecWidthRange () const
SourceLocation getTypeSpecComplexLoc () const
SourceLocation getTypeSpecSignLoc () const
SourceLocation getTypeSpecTypeLoc () const
SourceLocation getAltiVecLoc () const
SourceLocation getTypeSpecSatLoc () const
SourceLocation getTypeSpecTypeNameLoc () const
SourceRange getTypeofParensRange () const
void setTypeArgumentRange (SourceRange range)
bool hasAutoTypeSpec () const
bool hasTagDefinition () const
unsigned getTypeQualifiers () const
getTypeQualifiers - Return a set of TQs.
SourceLocation getConstSpecLoc () const
SourceLocation getRestrictSpecLoc () const
SourceLocation getVolatileSpecLoc () const
SourceLocation getAtomicSpecLoc () const
SourceLocation getUnalignedSpecLoc () const
SourceLocation getPipeLoc () const
SourceLocation getEllipsisLoc () const
void ClearTypeQualifiers ()
Clear out all of the type qualifiers.
bool isInlineSpecified () const
SourceLocation getInlineSpecLoc () const
ExplicitSpecifier getExplicitSpecifier () const
bool isVirtualSpecified () const
SourceLocation getVirtualSpecLoc () const
bool hasExplicitSpecifier () const
SourceLocation getExplicitSpecLoc () const
SourceRange getExplicitSpecRange () const
bool isNoreturnSpecified () const
SourceLocation getNoreturnSpecLoc () const
void ClearFunctionSpecs ()
void forEachCVRUQualifier (llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle)
This method calls the passed in handler on each CVRU qual being set.
void forEachQualifier (llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle)
This method calls the passed in handler on each qual being set.
bool hasTypeSpecifier () const
Return true if any type-specifier has been found.
unsigned getParsedSpecifiers () const
Return a bitmask of which flavors of specifiers this [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") includes.
bool isEmpty () const
isEmpty - Return true if this declaration specifier is completely empty: no tokens were parsed in the production of it.
void SetRangeStart (SourceLocation Loc)
void SetRangeEnd (SourceLocation Loc)
bool SetStorageClassSpec (Sema &S, SCS SC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
These methods set the specified attribute of the [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") and return false if there was no error.
bool SetStorageClassSpecThread (TSCS TSC, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecWidth (TypeSpecifierWidth W, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
These methods set the specified attribute of the [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers"."), but return true and ignore the request if invalid (e.g.
bool SetTypeSpecComplex (TSC C, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecSign (TypeSpecifierSign S, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ParsedType Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, TypeResult Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, Decl *Rep, bool Owned, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation TagKwLoc, SourceLocation TagNameLoc, const char *&PrevSpec, unsigned &DiagID, ParsedType Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation TagKwLoc, SourceLocation TagNameLoc, const char *&PrevSpec, unsigned &DiagID, Decl *Rep, bool Owned, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, TemplateIdAnnotation *Rep, const PrintingPolicy &Policy)
bool SetTypeSpecType (TST T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, Expr *Rep, const PrintingPolicy &policy)
bool SetTypeAltiVecVector (bool isAltiVecVector, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeAltiVecPixel (bool isAltiVecPixel, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeAltiVecBool (bool isAltiVecBool, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypePipe (bool isPipe, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetBitIntType (SourceLocation KWLoc, Expr *BitWidth, const char *&PrevSpec, unsigned &DiagID, const PrintingPolicy &Policy)
bool SetTypeSpecSat (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
void SetPackIndexingExpr (SourceLocation EllipsisLoc, Expr *Pack)
bool SetTypeSpecError ()
void UpdateDeclRep (Decl *Rep)
void UpdateTypeRep (ParsedType Rep)
void UpdateExprRep (Expr *Rep)
bool SetTypeQual (TQ T, SourceLocation Loc)
bool SetTypeQual (TQ T, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, const LangOptions &Lang)
bool setFunctionSpecInline (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecForceInline (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecVirtual (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setFunctionSpecExplicit (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, ExplicitSpecifier ExplicitSpec, SourceLocation CloseParenLoc)
bool setFunctionSpecNoreturn (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetFriendSpec (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool setModulePrivateSpec (SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
bool SetConstexprSpec (ConstexprSpecKind ConstexprKind, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID)
FriendSpecified isFriendSpecified () const
bool isFriendSpecifiedFirst () const
SourceLocation getFriendSpecLoc () const
bool isModulePrivateSpecified () const
SourceLocation getModulePrivateSpecLoc () const
ConstexprSpecKind getConstexprSpecifier () const
SourceLocation getConstexprSpecLoc () const
bool hasConstexprSpecifier () const
void ClearConstexprSpec ()
AttributePool & getAttributePool () const
void addAttributes (const ParsedAttributesView &AL)
Concatenates two attribute lists.
bool hasAttributes () const
ParsedAttributes & getAttributes ()
const ParsedAttributes & getAttributes () const
void takeAttributesAppendingingFrom (ParsedAttributes &attrs)
void Finish (Sema &S, const PrintingPolicy &Policy)
Finish - This does final analysis of the declspec, issuing diagnostics for things like "_Complex" (lacking an FP type).
const WrittenBuiltinSpecs & getWrittenBuiltinSpecs () const
ObjCDeclSpec * getObjCQualifiers () const
void setObjCQualifiers (ObjCDeclSpec *quals)
bool isMissingDeclaratorOk ()
Checks if this [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") can stand alone, without a Declarator.
Static Public Member Functions
static bool isDeclRep (TST T)
static bool isTransformTypeTrait (TST T)
static const char * getSpecifierName (DeclSpec::TST T, const PrintingPolicy &Policy)
Turn a type-specifier-type into a string like "_Bool" or "union".
static const char * getSpecifierName (DeclSpec::TQ Q)
static const char * getSpecifierName (TypeSpecifierSign S)
static const char * getSpecifierName (DeclSpec::TSC C)
static const char * getSpecifierName (TypeSpecifierWidth W)
static const char * getSpecifierName (DeclSpec::SCS S)
static const char * getSpecifierName (DeclSpec::TSCS S)
static const char * getSpecifierName (ConstexprSpecKind C)
Static Public Attributes
static const TSCS TSCS_unspecified = clang::TSCS_unspecified
static const TSCS TSCS___thread = clang::TSCS___thread
static const TSCS TSCS_thread_local = clang::TSCS_thread_local
static const TSCS TSCS__Thread_local = clang::TSCS__Thread_local
static const TST TST_unspecified = clang::TST_unspecified
static const TST TST_void = clang::TST_void
static const TST TST_char = clang::TST_char
static const TST TST_wchar = clang::TST_wchar
static const TST TST_char8 = clang::TST_char8
static const TST TST_char16 = clang::TST_char16
static const TST TST_char32 = clang::TST_char32
static const TST TST_int = clang::TST_int
static const TST TST_int128 = clang::TST_int128
static const TST TST_bitint = clang::TST_bitint
static const TST TST_half = clang::TST_half
static const TST TST_BFloat16 = clang::TST_BFloat16
static const TST TST_float = clang::TST_float
static const TST TST_double = clang::TST_double
static const TST TST_float16 = clang::TST_Float16
static const TST TST_accum = clang::TST_Accum
static const TST TST_fract = clang::TST_Fract
static const TST TST_float128 = clang::TST_float128
static const TST TST_ibm128 = clang::TST_ibm128
static const TST TST_bool = clang::TST_bool
static const TST TST_decimal32 = clang::TST_decimal32
static const TST TST_decimal64 = clang::TST_decimal64
static const TST TST_decimal128 = clang::TST_decimal128
static const TST TST_enum = clang::TST_enum
static const TST TST_union = clang::TST_union
static const TST TST_struct = clang::TST_struct
static const TST TST_interface = clang::TST_interface
static const TST TST_class = clang::TST_class
static const TST TST_typename = clang::TST_typename
static const TST TST_typeofType = clang::TST_typeofType
static const TST TST_typeofExpr = clang::TST_typeofExpr
static const TST TST_typeof_unqualType = clang::TST_typeof_unqualType
static const TST TST_typeof_unqualExpr = clang::TST_typeof_unqualExpr
static const TST TST_decltype = clang::TST_decltype
static const TST TST_decltype_auto = clang::TST_decltype_auto
static const TST TST_typename_pack_indexing
static const TST TST_auto = clang::TST_auto
static const TST TST_auto_type = clang::TST_auto_type
static const TST TST_unknown_anytype = clang::TST_unknown_anytype
static const TST TST_atomic = clang::TST_atomic
static const TST TST_error = clang::TST_error

Captures information about "declaration specifiers".

"Declaration specifiers" encompasses storage-class-specifiers, type-specifiers, type-qualifiers, and function-specifiers.

Definition at line 217 of file DeclSpec.h.

TSCS

TST

FriendSpecified

ParsedSpecifiers

ParsedSpecifiers - Flags to query which specifiers were applied.

This is returned by getParsedSpecifiers.

Enumerator
PQ_None
PQ_StorageClassSpecifier
PQ_TypeSpecifier
PQ_TypeQualifier
PQ_FunctionSpecifier

Definition at line 314 of file DeclSpec.h.

SCS

storage-class-specifier

Note

The order of these enumerators is important for diagnostics.

Enumerator
SCS_unspecified
SCS_typedef
SCS_extern
SCS_static
SCS_auto
SCS_register
SCS_private_extern
SCS_mutable

Definition at line 221 of file DeclSpec.h.

TQ

Enumerator
TQ_unspecified
TQ_const
TQ_restrict
TQ_volatile
TQ_unaligned
TQ_atomic

Definition at line 301 of file DeclSpec.h.

TSC

Enumerator
TSC_unspecified
TSC_imaginary
TSC_complex

Definition at line 240 of file DeclSpec.h.

addAttributes()

ClearConstexprSpec()

void clang::DeclSpec::ClearConstexprSpec ( ) inline

ClearFunctionSpecs()

void clang::DeclSpec::ClearFunctionSpecs ( ) inline

ClearStorageClassSpecs()

void clang::DeclSpec::ClearStorageClassSpecs ( ) inline

ClearTypeQualifiers()

void clang::DeclSpec::ClearTypeQualifiers ( ) inline

ClearTypeSpecType()

void clang::DeclSpec::ClearTypeSpecType ( ) inline

Finish()

Finish - This does final analysis of the declspec, issuing diagnostics for things like "_Complex" (lacking an FP type).

Finish - This does final analysis of the declspec, rejecting things like "_Complex" (lacking an FP type).

After calling this method, [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") is guaranteed self-consistent, even if an error occurred.

After calling this method, [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") is guaranteed to be self-consistent, even if an error occurred.

Definition at line 1128 of file DeclSpec.cpp.

References ClearStorageClassSpecs(), clang::Consteval, clang::Constexpr, clang::Constinit, clang::Sema::Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), getConstexprSpecifier(), getExplicitSpecLoc(), getExplicitSpecRange(), clang::Sema::getLangOpts(), clang::Sema::getLocForEndOfToken(), clang::Sema::getSourceManager(), getSpecifierName(), getStorageClassSpec(), getStorageClassSpecLoc(), clang::ASTContext::getTargetInfo(), getThreadStorageClassSpec(), getThreadStorageClassSpecLoc(), clang::TargetInfo::getTriple(), getTypeSpecComplexLoc(), getTypeSpecSign(), getTypeSpecType(), getTypeSpecWidth(), getVirtualSpecLoc(), hasExplicitSpecifier(), clang::TargetInfo::hasFeature(), clang::LangOptionsBase::HLSL_202y, clang::SourceManager::isBeforeInTranslationUnit(), isDeclRep(), isFriendSpecified(), clang::SourceLocation::isInvalid(), isVirtualSpecified(), clang::Keyword, clang::Long, clang::LongLong, SCS_auto, SCS_extern, SCS_private_extern, SCS_static, SCS_unspecified, clang::Short, TSC_unspecified, TSCS_unspecified, TST_accum, TST_auto, TST_bitint, TST_char, TST_char16, TST_char32, TST_char8, TST_decltype_auto, TST_double, TST_error, TST_float, TST_float128, TST_float16, TST_fract, TST_ibm128, TST_int, TST_int128, TST_unspecified, TST_wchar, clang::Unsigned, and clang::Unspecified.

forEachCVRUQualifier()

void DeclSpec::forEachCVRUQualifier ( llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle )

forEachQualifier()

void DeclSpec::forEachQualifier ( llvm::function_ref< void(TQ, StringRef, SourceLocation)> Handle )

getAltiVecLoc()

getAtomicSpecLoc()

getAttributePool()

AttributePool & clang::DeclSpec::getAttributePool ( ) const inline

getAttributes() [1/2]

Definition at line 843 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), addContextSensitiveTypeNullability(), checkOmittedBlockReturnType(), clang::Sema::checkUnusedDeclAttributes(), ConvertDeclSpecToType(), distributeObjCPointerTypeAttrFromDeclarator(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::DeclaratorChunk::getFunction(), GetTypeSourceInfoForDeclarator(), hasParsedAttr(), clang::Sema::ImplicitlyDefineFunction(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Parser::ParseTypeName(), clang::Sema::ProcessDeclAttributes(), and takeDeclAttributes().

getAttributes() [2/2]

getBeginLoc()

Definition at line 545 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::CheckDeductionGuideDeclarator(), ConvertDeclSpecToType(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), and clang::Sema::ParsedFreeStandingDeclSpec().

getConstexprSpecifier()

getConstexprSpecLoc()

getConstSpecLoc()

getEllipsisLoc()

getEndLoc()

getExplicitSpecifier()

getExplicitSpecLoc()

getExplicitSpecRange()

SourceRange clang::DeclSpec::getExplicitSpecRange ( ) const inline

getFriendSpecLoc()

getInlineSpecLoc()

Definition at line 610 of file DeclSpec.h.

Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckMain(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), and clang::Sema::ParsedFreeStandingDeclSpec().

getModulePrivateSpecLoc()

SourceLocation clang::DeclSpec::getModulePrivateSpecLoc ( ) const inline

getNoreturnSpecLoc()

getObjCQualifiers()

ObjCDeclSpec * clang::DeclSpec::getObjCQualifiers ( ) const inline

getPackIndexingExpr()

Expr * clang::DeclSpec::getPackIndexingExpr ( ) const inline

getParsedSpecifiers()

unsigned DeclSpec::getParsedSpecifiers ( ) const

Return a bitmask of which flavors of specifiers this [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") includes.

getParsedSpecifiers - Return a bitmask of which flavors of specifiers this declaration specifier includes.

Definition at line 442 of file DeclSpec.cpp.

References hasExplicitSpecifier(), hasTypeSpecifier(), PQ_FunctionSpecifier, PQ_StorageClassSpecifier, PQ_TypeQualifier, PQ_TypeSpecifier, SCS_unspecified, TQ_unspecified, and TSCS_unspecified.

Referenced by clang::SemaCodeCompletion::CodeCompleteDeclSpec(), GetDeclSpecTypeForDeclarator(), isEmpty(), and warnAboutRedundantParens().

getPipeLoc()

getRepAsDecl()

Decl * clang::DeclSpec::getRepAsDecl ( ) const inline

Definition at line 521 of file DeclSpec.h.

References DeclRep, and isDeclRep().

Referenced by ConvertDeclSpecToType(), DiagnoseCountAttributedTypeInUnnamedAnon(), clang::Sema::FinalizeDeclaratorGroup(), GetDeclSpecTypeForDeclarator(), GetDiagnosticTypeSpecifierID(), GetFullTypeForDeclarator(), hasTagDefinition(), isMissingDeclaratorOk(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::ParseTypedefDecl(), and clang::Parser::ParseTypeName().

getRepAsExpr()

Expr * clang::DeclSpec::getRepAsExpr ( ) const inline

getRepAsTemplateId()

getRepAsType()

ParsedType clang::DeclSpec::getRepAsType ( ) const inline

getRestrictSpecLoc()

getSourceRange()

SourceRange clang::DeclSpec::getSourceRange ( ) const inline

getSpecifierName() [1/8]

getSpecifierName() [2/8]

const char * DeclSpec::getSpecifierName ( DeclSpec::SCS S) static

getSpecifierName() [3/8]

const char * DeclSpec::getSpecifierName ( DeclSpec::TQ Q) static

getSpecifierName() [4/8]

const char * DeclSpec::getSpecifierName ( DeclSpec::TSC C) static

getSpecifierName() [5/8]

getSpecifierName() [6/8]

Turn a type-specifier-type into a string like "_Bool" or "union".

Definition at line 532 of file DeclSpec.cpp.

References clang::PrintingPolicy::Bool, clang::PrintingPolicy::MSWChar, clang::T, TST_accum, TST_atomic, TST_auto, TST_auto_type, TST_BFloat16, TST_bitint, TST_bool, TST_char, TST_char16, TST_char32, TST_char8, TST_class, TST_decimal128, TST_decimal32, TST_decimal64, TST_decltype, TST_decltype_auto, TST_double, TST_enum, TST_error, TST_float, TST_float128, TST_float16, TST_fract, TST_half, TST_ibm128, TST_int, TST_int128, TST_interface, TST_struct, TST_typename, TST_typename_pack_indexing, TST_typeof_unqualExpr, TST_typeof_unqualType, TST_typeofExpr, TST_typeofType, TST_union, TST_unknown_anytype, TST_unspecified, TST_void, and TST_wchar.

Referenced by clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnVariableDeclarator(), BadSpecifier(), ConvertDeclSpecToType(), diagnoseAndRemoveTypeQualifiers(), Finish(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::Sema::ParsedFreeStandingDeclSpec(), SetBitIntType(), SetStorageClassSpec(), SetTypeAltiVecBool(), SetTypeAltiVecPixel(), SetTypeAltiVecVector(), SetTypePipe(), SetTypeSpecType(), SetTypeSpecType(), SetTypeSpecType(), and SetTypeSpecType().

getSpecifierName() [7/8]

getSpecifierName() [8/8]

getStorageClassSpec()

SCS clang::DeclSpec::getStorageClassSpec ( ) const inline

Definition at line 471 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::CheckExplicitObjectMemberFunction(), ConvertDeclSpecToType(), Finish(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getLambdaType(), clang::Sema::HandleDeclarator(), clang::Declarator::isStaticMember(), clang::Sema::ParsedFreeStandingDeclSpec(), StorageClassSpecToVarDeclStorageClass(), and warnAboutAmbiguousFunction().

getStorageClassSpecLoc()

SourceLocation clang::DeclSpec::getStorageClassSpecLoc ( ) const inline

Definition at line 480 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckMain(), Finish(), getFunctionStorageClass(), and clang::Sema::ParsedFreeStandingDeclSpec().

getThreadStorageClassSpec()

TSCS clang::DeclSpec::getThreadStorageClassSpec ( ) const inline

getThreadStorageClassSpecLoc()

SourceLocation clang::DeclSpec::getThreadStorageClassSpecLoc ( ) const inline

getTypeofParensRange()

SourceRange clang::DeclSpec::getTypeofParensRange ( ) const inline

getTypeQualifiers()

unsigned clang::DeclSpec::getTypeQualifiers ( ) const inline

getTypeQualifiers - Return a set of TQs.

Definition at line 586 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFriendTypeDecl(), AddTypeQualifierResults(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), checkOmittedBlockReturnType(), ConvertDeclSpecToType(), diagnoseRedundantReturnTypeQualifiers(), GetFullTypeForDeclarator(), clang::DeclaratorChunk::getFunction(), clang::Sema::ParsedFreeStandingDeclSpec(), and warnAboutRedundantParens().

getTypeSpecComplex()

TSC clang::DeclSpec::getTypeSpecComplex ( ) const inline

getTypeSpecComplexLoc()

SourceLocation clang::DeclSpec::getTypeSpecComplexLoc ( ) const inline

getTypeSpecSatLoc()

getTypeSpecScope() [1/2]

getTypeSpecScope() [2/2]

const CXXScopeSpec & clang::DeclSpec::getTypeSpecScope ( ) const inline

getTypeSpecSign()

getTypeSpecSignLoc()

getTypeSpecType()

TST clang::DeclSpec::getTypeSpecType ( ) const inline

Definition at line 507 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::BuildMemInitializer(), clang::SemaCodeCompletion::CodeCompleteDeclSpec(), clang::Sema::containsUnexpandedParameterPacks(), ConvertDeclSpecToType(), DiagnoseCountAttributedTypeInUnnamedAnon(), clang::Sema::FinalizeDeclaratorGroup(), Finish(), clang::Sema::getDestructorTypeForDecltype(), GetDiagnosticTypeSpecifierID(), GetFullTypeForDeclarator(), hasTypeSpecifier(), isMissingDeclaratorOk(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::ParseTypedefDecl(), and RebuildDeclaratorInCurrentInstantiation().

getTypeSpecTypeLoc()

Definition at line 552 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDestructorTypeForDecltype(), GetFullTypeForDeclarator(), InventTemplateParameter(), and RebuildDeclaratorInCurrentInstantiation().

getTypeSpecTypeNameLoc()

SourceLocation clang::DeclSpec::getTypeSpecTypeNameLoc ( ) const inline

getTypeSpecWidth()

getTypeSpecWidthLoc()

getTypeSpecWidthRange()

SourceRange clang::DeclSpec::getTypeSpecWidthRange ( ) const inline

getUnalignedSpecLoc()

getVirtualSpecLoc()

getVolatileSpecLoc()

getWrittenBuiltinSpecs()

hasAttributes()

bool clang::DeclSpec::hasAttributes ( ) const inline

hasAutoTypeSpec()

bool clang::DeclSpec::hasAutoTypeSpec ( ) const inline

hasConstexprSpecifier()

bool clang::DeclSpec::hasConstexprSpecifier ( ) const inline

hasExplicitSpecifier()

bool clang::DeclSpec::hasExplicitSpecifier ( ) const inline

hasTagDefinition()

bool DeclSpec::hasTagDefinition ( ) const

hasTypeSpecifier()

bool clang::DeclSpec::hasTypeSpecifier ( ) const inline

Return true if any type-specifier has been found.

Definition at line 661 of file DeclSpec.h.

References getTypeSpecComplex(), getTypeSpecSign(), getTypeSpecType(), getTypeSpecWidth(), TSC_unspecified, TST_unspecified, and clang::Unspecified.

Referenced by clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), ConvertDeclSpecToType(), getParsedSpecifiers(), and isOmittedBlockReturnType().

isConstrainedAuto()

bool clang::DeclSpec::isConstrainedAuto ( ) const inline

isDeclRep()

bool clang::DeclSpec::isDeclRep ( TST T) inlinestatic

Definition at line 439 of file DeclSpec.h.

References clang::T, TST_class, TST_enum, TST_interface, TST_struct, and TST_union.

Referenced by clang::Sema::FinalizeDeclaratorGroup(), Finish(), getRepAsDecl(), getTypeSpecTypeNameLoc(), isMissingDeclaratorOk(), SetTypeSpecType(), SetTypeSpecType(), and UpdateDeclRep().

isEmpty()

bool clang::DeclSpec::isEmpty ( ) const inline

isExternInLinkageSpec()

bool clang::DeclSpec::isExternInLinkageSpec ( ) const inline

isFriendSpecified()

FriendSpecified clang::DeclSpec::isFriendSpecified ( ) const inline

Definition at line 791 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), CreateNewFunctionDecl(), Finish(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::isDeclaratorFunctionLike(), clang::Declarator::isFirstDeclarationOfMember(), clang::Sema::ParsedFreeStandingDeclSpec(), and SetFriendSpec().

isFriendSpecifiedFirst()

bool clang::DeclSpec::isFriendSpecifiedFirst ( ) const inline

isInlineSpecified()

bool clang::DeclSpec::isInlineSpecified ( ) const inline

Definition at line 607 of file DeclSpec.h.

Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), CreateNewFunctionDecl(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), and clang::Sema::ParsedFreeStandingDeclSpec().

isMissingDeclaratorOk()

bool DeclSpec::isMissingDeclaratorOk ( )

isModulePrivateSpecified()

bool clang::DeclSpec::isModulePrivateSpecified ( ) const inline

isNoreturnSpecified()

bool clang::DeclSpec::isNoreturnSpecified ( ) const inline

isTransformTypeTrait()

bool clang::DeclSpec::isTransformTypeTrait ( TST T) inlinestatic

isTypeAltiVecBool()

bool clang::DeclSpec::isTypeAltiVecBool ( ) const inline

isTypeAltiVecPixel()

bool clang::DeclSpec::isTypeAltiVecPixel ( ) const inline

isTypeAltiVecVector()

bool clang::DeclSpec::isTypeAltiVecVector ( ) const inline

isTypeRep()

bool clang::DeclSpec::isTypeRep ( ) const inline

isTypeSpecOwned()

bool clang::DeclSpec::isTypeSpecOwned ( ) const inline

isTypeSpecPipe()

bool clang::DeclSpec::isTypeSpecPipe ( ) const inline

isTypeSpecSat()

bool clang::DeclSpec::isTypeSpecSat ( ) const inline

isVirtualSpecified()

bool clang::DeclSpec::isVirtualSpecified ( ) const inline

SetBitIntType()

SetConstexprSpec()

setExternInLinkageSpec()

void clang::DeclSpec::setExternInLinkageSpec ( bool Value) inline

SetFriendSpec()

setFunctionSpecExplicit()

setFunctionSpecForceInline()

setFunctionSpecInline()

setFunctionSpecNoreturn()

setFunctionSpecVirtual()

setModulePrivateSpec()

setObjCQualifiers()

void clang::DeclSpec::setObjCQualifiers ( ObjCDeclSpec * quals) inline

SetPackIndexingExpr()

SetRangeEnd()

SetRangeStart()

SetStorageClassSpec()

These methods set the specified attribute of the [DeclSpec](classclang%5F1%5F1DeclSpec.html "Captures information about "declaration specifiers".") and return false if there was no error.

If an error occurs (for example, if we tried to set "auto" on a spec with "extern" already set), they return true and set PrevSpec and DiagID such that Diag(Loc, DiagID) << PrevSpec; will yield a useful result.

TODO: use a more general approach that still allows these diagnostics to be ignored when desired.

Definition at line 619 of file DeclSpec.cpp.

References BadSpecifier(), clang::Sema::getLangOpts(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::Sema::getOpenCLOptions(), getSpecifierName(), clang::OpenCLOptions::isAvailableOption(), isInvalid(), SCS_auto, SCS_extern, SCS_private_extern, SCS_register, SCS_static, SCS_typedef, SCS_unspecified, SetTypeSpecType(), TST_auto, and TST_unspecified.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), addStaticToLambdaDeclSpecifier(), and clang::Sema::BuildAnonymousStructOrUnion().

SetStorageClassSpecThread()

SetTypeAltiVecBool()

SetTypeAltiVecPixel()

SetTypeAltiVecVector()

setTypeArgumentRange()

void clang::DeclSpec::setTypeArgumentRange ( SourceRange range) inline

SetTypePipe()

SetTypeQual() [1/2]

SetTypeQual() [2/2]

SetTypeSpecComplex()

SetTypeSpecError()

bool DeclSpec::SetTypeSpecError ( )

SetTypeSpecSat()

SetTypeSpecSign()

SetTypeSpecType() [1/8]

Definition at line 834 of file DeclSpec.cpp.

References getSpecifierName(), isDeclRep(), isTypeRep(), clang::T, TST_bool, TST_error, and TST_unspecified.

Referenced by clang::Sema::ActOnCXXForRangeIdentifier(), clang::Sema::ActOnFinishKNRParamDeclarations(), clang::SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ImplicitlyDefineFunction(), SetStorageClassSpec(), SetTypeSpecType(), SetTypeSpecType(), SetTypeSpecType(), and SetTypeSpecType().

SetTypeSpecType() [2/8]

SetTypeSpecType() [3/8]

SetTypeSpecType() [4/8]

SetTypeSpecType() [5/8]

SetTypeSpecType() [6/8]

SetTypeSpecType() [7/8]

SetTypeSpecType() [8/8]

SetTypeSpecWidth()

takeAttributesAppendingingFrom()

void clang::DeclSpec::takeAttributesAppendingingFrom ( ParsedAttributes & attrs) inline

UpdateDeclRep()

void clang::DeclSpec::UpdateDeclRep ( Decl * Rep) inline

UpdateExprRep()

void clang::DeclSpec::UpdateExprRep ( Expr * Rep) inline

UpdateTypeRep()

void clang::DeclSpec::UpdateTypeRep ( ParsedType Rep) inline

DeclRep

Decl* clang::DeclSpec::DeclRep

ExprRep

Expr* clang::DeclSpec::ExprRep

TemplateIdRep

TSCS___thread

const TSCS clang::DeclSpec::TSCS___thread = clang::TSCS___thread static

TSCS__Thread_local

const TSCS clang::DeclSpec::TSCS__Thread_local = clang::TSCS__Thread_local static

TSCS_thread_local

const TSCS clang::DeclSpec::TSCS_thread_local = clang::TSCS_thread_local static

TSCS_unspecified

const TSCS clang::DeclSpec::TSCS_unspecified = clang::TSCS_unspecified static

TST_accum

TST_atomic

const TST clang::DeclSpec::TST_atomic = clang::TST_atomic static

TST_auto

const TST clang::DeclSpec::TST_auto = clang::TST_auto static

TST_auto_type

const TST clang::DeclSpec::TST_auto_type = clang::TST_auto_type static

TST_BFloat16

const TST clang::DeclSpec::TST_BFloat16 = clang::TST_BFloat16 static

TST_bitint

const TST clang::DeclSpec::TST_bitint = clang::TST_bitint static

TST_bool

const TST clang::DeclSpec::TST_bool = clang::TST_bool static

TST_char

const TST clang::DeclSpec::TST_char = clang::TST_char static

TST_char16

const TST clang::DeclSpec::TST_char16 = clang::TST_char16 static

TST_char32

const TST clang::DeclSpec::TST_char32 = clang::TST_char32 static

TST_char8

const TST clang::DeclSpec::TST_char8 = clang::TST_char8 static

TST_class

const TST clang::DeclSpec::TST_class = clang::TST_class static

TST_decimal128

const TST clang::DeclSpec::TST_decimal128 = clang::TST_decimal128 static

TST_decimal32

const TST clang::DeclSpec::TST_decimal32 = clang::TST_decimal32 static

TST_decimal64

const TST clang::DeclSpec::TST_decimal64 = clang::TST_decimal64 static

TST_decltype

const TST clang::DeclSpec::TST_decltype = clang::TST_decltype static

TST_decltype_auto

const TST clang::DeclSpec::TST_decltype_auto = clang::TST_decltype_auto static

TST_double

const TST clang::DeclSpec::TST_double = clang::TST_double static

TST_enum

const TST clang::DeclSpec::TST_enum = clang::TST_enum static

TST_error

const TST clang::DeclSpec::TST_error = clang::TST_error static

Definition at line 298 of file DeclSpec.h.

Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnPseudoDestructorExpr(), ConvertDeclSpecToType(), Finish(), clang::Sema::getDestructorTypeForDecltype(), getSpecifierName(), clang::Declarator::isInvalidType(), clang::Sema::ParsedFreeStandingDeclSpec(), SetBitIntType(), SetTypeAltiVecBool(), SetTypeAltiVecPixel(), SetTypeAltiVecVector(), SetTypePipe(), SetTypeSpecError(), SetTypeSpecType(), SetTypeSpecType(), SetTypeSpecType(), and SetTypeSpecType().

TST_float

const TST clang::DeclSpec::TST_float = clang::TST_float static

TST_float128

const TST clang::DeclSpec::TST_float128 = clang::TST_float128 static

TST_float16

TST_fract

TST_half

const TST clang::DeclSpec::TST_half = clang::TST_half static

TST_ibm128

const TST clang::DeclSpec::TST_ibm128 = clang::TST_ibm128 static

TST_int

const TST clang::DeclSpec::TST_int = clang::TST_int static

TST_int128

const TST clang::DeclSpec::TST_int128 = clang::TST_int128 static

TST_interface

const TST clang::DeclSpec::TST_interface = clang::TST_interface static

TST_struct

const TST clang::DeclSpec::TST_struct = clang::TST_struct static

TST_typename

const TST clang::DeclSpec::TST_typename = clang::TST_typename static

TST_typename_pack_indexing

const TST clang::DeclSpec::TST_typename_pack_indexing static

TST_typeof_unqualExpr

const TST clang::DeclSpec::TST_typeof_unqualExpr = clang::TST_typeof_unqualExpr static

TST_typeof_unqualType

const TST clang::DeclSpec::TST_typeof_unqualType = clang::TST_typeof_unqualType static

TST_typeofExpr

const TST clang::DeclSpec::TST_typeofExpr = clang::TST_typeofExpr static

TST_typeofType

const TST clang::DeclSpec::TST_typeofType = clang::TST_typeofType static

TST_union

const TST clang::DeclSpec::TST_union = clang::TST_union static

TST_unknown_anytype

const TST clang::DeclSpec::TST_unknown_anytype = clang::TST_unknown_anytype static

TST_unspecified

const TST clang::DeclSpec::TST_unspecified = clang::TST_unspecified static

Definition at line 248 of file DeclSpec.h.

Referenced by ClearTypeSpecType(), ConvertDeclSpecToType(), DeclSpec(), Finish(), getSpecifierName(), hasTypeSpecifier(), clang::Sema::isTagName(), SetBitIntType(), SetStorageClassSpec(), SetTypeAltiVecBool(), SetTypeAltiVecPixel(), SetTypeAltiVecVector(), SetTypePipe(), SetTypeSpecType(), SetTypeSpecType(), SetTypeSpecType(), and SetTypeSpecType().

TST_void

const TST clang::DeclSpec::TST_void = clang::TST_void static

TST_wchar

const TST clang::DeclSpec::TST_wchar = clang::TST_wchar static

TypeRep


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