clang 22.0.0git
ASTContext.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "ByteCode/Context.h"
#include "CXXABI.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTConcept.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/ASTStructuralEquivalence.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Attr.h"
#include "clang/AST/AttrIterator.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Comment.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclContextInternals.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/DependenceFlags.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/MangleNumberingContext.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CommentOptions.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/Module.h"
#include "clang/Basic/NoSanitizeList.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/ProfileList.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetCXXABI.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/XRayLists.h"
#include "llvm/ADT/APFixedPoint.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
#include "llvm/Support/Capacity.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SipHash.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/AArch64TargetParser.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include "clang/AST/TypeNodes.inc"
#include "clang/Basic/BuiltinTemplates.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"

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< llvm::FoldingSetNodeID >

Macros

#define TYPE(Name, Parent)
#define ABSTRACT_TYPE(Name, Parent)
#define TYPE(Name, Parent)
#define ABSTRACT_TYPE(Name, Parent)
#define BuiltinTemplate(BTName)
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
#define SVE_TYPE(Name, Id, SingletonId)
#define PPC_VECTOR_MMA_TYPE(Name, Id, Size)
#define PPC_VECTOR_VSX_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 TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId)
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId)
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits)
#define PPC_VECTOR_TYPE(Name, Id, Size)
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, NF, IsSigned, IsFP, IsBF)
#define RVV_PREDICATE_TYPE(Name, Id, SingletonId, ElKind)
#define WASM_TYPE(Name, Id, SingletonId)
#define AMDGPU_TYPE(NAME, ID, SINGLETONID, WIDTH, ALIGN)
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
#define SIGNED_TYPE(Id, SingletonId)
#define UNSIGNED_TYPE(Id, SingletonId)
#define PLACEHOLDER_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 HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align)
#define RVV_TYPE(Name, Id, SingletonId)
#define NON_CANONICAL_TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
#define TYPE(Class, Base)
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)
#define SVE_INT_ELTTY(BITS, ELTS, SIGNED, NUMVECTORS)
#define SVE_ELTTY(ELTTY, ELTS, NUMVECTORS)
#define SVE_VECTOR_TYPE_INT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned)
#define SVE_VECTOR_TYPE_FLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_VECTOR_TYPE_BFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_PREDICATE_TYPE_ALL(Name, MangledName, Id, SingletonId, NumEls, NF)
#define RVV_VECTOR_TYPE_INT(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned)
#define RVV_VECTOR_TYPE_FLOAT(Name, Id, SingletonId, NumEls, ElBits, NF)
#define RVV_VECTOR_TYPE_BFLOAT(Name, Id, SingletonId, NumEls, ElBits, NF)
#define RVV_PREDICATE_TYPE(Name, Id, SingletonId, NumEls)
#define WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS)
#define SVE_VECTOR_TYPE_INT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF, IsSigned)
#define SVE_VECTOR_TYPE_FLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_VECTOR_TYPE_BFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, ElBits, NF)
#define SVE_PREDICATE_TYPE_ALL(Name, MangledName, Id, SingletonId, NumEls, NF)
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, IsFP, IsBF)
#define RVV_PREDICATE_TYPE(Name, Id, SingletonId, NumEls)
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
#define SVE_TYPE(Name, Id, SingletonId)
#define RVV_TYPE(Name, Id, SingletonId)
#define WASM_TYPE(Name, Id, SingletonId)
#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align)
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
#define PPC_VECTOR_TYPE(Name, Id, Size)
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
#define BUILTIN_TYPE(KIND, ID)
#define PLACEHOLDER_TYPE(KIND, ID)
#define ABSTRACT_TYPE(KIND, BASE)
#define TYPE(KIND, BASE)
#define DEPENDENT_TYPE(KIND, BASE)
#define NON_CANONICAL_TYPE(KIND, BASE)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(KIND, BASE)
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)
#define UNEXPECTED_TYPE(Class, Kind)
#define NON_CANONICAL_TYPE(Class, Base)
#define TYPE(Class, Base)
#define SUGAR_FREE_TYPE(Class)
#define NON_UNIQUE_TYPE(Class)
#define UNEXPECTED_TYPE(Class, Kind)
#define TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)
#define CANONICAL_TYPE(Class)

Enumerations

enum  FloatingRank {
  BFloat16Rank , Float16Rank , HalfRank , FloatRank ,
  DoubleRank , LongDoubleRank , Float128Rank , Ibm128Rank
}

Functions

static SmallVector< SourceLocation, 2 > getDeclLocsForCommentSearch (const Decl *D, SourceManager &SourceMgr)
static const DecladjustDeclToTemplate (const Decl &D)
 If we have a 'templated' declaration for a template, adjust 'D' to refer to the actual template.
static void addRedeclaredMethods (const ObjCMethodDecl *ObjCMethod, SmallVectorImpl< const NamedDecl * > &Redeclared)
static bool isAddrSpaceMapManglingEnabled (const TargetInfo &TI, const LangOptions &LangOpts)
static bool primaryBaseHaseAddressDiscriminatedVTableAuthentication (const ASTContext &Context, const CXXRecordDecl *Class)
static TypeInfoChars getConstantArrayInfoInChars (const ASTContext &Context, const ConstantArrayType *CAT)
 getConstantArrayInfoInChars - Performing the computation in CharUnits instead of in bits prevents overflowing the uint64_t for some large arrays.
static bool unionHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD, bool CheckIfTriviallyCopyable)
static int64_t getSubobjectOffset (const FieldDecl *Field, const ASTContext &Context, const clang::ASTRecordLayout &)
static int64_t getSubobjectOffset (const CXXRecordDecl *RD, const ASTContext &Context, const clang::ASTRecordLayout &Layout)
static std::optional< int64_t > structHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD, bool CheckIfTriviallyCopyable)
static std::optional< int64_t > getSubobjectSizeInBits (const FieldDecl *Field, const ASTContext &Context, bool CheckIfTriviallyCopyable)
static std::optional< int64_t > getSubobjectSizeInBits (const CXXRecordDecl *RD, const ASTContext &Context, bool CheckIfTriviallyCopyable)
template<typename RangeT>
static std::optional< int64_t > structSubobjectsHaveUniqueObjectRepresentations (const RangeT &Subobjects, int64_t CurOffsetInBits, const ASTContext &Context, const clang::ASTRecordLayout &Layout, bool CheckIfTriviallyCopyable)
static auto getCanonicalTemplateArguments (const ASTContext &C, ArrayRef< TemplateArgument > Args, bool &AnyNonCanonArgs)
static void encodeTypeForFunctionPointerAuth (const ASTContext &Ctx, raw_ostream &OS, QualType QT)
 Encode a function type for use in the discriminator of a function pointer type.
static bool isCanonicalResultType (QualType T)
 Determine whether T is canonical as the result type of a function.
