clang 20.0.0git
Macros | Enumerations | Functions
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/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/ExprConcepts.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/StmtOpenACC.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/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.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.

Macros

#define TYPE(Name, Parent)   0,
 
#define ABSTRACT_TYPE(Name, Parent)
 
#define TYPE(Name, Parent)
 
#define ABSTRACT_TYPE(Name, Parent)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)    InitBuiltinType(Id##Ty, BuiltinType::Id);
 
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define SVE_TYPE(Name, Id, SingletonId)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define PPC_VECTOR_MMA_TYPE(Name, Id, Size)    InitBuiltinType(Id##Ty, BuiltinType::Id);
 
#define PPC_VECTOR_VSX_TYPE(Name, Id, Size)    InitBuiltinType(Id##Ty, BuiltinType::Id);
 
#define RVV_TYPE(Name, Id, SingletonId)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define WASM_TYPE(Name, Id, SingletonId)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define AMDGPU_TYPE(Name, Id, SingletonId)    InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_TYPE(Class, Base)
 
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)    case BuiltinType::Id:
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)    case BuiltinType::Id:
 
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId, NumEls, ElBits, IsSigned, IsFP, IsBF)
 
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId, NumEls)
 
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
 
#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_OPAQUE_PTR_TYPE(NAME, MANGLEDNAME, AS, WIDTH, ALIGN, ID, SINGLETONID)
 
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define SIGNED_TYPE(Id, SingletonId)
 
#define UNSIGNED_TYPE(Id, SingletonId)
 
#define PLACEHOLDER_TYPE(Id, SingletonId)   case BuiltinType::Id:
 
#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 RVV_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
 
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define ABSTRACT_TYPE(Class, Base)
 
#define TYPE(Class, Base)
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
 
#define SVE_INT_ELTTY(BITS, ELTS, SIGNED, NUMVECTORS)
 
#define SVE_ELTTY(ELTTY, ELTS, NUMVECTORS)    {ELTTY, llvm::ElementCount::getScalable(ELTS), NUMVECTORS};
 
#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(Name, MangledName, Id, SingletonId, NumEls, ElBits, IsSigned, IsFP, IsBF)
 
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId, NumEls)
 
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingleTonId)
 
#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)    case BuiltinType::Id:
 
#define RVV_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define WASM_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define AMDGPU_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)    case BuiltinType::Id:
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)    case BuiltinType::Id:
 
#define PPC_VECTOR_TYPE(Name, Id, Size)    case BuiltinType::Id:
 
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define BUILTIN_TYPE(KIND, ID)
 
#define PLACEHOLDER_TYPE(KIND, ID)    case BuiltinType::KIND:
 
#define ABSTRACT_TYPE(KIND, BASE)
 
#define TYPE(KIND, BASE)
 
#define DEPENDENT_TYPE(KIND, BASE)    case Type::KIND:
 
#define NON_CANONICAL_TYPE(KIND, BASE)    case Type::KIND:
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(KIND, BASE)    case Type::KIND:
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
 
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define UNEXPECTED_TYPE(Class, Kind)
 
#define NON_CANONICAL_TYPE(Class, Base)   UNEXPECTED_TYPE(Class, "non-canonical")
 
#define TYPE(Class, Base)
 
#define SUGAR_FREE_TYPE(Class)   UNEXPECTED_TYPE(Class, "sugar-free")
 
#define NON_UNIQUE_TYPE(Class)   UNEXPECTED_TYPE(Class, "non-unique")
 
#define UNEXPECTED_TYPE(Class, Kind)
 
#define TYPE(Class, Base)
 
#define DEPENDENT_TYPE(Class, Base)   UNEXPECTED_TYPE(Class, "dependent")
 
#define CANONICAL_TYPE(Class)   UNEXPECTED_TYPE(Class, "canonical")
 

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 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 bool NeedsInjectedClassNameType (const RecordDecl *D)
 
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 NamespaceDeclgetNamespace (const NestedNameSpecifier *X)
 
