clang  16.0.0git
Macros | Enumerations | Functions
ASTContext.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "CXXABI.h"
#include "Interp/Context.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/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/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/None.h"
#include "llvm/ADT/Optional.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/ADT/Triple.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/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include "clang/AST/TypeNodes.inc"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.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 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 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 PPC_VECTOR_TYPE(Name, Id, Size)
 
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, NF, IsSigned, IsFP)
 
#define RVV_PREDICATE_TYPE(Name, Id, SingletonId, ElKind)
 
#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_PREDICATE_TYPE(Name, Id, SingletonId, NumEls)
 
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId, NumEls, ElBits, IsSigned, IsFP, IsBF)
 
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId, NumEls)
 
#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, IsFP)
 
#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 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 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 SourceLocation getDeclLocForCommentSearch (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. More...
 
static void addRedeclaredMethods (const ObjCMethodDecl *ObjCMethod, SmallVectorImpl< const NamedDecl * > &Redeclared)
 
static ExprcanonicalizeImmediatelyDeclaredConstraint (const ASTContext &C, Expr *IDC, QualType ConstrainedType)
 
static const LangASMapgetAddressSpaceMap (const TargetInfo &T, const LangOptions &LOpts)
 
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. More...
 
static bool unionHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD)
 
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 llvm::Optional< int64_t > structHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD)
 
static llvm::Optional< int64_t > getSubobjectSizeInBits (const FieldDecl *Field, const ASTContext &Context)
 
static llvm::Optional< int64_t > getSubobjectSizeInBits (const CXXRecordDecl *RD, const ASTContext &Context)
 
template<typename RangeT >
static llvm::Optional< int64_t > structSubobjectsHaveUniqueObjectRepresentations (const RangeT &Subobjects, int64_t CurOffsetInBits, const ASTContext &Context, const clang::ASTRecordLayout &Layout)
 
static auto getCanonicalTemplateArguments (const ASTContext &C, ArrayRef< TemplateArgument > Args, bool &AnyNonCanonArgs)
 
static bool isCanonicalResultType (QualType T)
 Determine whether T is canonical as the result type of a function. More...
 
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. More...
 
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. More...
 
static FloatingRank getFloatingRank (QualType T)
 getFloatingRank - Return a relative rank for floating point types. More...
 
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. More...
 
static bool areCompatMatrixTypes (const ConstantMatrixType *LHS, const ConstantMatrixType *RHS)
 areCompatMatrixTypes - Return true if the two specified matrix types are compatible. More...
 
static uint64_t getSVETypeSize (ASTContext &Context, const BuiltinType *Ty)
 getSVETypeSize - Return SVE vector or predicate register size. More...
 
static int compareObjCProtocolsByName (ObjCProtocolDecl *const *lhs, ObjCProtocolDecl *const *rhs)
 Comparison routine for Objective-C protocols to be used with llvm::array_pod_sort. More...
 
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. More...
 
static bool canAssignObjCObjectTypes (ASTContext &ctx, QualType lhs, QualType rhs)
 Determine whether the first type is a subtype of the second. More...
 
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. More...
 
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. More...
 
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. More...
 
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)
 

Macro Definition Documentation

◆ ABSTRACT_TYPE [1/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ ABSTRACT_TYPE [2/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ ABSTRACT_TYPE [3/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ ABSTRACT_TYPE [4/6]

#define ABSTRACT_TYPE (   KIND,
  BASE 
)

◆ ABSTRACT_TYPE [5/6]

#define ABSTRACT_TYPE (   Name,
  Parent 
)

◆ ABSTRACT_TYPE [6/6]

#define ABSTRACT_TYPE (   Name,
  Parent 
)

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   KIND,
  ID 
)

◆ CANONICAL_TYPE

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

◆ DEPENDENT_TYPE [1/4]

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

◆ DEPENDENT_TYPE [2/4]

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

◆ DEPENDENT_TYPE [3/4]

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