static bool isCanonicalExceptionSpecification (const FunctionProtoType::ExceptionSpecInfo &ESI, bool NoexceptInType)
static const TagDeclgetNonInjectedClassName (const TagDecl *TD)
static ElaboratedTypeKeyword getCanonicalElaboratedTypeKeyword (ElaboratedTypeKeyword Keyword)
static bool hasAnyPackExpansions (ArrayRef< TemplateArgument > Args)
static int CmpProtocolNames (ObjCProtocolDecl *const *LHS, ObjCProtocolDecl *const *RHS)
 CmpProtocolNames - Comparison predicate for sorting protocols alphabetically.
static bool areSortedAndUniqued (ArrayRef< ObjCProtocolDecl * > Protocols)
static void SortAndUniqueProtocols (SmallVectorImpl< ObjCProtocolDecl * > &Protocols)
static const TemplateArgumentgetDefaultTemplateArgumentOrNone (const NamedDecl *P)
static bool isSameQualifier (const NestedNameSpecifier X, const NestedNameSpecifier Y)
static bool hasSameCudaAttrs (const FunctionDecl *A, const FunctionDecl *B)
static bool hasSameOverloadableAttrs (const FunctionDecl *A, const FunctionDecl *B)
 Determine whether the attributes we can overload on are identical for A and B.
static FloatingRank getFloatingRank (QualType T)
 getFloatingRank - Return a relative rank for floating point types.
static const TypegetIntegerTypeForEnum (const EnumType *ET)
static bool isTypeTypedefedAsBOOL (QualType T)
static std::string charUnitsToString (const CharUnits &CU)
static char getObjCEncodingForPrimitiveType (const ASTContext *C, const BuiltinType *BT)
static char ObjCEncodingForEnumDecl (const ASTContext *C, const EnumDecl *ED)
static void EncodeBitField (const ASTContext *Ctx, std::string &S, QualType T, const FieldDecl *FD)
static bool hasTemplateSpecializationInEncodedString (const Type *T, bool VisitBasesAndFields)
static TypedefDeclCreateCharPtrNamedVaListDecl (const ASTContext *Context, StringRef Name)
static TypedefDeclCreateMSVaListDecl (const ASTContext *Context)
static TypedefDeclCreateCharPtrBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateVoidPtrBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateAArch64ABIBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreatePowerABIBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateX86_64ABIBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateAAPCSABIBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateSystemZBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateHexagonBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateXtensaABIBuiltinVaListDecl (const ASTContext *Context)
static TypedefDeclCreateVaListDecl (const ASTContext *Context, TargetInfo::BuiltinVaListKind Kind)
static bool areCompatVectorTypes (const VectorType *LHS, const VectorType *RHS)
 areCompatVectorTypes - Return true if the two specified vector types are compatible.
static bool areCompatMatrixTypes (const ConstantMatrixType *LHS, const ConstantMatrixType *RHS)
 areCompatMatrixTypes - Return true if the two specified matrix types are compatible.
static uint64_t getRVVTypeSize (ASTContext &Context, const BuiltinType *Ty)
 getRVVTypeSize - Return RVV vector register size.
static int compareObjCProtocolsByName (ObjCProtocolDecl *const *lhs, ObjCProtocolDecl *const *rhs)
 Comparison routine for Objective-C protocols to be used with llvm::array_pod_sort.
static void getIntersectionOfProtocols (ASTContext &Context, const ObjCInterfaceDecl *CommonBase, const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, SmallVectorImpl< ObjCProtocolDecl * > &IntersectionSet)
 getIntersectionOfProtocols - This routine finds the intersection of set of protocols inherited from two distinct objective-c pointer objects with the given common base.
static bool canAssignObjCObjectTypes (ASTContext &ctx, QualType lhs, QualType rhs)
 Determine whether the first type is a subtype of the second.
static bool sameObjCTypeArgs (ASTContext &ctx, const ObjCInterfaceDecl *iface, ArrayRef< QualType > lhsArgs, ArrayRef< QualType > rhsArgs, bool stripKindOf)
static QualType mergeEnumWithInteger (ASTContext &Context, const EnumType *ET, QualType other, bool isBlockReturnType)
 Given that we have an enum type and a non-enum type, try to merge them.
static QualType DecodeTypeFromStr (const char *&Str, const ASTContext &Context, ASTContext::GetBuiltinTypeError &Error, bool &RequiresICE, bool AllowTypeModifiers)
 DecodeTypeFromStr - This decodes one type descriptor from Str, advancing the pointer over the consumed characters.
static GVALinkage basicGVALinkageForFunction (const ASTContext &Context, const FunctionDecl *FD)
static GVALinkage adjustGVALinkageForAttributes (const ASTContext &Context, const Decl *D, GVALinkage L)
static GVALinkage adjustGVALinkageForExternalDefinitionKind (const ASTContext &Ctx, const Decl *D, GVALinkage L)
 Adjust the GVALinkage for a declaration based on what an external AST source knows about whether there can be other definitions of this declaration.
static GVALinkage basicGVALinkageForVariable (const ASTContext &Context, const VarDecl *VD)
static DeclgetCommonDecl (Decl *X, Decl *Y)
template<class T, std::enable_if_t< std::is_base_of_v< Decl, T >, bool > = true>
static T * getCommonDecl (T *X, T *Y)
template<class T, std::enable_if_t< std::is_base_of_v< Decl, T >, bool > = true>
static T * getCommonDeclChecked (T *X, T *Y)
static TemplateName getCommonTemplateName (const ASTContext &Ctx, TemplateName X, TemplateName Y, bool IgnoreDeduced=false)
static TemplateName getCommonTemplateNameChecked (const ASTContext &Ctx, TemplateName X, TemplateName Y, bool IgnoreDeduced)
static auto getCommonTypes (const ASTContext &Ctx, ArrayRef< QualType > Xs, ArrayRef< QualType > Ys, bool Unqualified=false)
template<class T>
static SourceLocation getCommonAttrLoc (const T *X, const T *Y)
static TemplateArgument getCommonTemplateArgument (const ASTContext &Ctx, const TemplateArgument &X, const TemplateArgument &Y)
static bool getCommonTemplateArguments (const ASTContext &Ctx, SmallVectorImpl< TemplateArgument > &R, ArrayRef< TemplateArgument > Xs, ArrayRef< TemplateArgument > Ys)
static auto getCommonTemplateArguments (const ASTContext &Ctx, ArrayRef< TemplateArgument > Xs, ArrayRef< TemplateArgument > Ys)
template<class T>
static ElaboratedTypeKeyword getCommonTypeKeyword (const T *X, const T *Y, bool IsSame)
static NestedNameSpecifier getCommonNNS (const ASTContext &Ctx, NestedNameSpecifier NNS1, NestedNameSpecifier NNS2, bool IsSame)
 Returns a NestedNameSpecifier which has only the common sugar present in both NNS1 and NNS2.
