clang 22.0.0git
|
C Language Family Type Representation. More...
#include "clang/AST/DependenceFlags.h"
#include "clang/AST/NestedNameSpecifierBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/AttrKinds.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Linkage.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/PointerAuthOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/Visibility.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DXILABI.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
#include "llvm/Support/TrailingObjects.h"
#include "llvm/Support/type_traits.h"
#include <bitset>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <optional>
#include <string>
#include <type_traits>
#include <utility>
#include "clang/AST/TypeNodes.inc"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/Basic/AArch64ACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/Basic/AMDGPUTypes.def"
#include "clang/AST/BuiltinTypes.def"
#include "clang/Basic/TransformTypeTraits.def"
Go to the source code of this file.
Classes | |
struct | llvm::PointerLikeTypeTraits< ::clang::Type * > |
struct | llvm::PointerLikeTypeTraits< ::clang::ExtQuals * > |
class | clang::PointerAuthQualifier |
Pointer-authentication qualifiers. More... | |
class | clang::Qualifiers |
The collection of all-type qualifiers we support. More... | |
class | clang::QualifiersAndAtomic |
struct | clang::SplitQualType |
A std::pair-like structure for storing a qualified type split into its local qualifiers and its locally-unqualified type. More... | |
class | clang::QualType |
A (possibly-)qualified type. More... | |
class | clang::QualType::StreamedQualTypeHelper |
struct | llvm::simplify_type< ::clang::QualType > |
Implement simplify_type for QualType, so that we can dyn_cast from QualType to a specific Type class. More... | |
struct | llvm::PointerLikeTypeTraits< clang::QualType > |
class | clang::ExtQualsTypeCommonBase |
Base class that is common to both the ExtQuals and Type classes, which allows QualType to access the common fields between the two. More... | |
class | clang::ExtQuals |
We can encode up to four bits in the low bits of a type pointer, but there are many more type qualifiers that we want to be able to apply to an arbitrary type. More... | |
class | clang::Type |
The base class of the type hierarchy. More... | |
class | clang::Type::ArrayTypeBitfields |
class | clang::Type::ConstantArrayTypeBitfields |
class | clang::Type::BuiltinTypeBitfields |
class | clang::Type::FunctionTypeBitfields |
FunctionTypeBitfields store various bits belonging to FunctionProtoType. More... | |
class | clang::Type::ObjCObjectTypeBitfields |
class | clang::Type::ReferenceTypeBitfields |
class | clang::Type::KeywordWrapperBitfields |
class | clang::Type::TagTypeBitfields |
class | clang::Type::VectorTypeBitfields |
class | clang::Type::AttributedTypeBitfields |
class | clang::Type::AutoTypeBitfields |
class | clang::Type::TypeOfBitfields |
class | clang::Type::UnresolvedUsingBitfields |
class | clang::Type::UsingBitfields |
class | clang::Type::TypedefBitfields |
class | clang::Type::TemplateTypeParmTypeBitfields |
class | clang::Type::SubstTemplateTypeParmTypeBitfields |
class | clang::Type::SubstPackTypeBitfields |
class | clang::Type::TemplateSpecializationTypeBitfields |
class | clang::Type::DependentTemplateSpecializationTypeBitfields |
class | clang::Type::PackExpansionTypeBitfields |
class | clang::Type::PresefinedSugarTypeBitfields |
class | clang::Type::CountAttributedTypeBitfields |
class | clang::BuiltinType |
This class is used for builtin types like 'int'. More... | |
class | clang::ComplexType |
Complex values, per C99 6.2.5p11. More... | |
class | clang::ParenType |
Sugar for parentheses used when specifying types. More... | |
class | clang::PointerType |
PointerType - C99 6.7.5.1 - Pointer Declarators. More... | |
class | clang::TypeCoupledDeclRefInfo |
[BoundsSafety] Represents information of declarations referenced by the arguments of the counted_by attribute and the likes. More... | |
class | clang::BoundsAttributedType |
[BoundsSafety] Represents a parent type class for CountAttributedType and similar sugar types that will be introduced to represent a type with a bounds attribute. More... | |
class | clang::CountAttributedType |
Represents a sugar type with __counted_by or __sized_by annotations, including their _or_null variants. More... | |
class | clang::AdjustedType |
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons. More... | |
class | clang::DecayedType |
Represents a pointer type decayed from an array or function type. More... | |
class | clang::BlockPointerType |
Pointer to a block type. More... | |
class | clang::ReferenceType |
Base for LValueReferenceType and RValueReferenceType. More... | |
class | clang::LValueReferenceType |
An lvalue reference type, per C++11 [dcl.ref]. More... | |
class | clang::RValueReferenceType |
An rvalue reference type, per C++11 [dcl.ref]. More... | |
class | clang::MemberPointerType |
A pointer to member type per C++ 8.3.3 - Pointers to members. More... | |
class | clang::ArrayType |
Represents an array type, per C99 6.7.5.2 - Array Declarators. More... | |
class | clang::ConstantArrayType |
Represents the canonical version of C arrays with a specified constant size. More... | |
class | clang::ArrayParameterType |
Represents a constant array type that does not decay to a pointer when used as a function parameter. More... | |
class | clang::IncompleteArrayType |
Represents a C array with an unspecified size. More... | |
class | clang::VariableArrayType |
Represents a C array with a specified size that is not an integer-constant-expression. More... | |
class | clang::DependentSizedArrayType |
Represents an array type in C++ whose size is a value-dependent expression. More... | |
class | clang::DependentAddressSpaceType |
Represents an extended address space qualifier where the input address space value is dependent. More... | |
class | clang::DependentSizedExtVectorType |
Represents an extended vector type where either the type or size is dependent. More... | |
class | clang::VectorType |
Represents a GCC generic vector type. More... | |
class | clang::DependentVectorType |
Represents a vector type where either the type or size is dependent. More... | |
class | clang::ExtVectorType |
ExtVectorType - Extended vector type. More... | |
class | clang::MatrixType |
Represents a matrix type, as defined in the Matrix Types clang extensions. More... | |
class | clang::ConstantMatrixType |
Represents a concrete matrix type with constant number of rows and columns. More... | |
class | clang::DependentSizedMatrixType |
Represents a matrix type where the type and the number of rows and columns is dependent on a template. More... | |
class | clang::FunctionType |
FunctionType - C99 6.7.5.3 - Function Declarators. More... | |
class | clang::FunctionType::ExtParameterInfo |
Interesting information about a specific parameter that can't simply be reflected in parameter's type. More... | |
class | clang::FunctionType::ExtInfo |
A class which abstracts out some details necessary for making a call. More... | |
struct | clang::FunctionType::ExceptionType |
A simple holder for a QualType representing a type in an exception specification. More... | |
struct | clang::FunctionType::FunctionTypeExtraBitfields |
A simple holder for various uncommon bits which do not fit in FunctionTypeBitfields. More... | |
struct | clang::FunctionType::FunctionTypeExtraAttributeInfo |
A holder for extra information from attributes which aren't part of an AttributedType . More... | |
struct | clang::FunctionType::FunctionTypeArmAttributes |
A holder for Arm type attributes as described in the Arm C/C++ Language extensions which are not particularly common to all types and therefore accounted separately from FunctionTypeBitfields. More... | |
class | clang::FunctionNoProtoType |
Represents a K&R-style 'int foo()' function, which has no information available about its arguments. More... | |
class | clang::FunctionEffect |
Represents an abstract function effect, using just an enumeration describing its kind. More... | |
class | clang::EffectConditionExpr |
Wrap a function effect's condition expression in another struct so that FunctionProtoType's TrailingObjects can treat it separately. More... | |
struct | clang::FunctionEffectWithCondition |
A FunctionEffect plus a potential boolean expression determining whether the effect is declared (e.g. More... | |
class | clang::FunctionEffectIterator< Container > |
Support iteration in parallel through a pair of FunctionEffect and EffectConditionExpr containers. More... | |
class | clang::FunctionEffectsRef |
An immutable set of FunctionEffects and possibly conditions attached to them. More... | |
class | clang::FunctionEffectKindSet |
A mutable set of FunctionEffect::Kind. More... | |
class | clang::FunctionEffectSet |
A mutable set of FunctionEffects and possibly conditions attached to them. More... | |
struct | clang::FunctionEffectSet::Conflict |
class | clang::FunctionProtoType |
Represents a prototype with parameter type info, e.g. More... | |
struct | clang::FunctionProtoType::ExceptionSpecInfo |
Holds information about the various types of exception specification. More... | |
struct | clang::FunctionProtoType::ExtProtoInfo |
Extra information about a function prototype. More... | |
struct | clang::KeywordHelpers |
Provides a few static helpers for converting and printing elaborated type keyword and tag type kind enumerations. More... | |
class | clang::KeywordWrapper< T > |
class | clang::KeywordWrapper< T >::CannotCastToThisType |
class | clang::TypeWithKeyword |
A helper class for Type nodes having an ElaboratedTypeKeyword. More... | |
struct | clang::FoldingSetPlaceholder< T > |
class | clang::UnresolvedUsingType |
Represents the dependent type named by a dependently-scoped typename using declaration, e.g. More... | |
class | clang::UsingType |
class | clang::TypedefType |
class | clang::MacroQualifiedType |
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation. More... | |
class | clang::TypeOfExprType |
Represents a typeof (or typeof) expression (a C23 feature and GCC extension) or a typeof_unqual expression (a C23 feature). More... | |
class | clang::DependentTypeOfExprType |
Internal representation of canonical, dependent typeof(expr) types. More... | |
class | clang::TypeOfType |
Represents typeof(type) , a C23 feature and GCC extension, or `typeof_unqual(type), a C23 feature. More... | |
class | clang::DecltypeType |
Represents the type decltype(expr) (C++11). More... | |
class | clang::DependentDecltypeType |
Internal representation of canonical, dependent decltype(expr) types. More... | |
class | clang::PackIndexingType |
class | clang::UnaryTransformType |
A unary type transform, which is a type constructed from another. More... | |
class | clang::TagType |
struct | clang::TagTypeFoldingSetPlaceholder |
class | clang::RecordType |
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/classes. More... | |
class | clang::EnumType |
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums. More... | |
class | clang::InjectedClassNameType |
The injected class name of a C++ class template or class template partial specialization. More... | |
class | clang::AttributedType |
An attributed type is a type to which a type attribute has been applied. More... | |
class | clang::BTFTagAttributedType |
class | clang::HLSLAttributedResourceType |
struct | clang::HLSLAttributedResourceType::Attributes |
class | clang::SpirvOperand |
Instances of this class represent operands to a SPIR-V type instruction. More... | |
class | clang::HLSLInlineSpirvType |
Represents an arbitrary, user-specified SPIR-V type instruction. More... | |
class | clang::TemplateTypeParmType |
class | clang::SubstTemplateTypeParmType |
Represents the result of substituting a type for a template type parameter. More... | |
class | clang::SubstPackType |
Represents the result of substituting a set of types as a template argument that needs to be expanded later. More... | |
class | clang::SubstBuiltinTemplatePackType |
Represents the result of substituting a builtin template as a pack. More... | |
class | clang::SubstTemplateTypeParmPackType |
Represents the result of substituting a set of types for a template type parameter pack. More... | |
class | clang::DeducedType |
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 auto, C++14 decltype(auto), C++17 deduced class template types, and constrained type names. More... | |
class | clang::AutoType |
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint. More... | |
class | clang::DeducedTemplateSpecializationType |
Represents a C++17 deduced template specialization type. More... | |
class | clang::TemplateSpecializationType |
Represents a type template specialization; the template must be a class template, a type alias template, or a template template parameter. More... | |
class | clang::DependentNameType |
Represents a qualified type name for which the type name is dependent. More... | |
class | clang::DependentTemplateSpecializationType |
Represents a template specialization type whose template cannot be resolved, e.g. More... | |
class | clang::PackExpansionType |
Represents a pack expansion of types. More... | |
class | clang::ObjCProtocolQualifiers< T > |
This class wraps the list of protocol qualifiers. More... | |
class | clang::ObjCTypeParamType |
Represents a type parameter type in Objective C. More... | |
class | clang::ObjCObjectType |
Represents a class type in Objective C. More... | |
class | clang::ObjCObjectTypeImpl |
A class providing a concrete implementation of ObjCObjectType, so as to not increase the footprint of ObjCInterfaceType. More... | |
class | clang::ObjCInterfaceType |
Interfaces are the core concept in Objective-C for object oriented design. More... | |
class | clang::ObjCObjectPointerType |
Represents a pointer to an Objective C object. More... | |
class | clang::AtomicType |
class | clang::PipeType |
PipeType - OpenCL20. More... | |
class | clang::BitIntType |
A fixed int type of a specified bitwidth. More... | |
class | clang::DependentBitIntType |
class | clang::PredefinedSugarType |
class | clang::QualifierCollector |
A qualifier set is used to build a set of qualifiers. More... | |
class | clang::TypeSourceInfo |
A container of type source information. More... | |
Namespaces | |
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
namespace | clang::serialization |
namespace | llvm |
Diagnostic wrappers for TextAPI types for error reporting. | |
Macros | |
#define | TYPE(Class, Base) class Class##Type; |
#define | TYPE(Class, Base) Class, |
#define | LAST_TYPE(Class) TypeLast = Class |
#define | ABSTRACT_TYPE(Class, Base) |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) bool is##Id##Type() const; |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) bool is##Id##Type() const; |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) bool is##Id##Type() const; |
#define | TYPE(Class, Base) |
#define | NEVER_CANONICAL_TYPE(Class) |
#define | TYPE(Class, Base) |
#define | ALWAYS_CANONICAL_TYPE(Class) |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) Id, |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) Id, |
#define | SVE_TYPE(Name, Id, SingletonId) Id, |
#define | PPC_VECTOR_TYPE(Name, Id, Size) Id, |
#define | RVV_TYPE(Name, Id, SingletonId) Id, |
#define | WASM_TYPE(Name, Id, SingletonId) Id, |
#define | AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) Id, |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) Id, |
#define | BUILTIN_TYPE(Id, SingletonId) Id, |
#define | LAST_BUILTIN_TYPE(Id) LastKind = Id |
#define | TRANSFORM_TYPE_TRAIT_DEF(Enum, _) Enum, |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) is##Id##Type() || |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) |
#define | INTEL_SUBGROUP_AVC_TYPE(ExtType, Id) isOCLIntelSubgroupAVC##Id##Type() || |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) is##Id##Type() || |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) is##Id##Type() || |
Typedefs | |
template<typename T > | |
using | clang::TypeIsArrayType = std::integral_constant< bool, std::is_same< T, ArrayType >::value||std::is_base_of< ArrayType, T >::value > |
Functions | |
raw_ostream & | clang::operator<< (raw_ostream &OS, QualType QT) |
void | clang::printTemplateArgumentList (raw_ostream &OS, ArrayRef< TemplateArgument > Args, const PrintingPolicy &Policy, const TemplateParameterList *TPL=nullptr) |
Print a template argument list, including the '<' and '>' enclosing the template arguments. | |
void | clang::printTemplateArgumentList (raw_ostream &OS, ArrayRef< TemplateArgumentLoc > Args, const PrintingPolicy &Policy, const TemplateParameterList *TPL=nullptr) |
void | clang::printTemplateArgumentList (raw_ostream &OS, const TemplateArgumentListInfo &Args, const PrintingPolicy &Policy, const TemplateParameterList *TPL=nullptr) |
bool | clang::isSubstitutedDefaultArgument (ASTContext &Ctx, TemplateArgument Arg, const NamedDecl *Param, ArrayRef< TemplateArgument > Args, unsigned Depth) |
Make a best-effort determination of whether the type T can be produced by substituting Args into the default argument of Param. | |
FunctionType::ExtInfo | clang::getFunctionExtInfo (const Type &t) |
FunctionType::ExtInfo | clang::getFunctionExtInfo (QualType t) |
bool | clang::IsEnumDeclComplete (EnumDecl *ED) |
Check if the given decl is complete. | |
bool | clang::IsEnumDeclScoped (EnumDecl *ED) |
Check if the given decl is scoped. | |
const StreamingDiagnostic & | clang::operator<< (const StreamingDiagnostic &PD, LangAS AS) |
Insertion operator for partial diagnostics. | |
const StreamingDiagnostic & | clang::operator<< (const StreamingDiagnostic &PD, Qualifiers Q) |
Insertion operator for partial diagnostics. | |
const StreamingDiagnostic & | clang::operator<< (const StreamingDiagnostic &PD, QualType T) |
Insertion operator for partial diagnostics. | |
void | clang::FixedPointValueToString (SmallVectorImpl< char > &Str, llvm::APSInt Val, unsigned Scale) |
C Language Family Type Representation.
This file defines the clang::Type interface and subclasses, used to represent types for languages in the C family.
Definition in file TypeBase.h.
#define ABSTRACT_TYPE | ( | Class, | |
Base | |||
) |
Definition at line 1838 of file TypeBase.h.
#define ALWAYS_CANONICAL_TYPE | ( | Class | ) |
Definition at line 3171 of file TypeBase.h.
Definition at line 3204 of file TypeBase.h.
Definition at line 3210 of file TypeBase.h.
Definition at line 8849 of file TypeBase.h.
Definition at line 8849 of file TypeBase.h.
#define EXT_OPAQUE_TYPE | ( | ExtType, | |
Id, | |||
Ext | |||
) |
Definition at line 8849 of file TypeBase.h.
Definition at line 8849 of file TypeBase.h.
Definition at line 8875 of file TypeBase.h.
Definition at line 8875 of file TypeBase.h.
#define HLSL_INTANGIBLE_TYPE | ( | Name, | |
Id, | |||
SingletonId | |||
) |
Definition at line 8875 of file TypeBase.h.
Definition at line 8875 of file TypeBase.h.
Definition at line 8808 of file TypeBase.h.
Definition at line 8808 of file TypeBase.h.
#define IMAGE_TYPE | ( | ImgType, | |
Id, | |||
SingletonId, | |||
Access, | |||
Suffix | |||
) |
Definition at line 8808 of file TypeBase.h.
Definition at line 8808 of file TypeBase.h.
Definition at line 3211 of file TypeBase.h.
#define LAST_TYPE | ( | Class | ) | TypeLast = Class |
Definition at line 1837 of file TypeBase.h.
#define NEVER_CANONICAL_TYPE | ( | Class | ) |
Definition at line 2952 of file TypeBase.h.
Definition at line 3195 of file TypeBase.h.
Definition at line 3198 of file TypeBase.h.
Definition at line 3192 of file TypeBase.h.
Definition at line 6378 of file TypeBase.h.
Definition at line 3170 of file TypeBase.h.
#define TYPE | ( | Class, | |
Base | |||
) | Class, |
Definition at line 3170 of file TypeBase.h.
#define TYPE | ( | Class, | |
Base | |||
) |
Definition at line 3170 of file TypeBase.h.
#define TYPE | ( | Class, | |
Base | |||
) |
Definition at line 3170 of file TypeBase.h.
Definition at line 3201 of file TypeBase.h.