◆ DEPENDENT_TYPE [4/4]

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

◆ EXT_OPAQUE_TYPE [1/3]

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

◆ EXT_OPAQUE_TYPE [2/3]

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

◆ EXT_OPAQUE_TYPE [3/3]

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

◆ IMAGE_TYPE [1/4]

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

◆ IMAGE_TYPE [2/4]

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

◆ IMAGE_TYPE [3/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
return OCLTK_Image;

◆ IMAGE_TYPE [4/4]

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

◆ NON_CANONICAL_TYPE [1/5]

#define NON_CANONICAL_TYPE (   Class,
  Base 
)

◆ NON_CANONICAL_TYPE [2/5]

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

◆ NON_CANONICAL_TYPE [3/5]

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

◆ NON_CANONICAL_TYPE [4/5]

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

◆ NON_CANONICAL_TYPE [5/5]

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

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [1/3]

#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());

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/3]

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

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [3/3]

#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

#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:
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:
Width = 0; \
Align = 8; \
break;

◆ RVV_PREDICATE_TYPE [2/3]

#define RVV_PREDICATE_TYPE (   Name,
  Id,
  SingletonId,
  NumEls 
)
Value:
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/2]

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

◆ RVV_TYPE [2/2]

#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 
)
Value:
Width = 0; \
Align = ElBits; \
break;

◆ RVV_VECTOR_TYPE [2/2]

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

◆ RVV_VECTOR_TYPE_FLOAT

#define RVV_VECTOR_TYPE_FLOAT (   Name,
  Id,
  SingletonId,
  NumEls,
  ElBits,
  NF 
)
Value:
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:
return {getIntTypeForBitwidth(ElBits, IsSigned), \
llvm::ElementCount::getScalable(NumEls), NF};

◆ 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_PREDICATE_TYPE [1/2]

#define SVE_PREDICATE_TYPE (   Name,
  MangledName,
  Id,
  SingletonId,
  NumEls 
)
Value:
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/2]

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

◆ SVE_TYPE [2/2]

#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:
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/8]

#define TYPE (   Class,
  Base 
)

◆ TYPE [2/8]

#define TYPE (   Class,
  Base 
)

◆ TYPE [3/8]

#define TYPE (   Class,
  Base 
)

◆ TYPE [4/8]

#define TYPE (   Class,
  Base 
)

◆ TYPE [5/8]

#define TYPE (   Class,
  Base 
)

◆ TYPE [6/8]

#define TYPE (   KIND,
  BASE 
)

◆ TYPE [7/8]

#define TYPE (   Name,
  Parent 
)    0,

◆ TYPE [8/8]

#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;

◆ 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);

Enumeration Type Documentation

◆ FloatingRank

Enumerator
BFloat16Rank 
Float16Rank 
HalfRank 
FloatRank 
DoubleRank 
LongDoubleRank 
Float128Rank 
Ibm128Rank 

Definition at line 103 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 9403 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 9394 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 5302 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 9884 of file ASTContext.cpp.

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

Referenced by sameObjCTypeArgs().

◆ canonicalizeImmediatelyDeclaredConstraint()

static Expr* canonicalizeImmediatelyDeclaredConstraint ( const ASTContext C,
Expr IDC,
QualType  ConstrainedType 
)
static

◆ charUnitsToString()

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

Definition at line 7654 of file ASTContext.cpp.

References clang::CharUnits::getQuantity().

◆ CmpProtocolNames()

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

CmpProtocolNames - Comparison predicate for sorting protocols alphabetically.

Definition at line 5297 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 9816 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 8750 of file ASTContext.cpp.

References CreateCharPtrNamedVaListDecl().

Referenced by CreateVaListDecl().

◆ CreateCharPtrNamedVaListDecl()

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

Definition at line 8739 of file ASTContext.cpp.

Referenced by CreateCharPtrBuiltinVaListDecl(), and CreateMSVaListDecl().