template<class T>
static NestedNameSpecifier getCommonQualifier (const ASTContext &Ctx, const T *X, const T *Y, bool IsSame)
template<class T>
static QualType getCommonElementType (const ASTContext &Ctx, const T *X, const T *Y)
template<class T>
static QualType getCommonArrayElementType (const ASTContext &Ctx, const T *X, Qualifiers &QX, const T *Y, Qualifiers &QY)
template<class T>
static QualType getCommonPointeeType (const ASTContext &Ctx, const T *X, const T *Y)
template<class T>
static auto * getCommonSizeExpr (const ASTContext &Ctx, T *X, T *Y)
static auto getCommonSizeModifier (const ArrayType *X, const ArrayType *Y)
static auto getCommonIndexTypeCVRQualifiers (const ArrayType *X, const ArrayType *Y)
static void mergeTypeLists (const ASTContext &Ctx, SmallVectorImpl< QualType > &Out, ArrayRef< QualType > X, ArrayRef< QualType > Y)
static QualType getCommonNonSugarTypeNode (const ASTContext &Ctx, const Type *X, Qualifiers &QX, const Type *Y, Qualifiers &QY)
static QualType getCommonSugarTypeNode (const ASTContext &Ctx, const Type *X, const Type *Y, SplitQualType Underlying)
static auto unwrapSugar (SplitQualType &T, Qualifiers &QTotal)
static std::vector< std::string > getFMVBackendFeaturesFor (const llvm::SmallVectorImpl< StringRef > &FMVFeatStrings)
static SYCLKernelInfo BuildSYCLKernelInfo (ASTContext &Context, CanQualType KernelNameType, const FunctionDecl *FD)

Macro Definition Documentation

◆ ABSTRACT_TYPE [1/7]

#define ABSTRACT_TYPE ( Class,
Base )

◆ ABSTRACT_TYPE [2/7]

#define ABSTRACT_TYPE ( Class,
Base )

◆ ABSTRACT_TYPE [3/7]

#define ABSTRACT_TYPE ( Class,
Base )

◆ ABSTRACT_TYPE [4/7]

#define ABSTRACT_TYPE ( Class,
Base )

◆ ABSTRACT_TYPE [5/7]

#define ABSTRACT_TYPE ( KIND,
BASE )

◆ ABSTRACT_TYPE [6/7]

#define ABSTRACT_TYPE ( Name,
Parent )

◆ ABSTRACT_TYPE [7/7]

#define ABSTRACT_TYPE ( Name,
Parent )

◆ AMDGPU_TYPE [1/4]

#define AMDGPU_TYPE ( NAME,
ID,
SINGLETONID,
WIDTH,
ALIGN )
Value:
case BuiltinType::ID: \
Width = WIDTH; \
Align = ALIGN; \
break;

◆ AMDGPU_TYPE [2/4]

#define AMDGPU_TYPE ( Name,
Id,
SingletonId,
Width,
Align )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ AMDGPU_TYPE [3/4]

#define AMDGPU_TYPE ( Name,
Id,
SingletonId,
Width,
Align )
Value:
case BuiltinType::Id:

◆ AMDGPU_TYPE [4/4]

#define AMDGPU_TYPE ( Name,
Id,
SingletonId,
Width,
Align )
Value:
case BuiltinType::Id:

◆ BUILTIN_TYPE [1/2]

#define BUILTIN_TYPE ( Id,
SingletonId )

◆ BUILTIN_TYPE [2/2]

#define BUILTIN_TYPE ( KIND,
ID )

◆ BuiltinTemplate

#define BuiltinTemplate ( BTName)
Value:
BuiltinTemplateDecl *ASTContext::get##BTName##Decl() const { \
if (!Decl##BTName) \
Decl##BTName = \
buildBuiltinTemplateDecl(BTK##BTName, get##BTName##Name()); \
return Decl##BTName; \
}
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
Decl - This represents one declaration (or definition), e.g.
Definition DeclBase.h:86

Definition at line 1223 of file ASTContext.cpp.

◆ CANONICAL_TYPE

#define CANONICAL_TYPE ( Class)
Value:
UNEXPECTED_TYPE(Class, "canonical")
#define UNEXPECTED_TYPE(Class, Kind)

Referenced by getCommonSugarTypeNode().

◆ DEPENDENT_TYPE [1/5]

#define DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ DEPENDENT_TYPE [2/5]

#define DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ DEPENDENT_TYPE [3/5]

#define DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ DEPENDENT_TYPE [4/5]

#define DEPENDENT_TYPE ( Class,
Base )
Value:
UNEXPECTED_TYPE(Class, "dependent")

◆ DEPENDENT_TYPE [5/5]

#define DEPENDENT_TYPE ( KIND,
BASE )
Value:
case Type::KIND:

◆ EXT_OPAQUE_TYPE [1/4]

#define EXT_OPAQUE_TYPE ( ExtType,
Id,
Ext )
Value:
InitBuiltinType(Id##Ty, BuiltinType::Id);

◆ EXT_OPAQUE_TYPE [2/4]

#define EXT_OPAQUE_TYPE ( ExtType,
Id,
Ext )
Value:
case BuiltinType::Id:

◆ EXT_OPAQUE_TYPE [3/4]

#define EXT_OPAQUE_TYPE ( ExtType,
Id,
Ext )
Value:
case BuiltinType::Id: \
return;

◆ EXT_OPAQUE_TYPE [4/4]

#define EXT_OPAQUE_TYPE ( ExtType,
Id,
Ext )
Value:
case BuiltinType::Id:

◆ HLSL_INTANGIBLE_TYPE [1/4]

#define HLSL_INTANGIBLE_TYPE ( Name,
Id,
SingletonId )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ HLSL_INTANGIBLE_TYPE [2/4]

#define HLSL_INTANGIBLE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ HLSL_INTANGIBLE_TYPE [3/4]

#define HLSL_INTANGIBLE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
return;

◆ HLSL_INTANGIBLE_TYPE [4/4]

#define HLSL_INTANGIBLE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ IMAGE_TYPE [1/5]

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ IMAGE_TYPE [2/5]

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
case BuiltinType::Id:

◆ IMAGE_TYPE [3/5]

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
case BuiltinType::Id: \
return;

◆ IMAGE_TYPE [4/5]

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
case BuiltinType::Id: \
return OCLTK_Image;
@ OCLTK_Image
Definition TargetInfo.h:216

◆ IMAGE_TYPE [5/5]

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
case BuiltinType::Id:

◆ NON_CANONICAL_TYPE [1/6]

#define NON_CANONICAL_TYPE ( Class,
Base )

◆ NON_CANONICAL_TYPE [2/6]

#define NON_CANONICAL_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ NON_CANONICAL_TYPE [3/6]

#define NON_CANONICAL_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ NON_CANONICAL_TYPE [4/6]

#define NON_CANONICAL_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ NON_CANONICAL_TYPE [5/6]

#define NON_CANONICAL_TYPE ( Class,
Base )
Value:
UNEXPECTED_TYPE(Class, "non-canonical")

◆ NON_CANONICAL_TYPE [6/6]

