|
clang 24.0.0git
|
#include "clang/AST/Type.h"#include "Linkage.h"#include "clang/AST/ASTContext.h"#include "clang/AST/Attr.h"#include "clang/AST/CharUnits.h"#include "clang/AST/Decl.h"#include "clang/AST/DeclBase.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclFriend.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/DependenceFlags.h"#include "clang/AST/Expr.h"#include "clang/AST/NestedNameSpecifier.h"#include "clang/AST/PrettyPrinter.h"#include "clang/AST/TemplateBase.h"#include "clang/AST/TemplateName.h"#include "clang/AST/TypeVisitor.h"#include "clang/Basic/AddressSpaces.h"#include "clang/Basic/ExceptionSpecificationType.h"#include "clang/Basic/IdentifierTable.h"#include "clang/Basic/LLVM.h"#include "clang/Basic/LangOptions.h"#include "clang/Basic/Linkage.h"#include "clang/Basic/Specifiers.h"#include "clang/Basic/TargetCXXABI.h"#include "clang/Basic/TargetInfo.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/STLExtras.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include <algorithm>#include <cassert>#include <cstdint>#include <cstring>#include <optional>#include "clang/AST/TypeNodes.inc"#include "clang/Basic/AArch64ACLETypes.def"#include "clang/Basic/WebAssemblyReferenceTypes.def"#include "clang/Basic/HLSLIntangibleTypes.def"#include "clang/Basic/RISCVVTypes.def"#include "clang/Basic/OpenCLImageTypes.def"#include "clang/Basic/OpenCLExtensionTypes.def"#include "clang/Basic/PPCTypes.def"#include "clang/Basic/AMDGPUTypes.def"#include "clang/Basic/SPIRVTypes.def"#include "clang/AST/BuiltinTypes.def"Go to the source code of this file.
Classes | |
| class | clang::TypePropertyCache< Private > |
| The type-property cache. More... | |
Namespaces | |
| namespace | clang |
| Top level wrappers for InstallAPI frontend operations. | |
Macros | |
| #define | TYPE(CLASS, BASE) |
| #define | TYPE(CLASS, BASE) |
| #define | ABSTRACT_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | ABSTRACT_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | ABSTRACT_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | ABSTRACT_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | ABSTRACT_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | TYPE(Class, Base) |
| #define | DEPENDENT_TYPE(Class, Base) |
| #define | TRIVIAL_TYPE_CLASS(Class) |
| #define | SUGARED_TYPE_CLASS(Class) |
| #define | SVE_VECTOR_TYPE_INT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned) |
| #define | WASM_TYPE(Name, Id, SingletonId) |
| #define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
| #define | SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId) |
| #define | SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId) |
| #define | SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) |
| #define | RVV_TYPE(Name, Id, SingletonId) |
| #define | RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, IsFP, IsBF) |
| #define | RVV_PREDICATE_TYPE(Name, Id, SingletonId, NumEls) |
| #define | RVV_PREDICATE_TYPE(Name, Id, SingletonId, NumEls) |
| #define | ABSTRACT_TYPE(Derived, Base) |
| #define | TYPE(Derived, Base) |
| #define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) |
| #define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) |
| #define | SVE_TYPE(Name, Id, SingletonId) |
| #define | PPC_VECTOR_TYPE(Name, Id, Size) |
| #define | RVV_TYPE(Name, Id, SingletonId) |
| #define | WASM_TYPE(Name, Id, SingletonId) |
| #define | AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) |
| #define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
| #define | SPIRV_TYPE(Name, Id, SingletonId) |
| #define | CC_VLS_CASE(ABI_VLEN) |
| #define | ENUMERATE_ATTRS(PREFIX) |
| #define | TYPE(Class, Base) |
| #define | NON_CANONICAL_TYPE(Class, Base) |
| #define | TYPE(Class, Base) |
| #define | DEPENDENT_TYPE(Class, Base) |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) |
| #define | TYPE(Class, Base) |
| #define | NON_CANONICAL_TYPE(Class, Base) |
| #define | TYPE(Class, Base) |
| #define | DEPENDENT_TYPE(Class, Base) |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) |
| #define | NON_CANONICAL_TYPE(Class, Parent) |
| #define | TYPE(Class, Parent) |
| #define | SIGNED_TYPE(Id, SingletonId) |
| #define | UNSIGNED_TYPE(Id, SingletonId) |
| #define | FLOATING_TYPE(Id, SingletonId) |
| #define | BUILTIN_TYPE(Id, SingletonId) |
| #define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) |
| #define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) |
| #define | SVE_TYPE(Name, Id, SingletonId) |
| #define | PPC_VECTOR_TYPE(Name, Id, Size) |
| #define | RVV_TYPE(Name, Id, SingletonId) |
| #define | WASM_TYPE(Name, Id, SingletonId) |
| #define | AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) |
| #define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
| #define | SPIRV_TYPE(Name, Id, SingletonId) |
Typedefs | |
| using | Cache = TypePropertyCache<Private> |
Enumerations | |
| enum class | MemoryRegion { Global , Local , Private , Generic , Constant , GlobalDevice , GlobalHost , Unknown } |
Functions | |
| static MemoryRegion | getMemoryRegion (LangAS AS) |
| static bool | isConvertibleOpenCLSYCLAddressSpace (LangAS To, LangAS From) |
| template<typename T> | |
| static const T * | getAsSugar (const Type *Cur) |
| This will check for a T (which should be a Type which can act as sugar, such as a TypedefType) by removing any existing sugar until it reaches a T or a non-sugared type. | |
| static bool | isTriviallyCopyableTypeImpl (const QualType &type, const ASTContext &Context, bool IsCopyConstructible) |
| static ArrayRef< TypeCoupledDeclRefInfo > | allocateCoupledDecls (const ASTContext &Ctx, ArrayRef< TypeCoupledDeclRefInfo > Decls) |
Copy Decls into Ctx so a CountAttributedType can retain it by reference. | |
| static TypeDependence | getTemplateSpecializationTypeDependence (QualType Underlying, TemplateName T) |
| static CachedProperties | computeCachedProperties (const Type *T) |
| static bool | isAMDGPUNamedBarrierTypeImpl (const Type *Ty, bool AllowWrappers) |
| static bool | requiresBuiltinLaunderImpl (const ASTContext &Context, QualType Ty, llvm::SmallPtrSetImpl< const Decl * > &Seen) |
| raw_ostream & | clang::operator<< (raw_ostream &OS, const FunctionEffectWithCondition &CFE) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Parent ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Parent ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Parent ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Parent ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Parent ) |
| #define ABSTRACT_TYPE | ( | Derived, | |
| Base ) |
| #define AMDGPU_TYPE | ( | Name, | |
| Id, | |||
| SingletonId, | |||
| Width, | |||
| Align ) |
| #define AMDGPU_TYPE | ( | Name, | |
| Id, | |||
| SingletonId, | |||
| Width, | |||
| Align ) |
| #define BUILTIN_TYPE | ( | Id, | |
| SingletonId ) |
| #define CC_VLS_CASE | ( | ABI_VLEN | ) |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base ) |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base ) |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base ) |
| #define ENUMERATE_ATTRS | ( | PREFIX | ) |
Referenced by clang::CountAttributedType::getAttributeName().
| #define EXT_OPAQUE_TYPE | ( | ExtType, | |
| Id, | |||
| Ext ) |
| #define EXT_OPAQUE_TYPE | ( | ExtType, | |
| Id, | |||
| Ext ) |
| #define FLOATING_TYPE | ( | Id, | |
| SingletonId ) |
| #define HLSL_INTANGIBLE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define HLSL_INTANGIBLE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define HLSL_INTANGIBLE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define IMAGE_TYPE | ( | ImgType, | |
| Id, | |||
| SingletonId, | |||
| Access, | |||
| Suffix ) |
| #define IMAGE_TYPE | ( | ImgType, | |
| Id, | |||
| SingletonId, | |||
| Access, | |||
| Suffix ) |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Base ) |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Base ) |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Parent ) |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | Class, | |
| Base ) |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | Class, | |
| Base ) |
| #define PPC_VECTOR_TYPE | ( | Name, | |
| Id, | |||
| Size ) |
| #define PPC_VECTOR_TYPE | ( | Name, | |
| Id, | |||
| Size ) |
| #define RVV_PREDICATE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId, | |||
| NumEls ) |
| #define RVV_PREDICATE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId, | |||
| NumEls ) |
| #define RVV_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define RVV_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define RVV_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define RVV_VECTOR_TYPE | ( | Name, | |
| Id, | |||
| SingletonId, | |||
| NumEls, | |||
| ElBits, | |||
| NF, | |||
| IsSigned, | |||
| IsFP, | |||
| IsBF ) |
| #define SIGNED_TYPE | ( | Id, | |
| SingletonId ) |
| #define SPIRV_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define SPIRV_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define SUGARED_TYPE_CLASS | ( | Class | ) |
| #define SVE_OPAQUE_TYPE | ( | Name, | |
| MangledName, | |||
| Id, | |||
| SingletonId ) |
| #define SVE_PREDICATE_TYPE | ( | Name, | |
| MangledName, | |||
| Id, | |||
| SingletonId ) |
| #define SVE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define SVE_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define SVE_VECTOR_TYPE | ( | Name, | |
| MangledName, | |||
| Id, | |||
| SingletonId ) |
| #define SVE_VECTOR_TYPE_INT | ( | Name, | |
| MangledName, | |||
| Id, | |||
| SingletonId, | |||
| NumEls, | |||
| ElBits, | |||
| NF, | |||
| IsSigned ) |
| #define TRIVIAL_TYPE_CLASS | ( | Class | ) |
| #define TYPE | ( | CLASS, | |
| BASE ) |
| #define TYPE | ( | CLASS, | |
| BASE ) |
| #define TYPE | ( | Class, | |
| Parent ) |
| #define TYPE | ( | Class, | |
| Parent ) |
| #define TYPE | ( | Class, | |
| Parent ) |
| #define TYPE | ( | Class, | |
| Parent ) |
| #define TYPE | ( | Class, | |
| Parent ) |
| #define TYPE | ( | Derived, | |
| Base ) |
| #define UNSIGNED_TYPE | ( | Id, | |
| SingletonId ) |
| #define WASM_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define WASM_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| #define WASM_TYPE | ( | Name, | |
| Id, | |||
| SingletonId ) |
| using Cache = TypePropertyCache<Private> |
|
strong |
|
static |
Copy Decls into Ctx so a CountAttributedType can retain it by reference.
The node owns this allocation rather than its callers, so both Create and complete route through here.
Definition at line 4287 of file Type.cpp.
References clang::ASTContext::Allocate().
|
static |
Definition at line 5079 of file Type.cpp.
References clang::cast(), clang::External, clang::TypePropertyCache< Private >::get(), getPointeeType(), getUnderlyingType(), and clang::T.
Referenced by clang::TypePropertyCache< Private >::ensure().
|
static |
This will check for a T (which should be a Type which can act as sugar, such as a TypedefType) by removing any existing sugar until it reaches a T or a non-sugared type.
Definition at line 736 of file Type.cpp.
References clang::Type::getTypeClass(), and clang::T.
Referenced by clang::Type::getAs().
|
static |
Definition at line 85 of file Type.cpp.
References Constant, Generic, Global, GlobalDevice, GlobalHost, Local, clang::opencl_constant, clang::opencl_generic, clang::opencl_global, clang::opencl_global_device, clang::opencl_global_host, clang::opencl_local, clang::opencl_private, Private, clang::sycl_constant, clang::sycl_generic, clang::sycl_global, clang::sycl_global_device, clang::sycl_global_host, clang::sycl_local, clang::sycl_private, and Unknown.
Referenced by isConvertibleOpenCLSYCLAddressSpace().
|
static |
Definition at line 4885 of file Type.cpp.
References clang::Type::getDependence(), clang::QualType::isNull(), clang::isPackProducingBuiltinTemplateName(), clang::T, clang::toSemanticDependence(), and clang::toTypeDependence().
Definition at line 5651 of file Type.cpp.
References clang::Type::getArrayElementTypeNoTypeQual(), clang::Type::getUnqualifiedDesugaredType(), and clang::isa().
Referenced by clang::Type::isAMDGPUNamedBarrierType(), and clang::Type::isAMDGPUNamedBarrierTypeOrWrapper().
Definition at line 119 of file Type.cpp.
References Constant, Generic, getMemoryRegion(), and Unknown.
Referenced by clang::Qualifiers::isTargetAddressSpaceSupersetOf().
|
static |
Definition at line 3038 of file Type.cpp.
References clang::Type::getAsRecordDecl(), clang::QualType::hasAddressDiscriminatedPointerAuth(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isMatrixType(), clang::Type::isMFloat8Type(), clang::Type::isScalarType(), clang::Type::isSizelessBuiltinType(), isTriviallyCopyableTypeImpl(), clang::Type::isVectorType(), and clang::ast_matchers::type.
Referenced by clang::QualType::isTriviallyCopyableType(), isTriviallyCopyableTypeImpl(), and clang::QualType::isTriviallyCopyConstructibleType().
|
static |
Definition at line 5771 of file Type.cpp.
References clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Type::isIncompleteType(), and requiresBuiltinLaunderImpl().
Referenced by clang::QualType::requiresBuiltinLaunder(), and requiresBuiltinLaunderImpl().