static bool isSameQualifier (const NestedNameSpecifier *X, const NestedNameSpecifier *Y)
 
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 ObjCEncodingForEnumType (const ASTContext *C, const EnumType *ET)
 
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 TypedefDeclCreatePNaClABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateAAPCSABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateSystemZBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateHexagonBuiltinVaListDecl (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 getSVETypeSize (ASTContext &Context, const BuiltinType *Ty)
 getSVETypeSize - Return SVE vector or predicate register size.
 
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 (ASTContext &Ctx, TemplateName X, TemplateName Y)
 
static TemplateName getCommonTemplateNameChecked (ASTContext &Ctx, TemplateName X, TemplateName Y)
 
static auto getCommonTypes (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 (ASTContext &Ctx, const TemplateArgument &X, const TemplateArgument &Y)
 
static bool getCommonTemplateArguments (ASTContext &Ctx, SmallVectorImpl< TemplateArgument > &R, ArrayRef< TemplateArgument > Xs, ArrayRef< TemplateArgument > Ys)
 
static auto getCommonTemplateArguments (ASTContext &Ctx, ArrayRef< TemplateArgument > Xs, ArrayRef< TemplateArgument > Ys)
 
template<class T >
static ElaboratedTypeKeyword getCommonTypeKeyword (const T *X, const T *Y)
 
template<class T >
static NestedNameSpecifiergetCommonNNS (ASTContext &Ctx, const T *X, const T *Y)
 
template<class T >
static QualType getCommonElementType (ASTContext &Ctx, const T *X, const T *Y)
 
template<class T >
static QualType getCommonArrayElementType (ASTContext &Ctx, const T *X, Qualifiers &QX, const T *Y, Qualifiers &QY)
 
template<class T >
static QualType getCommonPointeeType (ASTContext &Ctx, const T *X, const T *Y)
 
template<class T >
static auto * getCommonSizeExpr (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 (ASTContext &Ctx, SmallVectorImpl< QualType > &Out, ArrayRef< QualType > X, ArrayRef< QualType > Y)
 
static QualType getCommonNonSugarTypeNode (ASTContext &Ctx, const Type *X, Qualifiers &QX, const Type *Y, Qualifiers &QY)
 
static QualType getCommonSugarTypeNode (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)
 

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_OPAQUE_PTR_TYPE

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

◆ AMDGPU_TYPE [1/2]

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

◆ AMDGPU_TYPE [2/2]

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

◆ BUILTIN_TYPE [1/2]

#define BUILTIN_TYPE (   Id,
  SingletonId 
)

◆ BUILTIN_TYPE [2/2]

#define BUILTIN_TYPE (   KIND,
  ID 
)

◆ CANONICAL_TYPE

#define CANONICAL_TYPE (   Class)    UNEXPECTED_TYPE(Class, "canonical")

◆ DEPENDENT_TYPE [1/5]

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

◆ DEPENDENT_TYPE [2/5]

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

◆ DEPENDENT_TYPE [3/5]

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

◆ DEPENDENT_TYPE [4/5]

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

◆ DEPENDENT_TYPE [5/5]

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

◆ EXT_OPAQUE_TYPE [1/4]

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

◆ EXT_OPAQUE_TYPE [2/4]

#define EXT_OPAQUE_TYPE (   ExtType,
  Id,
  Ext 
)     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 
)     case BuiltinType::Id:

◆ HLSL_INTANGIBLE_TYPE [1/4]

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

◆ HLSL_INTANGIBLE_TYPE [2/4]

#define HLSL_INTANGIBLE_TYPE (   Name,
  Id,
  SingletonId 
)    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 
)    case BuiltinType::Id:

◆ IMAGE_TYPE [1/5]

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

◆ IMAGE_TYPE [2/5]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)     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:208

◆ IMAGE_TYPE [5/5]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)     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 
)    case Type::Class:

◆ NON_CANONICAL_TYPE [3/6]

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

◆ NON_CANONICAL_TYPE [4/6]

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

◆ NON_CANONICAL_TYPE [5/6]

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