◆ 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 11077 of file ASTContext.cpp.

References clang::ASTContext::BFloat16Ty, clang::ASTContext::BoolTy, c, clang::ASTContext::CharTy, clang::ASTContext::DoubleTy, End, 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::VectorType::GenericVector, 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 clang::ASTContext::DecodeTypeStr(), and clang::ASTContext::GetBuiltinType().

◆ EncodeBitField()

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

Definition at line 8102 of file ASTContext.cpp.

◆ getAddressSpaceMap()

static const LangASMap* getAddressSpaceMap ( const TargetInfo T,
const LangOptions LOpts 
)
static

◆ 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 12323 of file ASTContext.cpp.

References clang::tooling::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 12280 of file ASTContext.cpp.

References getCommonDecl(), and clang::tooling::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 12287 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonElementType()

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

◆ getCommonIndexTypeCVRQualifiers()

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

◆ 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 12541 of file ASTContext.cpp.

References clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, 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 clang::tooling::X().

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

◆ getCommonPointeeType()

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

◆ getCommonSizeExpr()

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

Definition at line 12437 of file ASTContext.cpp.

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

Referenced by getCommonNonSugarTypeNode().

◆ getCommonSizeModifier()

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

◆ 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 12389 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 12400 of file ASTContext.cpp.

References clang::ETK_None, and clang::tooling::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

◆ getDeclLocForCommentSearch()

static SourceLocation getDeclLocForCommentSearch ( 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 7031 of file ASTContext.cpp.

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

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

◆ 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 9827 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 6436 of file ASTContext.cpp.

References clang::tooling::X().

Referenced by isSameQualifier().

◆ getObjCEncodingForPrimitiveType()

static char getObjCEncodingForPrimitiveType ( const ASTContext C,
const BuiltinType BT 
)
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 llvm::Optional<int64_t> getSubobjectSizeInBits ( const CXXRecordDecl RD,
const ASTContext Context 
)
static

Definition at line 2768 of file ASTContext.cpp.

References structHasUniqueObjectRepresentations().

◆ getSubobjectSizeInBits() [2/2]

static llvm::Optional<int64_t> getSubobjectSizeInBits ( const FieldDecl Field,
const ASTContext Context 
)
static

◆ getSVETypeSize()

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

◆ hasAnyPackExpansions()

static bool hasAnyPackExpansions ( ArrayRef< TemplateArgument Args)
static

Definition at line 4975 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 6485 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

Definition at line 965 of file ASTContext.cpp.

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

◆ 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 4330 of file ASTContext.cpp.

References clang::QualType::getObjCLifetime(), clang::QualType::isCanonical(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.

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

◆ 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

Definition at line 12457 of file ASTContext.cpp.

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

◆ NeedsInjectedClassNameType()

static bool NeedsInjectedClassNameType ( const RecordDecl D)
static

Definition at line 4637 of file ASTContext.cpp.

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

References CmpProtocolNames(), and P.

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

◆ structHasUniqueObjectRepresentations()

static llvm::Optional< int64_t > structHasUniqueObjectRepresentations ( const ASTContext Context,
const RecordDecl RD 
)
static

◆ structSubobjectsHaveUniqueObjectRepresentations()

template<typename RangeT >
static llvm::Optional<int64_t> structSubobjectsHaveUniqueObjectRepresentations ( const RangeT &  Subobjects,
int64_t  CurOffsetInBits,
const ASTContext Context,
const clang::ASTRecordLayout Layout 
)
static

◆ unionHasUniqueObjectRepresentations()

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

◆ unwrapSugar()

static auto unwrapSugar ( SplitQualType T,
Qualifiers QTotal 
)
static
clang::OCLTK_Image
@ OCLTK_Image
Definition: TargetInfo.h:196
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1565
Id
int Id
Definition: ASTDiff.cpp:189
clang::syntax::NodeRole::Size
@ Size
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
Type
MatchType Type
Definition: ASTMatchFinder.cpp:71