#define NON_CANONICAL_TYPE ( KIND,
BASE )
Value:
case Type::KIND:

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [1/4]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class: \
assert(!T->isDependentType() && "should not see dependent types here"); \
return getTypeInfo(cast<Class##Type>(T)->desugar().getTypePtr());
const FunctionProtoType * T
U cast(CodeGen::Address addr)
Definition Address.h:327

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/4]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [3/4]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( Class,
Base )
Value:
case Type::Class:

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [4/4]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( KIND,
BASE )
Value:
case Type::KIND:

◆ NON_UNIQUE_TYPE

#define NON_UNIQUE_TYPE ( Class)
Value:
UNEXPECTED_TYPE(Class, "non-unique")

Referenced by getCommonNonSugarTypeNode().

◆ PLACEHOLDER_TYPE [1/2]

#define PLACEHOLDER_TYPE ( Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ PLACEHOLDER_TYPE [2/2]

#define PLACEHOLDER_TYPE ( KIND,
ID )
Value:
case BuiltinType::KIND:

◆ PPC_VECTOR_MMA_TYPE

#define PPC_VECTOR_MMA_TYPE ( Name,
Id,
Size )
Value:
InitBuiltinType(Id##Ty, BuiltinType::Id);

◆ PPC_VECTOR_TYPE [1/2]

#define PPC_VECTOR_TYPE ( Name,
Id,
Size )
Value:
case BuiltinType::Id: \
Width = Size; \
Align = Size; \
break;

◆ PPC_VECTOR_TYPE [2/2]

#define PPC_VECTOR_TYPE ( Name,
Id,
Size )
Value:
case BuiltinType::Id:

◆ PPC_VECTOR_VSX_TYPE

#define PPC_VECTOR_VSX_TYPE ( Name,
Id,
Size )
Value:
InitBuiltinType(Id##Ty, BuiltinType::Id);

◆ RVV_PREDICATE_TYPE [1/3]

#define RVV_PREDICATE_TYPE ( Name,
Id,
SingletonId,
ElKind )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = 8; \
break;

◆ RVV_PREDICATE_TYPE [2/3]

#define RVV_PREDICATE_TYPE ( Name,
Id,
SingletonId,
NumEls )
Value:
case BuiltinType::Id: \
return {BoolTy, llvm::ElementCount::getScalable(NumEls), 1};

◆ RVV_PREDICATE_TYPE [3/3]

#define RVV_PREDICATE_TYPE ( Name,
Id,
SingletonId,
NumEls )
Value:
if (EltTy->isBooleanType() && NumElts == NumEls) \
return SingletonId;

◆ RVV_TYPE [1/3]

#define RVV_TYPE ( Name,
Id,
SingletonId )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ RVV_TYPE [2/3]

#define RVV_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ RVV_TYPE [3/3]

#define RVV_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ RVV_VECTOR_TYPE [1/2]

#define RVV_VECTOR_TYPE ( Name,
Id,
SingletonId,
ElKind,
ElBits,
NF,
IsSigned,
IsFP,
IsBF )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = ElBits; \
break;

◆ RVV_VECTOR_TYPE [2/2]

#define RVV_VECTOR_TYPE ( Name,
Id,
SingletonId,
NumEls,
ElBits,
NF,
IsSigned,
IsFP,
IsBF )
Value:
if (!EltTy->isBooleanType() && \
((EltTy->hasIntegerRepresentation() && \
EltTy->hasSignedIntegerRepresentation() == IsSigned) || \
(EltTy->hasFloatingRepresentation() && !EltTy->isBFloat16Type() && \
IsFP && !IsBF) || \
(EltTy->hasFloatingRepresentation() && EltTy->isBFloat16Type() && \
IsBF && !IsFP)) && \
EltTySize == ElBits && NumElts == NumEls && NumFields == NF) \
return SingletonId;

◆ RVV_VECTOR_TYPE_BFLOAT

#define RVV_VECTOR_TYPE_BFLOAT ( Name,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
case BuiltinType::Id: \
return {BFloat16Ty, llvm::ElementCount::getScalable(NumEls), NF};

◆ RVV_VECTOR_TYPE_FLOAT

#define RVV_VECTOR_TYPE_FLOAT ( Name,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
case BuiltinType::Id: \
return {ElBits == 16 ? Float16Ty : (ElBits == 32 ? FloatTy : DoubleTy), \
llvm::ElementCount::getScalable(NumEls), NF};

◆ RVV_VECTOR_TYPE_INT

#define RVV_VECTOR_TYPE_INT ( Name,
Id,
SingletonId,
NumEls,
ElBits,
NF,
IsSigned )
Value:
case BuiltinType::Id: \
return {getIntTypeForBitwidth(ElBits, IsSigned), \
llvm::ElementCount::getScalable(NumEls), NF};

◆ SIGNED_TYPE

#define SIGNED_TYPE ( Id,
SingletonId )
Value:
case BuiltinType::Id: \
OS << "i"; \
return;

◆ SUGAR_FREE_TYPE

#define SUGAR_FREE_TYPE ( Class)
Value:
UNEXPECTED_TYPE(Class, "sugar-free")

Referenced by getCommonNonSugarTypeNode().

◆ SVE_ELTTY

#define SVE_ELTTY ( ELTTY,
ELTS,
NUMVECTORS )
Value:
{ELTTY, llvm::ElementCount::getScalable(ELTS), NUMVECTORS};

◆ SVE_INT_ELTTY

#define SVE_INT_ELTTY ( BITS,
ELTS,
SIGNED,
NUMVECTORS )
Value:
{getIntTypeForBitwidth(BITS, SIGNED), llvm::ElementCount::getScalable(ELTS), \
NUMVECTORS};

◆ SVE_OPAQUE_TYPE

#define SVE_OPAQUE_TYPE ( Name,
MangledName,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = 16; \
break;

◆ SVE_PREDICATE_TYPE

#define SVE_PREDICATE_TYPE ( Name,
MangledName,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = 16; \
break;

◆ SVE_PREDICATE_TYPE_ALL [1/2]

#define SVE_PREDICATE_TYPE_ALL ( Name,
MangledName,
Id,
SingletonId,
NumEls,
NF )
Value:
case BuiltinType::Id: \
return {BoolTy, llvm::ElementCount::getScalable(NumEls), NF};

◆ SVE_PREDICATE_TYPE_ALL [2/2]

#define SVE_PREDICATE_TYPE_ALL ( Name,
MangledName,
Id,
SingletonId,
NumEls,
NF )
Value:
if (EltTy->isBooleanType() && NumElts == (NumEls * NF) && NumFields == 1) \
return SingletonId;

◆ SVE_SCALAR_TYPE

#define SVE_SCALAR_TYPE ( Name,
MangledName,
Id,
SingletonId,
Bits )
Value:
case BuiltinType::Id: \
Width = Bits; \
Align = Bits; \
break;

◆ SVE_TYPE [1/3]

#define SVE_TYPE ( Name,
Id,
SingletonId )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ SVE_TYPE [2/3]

#define SVE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
return;

◆ SVE_TYPE [3/3]

#define SVE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

◆ SVE_VECTOR_TYPE

#define SVE_VECTOR_TYPE ( Name,
MangledName,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = 128; \
break;