◆ NON_CANONICAL_TYPE [6/6]

#define NON_CANONICAL_TYPE (   KIND,
  BASE 
)     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());
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:2695
const FunctionProtoType * T

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/4]

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

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [3/4]

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

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [4/4]

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

◆ NON_UNIQUE_TYPE

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

◆ PLACEHOLDER_TYPE [1/2]

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

◆ PLACEHOLDER_TYPE [2/2]

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

◆ PPC_VECTOR_MMA_TYPE

#define PPC_VECTOR_MMA_TYPE (   Name,
  Id,
  Size 
)     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 
)     case BuiltinType::Id:

◆ PPC_VECTOR_VSX_TYPE

#define PPC_VECTOR_VSX_TYPE (   Name,
  Id,
  Size 
)     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 
)     InitBuiltinType(SingletonId, BuiltinType::Id);

◆ RVV_TYPE [2/3]

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

◆ RVV_TYPE [3/3]

#define RVV_TYPE (   Name,
  Id,
  SingletonId 
)    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)    UNEXPECTED_TYPE(Class, "sugar-free")

◆ SVE_ELTTY

#define SVE_ELTTY (   ELTTY,
  ELTS,
  NUMVECTORS 
)     {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 [1/2]

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

◆ SVE_OPAQUE_TYPE [2/2]

#define SVE_OPAQUE_TYPE (   Name,
  MangledName,
  Id,
  SingleTonId 
)

◆ SVE_PREDICATE_TYPE [1/2]

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

◆ SVE_PREDICATE_TYPE [2/2]

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

◆ SVE_TYPE [1/3]

#define SVE_TYPE (   Name,
  Id,
  SingletonId 
)     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 
)     case BuiltinType::Id:

◆ SVE_VECTOR_TYPE [1/2]

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

◆ SVE_VECTOR_TYPE [2/2]

#define SVE_VECTOR_TYPE (   Name,
  MangledName,
  Id,
  SingletonId,
  NumEls,
  ElBits,
  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) { \
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 
)    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: Type.h:1829

◆ UNEXPECTED_TYPE [1/2]

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

◆ 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 
)     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 
)    case BuiltinType::Id:

Enumeration Type Documentation

◆ FloatingRank

Enumerator
BFloat16Rank 
Float16Rank 
HalfRank 
FloatRank 
DoubleRank 
LongDoubleRank 
Float128Rank 
Ibm128Rank 

Definition at line 107 of file ASTContext.cpp.

Function Documentation

◆ addRedeclaredMethods()

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

◆ adjustDeclToTemplate()

static const Decl & adjustDeclToTemplate ( const Decl D)
static

◆ adjustGVALinkageForAttributes()

static GVALinkage adjustGVALinkageForAttributes ( const ASTContext Context,
const Decl D,
GVALinkage  L 
)
static

◆ adjustGVALinkageForExternalDefinitionKind()

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

◆ areCompatMatrixTypes()

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

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

Definition at line 9895 of file ASTContext.cpp.

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

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

◆ areCompatVectorTypes()

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

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

Definition at line 9886 of file ASTContext.cpp.

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

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

◆ areSortedAndUniqued()

static bool areSortedAndUniqued ( ArrayRef< ObjCProtocolDecl * >  Protocols)
static

Definition at line 5690 of file ASTContext.cpp.

References CmpProtocolNames(), and getCanonicalDecl().

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

◆ basicGVALinkageForFunction()

static GVALinkage basicGVALinkageForFunction ( const ASTContext Context,
const FunctionDecl FD 
)
static

◆ basicGVALinkageForVariable()

static GVALinkage basicGVALinkageForVariable ( const ASTContext Context,
const VarDecl VD 
)
static

◆ canAssignObjCObjectTypes()

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

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

Definition at line 10487 of file ASTContext.cpp.

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

Referenced by sameObjCTypeArgs().

◆ charUnitsToString()

static std::string charUnitsToString ( const CharUnits CU)
static

◆ CmpProtocolNames()

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

