15#ifndef LLVM_CLANG_BASIC_SPECIFIERS_H
16#define LLVM_CLANG_BASIC_SPECIFIERS_H
18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/DataTypes.h"
20#include "llvm/Support/ErrorHandling.h"
90#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) TST_##Trait,
91#include "clang/Basic/TransformTypeTraits.def"
97#define GENERIC_IMAGE_TYPE(ImgType, Id) TST_##ImgType##_t,
98#include "clang/Basic/OpenCLImageTypes.def"
105 static_assert(
TST_error < 1 << 7,
"Type bitfield not wide enough for TST");
112 LLVM_PREFERRED_TYPE(
bool)
226 llvm_unreachable(
"bad template specialization kind");
351 return uint8_t(L) > uint8_t(R);
356 bool isContextSensitive =
false);
405 llvm_unreachable(
"Unknown AccessSpecifier");
The base class of the type hierarchy.
TypeSpecifierType
Specifies the kind of type.
bool isTemplateInstantiation(TemplateSpecializationKind Kind)
Determine whether this template specialization kind refers to an instantiation of an entity (as oppos...
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
llvm::StringRef getParameterABISpelling(ParameterABI kind)
ConstexprSpecKind
Define the kind of constexpr specifier.
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
NullabilityKind
Describes the nullability of a particular type.
@ Nullable
Values of this type can be null.
@ NonNull
Values of this type can never be null.
InClassInitStyle
In-class initialization styles for non-static data members.
@ ICIS_CopyInit
Copy initialization.
@ ICIS_ListInit
Direct list-initialization.
@ ICIS_NoInit
No in-class initializer.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
@ OK_VectorComponent
A vector component is an element or range of elements on a vector.
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
@ OK_Ordinary
An ordinary object is located at an address in memory.
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
@ OK_MatrixComponent
A matrix component is a single element of a matrix.
StorageClass
Storage classes.
ThreadStorageClassSpecifier
Thread storage-class-specifier.
@ TSCS_thread_local
C++11 thread_local.
@ TSCS__Thread_local
C11 _Thread_local.
@ TSCS___thread
GNU __thread.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_Thread
Thread storage duration.
@ SD_Static
Static storage duration.
@ SD_FullExpression
Full-expression storage duration (for temporaries).
@ SD_Automatic
Automatic storage duration (most local variables).
@ SD_Dynamic
Dynamic storage duration.
llvm::StringRef getNullabilitySpelling(NullabilityKind kind, bool isContextSensitive=false)
Retrieve the spelling of the given nullability kind.
ParameterABI
Kinds of parameter ABI.
@ SwiftAsyncContext
This parameter (which must have pointer type) uses the special Swift asynchronous context-pointer ABI...
@ SwiftErrorResult
This parameter (which must have pointer-to-pointer type) uses the special Swift error-result ABI trea...
@ SwiftIndirectResult
This parameter (which must have pointer type) is a Swift indirect result parameter.
@ SwiftContext
This parameter (which must have pointer type) uses the special Swift context-pointer ABI treatment.
bool supportsVariadicCall(CallingConv CC)
Checks whether the given calling convention supports variadic calls.
bool hasWeakerNullability(NullabilityKind L, NullabilityKind R)
Return true if L has a weaker nullability annotation than R.
bool isLegalForFunction(StorageClass SC)
Checks whether the given storage class is legal for functions.
TypeSpecifierWidth
Specifies the width of a type, e.g., short, long, or long long.
TypeSpecifierSign
Specifies the signedness of a type, e.g., signed or unsigned.
bool isLegalForVariable(StorageClass SC)
Checks whether the given storage class is legal for variables.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool isTemplateExplicitInstantiationOrSpecialization(TemplateSpecializationKind Kind)
True if this template specialization kind is an explicit specialization, explicit instantiation decla...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
@ NOUR_None
This is an odr-use.
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
YAML serialization mapping.
Structure that packs information about the type specifiers that were written in a particular type spe...