◆ SVE_VECTOR_TYPE_BFLOAT [1/2]

#define SVE_VECTOR_TYPE_BFLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
case BuiltinType::Id: \
return {BFloat16Ty, llvm::ElementCount::getScalable(NumEls), NF};

◆ SVE_VECTOR_TYPE_BFLOAT [2/2]

#define SVE_VECTOR_TYPE_BFLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
if (EltTy->hasFloatingRepresentation() && EltTy->isBFloat16Type() && \
EltTySize == ElBits && NumElts == (NumEls * NF) && NumFields == 1) { \
return SingletonId; \
}

◆ SVE_VECTOR_TYPE_FLOAT [1/2]

#define SVE_VECTOR_TYPE_FLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
case BuiltinType::Id: \
return {ElBits == 16 ? HalfTy : (ElBits == 32 ? FloatTy : DoubleTy), \
llvm::ElementCount::getScalable(NumEls), NF};

◆ SVE_VECTOR_TYPE_FLOAT [2/2]

#define SVE_VECTOR_TYPE_FLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
if (EltTy->hasFloatingRepresentation() && !EltTy->isBFloat16Type() && \
EltTySize == ElBits && NumElts == (NumEls * NF) && NumFields == 1) { \
return SingletonId; \
}

◆ SVE_VECTOR_TYPE_INT [1/2]

#define SVE_VECTOR_TYPE_INT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF,
IsSigned )
Value:
case BuiltinType::Id: \
return {getIntTypeForBitwidth(ElBits, IsSigned), \
llvm::ElementCount::getScalable(NumEls), NF};

◆ SVE_VECTOR_TYPE_INT [2/2]

#define SVE_VECTOR_TYPE_INT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF,
IsSigned )
Value:
if (EltTy->hasIntegerRepresentation() && !EltTy->isBooleanType() && \
EltTy->hasSignedIntegerRepresentation() == IsSigned && \
EltTySize == ElBits && NumElts == (NumEls * NF) && NumFields == 1) { \
return SingletonId; \
}

◆ SVE_VECTOR_TYPE_MFLOAT [1/2]

#define SVE_VECTOR_TYPE_MFLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
case BuiltinType::Id: \
return {MFloat8Ty, llvm::ElementCount::getScalable(NumEls), NF};

◆ SVE_VECTOR_TYPE_MFLOAT [2/2]

#define SVE_VECTOR_TYPE_MFLOAT ( Name,
MangledName,
Id,
SingletonId,
NumEls,
ElBits,
NF )
Value:
if (EltTy->isMFloat8Type() && EltTySize == ElBits && \
NumElts == (NumEls * NF) && NumFields == 1) { \
return SingletonId; \
}

◆ TYPE [1/9]

#define TYPE ( Class,
Base )

◆ TYPE [2/9]

#define TYPE ( Class,
Base )

◆ TYPE [3/9]

#define TYPE ( Class,
Base )

◆ TYPE [4/9]

#define TYPE ( Class,
Base )

◆ TYPE [5/9]

#define TYPE ( Class,
Base )

◆ TYPE [6/9]

#define TYPE ( Class,
Base )

◆ TYPE [7/9]

#define TYPE ( KIND,
BASE )

◆ TYPE [8/9]

#define TYPE ( Name,
Parent )
Value:
0,

◆ TYPE [9/9]

#define TYPE ( Name,
Parent )
Value:
if (counts[Idx]) \
llvm::errs() << " " << counts[Idx] << " " << #Name \
<< " types, " << sizeof(Name##Type) << " each " \
<< "(" << counts[Idx] * sizeof(Name##Type) \
<< " bytes)\n"; \
TotalBytes += counts[Idx] * sizeof(Name##Type); \
++Idx;
The base class of the type hierarchy.
Definition TypeBase.h:1833

◆ UNEXPECTED_TYPE [1/2]

#define UNEXPECTED_TYPE ( Class,
Kind )
Value:
case Type::Class: \
llvm_unreachable("Unexpected " Kind ": " #Class);

Referenced by getCommonNonSugarTypeNode().

◆ UNEXPECTED_TYPE [2/2]

#define UNEXPECTED_TYPE ( Class,
Kind )
Value:
case Type::Class: \
llvm_unreachable("Unexpected " Kind ": " #Class);

◆ UNSIGNED_TYPE

#define UNSIGNED_TYPE ( Id,
SingletonId )
Value:
case BuiltinType::Id: \
OS << "i"; \
return;

◆ WASM_REF_TYPE

#define WASM_REF_TYPE ( Name,
MangledName,
Id,
SingletonId,
AS )
Value:
if (BuiltinType::Id == BuiltinType::WasmExternRef) \
return SingletonId;

◆ WASM_TYPE [1/3]

#define WASM_TYPE ( Name,
Id,
SingletonId )
Value:
InitBuiltinType(SingletonId, BuiltinType::Id);

◆ WASM_TYPE [2/3]

#define WASM_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
Width = 0; \
Align = 8; \
break;

◆ WASM_TYPE [3/3]

#define WASM_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id:

Enumeration Type Documentation

◆ FloatingRank

Enumerator
BFloat16Rank 
Float16Rank 
HalfRank 
FloatRank 
DoubleRank 
LongDoubleRank 
Float128Rank 
Ibm128Rank 

Definition at line 106 of file ASTContext.cpp.

Function Documentation

◆ addRedeclaredMethods()

void addRedeclaredMethods ( const ObjCMethodDecl * ObjCMethod,
SmallVectorImpl< const NamedDecl * > & Redeclared )
static

◆ adjustDeclToTemplate()

const Decl & adjustDeclToTemplate ( const Decl & D)
static

◆ adjustGVALinkageForAttributes()

◆ adjustGVALinkageForExternalDefinitionKind()

GVALinkage adjustGVALinkageForExternalDefinitionKind ( const ASTContext & Ctx,
const Decl * D,
GVALinkage L )
static

◆ areCompatMatrixTypes()

bool areCompatMatrixTypes ( const ConstantMatrixType * LHS,
const ConstantMatrixType * RHS )
static

areCompatMatrixTypes - Return true if the two specified matrix types are compatible.

Definition at line 10561 of file ASTContext.cpp.

References clang::MatrixType::getElementType(), clang::ConstantMatrixType::getNumColumns(), clang::ConstantMatrixType::getNumRows(), and clang::Type::isCanonicalUnqualified().

Referenced by clang::ASTContext::mergeTypes().

◆ areCompatVectorTypes()

bool areCompatVectorTypes ( const VectorType * LHS,
const VectorType * RHS )
static

areCompatVectorTypes - Return true if the two specified vector types are compatible.

Definition at line 10552 of file ASTContext.cpp.

References clang::VectorType::getElementType(), clang::VectorType::getNumElements(), and clang::Type::isCanonicalUnqualified().

Referenced by clang::ASTContext::mergeTypes().

◆ areSortedAndUniqued()

bool areSortedAndUniqued ( ArrayRef< ObjCProtocolDecl * > Protocols)
static