CmpProtocolNames - Comparison predicate for sorting protocols alphabetically.

Definition at line 5685 of file ASTContext.cpp.

References clang::DeclarationName::compare().

Referenced by areSortedAndUniqued(), and SortAndUniqueProtocols().

◆ compareObjCProtocolsByName()

static 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 10419 of file ASTContext.cpp.

Referenced by getIntersectionOfProtocols().

◆ CreateAAPCSABIBuiltinVaListDecl()

static TypedefDecl * CreateAAPCSABIBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateAArch64ABIBuiltinVaListDecl()

static TypedefDecl * CreateAArch64ABIBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateCharPtrBuiltinVaListDecl()

static TypedefDecl * CreateCharPtrBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 9243 of file ASTContext.cpp.

References CreateCharPtrNamedVaListDecl().

Referenced by CreateVaListDecl().

◆ CreateCharPtrNamedVaListDecl()

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

◆ CreateHexagonBuiltinVaListDecl()

static TypedefDecl * CreateHexagonBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateMSVaListDecl()

static TypedefDecl * CreateMSVaListDecl ( const ASTContext Context)
static

◆ CreatePNaClABIBuiltinVaListDecl()

static TypedefDecl * CreatePNaClABIBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreatePowerABIBuiltinVaListDecl()

static TypedefDecl * CreatePowerABIBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateSystemZBuiltinVaListDecl()

static TypedefDecl * CreateSystemZBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateVaListDecl()

static TypedefDecl * CreateVaListDecl ( const ASTContext Context,
TargetInfo::BuiltinVaListKind  Kind 
)
static

◆ CreateVoidPtrBuiltinVaListDecl()

static TypedefDecl * CreateVoidPtrBuiltinVaListDecl ( const ASTContext Context)
static

◆ CreateX86_64ABIBuiltinVaListDecl()

static TypedefDecl * CreateX86_64ABIBuiltinVaListDecl ( const ASTContext Context)
static

◆ DecodeTypeFromStr()

static 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 11729 of file ASTContext.cpp.

References clang::ASTContext::BFloat16Ty, clang::ASTContext::BoolTy, c, clang::ASTContext::CharTy, DecodeTypeFromStr(), clang::ASTContext::DoubleTy, clang::ASTContext::Float128Ty, clang::ASTContext::Float16Ty, clang::ASTContext::FloatTy, clang::ASTContext::GE_Missing_setjmp, clang::ASTContext::GE_Missing_stdio, clang::ASTContext::GE_Missing_ucontext, clang::Generic, clang::ASTContext::getAddrSpaceQualType(), clang::ASTContext::getArrayDecayedType(), clang::ASTContext::getBuiltinVaListType(), clang::ASTContext::getCFConstantStringType(), clang::ASTContext::getComplexType(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getFILEType(), clang::TargetInfo::getInt64Type(), clang::TargetInfo::getIntTypeByWidth(), clang::ASTContext::getjmp_bufType(), clang::ASTContext::getLangASForBuiltinAddressSpace(), clang::ASTContext::getLangOpts(), clang::TargetInfo::getLongWidth(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCSelType(), clang::ASTContext::getObjCSuperType(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getPointerType(), clang::ASTContext::getProcessIDType(), clang::ASTContext::getScalableVectorType(), clang::ASTContext::getsigjmp_bufType(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getucontext_tType(), clang::ASTContext::getVectorType(), clang::ASTContext::getVolatileType(), clang::ASTContext::getWideCharType(), clang::ASTContext::HalfTy, clang::ASTContext::Int128Ty, clang::ASTContext::IntTy, clang::Type::isArrayType(), clang::Type::isIntegralOrEnumerationType(), clang::ASTContext::LongDoubleTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::ASTContext::ShortTy, clang::Signed, clang::ASTContext::SignedCharTy, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::Unsigned, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedInt128Ty, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::ASTContext::UnsignedShortTy, and clang::ASTContext::VoidTy.

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

◆ EncodeBitField()

static void EncodeBitField ( const ASTContext Ctx,
std::string &  S,
QualType  T,
const FieldDecl FD 
)
static

◆ encodeTypeForFunctionPointerAuth()

static 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 3177 of file ASTContext.cpp.

References clang::Type::castAs(), encodeTypeForFunctionPointerAuth(), clang::QualType::getCanonicalType(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), getPointeeType(), clang::CharUnits::getQuantity(), clang::ASTContext::getSignatureParameterType(), clang::Type::getTypeClass(), 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().

◆ getCanonicalTemplateArguments()

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

◆ getCommonArrayElementType()

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

◆ getCommonAttrLoc()

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

Definition at line 13010 of file ASTContext.cpp.

References X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonDecl() [1/2]

static 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>
static T * getCommonDecl ( T *  X,
T *  Y 
)
static

Definition at line 12967 of file ASTContext.cpp.

References getCommonDecl(), and X.

◆ getCommonDeclChecked()

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

Definition at line 12974 of file ASTContext.cpp.

References getCommonDecl(), and X.

Referenced by getCommonNonSugarTypeNode().

◆ getCommonElementType()

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

Definition at line 13102 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonIndexTypeCVRQualifiers()

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

Definition at line 13134 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonNNS()

template<class T >
static NestedNameSpecifier * getCommonNNS ( ASTContext Ctx,
const T *  X,
const T *  Y 
)
static

◆ getCommonNonSugarTypeNode()

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

Definition at line 13228 of file ASTContext.cpp.

References BitInt, clang::Enum, 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(), getCommonNNS(), getCommonPointeeType(), 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::getDependentTemplateSpecializationType(), clang::ASTContext::getDependentVectorType(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getFunctionNoProtoType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIncompleteArrayType(), clang::ASTContext::getInjectedClassNameType(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getPackExpansionType(), clang::ASTContext::getPointerType(), clang::ASTContext::getReadPipeType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateTypeParmType(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::ASTContext::getUnaryTransformType(), clang::ASTContext::getVectorType(), clang::ASTContext::getWritePipeType(), clang::ASTContext::hasSameExpr(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::Type::isInstantiationDependentType(), clang::ASTContext::mergeExceptionSpecs(), NON_UNIQUE_TYPE, P, 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 >
static QualType getCommonPointeeType ( ASTContext Ctx,
const T *  X,
const T *  Y 
)
static

Definition at line 13120 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSizeExpr()

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

Definition at line 13124 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSizeModifier()

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

Definition at line 13129 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSugarTypeNode()

static QualType getCommonSugarTypeNode ( ASTContext Ctx,
const Type X,
const Type Y,
SplitQualType  Underlying 
)
static

◆ getCommonTemplateArgument()

static TemplateArgument getCommonTemplateArgument ( ASTContext Ctx,
const TemplateArgument X,
const TemplateArgument Y 
)
static

◆ getCommonTemplateArguments() [1/2]

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

Definition at line 13076 of file ASTContext.cpp.

References getCommonTemplateArguments().

◆ getCommonTemplateArguments() [2/2]

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

◆ getCommonTemplateName()

static TemplateName getCommonTemplateName ( ASTContext Ctx,
TemplateName  X,
TemplateName  Y 
)
static

◆ getCommonTemplateNameChecked()

static TemplateName getCommonTemplateNameChecked ( ASTContext Ctx,
TemplateName  X,
TemplateName  Y 
)
static

◆ getCommonTypeKeyword()

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

Definition at line 13087 of file ASTContext.cpp.

References clang::None, and X.

Referenced by getCommonNonSugarTypeNode(), and getCommonSugarTypeNode().

◆ getCommonTypes()

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

◆ getConstantArrayInfoInChars()

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

◆ getDeclLocsForCommentSearch()

static SmallVector< SourceLocation, 2 > getDeclLocsForCommentSearch ( const Decl D,
SourceManager SourceMgr 
)
static

◆ getFloatingRank()

static 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 7492 of file ASTContext.cpp.

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

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

◆ getFMVBackendFeaturesFor()

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

Definition at line 14108 of file ASTContext.cpp.

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

◆ getIntegerTypeForEnum()

static const Type * getIntegerTypeForEnum ( const EnumType ET)
static

◆ getIntersectionOfProtocols()

static 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 10430 of file ASTContext.cpp.

References clang::ASTContext::CollectInheritedProtocols(), compareObjCProtocolsByName(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), and clang::ObjCProtocolQualifiers< T >::quals().

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

◆ getNamespace()

static NamespaceDecl * getNamespace ( const NestedNameSpecifier X)
static

Definition at line 6906 of file ASTContext.cpp.

References X.

Referenced by isSameQualifier().

◆ getObjCEncodingForPrimitiveType()

static char getObjCEncodingForPrimitiveType ( const ASTContext C,
const BuiltinType BT 
)
static

◆ getRVVTypeSize()

static uint64_t getRVVTypeSize ( ASTContext Context,
const BuiltinType Ty 
)
static

◆ getSubobjectOffset() [1/2]

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

◆ getSubobjectOffset() [2/2]

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

◆ getSubobjectSizeInBits() [1/2]

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

Definition at line 2756 of file ASTContext.cpp.

References structHasUniqueObjectRepresentations().

◆ getSubobjectSizeInBits() [2/2]

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

◆ getSVETypeSize()

static uint64_t getSVETypeSize ( ASTContext Context,
const BuiltinType Ty 
)
static

◆ hasAnyPackExpansions()

static bool hasAnyPackExpansions ( ArrayRef< TemplateArgument Args)
static

Definition at line 5357 of file ASTContext.cpp.

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

◆ hasSameOverloadableAttrs()

static 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 6955 of file ASTContext.cpp.

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

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

◆ hasTemplateSpecializationInEncodedString()

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

◆ isAddrSpaceMapManglingEnabled()

static bool isAddrSpaceMapManglingEnabled ( const TargetInfo TI,
const LangOptions LangOpts 
)
static

◆ isCanonicalExceptionSpecification()

static bool isCanonicalExceptionSpecification ( const FunctionProtoType::ExceptionSpecInfo ESI,
bool  NoexceptInType 
)
static

◆ isCanonicalResultType()

static bool isCanonicalResultType ( QualType  T)
static

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

Definition at line 4704 of file ASTContext.cpp.

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

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

◆ isSameQualifier()

static bool isSameQualifier ( const NestedNameSpecifier X,
const NestedNameSpecifier Y 
)
static

◆ isTypeTypedefedAsBOOL()

static bool isTypeTypedefedAsBOOL ( QualType  T)
static

Definition at line 8085 of file ASTContext.cpp.

References clang::T.

◆ mergeEnumWithInteger()

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

◆ mergeTypeLists()

static void mergeTypeLists ( ASTContext Ctx,
SmallVectorImpl< QualType > &  Out,
ArrayRef< QualType X,
ArrayRef< QualType Y 
)
static

◆ NeedsInjectedClassNameType()

static bool NeedsInjectedClassNameType ( const RecordDecl D)
static

Definition at line 5016 of file ASTContext.cpp.

References D.

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

◆ ObjCEncodingForEnumType()

static char ObjCEncodingForEnumType ( const ASTContext C,
const EnumType ET 
)
static

◆ sameObjCTypeArgs()

static bool sameObjCTypeArgs ( ASTContext ctx,
const ObjCInterfaceDecl iface,
ArrayRef< QualType lhsArgs,
ArrayRef< QualType rhsArgs,
bool  stripKindOf 
)
static

◆ SortAndUniqueProtocols()

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

Definition at line 5704 of file ASTContext.cpp.

References CmpProtocolNames(), and P.

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

◆ structHasUniqueObjectRepresentations()

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

◆ structSubobjectsHaveUniqueObjectRepresentations()

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

◆ unionHasUniqueObjectRepresentations()

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

◆ unwrapSugar()

static auto unwrapSugar ( SplitQualType T,
Qualifiers QTotal 
)
static