Definition at line 6233 of file ASTContext.cpp.

References CmpProtocolNames(), and getCanonicalDecl().

Referenced by clang::ASTContext::getObjCObjectType().

◆ basicGVALinkageForFunction()

◆ basicGVALinkageForVariable()

◆ BuildSYCLKernelInfo()

SYCLKernelInfo BuildSYCLKernelInfo ( ASTContext & Context,
CanQualType KernelNameType,
const FunctionDecl * FD )
static

◆ canAssignObjCObjectTypes()

bool canAssignObjCObjectTypes ( ASTContext & ctx,
QualType lhs,
QualType rhs )
static

Determine whether the first type is a subtype of the second.

Definition at line 11073 of file ASTContext.cpp.

References clang::ASTContext::canAssignObjCInterfaces(), clang::Type::getAs(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::ASTContext::typesAreBlockPointerCompatible().

Referenced by sameObjCTypeArgs().

◆ charUnitsToString()

◆ CmpProtocolNames()

int CmpProtocolNames ( ObjCProtocolDecl *const * LHS,
ObjCProtocolDecl *const * RHS )
static

CmpProtocolNames - Comparison predicate for sorting protocols alphabetically.

Definition at line 6228 of file ASTContext.cpp.

References clang::DeclarationName::compare().

Referenced by areSortedAndUniqued(), and SortAndUniqueProtocols().

◆ compareObjCProtocolsByName()

int compareObjCProtocolsByName ( ObjCProtocolDecl *const * lhs,
ObjCProtocolDecl *const * rhs )
static

Comparison routine for Objective-C protocols to be used with llvm::array_pod_sort.

Definition at line 11005 of file ASTContext.cpp.

Referenced by getIntersectionOfProtocols().

◆ CreateAAPCSABIBuiltinVaListDecl()

◆ CreateAArch64ABIBuiltinVaListDecl()

◆ CreateCharPtrBuiltinVaListDecl()

TypedefDecl * CreateCharPtrBuiltinVaListDecl ( const ASTContext * Context)
static

Definition at line 9895 of file ASTContext.cpp.

References CreateCharPtrNamedVaListDecl().

Referenced by CreateVaListDecl().

◆ CreateCharPtrNamedVaListDecl()

TypedefDecl * CreateCharPtrNamedVaListDecl ( const ASTContext * Context,
StringRef Name )
static

Definition at line 9884 of file ASTContext.cpp.

References clang::T.

Referenced by CreateCharPtrBuiltinVaListDecl(), and CreateMSVaListDecl().

◆ CreateHexagonBuiltinVaListDecl()

TypedefDecl * CreateHexagonBuiltinVaListDecl ( const ASTContext * Context)
static

◆ CreateMSVaListDecl()

TypedefDecl * CreateMSVaListDecl ( const ASTContext * Context)
static

◆ CreatePowerABIBuiltinVaListDecl()

TypedefDecl * CreatePowerABIBuiltinVaListDecl ( const ASTContext * Context)
static

◆ CreateSystemZBuiltinVaListDecl()

TypedefDecl * CreateSystemZBuiltinVaListDecl ( const ASTContext * Context)
static

◆ CreateVaListDecl()

◆ CreateVoidPtrBuiltinVaListDecl()

TypedefDecl * CreateVoidPtrBuiltinVaListDecl ( const ASTContext * Context)
static

Definition at line 9899 of file ASTContext.cpp.

References clang::T.

Referenced by CreateVaListDecl().

◆ CreateX86_64ABIBuiltinVaListDecl()

TypedefDecl * CreateX86_64ABIBuiltinVaListDecl ( const ASTContext * Context)
static

◆ CreateXtensaABIBuiltinVaListDecl()

TypedefDecl * CreateXtensaABIBuiltinVaListDecl ( const ASTContext * Context)
static

◆ DecodeTypeFromStr()

QualType DecodeTypeFromStr ( const char *& Str,
const ASTContext & Context,
ASTContext::GetBuiltinTypeError & Error,
bool & RequiresICE,
bool AllowTypeModifiers )
static

DecodeTypeFromStr - This decodes one type descriptor from Str, advancing the pointer over the consumed characters.

This returns the resultant type. If AllowTypeModifiers is false then modifier like * are not parsed, just basic types. This allows "v2i*" to be parsed as a pointer to a v2i instead of a vector of "i*".

RequiresICE is filled in on return to indicate whether the value is required to be an Integer Constant Expression.

Definition at line 12370 of file ASTContext.cpp.

References c, DecodeTypeFromStr(), clang::Error, ASTContext::GE_Missing_setjmp, ASTContext::GE_Missing_stdio, ASTContext::GE_Missing_ucontext, clang::Generic, clang::Type::isArrayType(), clang::Type::isIntegralOrEnumerationType(), clang::Signed, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, and clang::Unsigned.

Referenced by DecodeTypeFromStr(), clang::ASTContext::DecodeTypeStr(), and clang::ASTContext::GetBuiltinType().

◆ EncodeBitField()

◆ encodeTypeForFunctionPointerAuth()

void encodeTypeForFunctionPointerAuth ( const ASTContext & Ctx,
raw_ostream & OS,
QualType QT )
static

Encode a function type for use in the discriminator of a function pointer type.

We can't use the itanium scheme for this since C has quite permissive rules for type compatibility that we need to be compatible with.

Formally, this function associates every function pointer type T with an encoded string E(T). Let the equivalence relation T1 ~ T2 be defined as E(T1) == E(T2). E(T) is part of the ABI of values of type T. C type compatibility requires equivalent treatment under the ABI, so CCompatible(T1, T2) must imply E(T1) == E(T2), that is, CCompatible must be a subset of ~. Crucially, however, it must be a proper subset because CCompatible is not an equivalence relation: for example, int[] is compatible with both int[1] and int[2], but the latter are not compatible with each other. Therefore this encoding function must be careful to only distinguish types if there is no third type with which they are both required to be compatible.

Definition at line 3343 of file ASTContext.cpp.

References clang::cast(), encodeTypeForFunctionPointerAuth(), clang::QualType::getCanonicalType(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), getPointeeType(), clang::CharUnits::getQuantity(), clang::ASTContext::getSignatureParameterType(), clang::TagDecl::getTypedefNameForAnonDecl(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::IntTy, clang::QualType::isNull(), and clang::T.

Referenced by encodeTypeForFunctionPointerAuth(), and clang::ASTContext::getPointerAuthTypeDiscriminator().

◆ getCanonicalElaboratedTypeKeyword()

◆ getCanonicalTemplateArguments()

auto getCanonicalTemplateArguments ( const ASTContext & C,
ArrayRef< TemplateArgument > Args,
bool & AnyNonCanonArgs )
static

◆ getCommonArrayElementType()

template<class T>
QualType getCommonArrayElementType ( const ASTContext & Ctx,
const T * X,
Qualifiers & QX,
const T * Y,
Qualifiers & QY )
static

◆ getCommonAttrLoc()

template<class T>
SourceLocation getCommonAttrLoc ( const T * X,
const T * Y )
static

Definition at line 13682 of file ASTContext.cpp.

References clang::T, and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonDecl() [1/2]

Decl * getCommonDecl ( Decl * X,
Decl * Y )
static

◆ getCommonDecl() [2/2]

template<class T, std::enable_if_t< std::is_base_of_v< Decl, T >, bool > = true>
T * getCommonDecl ( T * X,
T * Y )
static

Definition at line 13637 of file ASTContext.cpp.

References getCommonDecl(), clang::T, and X.

◆ getCommonDeclChecked()

template<class T, std::enable_if_t< std::is_base_of_v< Decl, T >, bool > = true>
T * getCommonDeclChecked ( T * X,
T * Y )
static

Definition at line 13644 of file ASTContext.cpp.

References clang::cast(), getCommonDecl(), clang::T, and X.

Referenced by getCommonNNS(), and getCommonNonSugarTypeNode().

◆ getCommonElementType()

template<class T>
QualType getCommonElementType ( const ASTContext & Ctx,
const T * X,
const T * Y )
static

Definition at line 13847 of file ASTContext.cpp.

References clang::ASTContext::getCommonSugaredType(), clang::T, and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonIndexTypeCVRQualifiers()

auto getCommonIndexTypeCVRQualifiers ( const ArrayType * X,
const ArrayType * Y )
static

Definition at line 13886 of file ASTContext.cpp.

References clang::ArrayType::getIndexTypeCVRQualifiers(), and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonNNS()

◆ getCommonNonSugarTypeNode()

QualType getCommonNonSugarTypeNode ( const ASTContext & Ctx,
const Type * X,
Qualifiers & QX,
const Type * Y,
Qualifiers & QY )
static

Definition at line 13981 of file ASTContext.cpp.

References BitInt, clang::cast(), clang::declaresSameEntity(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, clang::ASTContext::getArrayParameterType(), clang::ASTContext::getAtomicType(), clang::ASTContext::getAutoType(), clang::ASTContext::getBlockPointerType(), getCommonArrayElementType(), getCommonAttrLoc(), getCommonDecl(), getCommonDeclChecked(), getCommonElementType(), getCommonIndexTypeCVRQualifiers(), getCommonPointeeType(), getCommonQualifier(), getCommonSizeExpr(), getCommonSizeModifier(), clang::ASTContext::getCommonSugaredType(), getCommonTemplateArguments(), getCommonTemplateNameChecked(), getCommonTypeKeyword(), getCommonTypes(), clang::ASTContext::getComplexType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getConstantMatrixType(), clang::ASTContext::getDependentAddressSpaceType(), clang::ASTContext::getDependentNameType(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getDependentSizedExtVectorType(), clang::ASTContext::getDependentSizedMatrixType(), clang::ASTContext::getDependentVectorType(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getFunctionNoProtoType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIncompleteArrayType(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getPackExpansionType(), clang::ASTContext::getPointerType(), ASTContext::getReadPipeType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getTagType(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateTypeParmType(), clang::Type::getTypeClass(), clang::ASTContext::getUnaryTransformType(), clang::ASTContext::getVectorType(), ASTContext::getWritePipeType(), clang::ASTContext::hasSameExpr(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::Type::isInstantiationDependentType(), clang::ASTContext::mergeExceptionSpecs(), NON_UNIQUE_TYPE, clang::FunctionProtoType::ExtProtoInfo::RefQualifier, SUGAR_FREE_TYPE, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, UNEXPECTED_TYPE, clang::FunctionProtoType::ExtProtoInfo::Variadic, and X.

Referenced by clang::ASTContext::getCommonSugaredType().

◆ getCommonPointeeType()

template<class T>
QualType getCommonPointeeType ( const ASTContext & Ctx,
const T * X,
const T * Y )
static

◆ getCommonQualifier()

template<class T>
NestedNameSpecifier getCommonQualifier ( const ASTContext & Ctx,
const T * X,
const T * Y,
bool IsSame )
static

Definition at line 13841 of file ASTContext.cpp.

References clang::T, and X.

Referenced by getCommonNonSugarTypeNode(), and getCommonSugarTypeNode().

◆ getCommonSizeExpr()

template<class T>
auto * getCommonSizeExpr ( const ASTContext & Ctx,
T * X,
T * Y )
static

Definition at line 13876 of file ASTContext.cpp.

References clang::ASTContext::hasSameExpr(), clang::T, and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSizeModifier()

auto getCommonSizeModifier ( const ArrayType * X,
const ArrayType * Y )
static

Definition at line 13881 of file ASTContext.cpp.

References clang::ArrayType::getSizeModifier(), and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSugarTypeNode()

◆ getCommonTemplateArgument()

◆ getCommonTemplateArguments() [1/2]

auto getCommonTemplateArguments ( const ASTContext & Ctx,
ArrayRef< TemplateArgument > Xs,
ArrayRef< TemplateArgument > Ys )
static

Definition at line 13748 of file ASTContext.cpp.

References getCommonTemplateArguments().

◆ getCommonTemplateArguments() [2/2]

bool getCommonTemplateArguments ( const ASTContext & Ctx,
SmallVectorImpl< TemplateArgument > & R,
ArrayRef< TemplateArgument > Xs,
ArrayRef< TemplateArgument > Ys )
static

◆ getCommonTemplateName()

◆ getCommonTemplateNameChecked()

TemplateName getCommonTemplateNameChecked ( const ASTContext & Ctx,
TemplateName X,
TemplateName Y,
bool IgnoreDeduced )
static

◆ getCommonTypeKeyword()

template<class T>
ElaboratedTypeKeyword getCommonTypeKeyword ( const T * X,
const T * Y,
bool IsSame )
static

◆ getCommonTypes()

auto getCommonTypes ( const ASTContext & Ctx,
ArrayRef< QualType > Xs,
ArrayRef< QualType > Ys,
bool Unqualified = false )
static

◆ getConstantArrayInfoInChars()

TypeInfoChars getConstantArrayInfoInChars ( const ASTContext & Context,
const ConstantArrayType * CAT )
static

getConstantArrayInfoInChars - Performing the computation in CharUnits instead of in bits prevents overflowing the uint64_t for some large arrays.

Definition at line 1949 of file ASTContext.cpp.

References clang::TypeInfoChars::Align, clang::TypeInfoChars::AlignRequirement, clang::Default, clang::CharUnits::fromQuantity(), clang::ArrayType::getElementType(), clang::CharUnits::getQuantity(), clang::ConstantArrayType::getZExtSize(), and clang::TypeInfoChars::Width.

Referenced by clang::ASTContext::getTypeInfoInChars().

◆ getDeclLocsForCommentSearch()

◆ getDefaultTemplateArgumentOrNone()

const TemplateArgument * getDefaultTemplateArgumentOrNone ( const NamedDecl * P)
static

Definition at line 7286 of file ASTContext.cpp.

References clang::cast(), and clang::Decl::getKind().

Referenced by clang::ASTContext::getCanonicalTemplateName().

◆ getFloatingRank()

FloatingRank getFloatingRank ( QualType T)
static

getFloatingRank - Return a relative rank for floating point types.

This routine will assert if passed a built-in type that isn't a float.

Definition at line 8126 of file ASTContext.cpp.

References BFloat16Rank, DoubleRank, Float128Rank, Float16Rank, FloatRank, getFloatingRank(), clang::BuiltinType::getKind(), HalfRank, Ibm128Rank, LongDoubleRank, and clang::T.

Referenced by getFloatingRank(), and clang::ASTContext::getFloatingTypeOrder().

◆ getFMVBackendFeaturesFor()

std::vector< std::string > getFMVBackendFeaturesFor ( const llvm::SmallVectorImpl< StringRef > & FMVFeatStrings)
static

Definition at line 14888 of file ASTContext.cpp.

Referenced by clang::ASTContext::getFunctionFeatureMap().

◆ getIntegerTypeForEnum()

◆ getIntersectionOfProtocols()

void getIntersectionOfProtocols ( ASTContext & Context,
const ObjCInterfaceDecl * CommonBase,
const ObjCObjectPointerType * LHSOPT,
const ObjCObjectPointerType * RHSOPT,
SmallVectorImpl< ObjCProtocolDecl * > & IntersectionSet )
static

getIntersectionOfProtocols - This routine finds the intersection of set of protocols inherited from two distinct objective-c pointer objects with the given common base.

It is used to build composite qualifier list of the composite type of the conditional expression involving two objective-c pointer objects.

Definition at line 11016 of file ASTContext.cpp.

References compareObjCProtocolsByName(), and clang::ObjCObjectPointerType::getObjectType().

Referenced by clang::ASTContext::areCommonBaseCompatible().

◆ getNonInjectedClassName()

const TagDecl * getNonInjectedClassName ( const TagDecl * TD)
static

◆ getObjCEncodingForPrimitiveType()

◆ getRVVTypeSize()

◆ getSubobjectOffset() [1/2]

int64_t getSubobjectOffset ( const CXXRecordDecl * RD,
const ASTContext & Context,
const clang::ASTRecordLayout & Layout )
static

Definition at line 2868 of file ASTContext.cpp.

References clang::ASTRecordLayout::getBaseClassOffset().

◆ getSubobjectOffset() [2/2]

int64_t getSubobjectOffset ( const FieldDecl * Field,
const ASTContext & Context,
const clang::ASTRecordLayout &  )
static

Definition at line 2862 of file ASTContext.cpp.

Referenced by structSubobjectsHaveUniqueObjectRepresentations().

◆ getSubobjectSizeInBits() [1/2]

std::optional< int64_t > getSubobjectSizeInBits ( const CXXRecordDecl * RD,
const ASTContext & Context,
bool CheckIfTriviallyCopyable )
static

Definition at line 2920 of file ASTContext.cpp.

References structHasUniqueObjectRepresentations().

◆ getSubobjectSizeInBits() [2/2]

std::optional< int64_t > getSubobjectSizeInBits ( const FieldDecl * Field,
const ASTContext & Context,
bool CheckIfTriviallyCopyable )
static

◆ hasAnyPackExpansions()

bool hasAnyPackExpansions ( ArrayRef< TemplateArgument > Args)
static

Definition at line 5988 of file ASTContext.cpp.

Referenced by clang::ASTContext::getTemplateSpecializationType().

◆ hasSameCudaAttrs()

bool hasSameCudaAttrs ( const FunctionDecl * A,
const FunctionDecl * B )
static

◆ hasSameOverloadableAttrs()

bool hasSameOverloadableAttrs ( const FunctionDecl * A,
const FunctionDecl * B )
static

Determine whether the attributes we can overload on are identical for A and B.

Will ignore any overloadable attrs represented in the type of A and B.

Definition at line 7593 of file ASTContext.cpp.

References clang::Decl::getASTContext(), hasSameCudaAttrs(), and clang::Decl::specific_attrs().

Referenced by clang::ASTContext::isSameEntity().

◆ hasTemplateSpecializationInEncodedString()

bool hasTemplateSpecializationInEncodedString ( const Type * T,
bool VisitBasesAndFields )
static

◆ isAddrSpaceMapManglingEnabled()

◆ isCanonicalExceptionSpecification()

◆ isCanonicalResultType()

bool isCanonicalResultType ( QualType T)
static

Determine whether T is canonical as the result type of a function.

Definition at line 4896 of file ASTContext.cpp.

References clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, and clang::T.

Referenced by clang::ASTContext::getFunctionNoProtoType().

◆ isSameQualifier()

◆ isTypeTypedefedAsBOOL()

bool isTypeTypedefedAsBOOL ( QualType T)
static

Definition at line 8722 of file ASTContext.cpp.

References clang::T.

◆ mergeEnumWithInteger()

QualType mergeEnumWithInteger ( ASTContext & Context,
const EnumType * ET,
QualType other,
bool isBlockReturnType )
static

Given that we have an enum type and a non-enum type, try to merge them.

Definition at line 11630 of file ASTContext.cpp.

References clang::Type::isIntegerType(), and clang::QualType::isNull().

Referenced by clang::ASTContext::mergeTypes().

◆ mergeTypeLists()

◆ ObjCEncodingForEnumDecl()

char ObjCEncodingForEnumDecl ( const ASTContext * C,
const EnumDecl * ED )
static

◆ primaryBaseHaseAddressDiscriminatedVTableAuthentication()

bool primaryBaseHaseAddressDiscriminatedVTableAuthentication ( const ASTContext & Context,
const CXXRecordDecl * Class )
static

Definition at line 1710 of file ASTContext.cpp.

References clang::Decl::getAttr().

◆ sameObjCTypeArgs()

◆ SortAndUniqueProtocols()

void SortAndUniqueProtocols ( SmallVectorImpl< ObjCProtocolDecl * > & Protocols)
static

Definition at line 6247 of file ASTContext.cpp.

References CmpProtocolNames().

Referenced by clang::ASTContext::getObjCObjectType().

◆ structHasUniqueObjectRepresentations()

std::optional< int64_t > structHasUniqueObjectRepresentations ( const ASTContext & Context,
const RecordDecl * RD,
bool CheckIfTriviallyCopyable )
static

◆ structSubobjectsHaveUniqueObjectRepresentations()

template<typename RangeT>
std::optional< int64_t > structSubobjectsHaveUniqueObjectRepresentations ( const RangeT & Subobjects,
int64_t CurOffsetInBits,
const ASTContext & Context,
const clang::ASTRecordLayout & Layout,
bool CheckIfTriviallyCopyable )
static

◆ unionHasUniqueObjectRepresentations()

bool unionHasUniqueObjectRepresentations ( const ASTContext & Context,
const RecordDecl * RD,
bool CheckIfTriviallyCopyable )
static

◆ unwrapSugar()

auto unwrapSugar ( SplitQualType & T,
Qualifiers & QTotal )
static