clang 19.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
clang::ASTContext Class Reference

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More...

#include "clang/AST/ASTContext.h"

Inheritance diagram for clang::ASTContext:
Inheritance graph
[legend]

Classes

struct  BuiltinVectorTypeInfo
 
struct  CUDAConstantEvalContext
 
struct  CUDAConstantEvalContextRAII
 
struct  SectionInfo
 

Public Types

enum  GetBuiltinTypeError {
  GE_None , GE_Missing_type , GE_Missing_stdio , GE_Missing_setjmp ,
  GE_Missing_ucontext
}
 
enum  NeedExtraManglingDecl_t { NeedExtraManglingDecl }
 
enum class  InlineVariableDefinitionKind { None , Weak , WeakUnknown , Strong }
 
enum  PragmaSectionFlag : unsigned {
  PSF_None = 0 , PSF_Read = 0x1 , PSF_Write = 0x2 , PSF_Execute = 0x4 ,
  PSF_Implicit = 0x8 , PSF_ZeroInit = 0x10 , PSF_Invalid = 0x80000000U
}
 
using TemplateOrSpecializationInfo = llvm::PointerUnion< VarTemplateDecl *, MemberSpecializationInfo * >
 A type synonym for the TemplateOrInstantiation mapping.
 
using overridden_cxx_method_iterator = CXXMethodVector::const_iterator
 
using overridden_method_range = llvm::iterator_range< overridden_cxx_method_iterator >
 
using import_range = llvm::iterator_range< import_iterator >
 

Public Member Functions

interp::ContextgetInterpContext ()
 Returns the clang bytecode interpreter context.
 
ParentMapContextgetParentMapContext ()
 Returns the dynamic AST node parent map context.
 
std::vector< Decl * > getTraversalScope () const
 
void setTraversalScope (const std::vector< Decl * > &)
 
template<typename NodeT >
DynTypedNodeList getParents (const NodeT &Node)
 Forwards to get node parents from the ParentMapContext.
 
const clang::PrintingPolicygetPrintingPolicy () const
 
void setPrintingPolicy (const clang::PrintingPolicy &Policy)
 
SourceManagergetSourceManager ()
 
const SourceManagergetSourceManager () const
 
void cleanup ()
 
llvm::BumpPtrAllocator & getAllocator () const
 
void * Allocate (size_t Size, unsigned Align=8) const
 
template<typename T >
T * Allocate (size_t Num=1) const
 
void Deallocate (void *Ptr) const
 
DeclListNodeAllocateDeclListNode (clang::NamedDecl *ND)
 Allocates a DeclListNode or returns one from the ListNodeFreeList pool.
 
void DeallocateDeclListNode (DeclListNode *N)
 Deallcates a DeclListNode by returning it to the ListNodeFreeList pool.
 
size_t getASTAllocatedMemory () const
 Return the total amount of physical memory allocated for representing AST nodes and type information.
 
size_t getSideTableAllocatedMemory () const
 Return the total memory used for various side tables.
 
PartialDiagnostic::DiagStorageAllocatorgetDiagAllocator ()
 
const TargetInfogetTargetInfo () const
 
const TargetInfogetAuxTargetInfo () const
 
QualType getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const
 getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned.
 
QualType getRealTypeForBitwidth (unsigned DestWidth, FloatModeKind ExplicitType) const
 getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.
 
bool AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const
 
const LangOptionsgetLangOpts () const
 
bool isDependenceAllowed () const
 
const NoSanitizeListgetNoSanitizeList () const
 
const XRayFunctionFiltergetXRayFilter () const
 
const ProfileListgetProfileList () const
 
DiagnosticsEnginegetDiagnostics () const
 
FullSourceLoc getFullLoc (SourceLocation Loc) const
 
TargetCXXABI::Kind getCXXABIKind () const
 Return the C++ ABI kind that should be used.
 
void cacheRawCommentForDecl (const Decl &OriginalD, const RawComment &Comment) const
 Attaches Comment to OriginalD and to its redeclaration chain and removes the redeclaration chain from the set of commentless chains.
 
RawCommentgetRawCommentForDeclNoCacheImpl (const Decl *D, const SourceLocation RepresentativeLocForDecl, const std::map< unsigned, RawComment * > &CommentsInFile) const
 
RawCommentgetRawCommentForDeclNoCache (const Decl *D) const
 Return the documentation comment attached to a given declaration, without looking into cache.
 
void addComment (const RawComment &RC)
 
const RawCommentgetRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const
 Return the documentation comment attached to a given declaration.
 
void attachCommentsToJustParsedDecls (ArrayRef< Decl * > Decls, const Preprocessor *PP)
 Searches existing comments for doc comments that should be attached to Decls.
 
comments::FullCommentgetCommentForDecl (const Decl *D, const Preprocessor *PP) const
 Return parsed documentation comment attached to a given declaration.
 
comments::FullCommentgetLocalCommentForDeclUncached (const Decl *D) const
 Return parsed documentation comment attached to a given declaration.
 
comments::FullCommentcloneFullComment (comments::FullComment *FC, const Decl *D) const
 
comments::CommandTraitsgetCommentCommandTraits () const
 
AttrVecgetDeclAttrs (const Decl *D)
 Retrieve the attributes for the given declaration.
 
void eraseDeclAttrs (const Decl *D)
 Erase the attributes corresponding to the given declaration.
 
MemberSpecializationInfogetInstantiatedFromStaticDataMember (const VarDecl *Var)
 If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated.
 
void setInstantiatedFromStaticDataMember (VarDecl *Inst, VarDecl *Tmpl, TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
 Note that the static data member Inst is an instantiation of the static data member template Tmpl of a class template.
 
TemplateOrSpecializationInfo getTemplateOrSpecializationInfo (const VarDecl *Var)
 
void setTemplateOrSpecializationInfo (VarDecl *Inst, TemplateOrSpecializationInfo TSI)
 
NamedDeclgetInstantiatedFromUsingDecl (NamedDecl *Inst)
 If the given using decl Inst is an instantiation of another (possibly unresolved) using decl, return it.
 
void setInstantiatedFromUsingDecl (NamedDecl *Inst, NamedDecl *Pattern)
 Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template.
 
UsingEnumDeclgetInstantiatedFromUsingEnumDecl (UsingEnumDecl *Inst)
 If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.
 
void setInstantiatedFromUsingEnumDecl (UsingEnumDecl *Inst, UsingEnumDecl *Pattern)
 Remember that the using enum decl Inst is an instantiation of the using enum decl Pattern of a class template.
 
UsingShadowDeclgetInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst)
 
void setInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst, UsingShadowDecl *Pattern)
 
FieldDeclgetInstantiatedFromUnnamedFieldDecl (FieldDecl *Field)
 
void setInstantiatedFromUnnamedFieldDecl (FieldDecl *Inst, FieldDecl *Tmpl)
 
overridden_cxx_method_iterator overridden_methods_begin (const CXXMethodDecl *Method) const
 
overridden_cxx_method_iterator overridden_methods_end (const CXXMethodDecl *Method) const
 
unsigned overridden_methods_size (const CXXMethodDecl *Method) const
 
overridden_method_range overridden_methods (const CXXMethodDecl *Method) const
 
void addOverriddenMethod (const CXXMethodDecl *Method, const CXXMethodDecl *Overridden)
 Note that the given C++ Method overrides the given Overridden method.
 
void getOverriddenMethods (const NamedDecl *Method, SmallVectorImpl< const NamedDecl * > &Overridden) const
 Return C++ or ObjC overridden methods for the given Method.
 
void addedLocalImportDecl (ImportDecl *Import)
 Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit.
 
import_range local_imports () const
 
DeclgetPrimaryMergedDecl (Decl *D)
 
void setPrimaryMergedDecl (Decl *D, Decl *Primary)
 
void mergeDefinitionIntoModule (NamedDecl *ND, Module *M, bool NotifyListeners=true)
 Note that the definition ND has been merged into module M, and should be visible whenever M is visible.
 
void deduplicateMergedDefinitonsFor (NamedDecl *ND)
 Clean up the merged definition list.
 
ArrayRef< Module * > getModulesWithMergedDefinition (const NamedDecl *Def)
 Get the additional modules in which the definition Def has been merged.
 
void addModuleInitializer (Module *M, Decl *Init)
 Add a declaration to the list of declarations that are initialized for a module.
 
void addLazyModuleInitializers (Module *M, ArrayRef< uint32_t > IDs)
 
ArrayRef< Decl * > getModuleInitializers (Module *M)
 Get the initializations to perform when importing a module, if any.
 
void setCurrentNamedModule (Module *M)
 Set the (C++20) module we are building.
 
ModulegetCurrentNamedModule () const
 Get module under construction, nullptr if this is not a C++20 module.
 
TranslationUnitDeclgetTranslationUnitDecl () const
 
void addTranslationUnitDecl ()
 
ExternCContextDeclgetExternCContextDecl () const
 
BuiltinTemplateDeclgetMakeIntegerSeqDecl () const
 
BuiltinTemplateDeclgetTypePackElementDecl () const
 
 ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, TranslationUnitKind TUKind)
 
 ASTContext (const ASTContext &)=delete
 
ASTContextoperator= (const ASTContext &)=delete
 
 ~ASTContext ()
 
void setExternalSource (IntrusiveRefCntPtr< ExternalASTSource > Source)
 Attach an external AST source to the AST context.
 
ExternalASTSourcegetExternalSource () const
 Retrieve a pointer to the external AST source associated with this AST context, if any.
 
void setASTMutationListener (ASTMutationListener *Listener)
 Attach an AST mutation listener to the AST context.
 
ASTMutationListenergetASTMutationListener () const
 Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
 
void PrintStats () const
 
const SmallVectorImpl< Type * > & getTypes () const
 
BuiltinTemplateDeclbuildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const
 
RecordDeclbuildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=RecordDecl::TagKind::Struct) const
 Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
 
TypedefDeclbuildImplicitTypedef (QualType T, StringRef Name) const
 Create a new implicit TU-level typedef declaration.
 
TypedefDeclgetInt128Decl () const
 Retrieve the declaration for the 128-bit signed integer type.
 
TypedefDeclgetUInt128Decl () const
 Retrieve the declaration for the 128-bit unsigned integer type.
 
QualType getAddrSpaceQualType (QualType T, LangAS AddressSpace) const
 Return the uniqued reference to the type for an address space qualified type with the specified type and address space.
 
QualType removeAddrSpaceQualType (QualType T) const
 Remove any existing address space on the type and returns the type with qualifiers intact (or that's the idea anyway)
 
QualType applyObjCProtocolQualifiers (QualType type, ArrayRef< ObjCProtocolDecl * > protocols, bool &hasError, bool allowOnPointerType=false) const
 Apply Objective-C protocol qualifiers to the given type.
 
QualType getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const
 Return the uniqued reference to the type for an Objective-C gc-qualified type.
 
QualType removePtrSizeAddrSpace (QualType T) const
 Remove the existing address space on the type if it is a pointer size address space and return the type with qualifiers intact.
 
QualType getRestrictType (QualType T) const
 Return the uniqued reference to the type for a restrict qualified type.
 
QualType getVolatileType (QualType T) const
 Return the uniqued reference to the type for a volatile qualified type.
 
QualType getConstType (QualType T) const
 Return the uniqued reference to the type for a const qualified type.
 
const FunctionTypeadjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo)
 Change the ExtInfo on a function type.
 
CanQualType getCanonicalFunctionResultType (QualType ResultType) const
 Adjust the given function result type.
 
void adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType)
 Change the result type of a function type once it is deduced.
 
QualType getFunctionTypeWithExceptionSpec (QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI) const
 Get a function type and produce the equivalent function type with the specified exception specification.
 
bool hasSameFunctionTypeIgnoringExceptionSpec (QualType T, QualType U) const
 Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.
 
void adjustExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI, bool AsWritten=false)
 Change the exception specification on a function once it is delay-parsed, instantiated, or computed.
 
QualType getFunctionTypeWithoutPtrSizes (QualType T)
 Get a function type and produce the equivalent function type where pointer size address spaces in the return type and parameter tyeps are replaced with the default address space.
 
bool hasSameFunctionTypeIgnoringPtrSizes (QualType T, QualType U)
 Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types.
 
QualType getComplexType (QualType T) const
 Return the uniqued reference to the type for a complex number with the specified element type.
 
CanQualType getComplexType (CanQualType T) const
 
QualType getPointerType (QualType T) const
 Return the uniqued reference to the type for a pointer to the specified type.
 
CanQualType getPointerType (CanQualType T) const
 
QualType getAdjustedType (QualType Orig, QualType New) const
 Return the uniqued reference to a type adjusted from the original type to a new type.
 
CanQualType getAdjustedType (CanQualType Orig, CanQualType New) const
 
QualType getDecayedType (QualType T) const
 Return the uniqued reference to the decayed version of the given type.
 
CanQualType getDecayedType (CanQualType T) const
 
QualType getDecayedType (QualType Orig, QualType Decayed) const
 Return the uniqued reference to a specified decay from the original type to the decayed type.
 
QualType getAtomicType (QualType T) const
 Return the uniqued reference to the atomic type for the specified type.
 
QualType getBlockPointerType (QualType T) const
 Return the uniqued reference to the type for a block of the specified type.
 
QualType getBlockDescriptorType () const
 Gets the struct used to keep track of the descriptor for pointer to blocks.
 
QualType getReadPipeType (QualType T) const
 Return a read_only pipe type for the specified type.
 
QualType getWritePipeType (QualType T) const
 Return a write_only pipe type for the specified type.
 
QualType getBitIntType (bool Unsigned, unsigned NumBits) const
 Return a bit-precise integer type with the specified signedness and bit count.
 
QualType getDependentBitIntType (bool Unsigned, Expr *BitsExpr) const
 Return a dependent bit-precise integer type with the specified signedness and bit count.
 
QualType getBlockDescriptorExtendedType () const
 Gets the struct used to keep track of the extended descriptor for pointer to blocks.
 
OpenCLTypeKind getOpenCLTypeKind (const Type *T) const
 Map an AST Type to an OpenCLTypeKind enum value.
 
LangAS getOpenCLTypeAddrSpace (const Type *T) const
 Get address space for OpenCL type.
 
LangAS getDefaultOpenCLPointeeAddrSpace ()
 Returns default address space based on OpenCL version and enabled features.
 
void setcudaConfigureCallDecl (FunctionDecl *FD)
 
FunctionDeclgetcudaConfigureCallDecl ()
 
bool BlockRequiresCopying (QualType Ty, const VarDecl *D)
 Returns true iff we need copy/dispose helpers for the given type.
 
bool getByrefLifetime (QualType Ty, Qualifiers::ObjCLifetime &Lifetime, bool &HasByrefExtendedLayout) const
 Returns true, if given type has a known lifetime.
 
QualType getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const
 Return the uniqued reference to the type for an lvalue reference to the specified type.
 
QualType getRValueReferenceType (QualType T) const
 Return the uniqued reference to the type for an rvalue reference to the specified type.
 
QualType getMemberPointerType (QualType T, const Type *Cls) const
 Return the uniqued reference to the type for a member pointer to the specified type in the specified class.
 
QualType getVariableArrayType (QualType EltTy, Expr *NumElts, ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a variable array of the specified element type.
 
QualType getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a dependently-sized array of the specified element type.
 
QualType getIncompleteArrayType (QualType EltTy, ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return a unique reference to the type for an incomplete array of the specified element type.
 
QualType getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, const Expr *SizeExpr, ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return the unique reference to the type for a constant array of the specified element type.
 
QualType getStringLiteralArrayType (QualType EltTy, unsigned Length) const
 Return a type for a constant array for a string literal of the specified element type and length.
 
QualType getVariableArrayDecayedType (QualType Ty) const
 Returns a vla type where known sizes are replaced with [*].
 
BuiltinVectorTypeInfo getBuiltinVectorTypeInfo (const BuiltinType *VecTy) const
 Returns the element type, element count and number of vectors (in case of tuple) for a builtin vector type.
 
QualType getScalableVectorType (QualType EltTy, unsigned NumElts, unsigned NumFields=1) const
 Return the unique reference to a scalable vector type of the specified element type and scalable number of elements.
 
QualType getWebAssemblyExternrefType () const
 Return a WebAssembly externref type.
 
QualType getVectorType (QualType VectorType, unsigned NumElts, VectorKind VecKind) const
 Return the unique reference to a vector type of the specified element type and size.
 
QualType getDependentVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc, VectorKind VecKind) const
 Return the unique reference to the type for a dependently sized vector of the specified element type.
 
QualType getExtVectorType (QualType VectorType, unsigned NumElts) const
 Return the unique reference to an extended vector type of the specified element type and size.
 
QualType getDependentSizedExtVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc) const
 
QualType getConstantMatrixType (QualType ElementType, unsigned NumRows, unsigned NumColumns) const
 Return the unique reference to the matrix type of the specified element type and size.
 
QualType getDependentSizedMatrixType (QualType ElementType, Expr *RowExpr, Expr *ColumnExpr, SourceLocation AttrLoc) const
 Return the unique reference to the matrix type of the specified element type and size.
 
QualType getDependentAddressSpaceType (QualType PointeeType, Expr *AddrSpaceExpr, SourceLocation AttrLoc) const
 
QualType getFunctionNoProtoType (QualType ResultTy, const FunctionType::ExtInfo &Info) const
 Return a K&R style C function type like 'int()'.
 
QualType getFunctionNoProtoType (QualType ResultTy) const
 
QualType getFunctionType (QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
 Return a normal function type with a typed argument list.
 
QualType adjustStringLiteralBaseType (QualType StrLTy) const
 
QualType getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
 Return the unique reference to the type for the specified type declaration.
 
QualType getUsingType (const UsingShadowDecl *Found, QualType Underlying) const
 
QualType getTypedefType (const TypedefNameDecl *Decl, QualType Underlying=QualType()) const
 Return the unique reference to the type for the specified typedef-name decl.
 
QualType getRecordType (const RecordDecl *Decl) const
 
QualType getEnumType (const EnumDecl *Decl) const
 
QualType getUnresolvedUsingType (const UnresolvedUsingTypenameDecl *Decl) const
 
QualType getInjectedClassNameType (CXXRecordDecl *Decl, QualType TST) const
 getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration.
 
QualType getAttributedType (attr::Kind attrKind, QualType modifiedType, QualType equivalentType) const
 
QualType getBTFTagAttributedType (const BTFTypeTagAttr *BTFAttr, QualType Wrapped)
 
QualType getSubstTemplateTypeParmType (QualType Replacement, Decl *AssociatedDecl, unsigned Index, std::optional< unsigned > PackIndex) const
 Retrieve a substitution-result type.
 
QualType getSubstTemplateTypeParmPackType (Decl *AssociatedDecl, unsigned Index, bool Final, const TemplateArgument &ArgPack)
 Retrieve a.
 
QualType getTemplateTypeParmType (unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *ParmDecl=nullptr) const
 Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name.
 
QualType getTemplateSpecializationType (TemplateName T, ArrayRef< TemplateArgument > Args, QualType Canon=QualType()) const
 
QualType getCanonicalTemplateSpecializationType (TemplateName T, ArrayRef< TemplateArgument > Args) const
 
QualType getTemplateSpecializationType (TemplateName T, ArrayRef< TemplateArgumentLoc > Args, QualType Canon=QualType()) const
 
TypeSourceInfogetTemplateSpecializationTypeInfo (TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const
 
QualType getParenType (QualType NamedType) const
 
QualType getMacroQualifiedType (QualType UnderlyingTy, const IdentifierInfo *MacroII) const
 
QualType getElaboratedType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType, TagDecl *OwnedTagDecl=nullptr) const
 
QualType getDependentNameType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const
 
QualType getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, ArrayRef< TemplateArgumentLoc > Args) const
 
QualType getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, ArrayRef< TemplateArgument > Args) const
 
TemplateArgument getInjectedTemplateArg (NamedDecl *ParamDecl)
 
void getInjectedTemplateArgs (const TemplateParameterList *Params, SmallVectorImpl< TemplateArgument > &Args)
 Get a template argument list with one argument per template parameter in a template parameter list, such as for the injected class name of a class template.
 
QualType getPackExpansionType (QualType Pattern, std::optional< unsigned > NumExpansions, bool ExpectPackInType=true)
 Form a pack expansion type with the given pattern.
 
QualType getObjCInterfaceType (const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const
 getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl.
 
QualType getObjCObjectType (QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const
 Legacy interface: cannot provide type arguments or __kindof.
 
QualType getObjCObjectType (QualType Base, ArrayRef< QualType > typeArgs, ArrayRef< ObjCProtocolDecl * > protocols, bool isKindOf) const
 
QualType getObjCTypeParamType (const ObjCTypeParamDecl *Decl, ArrayRef< ObjCProtocolDecl * > protocols) const
 
void adjustObjCTypeParamBoundType (const ObjCTypeParamDecl *Orig, ObjCTypeParamDecl *New) const
 
bool ObjCObjectAdoptsQTypeProtocols (QualType QT, ObjCInterfaceDecl *Decl)
 ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list.
 
bool QIdProtocolsAdoptObjCObjectProtocols (QualType QT, ObjCInterfaceDecl *IDecl)
 QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.
 
QualType getObjCObjectPointerType (QualType OIT) const
 Return a ObjCObjectPointerType type for the given ObjCObjectType.
 
QualType getTypeOfExprType (Expr *E, TypeOfKind Kind) const
 C23 feature and GCC extension.
 
QualType getTypeOfType (QualType QT, TypeOfKind Kind) const
 getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes.
 
QualType getReferenceQualifiedType (const Expr *e) const
 getReferenceQualifiedType - Given an expr, will return the type for that expression, as in [dcl.type.simple]p4 but without taking id-expressions and class member access into account.
 
QualType getDecltypeType (Expr *e, QualType UnderlyingType) const
 C++11 decltype.
 
QualType getPackIndexingType (QualType Pattern, Expr *IndexExpr, bool FullySubstituted=false, ArrayRef< QualType > Expansions={}, int Index=-1) const
 
QualType getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
 Unary type transforms.
 
QualType getAutoType (QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent, bool IsPack=false, ConceptDecl *TypeConstraintConcept=nullptr, ArrayRef< TemplateArgument > TypeConstraintArgs={}) const
 C++11 deduced auto type.
 
QualType getAutoDeductType () const
 C++11 deduction pattern for 'auto' type.
 
QualType getAutoRRefDeductType () const
 C++11 deduction pattern for 'auto &&' type.
 
QualType getUnconstrainedType (QualType T) const
 Remove any type constraints from a template parameter type, for equivalence comparison of template parameters.
 
QualType getDeducedTemplateSpecializationType (TemplateName Template, QualType DeducedType, bool IsDependent) const
 C++17 deduced class template specialization type.
 
QualType getTagDeclType (const TagDecl *Decl) const
 Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
 
CanQualType getSizeType () const
 Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
 
CanQualType getSignedSizeType () const
 Return the unique signed counterpart of the integer type corresponding to size_t.
 
CanQualType getIntMaxType () const
 Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
 
CanQualType getUIntMaxType () const
 Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
 
QualType getWCharType () const
 Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
 
QualType getWideCharType () const
 Return the type of wide characters.
 
QualType getSignedWCharType () const
 Return the type of "signed wchar_t".
 
QualType getUnsignedWCharType () const
 Return the type of "unsigned wchar_t".
 
QualType getWIntType () const
 In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
 
QualType getIntPtrType () const
 Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
 
QualType getUIntPtrType () const
 Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
 
QualType getPointerDiffType () const
 Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
 
QualType getUnsignedPointerDiffType () const
 Return the unique unsigned counterpart of "ptrdiff_t" integer type.
 
QualType getProcessIDType () const
 Return the unique type for "pid_t" defined in <sys/types.h>.
 
QualType getCFConstantStringType () const
 Return the C structure type used to represent constant CFStrings.
 
QualType getObjCSuperType () const
 Returns the C struct type for objc_super.
 
void setObjCSuperType (QualType ST)
 
QualType getRawCFConstantStringType () const
 Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.
 
void setCFConstantStringType (QualType T)
 
TypedefDeclgetCFConstantStringDecl () const
 
RecordDeclgetCFConstantStringTagDecl () const
 
void setObjCConstantStringInterface (ObjCInterfaceDecl *Decl)
 
QualType getObjCConstantStringInterface () const
 
QualType getObjCNSStringType () const
 
void setObjCNSStringType (QualType T)
 
QualType getObjCIdRedefinitionType () const
 Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd.
 
void setObjCIdRedefinitionType (QualType RedefType)
 Set the user-written type that redefines id.
 
QualType getObjCClassRedefinitionType () const
 Retrieve the type that Class has been defined to, which may be different from the built-in Class if Class has been typedef'd.
 
void setObjCClassRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'.
 
QualType getObjCSelRedefinitionType () const
 Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd.
 
void setObjCSelRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'.
 
IdentifierInfogetNSObjectName () const
 Retrieve the identifier 'NSObject'.
 
IdentifierInfogetNSCopyingName ()
 Retrieve the identifier 'NSCopying'.
 
CanQualType getNSUIntegerType () const
 
CanQualType getNSIntegerType () const
 
IdentifierInfogetBoolName () const
 Retrieve the identifier 'bool'.
 
IdentifierInfogetMakeIntegerSeqName () const
 
IdentifierInfogetTypePackElementName () const
 
QualType getObjCInstanceType ()
 Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
 
TypedefDeclgetObjCInstanceTypeDecl ()
 Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
 
void setFILEDecl (TypeDecl *FILEDecl)
 Set the type for the C FILE type.
 
QualType getFILEType () const
 Retrieve the C FILE type.
 
void setjmp_bufDecl (TypeDecl *jmp_bufDecl)
 Set the type for the C jmp_buf type.
 
QualType getjmp_bufType () const
 Retrieve the C jmp_buf type.
 
void setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl)
 Set the type for the C sigjmp_buf type.
 
QualType getsigjmp_bufType () const
 Retrieve the C sigjmp_buf type.
 
void setucontext_tDecl (TypeDecl *ucontext_tDecl)
 Set the type for the C ucontext_t type.
 
QualType getucontext_tType () const
 Retrieve the C ucontext_t type.
 
QualType getLogicalOperationType () const
 The result type of logical operations, '<', '>', '!=', etc.
 
void getObjCEncodingForType (QualType T, std::string &S, const FieldDecl *Field=nullptr, QualType *NotEncodedT=nullptr) const
 Emit the Objective-CC type encoding for the given type T into S.
 
void getObjCEncodingForPropertyType (QualType T, std::string &S) const
 Emit the Objective-C property type encoding for the given type T into S.
 
void getLegacyIntegralTypeEncoding (QualType &t) const
 getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always.
 
void getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const
 Put the string version of the type qualifiers QT into S.
 
std::string getObjCEncodingForFunctionDecl (const FunctionDecl *Decl) const
 Emit the encoded type for the function Decl into S.
 
std::string getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, bool Extended=false) const
 Emit the encoded type for the method declaration Decl into S.
 
std::string getObjCEncodingForBlock (const BlockExpr *blockExpr) const
 Return the encoded type for this block declaration.
 
std::string getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const
 getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.
 
bool ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
 ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.
 
ObjCPropertyImplDeclgetObjCPropertyImplDeclForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const
 
CharUnits getObjCEncodingTypeSize (QualType T) const
 Return the size of type T for Objective-C encoding purpose, in characters.
 
TypedefDeclgetObjCIdDecl () const
 Retrieve the typedef corresponding to the predefined id type in Objective-C.
 
QualType getObjCIdType () const
 Represents the Objective-CC id type.
 
TypedefDeclgetObjCSelDecl () const
 Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
 
QualType getObjCSelType () const
 Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
 
TypedefDeclgetObjCClassDecl () const
 Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
 
QualType getObjCClassType () const
 Represents the Objective-C Class type.
 
ObjCInterfaceDeclgetObjCProtocolDecl () const
 Retrieve the Objective-C class declaration corresponding to the predefined Protocol class.
 
TypedefDeclgetBOOLDecl () const
 Retrieve declaration of 'BOOL' typedef.
 
void setBOOLDecl (TypedefDecl *TD)
 Save declaration of 'BOOL' typedef.
 
QualType getBOOLType () const
 type of 'BOOL' type.
 
QualType getObjCProtoType () const
 Retrieve the type of the Objective-C Protocol class.
 
TypedefDeclgetBuiltinVaListDecl () const
 Retrieve the C type declaration corresponding to the predefined __builtin_va_list type.
 
QualType getBuiltinVaListType () const
 Retrieve the type of the __builtin_va_list type.
 
DeclgetVaListTagDecl () const
 Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets.
 
TypedefDeclgetBuiltinMSVaListDecl () const
 Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type.
 
QualType getBuiltinMSVaListType () const
 Retrieve the type of the __builtin_ms_va_list type.
 
TagDeclgetMSGuidTagDecl () const
 Retrieve the implicitly-predeclared 'struct _GUID' declaration.
 
QualType getMSGuidType () const
 Retrieve the implicitly-predeclared 'struct _GUID' type.
 
bool canBuiltinBeRedeclared (const FunctionDecl *) const
 Return whether a declaration to a builtin is allowed to be overloaded/redeclared.
 
QualType getCVRQualifiedType (QualType T, unsigned CVR) const
 Return a type with additional const, volatile, or restrict qualifiers.
 
QualType getQualifiedType (SplitQualType split) const
 Un-split a SplitQualType.
 
QualType getQualifiedType (QualType T, Qualifiers Qs) const
 Return a type with additional qualifiers.
 
QualType getQualifiedType (const Type *T, Qualifiers Qs) const
 Return a type with additional qualifiers.
 
QualType getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime)
 Return a type with the given lifetime qualifier.
 
QualType getUnqualifiedObjCPointerType (QualType type) const
 getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
 
unsigned char getFixedPointScale (QualType Ty) const
 
unsigned char getFixedPointIBits (QualType Ty) const
 
llvm::FixedPointSemantics getFixedPointSemantics (QualType Ty) const
 
llvm::APFixedPoint getFixedPointMax (QualType Ty) const
 
llvm::APFixedPoint getFixedPointMin (QualType Ty) const
 
DeclarationNameInfo getNameForTemplate (TemplateName Name, SourceLocation NameLoc) const
 
TemplateName getOverloadedTemplateName (UnresolvedSetIterator Begin, UnresolvedSetIterator End) const
 Retrieve the template name that corresponds to a non-empty lookup.
 
TemplateName getAssumedTemplateName (DeclarationName Name) const
 Retrieve a template name representing an unqualified-id that has been assumed to name a template for ADL purposes.
 
TemplateName getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateName Template) const
 Retrieve the template name that represents a qualified template name such as std::vector.
 
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, const IdentifierInfo *Name) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template apply.
 
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, OverloadedOperatorKind Operator) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template operator+.
 
TemplateName getSubstTemplateTemplateParm (TemplateName replacement, Decl *AssociatedDecl, unsigned Index, std::optional< unsigned > PackIndex) const
 
TemplateName getSubstTemplateTemplateParmPack (const TemplateArgument &ArgPack, Decl *AssociatedDecl, unsigned Index, bool Final) const
 
QualType DecodeTypeStr (const char *&Str, const ASTContext &Context, ASTContext::GetBuiltinTypeError &Error, bool &RequireICE, bool AllowTypeModifiers) const
 
QualType GetBuiltinType (unsigned ID, GetBuiltinTypeError &Error, unsigned *IntegerConstantArgs=nullptr) const
 Return the type for the specified builtin.
 
Qualifiers::GC getObjCGCAttrKind (QualType Ty) const
 Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes.
 
bool areCompatibleVectorTypes (QualType FirstVec, QualType SecondVec)
 Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type.
 
bool areCompatibleSveTypes (QualType FirstType, QualType SecondType)
 Return true if the given types are an SVE builtin and a VectorType that is a fixed-length representation of the SVE builtin for a specific vector-length.
 
bool areLaxCompatibleSveTypes (QualType FirstType, QualType SecondType)
 Return true if the given vector types are lax-compatible SVE vector types, false otherwise.
 
bool areCompatibleRVVTypes (QualType FirstType, QualType SecondType)
 Return true if the given types are an RISC-V vector builtin type and a VectorType that is a fixed-length representation of the RISC-V vector builtin type for a specific vector-length.
 
bool areLaxCompatibleRVVTypes (QualType FirstType, QualType SecondType)
 Return true if the given vector types are lax-compatible RISC-V vector types as defined by -flax-vector-conversions=, which permits implicit conversions between vectors with different number of elements and/or incompatible element types, false otherwise.
 
bool hasDirectOwnershipQualifier (QualType Ty) const
 Return true if the type has been explicitly qualified with ObjC ownership.
 
const llvm::fltSemantics & getFloatTypeSemantics (QualType T) const
 Return the APFloat 'semantics' for the specified scalar floating point type.
 
TypeInfo getTypeInfo (const Type *T) const
 Get the size and alignment of the specified complete type in bits.
 
TypeInfo getTypeInfo (QualType T) const
 
unsigned getOpenMPDefaultSimdAlign (QualType T) const
 Get default simd alignment of the specified complete type in bits.
 
uint64_t getTypeSize (QualType T) const
 Return the size of the specified (complete) type T, in bits.
 
uint64_t getTypeSize (const Type *T) const
 
uint64_t getCharWidth () const
 Return the size of the character type, in bits.
 
CharUnits toCharUnitsFromBits (int64_t BitSize) const
 Convert a size in bits to a size in characters.
 
int64_t toBits (CharUnits CharSize) const
 Convert a size in characters to a size in bits.
 
CharUnits getTypeSizeInChars (QualType T) const
 Return the size of the specified (complete) type T, in characters.
 
CharUnits getTypeSizeInChars (const Type *T) const
 
std::optional< CharUnitsgetTypeSizeInCharsIfKnown (QualType Ty) const
 
std::optional< CharUnitsgetTypeSizeInCharsIfKnown (const Type *Ty) const
 
unsigned getTypeAlign (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in bits.
 
unsigned getTypeAlign (const Type *T) const
 
unsigned getTypeUnadjustedAlign (QualType T) const
 Return the ABI-specified natural alignment of a (complete) type T, before alignment adjustments, in bits.
 
unsigned getTypeUnadjustedAlign (const Type *T) const
 
unsigned getTypeAlignIfKnown (QualType T, bool NeedsPreferredAlignment=false) const
 Return the alignment of a type, in bits, or 0 if the type is incomplete and we cannot determine the alignment (for example, from alignment attributes).
 
CharUnits getTypeAlignInChars (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in characters.
 
CharUnits getTypeAlignInChars (const Type *T) const
 
CharUnits getPreferredTypeAlignInChars (QualType T) const
 Return the PreferredAlignment of a (complete) type T, in characters.
 
CharUnits getTypeUnadjustedAlignInChars (QualType T) const
 getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments.
 
CharUnits getTypeUnadjustedAlignInChars (const Type *T) const
 
TypeInfoChars getTypeInfoDataSizeInChars (QualType T) const
 
TypeInfoChars getTypeInfoInChars (const Type *T) const
 
TypeInfoChars getTypeInfoInChars (QualType T) const
 
bool isAlignmentRequired (const Type *T) const
 Determine if the alignment the type has was required using an alignment attribute.
 
bool isAlignmentRequired (QualType T) const
 
bool isPromotableIntegerType (QualType T) const
 More type predicates useful for type checking/promotion.
 
unsigned getPreferredTypeAlign (QualType T) const
 Return the "preferred" alignment of the specified type T for the current target, in bits.
 
unsigned getPreferredTypeAlign (const Type *T) const
 getPreferredTypeAlign - Return the "preferred" alignment of the specified type for the current target in bits.
 
unsigned getTargetDefaultAlignForAttributeAligned () const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.
 
unsigned getAlignOfGlobalVar (QualType T, const VarDecl *VD) const
 Return the alignment in bits that should be given to a global variable with type T.
 
CharUnits getAlignOfGlobalVarInChars (QualType T, const VarDecl *VD) const
 Return the alignment in characters that should be given to a global variable with type T.
 
unsigned getMinGlobalAlignOfVar (uint64_t Size, const VarDecl *VD) const
 Return the minimum alignement as specified by the target.
 
CharUnits getDeclAlign (const Decl *D, bool ForAlignof=false) const
 Return a conservative estimate of the alignment of the specified decl D.
 
CharUnits getExnObjectAlignment () const
 Return the alignment (in bytes) of the thrown exception object.
 
const ASTRecordLayoutgetASTRecordLayout (const RecordDecl *D) const
 Get or compute information about the layout of the specified record (struct/union/class) D, which indicates its size and field position information.
 
const ASTRecordLayoutgetASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const
 Get or compute information about the layout of the specified Objective-C interface.
 
void DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const
 
const ASTRecordLayoutgetASTObjCImplementationLayout (const ObjCImplementationDecl *D) const
 Get or compute information about the layout of the specified Objective-C implementation.
 
const CXXMethodDeclgetCurrentKeyFunction (const CXXRecordDecl *RD)
 Get our current best idea for the key function of the given record decl, or nullptr if there isn't one.
 
void setNonKeyFunction (const CXXMethodDecl *method)
 Observe that the given method cannot be a key function.
 
CharUnits getOffsetOfBaseWithVBPtr (const CXXRecordDecl *RD) const
 Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero.
 
uint64_t getFieldOffset (const ValueDecl *FD) const
 Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
 
uint64_t lookupFieldBitOffset (const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) const
 Get the offset of an ObjCIvarDecl in bits.
 
CharUnits getMemberPointerPathAdjustment (const APValue &MP) const
 Find the 'this' offset for the member path in a pointer-to-member APValue.
 
bool isNearlyEmpty (const CXXRecordDecl *RD) const
 
VTableContextBasegetVTableContext ()
 
MangleContextcreateMangleContext (const TargetInfo *T=nullptr)
 If T is null pointer, assume the target in ASTContext.
 
MangleContextcreateDeviceMangleContext (const TargetInfo &T)
 Creates a device mangle context to correctly mangle lambdas in a mixed architecture compile by setting the lambda mangling number source to the DeviceLambdaManglingNumber.
 
void DeepCollectObjCIvars (const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl< const ObjCIvarDecl * > &Ivars) const
 DeepCollectObjCIvars - This routine first collects all declared, but not synthesized, ivars in super class and then collects all ivars, including those synthesized for current class.
 
unsigned CountNonClassIvars (const ObjCInterfaceDecl *OI) const
 
void CollectInheritedProtocols (const Decl *CDecl, llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &Protocols)
 CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
 
bool hasUniqueObjectRepresentations (QualType Ty, bool CheckIfTriviallyCopyable=true) const
 Return true if the specified type has unique object representations according to (C++17 [meta.unary.prop]p9)
 
CanQualType getCanonicalType (QualType T) const
 Return the canonical (structural) type corresponding to the specified potentially non-canonical type T.
 
const TypegetCanonicalType (const Type *T) const
 
CanQualType getCanonicalParamType (QualType T) const
 Return the canonical parameter type corresponding to the specific potentially non-canonical one.
 
bool hasSameType (QualType T1, QualType T2) const
 Determine whether the given types T1 and T2 are equivalent.
 
bool hasSameType (const Type *T1, const Type *T2) const
 
bool hasSameExpr (const Expr *X, const Expr *Y) const
 Determine whether the given expressions X and Y are equivalent.
 
QualType getUnqualifiedArrayType (QualType T, Qualifiers &Quals)
 Return this type as a completely-unqualified array type, capturing the qualifiers in Quals.
 
bool hasSameUnqualifiedType (QualType T1, QualType T2) const
 Determine whether the given types are equivalent after cvr-qualifiers have been removed.
 
bool hasSameNullabilityTypeQualifier (QualType SubT, QualType SuperT, bool IsParam) const
 
bool ObjCMethodsAreEqual (const ObjCMethodDecl *MethodDecl, const ObjCMethodDecl *MethodImp)
 
bool UnwrapSimilarTypes (QualType &T1, QualType &T2, bool AllowPiMismatch=true)
 Attempt to unwrap two types that may be similar (C++ [conv.qual]).
 
void UnwrapSimilarArrayTypes (QualType &T1, QualType &T2, bool AllowPiMismatch=true)
 Attempt to unwrap two types that may both be array types with the same bound (or both be array types of unknown bound) for the purpose of comparing the cv-decomposition of two types per C++ [conv.qual].
 
bool hasSimilarType (QualType T1, QualType T2)
 Determine if two types are similar, according to the C++ rules.
 
bool hasCvrSimilarType (QualType T1, QualType T2)
 Determine if two types are similar, ignoring only CVR qualifiers.
 
NestedNameSpecifiergetCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const
 Retrieves the "canonical" nested name specifier for a given nested name specifier.
 
CallingConv getDefaultCallingConvention (bool IsVariadic, bool IsCXXMethod, bool IsBuiltin=false) const
 Retrieves the default calling convention for the current target.
 
TemplateName getCanonicalTemplateName (const TemplateName &Name) const
 Retrieves the "canonical" template name that refers to a given template.
 
bool hasSameTemplateName (const TemplateName &X, const TemplateName &Y) const
 Determine whether the given template names refer to the same template.
 
bool isSameEntity (const NamedDecl *X, const NamedDecl *Y) const
 Determine whether the two declarations refer to the same entity.
 
bool isSameTemplateParameterList (const TemplateParameterList *X, const TemplateParameterList *Y) const
 Determine whether two template parameter lists are similar enough that they may be used in declarations of the same template.
 
bool isSameTemplateParameter (const NamedDecl *X, const NamedDecl *Y) const
 Determine whether two template parameters are similar enough that they may be used in declarations of the same template.
 
bool isSameConstraintExpr (const Expr *XCE, const Expr *YCE) const
 Determine whether two 'requires' expressions are similar enough that they may be used in re-declarations.
 
bool isSameTypeConstraint (const TypeConstraint *XTC, const TypeConstraint *YTC) const
 Determine whether two type contraint are similar enough that they could used in declarations of the same template.
 
bool isSameDefaultTemplateArgument (const NamedDecl *X, const NamedDecl *Y) const
 Determine whether two default template arguments are similar enough that they may be used in declarations of the same template.
 
TemplateArgument getCanonicalTemplateArgument (const TemplateArgument &Arg) const
 Retrieve the "canonical" template argument.
 
const ArrayTypegetAsArrayType (QualType T) const
 Type Query functions.
 
const ConstantArrayTypegetAsConstantArrayType (QualType T) const
 
const VariableArrayTypegetAsVariableArrayType (QualType T) const
 
const IncompleteArrayTypegetAsIncompleteArrayType (QualType T) const
 
const DependentSizedArrayTypegetAsDependentSizedArrayType (QualType T) const
 
QualType getBaseElementType (const ArrayType *VAT) const
 Return the innermost element type of an array type.
 
QualType getBaseElementType (QualType QT) const
 Return the innermost element type of a type (which needn't actually be an array type).
 
uint64_t getConstantArrayElementCount (const ConstantArrayType *CA) const
 Return number of constant array elements.
 
uint64_t getArrayInitLoopExprElementCount (const ArrayInitLoopExpr *AILE) const
 Return number of elements initialized in an ArrayInitLoopExpr.
 
QualType getAdjustedParameterType (QualType T) const
 Perform adjustment on the parameter type of a function.
 
QualType getSignatureParameterType (QualType T) const
 Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and function types and removing top-level cv-qualifiers.
 
QualType getExceptionObjectType (QualType T) const
 
QualType getArrayDecayedType (QualType T) const
 Return the properly qualified result of decaying the specified array type to a pointer.
 
QualType getPromotedIntegerType (QualType PromotableType) const
 Return the type that PromotableType will promote to: C99 6.3.1.1p2, assuming that PromotableType is a promotable integer type.
 
Qualifiers::ObjCLifetime getInnerObjCOwnership (QualType T) const
 Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownership.
 
QualType isPromotableBitField (Expr *E) const
 Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
 
int getIntegerTypeOrder (QualType LHS, QualType RHS) const
 Return the highest ranked integer type, see C99 6.3.1.8p1.
 
int getFloatingTypeOrder (QualType LHS, QualType RHS) const
 Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e.
 
int getFloatingTypeSemanticOrder (QualType LHS, QualType RHS) const
 Compare the rank of two floating point types as above, but compare equal if both types have the same floating-point semantics on the target (i.e.
 
unsigned getTargetAddressSpace (LangAS AS) const
 
LangAS getLangASForBuiltinAddressSpace (unsigned AS) const
 
uint64_t getTargetNullPointerValue (QualType QT) const
 Get target-dependent integer value for null pointer which is used for constant folding.
 
bool addressSpaceMapManglingFor (LangAS AS) const
 
FunctionProtoType::ExceptionSpecInfo mergeExceptionSpecs (FunctionProtoType::ExceptionSpecInfo ESI1, FunctionProtoType::ExceptionSpecInfo ESI2, SmallVectorImpl< QualType > &ExceptionTypeStorage, bool AcceptDependent)
 
QualType getCommonSugaredType (QualType X, QualType Y, bool Unqualified=false)
 
bool typesAreCompatible (QualType T1, QualType T2, bool CompareUnqualified=false)
 Compatibility predicates used to check assignment expressions.
 
bool propertyTypesAreCompatible (QualType, QualType)
 
bool typesAreBlockPointerCompatible (QualType, QualType)
 
bool isObjCIdType (QualType T) const
 
bool isObjCClassType (QualType T) const
 
bool isObjCSelType (QualType T) const
 
bool ObjCQualifiedIdTypesAreCompatible (const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS, bool ForCompare)
 ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
 
bool ObjCQualifiedClassTypesAreCompatible (const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS)
 ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
 
bool canAssignObjCInterfaces (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
 canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS.
 
bool canAssignObjCInterfaces (const ObjCObjectType *LHS, const ObjCObjectType *RHS)
 
bool canAssignObjCInterfacesInBlockPointer (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, bool BlockReturnType)
 canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safety for objective-c pointers used to pass/return arguments in block literals.
 
bool areComparableObjCPointerTypes (QualType LHS, QualType RHS)
 
QualType areCommonBaseCompatible (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
 
bool canBindObjCObjectType (QualType To, QualType From)
 
QualType mergeTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false, bool BlockReturnType=false, bool IsConditionalOperator=false)
 
QualType mergeFunctionTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false, bool AllowCXX=false, bool IsConditionalOperator=false)
 
QualType mergeFunctionParameterTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
 mergeFunctionParameterTypes - merge two types which appear as function parameter types
 
QualType mergeTransparentUnionType (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
 mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType()
 
QualType mergeObjCGCQualifiers (QualType, QualType)
 mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and returns the merged version; including for function return types.
 
bool mergeExtParameterInfo (const FunctionProtoType *FirstFnType, const FunctionProtoType *SecondFnType, bool &CanUseFirst, bool &CanUseSecond, SmallVectorImpl< FunctionProtoType::ExtParameterInfo > &NewParamInfos)
 This function merges the ExtParameterInfo lists of two functions.
 
void ResetObjCLayout (const ObjCContainerDecl *CD)
 
unsigned getIntWidth (QualType T) const
 
QualType getCorrespondingUnsignedType (QualType T) const
 
QualType getCorrespondingSignedType (QualType T) const
 
QualType getCorrespondingSaturatedType (QualType Ty) const
 
QualType getCorrespondingUnsaturatedType (QualType Ty) const
 
QualType getCorrespondingSignedFixedPointType (QualType Ty) const
 
llvm::APSInt MakeIntValue (uint64_t Value, QualType Type) const
 Make an APSInt of the appropriate width and signedness for the given Value and integer Type.
 
bool isSentinelNullExpr (const Expr *E)
 
ObjCImplementationDeclgetObjCImplementation (ObjCInterfaceDecl *D)
 Get the implementation of the ObjCInterfaceDecl D, or nullptr if none exists.
 
ObjCCategoryImplDeclgetObjCImplementation (ObjCCategoryDecl *D)
 Get the implementation of the ObjCCategoryDecl D, or nullptr if none exists.
 
bool AnyObjCImplementation ()
 Return true if there is at least one @implementation in the TU.
 
void setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD)
 Set the implementation of ObjCInterfaceDecl.
 
void setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD)
 Set the implementation of ObjCCategoryDecl.
 
const ObjCMethodDeclgetObjCMethodRedeclaration (const ObjCMethodDecl *MD) const
 Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
 
void setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
 
const ObjCInterfaceDeclgetObjContainingInterface (const NamedDecl *ND) const
 Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc.
 
void setBlockVarCopyInit (const VarDecl *VD, Expr *CopyExpr, bool CanThrow)
 Set the copy initialization expression of a block var decl.
 
BlockVarCopyInit getBlockVarCopyInit (const VarDecl *VD) const
 Get the copy initialization expression of the VarDecl VD, or nullptr if none exists.
 
TypeSourceInfoCreateTypeSourceInfo (QualType T, unsigned Size=0) const
 Allocate an uninitialized TypeSourceInfo.
 
TypeSourceInfogetTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const
 Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.
 
void AddDeallocation (void(*Callback)(void *), void *Data) const
 Add a deallocation callback that will be invoked when the ASTContext is destroyed.
 
template<typename T >
void addDestruction (T *Ptr) const
 If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
 
GVALinkage GetGVALinkageForFunction (const FunctionDecl *FD) const
 
GVALinkage GetGVALinkageForVariable (const VarDecl *VD) const
 
bool DeclMustBeEmitted (const Decl *D)
 Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is only relevant for function or file scoped var definitions.
 
void forEachMultiversionedFunctionVersion (const FunctionDecl *FD, llvm::function_ref< void(FunctionDecl *)> Pred) const
 Visits all versions of a multiversioned function with the passed predicate.
 
const CXXConstructorDeclgetCopyConstructorForExceptionObject (CXXRecordDecl *RD)
 
void addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD)
 
void addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND)
 
TypedefNameDeclgetTypedefNameForUnnamedTagDecl (const TagDecl *TD)
 
void addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD)
 
DeclaratorDeclgetDeclaratorForUnnamedTagDecl (const TagDecl *TD)
 
void setManglingNumber (const NamedDecl *ND, unsigned Number)
 
unsigned getManglingNumber (const NamedDecl *ND, bool ForAuxTarget=false) const
 
void setStaticLocalNumber (const VarDecl *VD, unsigned Number)
 
unsigned getStaticLocalNumber (const VarDecl *VD) const
 
MangleNumberingContextgetManglingNumberContext (const DeclContext *DC)
 Retrieve the context for computing mangling numbers in the given DeclContext.
 
MangleNumberingContextgetManglingNumberContext (NeedExtraManglingDecl_t, const Decl *D)
 
std::unique_ptr< MangleNumberingContextcreateMangleNumberingContext () const
 
void setParameterIndex (const ParmVarDecl *D, unsigned index)
 Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield.
 
unsigned getParameterIndex (const ParmVarDecl *D) const
 Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield.
 
StringLiteralgetPredefinedStringLiteralFromCache (StringRef Key) const
 Return a string representing the human readable name for the specified function declaration or file name.
 
MSGuidDeclgetMSGuidDecl (MSGuidDeclParts Parts) const
 Return a declaration for the global GUID object representing the given GUID value.
 
UnnamedGlobalConstantDeclgetUnnamedGlobalConstantDecl (QualType Ty, const APValue &Value) const
 Return a declaration for a uniquified anonymous global constant corresponding to a given APValue.
 
TemplateParamObjectDeclgetTemplateParamObjectDecl (QualType T, const APValue &V) const
 Return the template parameter object of the given type with the given value.
 
ParsedTargetAttr filterFunctionTargetAttrs (const TargetAttr *TD) const
 Parses the target attributes passed in, and returns only the ones that are valid feature names.
 
std::vector< std::string > filterFunctionTargetVersionAttrs (const TargetVersionAttr *TV) const
 
void getFunctionFeatureMap (llvm::StringMap< bool > &FeatureMap, const FunctionDecl *) const
 
void getFunctionFeatureMap (llvm::StringMap< bool > &FeatureMap, GlobalDecl GD) const
 
void InitBuiltinTypes (const TargetInfo &Target, const TargetInfo *AuxTarget=nullptr)
 Initialize built-in types.
 
void getObjCEncodingForMethodParameter (Decl::ObjCDeclQualifier QT, QualType T, std::string &S, bool Extended) const
 getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return type.
 
bool isMSStaticDataMemberInlineDefinition (const VarDecl *VD) const
 Returns true if this is an inline-initialized static data member which is treated as a definition for MSVC compatibility.
 
InlineVariableDefinitionKind getInlineVariableDefinitionKind (const VarDecl *VD) const
 Determine whether a definition of this inline variable should be treated as a weak or strong definition.
 
OMPTraitInfogetNewOMPTraitInfo ()
 Return a new OMPTraitInfo object owned by this context.
 
bool mayExternalize (const Decl *D) const
 Whether a C++ static variable or CUDA/HIP kernel may be externalized.
 
bool shouldExternalize (const Decl *D) const
 Whether a C++ static variable or CUDA/HIP kernel should be externalized.
 
StringRef getCUIDHash () const
 
template<>
DynTypedNodeList getParents (const DynTypedNode &Node)
 

Static Public Member Functions

static ImportDeclgetNextLocalImport (ImportDecl *Import)
 
static bool isObjCNSObjectType (QualType Ty)
 Return true if this is an NSObject object with its NSObject attribute set.
 

Public Attributes

IdentifierTableIdents
 
SelectorTableSelectors
 
Builtin::ContextBuiltinInfo
 
const TranslationUnitKind TUKind
 
DeclarationNameTable DeclarationNames
 
IntrusiveRefCntPtr< ExternalASTSourceExternalSource
 
ASTMutationListenerListener = nullptr
 
struct clang::ASTContext::CUDAConstantEvalContext CUDAConstantEvalCtx
 
RawCommentList Comments
 All comments in this translation unit.
 
bool CommentsLoaded = false
 True if comments are already loaded from ExternalASTSource.
 
llvm::DenseMap< const Decl *, const RawComment * > DeclRawComments
 Mapping from declaration to directly attached comment.
 
llvm::DenseMap< const Decl *, const Decl * > RedeclChainComments
 Mapping from canonical declaration to the first redeclaration in chain that has a comment attached.
 
llvm::DenseMap< const Decl *, const Decl * > CommentlessRedeclChains
 Keeps track of redeclaration chains that don't have any comment attached.
 
llvm::DenseMap< const Decl *, comments::FullComment * > ParsedComments
 Mapping from declarations to parsed comments attached to any redeclaration.
 
CanQualType VoidTy
 
CanQualType BoolTy
 
CanQualType CharTy
 
CanQualType WCharTy
 
CanQualType WideCharTy
 
CanQualType WIntTy
 
CanQualType Char8Ty
 
CanQualType Char16Ty
 
CanQualType Char32Ty
 
CanQualType SignedCharTy
 
CanQualType ShortTy
 
CanQualType IntTy
 
CanQualType LongTy
 
CanQualType LongLongTy
 
CanQualType Int128Ty
 
CanQualType UnsignedCharTy
 
CanQualType UnsignedShortTy
 
CanQualType UnsignedIntTy
 
CanQualType UnsignedLongTy
 
CanQualType UnsignedLongLongTy
 
CanQualType UnsignedInt128Ty
 
CanQualType FloatTy
 
CanQualType DoubleTy
 
CanQualType LongDoubleTy
 
CanQualType Float128Ty
 
CanQualType Ibm128Ty
 
CanQualType ShortAccumTy
 
CanQualType AccumTy
 
CanQualType LongAccumTy
 
CanQualType UnsignedShortAccumTy
 
CanQualType UnsignedAccumTy
 
CanQualType UnsignedLongAccumTy
 
CanQualType ShortFractTy
 
CanQualType FractTy
 
CanQualType LongFractTy
 
CanQualType UnsignedShortFractTy
 
CanQualType UnsignedFractTy
 
CanQualType UnsignedLongFractTy
 
CanQualType SatShortAccumTy
 
CanQualType SatAccumTy
 
CanQualType SatLongAccumTy
 
CanQualType SatUnsignedShortAccumTy
 
CanQualType SatUnsignedAccumTy
 
CanQualType SatUnsignedLongAccumTy
 
CanQualType SatShortFractTy
 
CanQualType SatFractTy
 
CanQualType SatLongFractTy
 
CanQualType SatUnsignedShortFractTy
 
CanQualType SatUnsignedFractTy
 
CanQualType SatUnsignedLongFractTy
 
CanQualType HalfTy
 
CanQualType BFloat16Ty
 
CanQualType Float16Ty
 
CanQualType VoidPtrTy
 
CanQualType NullPtrTy
 
CanQualType DependentTy
 
CanQualType OverloadTy
 
CanQualType BoundMemberTy
 
CanQualType UnknownAnyTy
 
CanQualType BuiltinFnTy
 
CanQualType PseudoObjectTy
 
CanQualType ARCUnbridgedCastTy
 
CanQualType ObjCBuiltinIdTy
 
CanQualType ObjCBuiltinClassTy
 
CanQualType ObjCBuiltinSelTy
 
CanQualType ObjCBuiltinBoolTy
 
CanQualType OCLSamplerTy
 
CanQualType OCLEventTy
 
CanQualType OCLClkEventTy
 
CanQualType OCLQueueTy
 
CanQualType OCLReserveIDTy
 
CanQualType IncompleteMatrixIdxTy
 
CanQualType OMPArraySectionTy
 
CanQualType OMPArrayShapingTy
 
CanQualType OMPIteratorTy
 
QualType AutoDeductTy
 
QualType AutoRRefDeductTy
 
DeclVaListTagDecl = nullptr
 
TagDeclMSGuidTagDecl = nullptr
 
llvm::DenseSet< const VarDecl * > CUDADeviceVarODRUsedByHost
 Keep track of CUDA/HIP device-side variables ODR-used by host code.
 
llvm::DenseSet< const ValueDecl * > CUDAExternalDeviceDeclODRUsedByHost
 Keep track of CUDA/HIP external kernels or device variables ODR-used by host code.
 
llvm::DenseSet< const FunctionDecl * > CUDAImplicitHostDeviceFunUsedByDevice
 Keep track of CUDA/HIP implicit host device functions used on device side in device compilation.
 
ComparisonCategories CompCategories
 Types and expressions required to build C++2a three-way comparisons using operator<=>, including the values return by builtin <=> operators.
 
unsigned NumImplicitDefaultConstructors = 0
 The number of implicitly-declared default constructors.
 
unsigned NumImplicitDefaultConstructorsDeclared = 0
 The number of implicitly-declared default constructors for which declarations were built.
 
unsigned NumImplicitCopyConstructors = 0
 The number of implicitly-declared copy constructors.
 
unsigned NumImplicitCopyConstructorsDeclared = 0
 The number of implicitly-declared copy constructors for which declarations were built.
 
unsigned NumImplicitMoveConstructors = 0
 The number of implicitly-declared move constructors.
 
unsigned NumImplicitMoveConstructorsDeclared = 0
 The number of implicitly-declared move constructors for which declarations were built.
 
unsigned NumImplicitCopyAssignmentOperators = 0
 The number of implicitly-declared copy assignment operators.
 
unsigned NumImplicitCopyAssignmentOperatorsDeclared = 0
 The number of implicitly-declared copy assignment operators for which declarations were built.
 
unsigned NumImplicitMoveAssignmentOperators = 0
 The number of implicitly-declared move assignment operators.
 
unsigned NumImplicitMoveAssignmentOperatorsDeclared = 0
 The number of implicitly-declared move assignment operators for which declarations were built.
 
unsigned NumImplicitDestructors = 0
 The number of implicitly-declared destructors.
 
unsigned NumImplicitDestructorsDeclared = 0
 The number of implicitly-declared destructors for which declarations were built.
 
llvm::StringMap< SectionInfoSectionInfos
 

Friends

class NestedNameSpecifier
 
class ASTDeclReader
 
class ASTReader
 
class ASTWriter
 
template<class >
class serialization::AbstractTypeReader
 
class CXXRecordDecl
 
class IncrementalParser
 
class DeclarationNameTable
 
class DeclContext
 

Detailed Description

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 182 of file ASTContext.h.

Member Typedef Documentation

◆ import_range

using clang::ASTContext::import_range = llvm::iterator_range<import_iterator>

Definition at line 1024 of file ASTContext.h.

◆ overridden_cxx_method_iterator

using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator

Definition at line 986 of file ASTContext.h.

◆ overridden_method_range

Definition at line 995 of file ASTContext.h.

◆ TemplateOrSpecializationInfo

A type synonym for the TemplateOrInstantiation mapping.

Definition at line 470 of file ASTContext.h.

Member Enumeration Documentation

◆ GetBuiltinTypeError

Enumerator
GE_None 

No error.

GE_Missing_type 

Missing a type.

GE_Missing_stdio 

Missing a type from <stdio.h>

GE_Missing_setjmp 

Missing a type from <setjmp.h>

GE_Missing_ucontext 

Missing a type from <ucontext.h>

Definition at line 2215 of file ASTContext.h.

◆ InlineVariableDefinitionKind

Enumerator
None 

Not an inline variable.

Weak 

Weak definition of inline variable.

WeakUnknown 

Weak for now, might become strong later in this TU.

Strong 

Strong definition.

Definition at line 3299 of file ASTContext.h.

◆ NeedExtraManglingDecl_t

Enumerator
NeedExtraManglingDecl 

Definition at line 3134 of file ASTContext.h.

◆ PragmaSectionFlag

Enumerator
PSF_None 
PSF_Read 
PSF_Write 
PSF_Execute 
PSF_Implicit 
PSF_ZeroInit 
PSF_Invalid 

Definition at line 3353 of file ASTContext.h.

Constructor & Destructor Documentation

◆ ASTContext() [1/2]

ASTContext::ASTContext ( LangOptions LOpts,
SourceManager SM,
IdentifierTable idents,
SelectorTable sels,
Builtin::Context builtins,
TranslationUnitKind  TUKind 
)

Definition at line 870 of file ASTContext.cpp.

References addTranslationUnitDecl().

◆ ASTContext() [2/2]

clang::ASTContext::ASTContext ( const ASTContext )
delete

◆ ~ASTContext()

ASTContext::~ASTContext ( )

Definition at line 934 of file ASTContext.cpp.

References cleanup().

Member Function Documentation

◆ addComment()

void ASTContext::addComment ( const RawComment RC)

◆ addCopyConstructorForExceptionObject()

void ASTContext::addCopyConstructorForExceptionObject ( CXXRecordDecl RD,
CXXConstructorDecl CD 
)

◆ AddDeallocation()

void ASTContext::AddDeallocation ( void(*)(void *)  Callback,
void *  Data 
) const

Add a deallocation callback that will be invoked when the ASTContext is destroyed.

Parameters
CallbackA callback function that will be invoked on destruction.
DataPointer data that will be provided to the callback function when it is called.

Definition at line 941 of file ASTContext.cpp.

References clang::Data.

Referenced by addDestruction().

◆ addDeclaratorForUnnamedTagDecl()

void ASTContext::addDeclaratorForUnnamedTagDecl ( TagDecl TD,
DeclaratorDecl DD 
)

Definition at line 12258 of file ASTContext.cpp.

Referenced by clang::Sema::FinalizeDeclaratorGroup().

◆ addDestruction()

template<typename T >
void clang::ASTContext::addDestruction ( T *  Ptr) const
inline

◆ addedLocalImportDecl()

void ASTContext::addedLocalImportDecl ( ImportDecl Import)

Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit.

Definition at line 1586 of file ASTContext.cpp.

Referenced by clang::DeclContext::addHiddenDecl().

◆ addLazyModuleInitializers()

void ASTContext::addLazyModuleInitializers ( Module M,
ArrayRef< uint32_t >  IDs 
)

Definition at line 1085 of file ASTContext.cpp.

◆ addModuleInitializer()

void ASTContext::addModuleInitializer ( Module M,
Decl Init 
)

Add a declaration to the list of declarations that are initialized for a module.

This will typically be a global variable (with internal linkage) that runs module initializers, such as the iostream initializer, or an ImportDecl nominating another module that has initializers.

Definition at line 1059 of file ASTContext.cpp.

Referenced by clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnModuleImport(), clang::Sema::BuildModuleInclude(), and clang::Sema::CheckCompleteVariableDeclaration().

◆ addOverriddenMethod()

void ASTContext::addOverriddenMethod ( const CXXMethodDecl Method,
const CXXMethodDecl Overridden 
)

Note that the given C++ Method overrides the given Overridden method.

Definition at line 1560 of file ASTContext.cpp.

References clang::Decl::isCanonicalDecl().

Referenced by clang::CXXMethodDecl::addOverriddenMethod(), and clang::ASTDeclReader::VisitCXXMethodDecl().

◆ addressSpaceMapManglingFor()

bool clang::ASTContext::addressSpaceMapManglingFor ( LangAS  AS) const
inline

Definition at line 2837 of file ASTContext.h.

References clang::isTargetAddressSpace().

◆ addTranslationUnitDecl()

void clang::ASTContext::addTranslationUnitDecl ( )
inline

◆ addTypedefNameForUnnamedTagDecl()

void ASTContext::addTypedefNameForUnnamedTagDecl ( TagDecl TD,
TypedefNameDecl TND 
)

Definition at line 12248 of file ASTContext.cpp.

Referenced by clang::Sema::setTagNameForLinkagePurposes().

◆ adjustDeducedFunctionResultType()

void ASTContext::adjustDeducedFunctionResultType ( FunctionDecl FD,
QualType  ResultType 
)

◆ adjustExceptionSpec()

void ASTContext::adjustExceptionSpec ( FunctionDecl FD,
const FunctionProtoType::ExceptionSpecInfo ESI,
bool  AsWritten = false 
)

◆ adjustFunctionType()

const FunctionType * ASTContext::adjustFunctionType ( const FunctionType Fn,
FunctionType::ExtInfo  EInfo 
)

◆ adjustObjCTypeParamBoundType()

void ASTContext::adjustObjCTypeParamBoundType ( const ObjCTypeParamDecl Orig,
ObjCTypeParamDecl New 
) const

◆ adjustStringLiteralBaseType()

QualType ASTContext::adjustStringLiteralBaseType ( QualType  StrLTy) const

◆ Allocate() [1/2]

template<typename T >
T * clang::ASTContext::Allocate ( size_t  Num = 1) const
inline

Definition at line 716 of file ASTContext.h.

References Allocate().

◆ Allocate() [2/2]

void * clang::ASTContext::Allocate ( size_t  Size,
unsigned  Align = 8 
) const
inline

Definition at line 713 of file ASTContext.h.

Referenced by Allocate(), ASTAllocateString(), clang::FunctionDecl::DefaultedFunctionInfo::Create(), clang::DependentFunctionTemplateSpecializationInfo::Create(), clang::PackIndexingExpr::Create(), clang::SizeOfPackExpr::Create(), clang::RecoveryExpr::Create(), clang::ObjCTypeParamList::create(), clang::LambdaExpr::Create(), clang::UnresolvedMemberExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::PseudoObjectExpr::Create(), clang::ConstantExpr::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::DeclRefExpr::Create(), clang::OMPArrayShapingExpr::Create(), clang::OMPIteratorExpr::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::FunctionParmPackExpr::Create(), clang::ObjCAtTryStmt::Create(), clang::GenericSelectionExpr::Create(), clang::CapturedStmt::Create(), clang::CXXNewExpr::Create(), clang::CXXTemporaryObjectExpr::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::UserDefinedLiteral::Create(), clang::CXXMemberCallExpr::Create(), clang::CallExpr::Create(), clang::CUDAKernelCallExpr::Create(), clang::CaseStmt::Create(), clang::CXXOperatorCallExpr::Create(), clang::CXXConstructExpr::Create(), clang::IfStmt::Create(), clang::PredefinedExpr::Create(), clang::CXXDefaultInitExpr::Create(), clang::ParenListExpr::Create(), clang::ReturnStmt::Create(), clang::SwitchStmt::Create(), clang::StringLiteral::Create(), clang::WhileStmt::Create(), clang::TemplateArgumentList::CreateCopy(), clang::SizeOfPackExpr::CreateDeserialized(), clang::PackIndexingExpr::CreateDeserialized(), clang::CapturedStmt::CreateDeserialized(), clang::RecoveryExpr::CreateEmpty(), clang::DeclRefExpr::CreateEmpty(), clang::MemberExpr::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::ConstantExpr::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::GenericSelectionExpr::CreateEmpty(), clang::ObjCAtTryStmt::CreateEmpty(), clang::OMPArrayShapingExpr::CreateEmpty(), clang::OMPIteratorExpr::CreateEmpty(), clang::FunctionParmPackExpr::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), clang::CaseStmt::CreateEmpty(), clang::IfStmt::CreateEmpty(), clang::PredefinedExpr::CreateEmpty(), clang::SwitchStmt::CreateEmpty(), clang::ReturnStmt::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), clang::WhileStmt::CreateEmpty(), clang::CXXNewExpr::CreateEmpty(), clang::CXXConstructExpr::CreateEmpty(), clang::CXXTemporaryObjectExpr::CreateEmpty(), clang::CallExpr::CreateEmpty(), clang::CXXOperatorCallExpr::CreateEmpty(), clang::CXXMemberCallExpr::CreateEmpty(), clang::CUDAKernelCallExpr::CreateEmpty(), clang::UserDefinedLiteral::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::ParenListExpr::CreateEmpty(), getCanonicalTemplateSpecializationType(), getConstantArrayType(), getDeclAttrs(), getDependentTemplateSpecializationType(), getElaboratedType(), clang::ASTReader::GetExternalCXXBaseSpecifiers(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getOverloadedTemplateName(), getPackIndexingType(), getSubstTemplateTypeParmType(), getTemplateSpecializationType(), getTypedefType(), getUsingType(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::Decl::operator new(), clang::Sema::SaveNestedNameSpecifierAnnotation(), and clang::CXXRecordDecl::setCaptures().

◆ AllocateDeclListNode()

DeclListNode * clang::ASTContext::AllocateDeclListNode ( clang::NamedDecl ND)
inline

Allocates a DeclListNode or returns one from the ListNodeFreeList pool.

Definition at line 723 of file ASTContext.h.

◆ AnyObjCImplementation()

bool clang::ASTContext::AnyObjCImplementation ( )
inline

Return true if there is at least one @implementation in the TU.

Definition at line 3022 of file ASTContext.h.

Referenced by clang::Sema::DiagnoseUseOfUnimplementedSelectors().

◆ applyObjCProtocolQualifiers()

QualType ASTContext::applyObjCProtocolQualifiers ( QualType  type,
ArrayRef< ObjCProtocolDecl * >  protocols,
bool hasError,
bool  allowOnPointerType = false 
) const

Apply Objective-C protocol qualifiers to the given type.

Parameters
allowOnPointerTypespecifies if we can apply protocol qualifiers on ObjCObjectPointerType. It can be set to true when constructing the canonical type of a Objective-C type parameter.

If this is for the canonical type of a type parameter, we can apply protocol qualifiers on the ObjCObjectPointerType.

Definition at line 5381 of file ASTContext.cpp.

References clang::ObjCObjectType::getBaseType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), clang::ObjCObjectType::getTypeArgsAsWritten(), clang::ObjCObjectType::isKindOfTypeAsWritten(), ObjCBuiltinClassTy, ObjCBuiltinIdTy, clang::ObjCProtocolQualifiers< T >::qual_begin(), clang::ObjCProtocolQualifiers< T >::qual_end(), and clang::ast_matchers::type.

Referenced by clang::Sema::BuildObjCObjectType(), clang::Sema::BuildObjCTypeParamType(), and getObjCTypeParamType().

◆ areCommonBaseCompatible()

QualType ASTContext::areCommonBaseCompatible ( const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT 
)

◆ areComparableObjCPointerTypes()

bool ASTContext::areComparableObjCPointerTypes ( QualType  LHS,
QualType  RHS 
)

Definition at line 10265 of file ASTContext.cpp.

References canAssignObjCInterfaces(), and clang::Type::getAs().

Referenced by clang::Sema::CheckCompareOperands().

◆ areCompatibleRVVTypes()

bool ASTContext::areCompatibleRVVTypes ( QualType  FirstType,
QualType  SecondType 
)

◆ areCompatibleSveTypes()

bool ASTContext::areCompatibleSveTypes ( QualType  FirstType,
QualType  SecondType 
)

◆ areCompatibleVectorTypes()

bool ASTContext::areCompatibleVectorTypes ( QualType  FirstVec,
QualType  SecondVec 
)

◆ areLaxCompatibleRVVTypes()

bool ASTContext::areLaxCompatibleRVVTypes ( QualType  FirstType,
QualType  SecondType 
)

Return true if the given vector types are lax-compatible RISC-V vector types as defined by -flax-vector-conversions=, which permits implicit conversions between vectors with different number of elements and/or incompatible element types, false otherwise.

Definition at line 9616 of file ASTContext.cpp.

References clang::LangOptionsBase::All, clang::Generic, clang::Type::getAs(), getLangOpts(), clang::Type::getRVVEltType(), getRVVTypeSize(), getTypeSize(), clang::LangOptionsBase::Integer, clang::Type::isIntegerType(), clang::Type::isRVVSizelessBuiltinType(), and clang::Type::isVectorType().

Referenced by clang::Sema::CheckAssignmentConstraints(), CheckImplicitConversion(), and IsVectorConversion().

◆ areLaxCompatibleSveTypes()

bool ASTContext::areLaxCompatibleSveTypes ( QualType  FirstType,
QualType  SecondType 
)

◆ AtomicUsesUnsupportedLibcall()

bool ASTContext::AtomicUsesUnsupportedLibcall ( const AtomicExpr E) const

◆ attachCommentsToJustParsedDecls()

void ASTContext::attachCommentsToJustParsedDecls ( ArrayRef< Decl * >  Decls,
const Preprocessor PP 
)

Searches existing comments for doc comments that should be attached to Decls.

If any doc comment is found, it is parsed.

Requirement: All Decls are in the same file.

If the last comment in the file is already attached we assume there are not comments left to be attached to Decls.

Definition at line 496 of file ASTContext.cpp.

References adjustDeclToTemplate(), cacheRawCommentForDecl(), Comments, DeclRawComments, clang::RawCommentList::empty(), clang::File, clang::RawCommentList::getCommentsInFile(), getDeclLocsForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), clang::SourceLocation::isValid(), and ParsedComments.

Referenced by clang::Sema::ActOnDocumentableDecls().

◆ BlockRequiresCopying()

bool ASTContext::BlockRequiresCopying ( QualType  Ty,
const VarDecl D 
)

◆ buildBuiltinTemplateDecl()

BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl ( BuiltinTemplateKind  BTK,
const IdentifierInfo II 
) const

◆ buildImplicitRecord()

RecordDecl * ASTContext::buildImplicitRecord ( StringRef  Name,
RecordDecl::TagKind  TK = RecordDecl::TagKind::Struct 
) const

◆ buildImplicitTypedef()

TypedefDecl * ASTContext::buildImplicitTypedef ( QualType  T,
StringRef  Name 
) const

◆ cacheRawCommentForDecl()

void ASTContext::cacheRawCommentForDecl ( const Decl OriginalD,
const RawComment Comment 
) const

Attaches Comment to OriginalD and to its redeclaration chain and removes the redeclaration chain from the set of commentless chains.

Don't do anything if a comment has already been attached to OriginalD or its redeclaration chain.

Definition at line 470 of file ASTContext.cpp.

References CommentlessRedeclChains, clang::LangOptions::CommentOpts, DeclRawComments, clang::Decl::getCanonicalDecl(), clang::RawComment::isDocumentation(), clang::CommentOptions::ParseAllComments, and RedeclChainComments.

Referenced by attachCommentsToJustParsedDecls(), and getRawCommentForAnyRedecl().

◆ canAssignObjCInterfaces() [1/2]

bool ASTContext::canAssignObjCInterfaces ( const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT 
)

◆ canAssignObjCInterfaces() [2/2]

bool ASTContext::canAssignObjCInterfaces ( const ObjCObjectType LHS,
const ObjCObjectType RHS 
)

◆ canAssignObjCInterfacesInBlockPointer()

bool ASTContext::canAssignObjCInterfacesInBlockPointer ( const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT,
bool  BlockReturnType 
)

canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safety for objective-c pointers used to pass/return arguments in block literals.

When passed as arguments, passing 'A*' where 'id' is expected is not OK. Passing 'Sub *" where 'Super *" is expected is not OK. For the return type, the opposite is not OK.

Definition at line 9887 of file ASTContext.cpp.

References canAssignObjCInterfacesInBlockPointer(), clang::ObjCInterfaceType::getDecl(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::Type::isObjCBuiltinType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ObjCInterfaceDecl::isSuperClassOf(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().

Referenced by canAssignObjCInterfacesInBlockPointer(), and mergeTypes().

◆ canBindObjCObjectType()

bool ASTContext::canBindObjCObjectType ( QualType  To,
QualType  From 
)

◆ canBuiltinBeRedeclared()

bool ASTContext::canBuiltinBeRedeclared ( const FunctionDecl FD) const

Return whether a declaration to a builtin is allowed to be overloaded/redeclared.

Definition at line 9182 of file ASTContext.cpp.

References BuiltinInfo, clang::Builtin::Context::canBeRedeclared(), clang::FunctionDecl::getBuiltinID(), clang::Builtin::Context::hasCustomTypechecking(), and clang::Builtin::NotBuiltin.

◆ cleanup()

void ASTContext::cleanup ( )

Definition at line 895 of file ASTContext.cpp.

References clang::Value::clear().

Referenced by ~ASTContext().

◆ cloneFullComment()

comments::FullComment * ASTContext::cloneFullComment ( comments::FullComment FC,
const Decl D 
) const

◆ CollectInheritedProtocols()

void ASTContext::CollectInheritedProtocols ( const Decl CDecl,
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &  Protocols 
)

◆ CountNonClassIvars()

unsigned ASTContext::CountNonClassIvars ( const ObjCInterfaceDecl OI) const

◆ createDeviceMangleContext()

MangleContext * ASTContext::createDeviceMangleContext ( const TargetInfo T)

Creates a device mangle context to correctly mangle lambdas in a mixed architecture compile by setting the lambda mangling number source to the DeviceLambdaManglingNumber.

Currently this asserts that the TargetInfo (from the AuxTargetInfo) is a an itanium target.

Definition at line 12094 of file ASTContext.cpp.

References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetInfo::getCXXABI(), getDiagnostics(), and clang::TargetCXXABI::getKind().

Referenced by InitDeviceMC().

◆ createMangleContext()

MangleContext * ASTContext::createMangleContext ( const TargetInfo T = nullptr)

◆ createMangleNumberingContext()

std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext ( ) const

Definition at line 12231 of file ASTContext.cpp.

Referenced by getManglingNumberContext().

◆ CreateTypeSourceInfo()

TypeSourceInfo * ASTContext::CreateTypeSourceInfo ( QualType  T,
unsigned  Size = 0 
) const

Allocate an uninitialized TypeSourceInfo.

The caller should initialize the memory held by TypeSourceInfo using the TypeLoc wrappers.

Parameters
Tthe type that will be the basis for type source info. This type should refer to how the declarator was written in source code, not to what type semantic analysis resolved the declarator to.
Sizethe size of the type info to create, or 0 if the size should be calculated based on the type.

Definition at line 2955 of file ASTContext.cpp.

References clang::TypeLoc::getFullDataSizeForType().

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::actOnObjCProtocolQualifierType(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::BuildMemInitializer(), clang::Sema::CheckTypenameType(), getTemplateSpecializationTypeInfo(), getTrivialTypeSourceInfo(), GetTypeSourceInfoForDeclarator(), and clang::ASTDeclReader::VisitDeclaratorDecl().

◆ Deallocate()

void clang::ASTContext::Deallocate ( void *  Ptr) const
inline

◆ DeallocateDeclListNode()

void clang::ASTContext::DeallocateDeclListNode ( DeclListNode N)
inline

Deallcates a DeclListNode by returning it to the ListNodeFreeList pool.

Definition at line 734 of file ASTContext.h.

◆ DeclMustBeEmitted()

bool ASTContext::DeclMustBeEmitted ( const Decl D)

◆ DecodeTypeStr()

QualType ASTContext::DecodeTypeStr ( const char *&  Str,
const ASTContext Context,
ASTContext::GetBuiltinTypeError Error,
bool RequireICE,
bool  AllowTypeModifiers 
) const

Definition at line 11579 of file ASTContext.cpp.

References DecodeTypeFromStr().

Referenced by DecodePPCMMATypeFromStr().

◆ deduplicateMergedDefinitonsFor()

void ASTContext::deduplicateMergedDefinitonsFor ( NamedDecl ND)

Clean up the merged definition list.

Call this if you might have added duplicates into the list.

Definition at line 1020 of file ASTContext.cpp.

References clang::Decl::getCanonicalDecl().

◆ DeepCollectObjCIvars()

void ASTContext::DeepCollectObjCIvars ( const ObjCInterfaceDecl OI,
bool  leafClass,
SmallVectorImpl< const ObjCIvarDecl * > &  Ivars 
) const

DeepCollectObjCIvars - This routine first collects all declared, but not synthesized, ivars in super class and then collects all ivars, including those synthesized for current class.

This routine is used for implementation of current class when all ivars, declared and synthesized are known.

Definition at line 2575 of file ASTContext.cpp.

References DeepCollectObjCIvars(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), and clang::ObjCInterfaceDecl::ivars().

Referenced by clang::Sema::ActOnDefs(), and DeepCollectObjCIvars().

◆ DumpRecordLayout()

void ASTContext::DumpRecordLayout ( const RecordDecl RD,
raw_ostream &  OS,
bool  Simple = false 
) const

◆ eraseDeclAttrs()

void ASTContext::eraseDeclAttrs ( const Decl D)

Erase the attributes corresponding to the given declaration.

Definition at line 1435 of file ASTContext.cpp.

Referenced by clang::Decl::dropAttrs().

◆ filterFunctionTargetAttrs()

ParsedTargetAttr ASTContext::filterFunctionTargetAttrs ( const TargetAttr *  TD) const

Parses the target attributes passed in, and returns only the ones that are valid feature names.

Definition at line 13568 of file ASTContext.cpp.

Referenced by getFunctionFeatureMap().

◆ filterFunctionTargetVersionAttrs()

std::vector< std::string > ASTContext::filterFunctionTargetVersionAttrs ( const TargetVersionAttr *  TV) const

Definition at line 13554 of file ASTContext.cpp.

Referenced by getFunctionFeatureMap().

◆ forEachMultiversionedFunctionVersion()

void ASTContext::forEachMultiversionedFunctionVersion ( const FunctionDecl FD,
llvm::function_ref< void(FunctionDecl *)>  Pred 
) const

◆ getAddrSpaceQualType()

QualType ASTContext::getAddrSpaceQualType ( QualType  T,
LangAS  AddressSpace 
) const

Return the uniqued reference to the type for an address space qualified type with the specified type and address space.

The resulting type has a union of the qualifiers from T and the address space. If T already has an address space specifier, it is silently replaced.

Definition at line 3033 of file ASTContext.cpp.

References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().

Referenced by clang::Sema::ActOnVariableDeclarator(), AdjustAddressSpaceForBuiltinOperandType(), AdjustFunctionParmAndArgTypesForDeduction(), adjustStringLiteralBaseType(), clang::Sema::BuildAddressSpaceAttr(), clang::Sema::BuildAtomicExpr(), checkConditionalPointerCompatibility(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), DecodeTypeFromStr(), clang::Sema::deduceOpenCLAddressSpace(), deduceOpenCLPointeeAddrSpace(), clang::CodeGen::CodeGenTypes::DeriveThisType(), HandleAddressSpaceTypeAttribute(), handleMSPointerTypeQualifierAttr(), HandleWebAssemblyFuncrefAttr(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), clang::TreeTransform< Derived >::RebuildQualifiedType(), rewriteBuiltinFunctionDecl(), and clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter().

◆ getAdjustedParameterType()

QualType ASTContext::getAdjustedParameterType ( QualType  T) const

Perform adjustment on the parameter type of a function.

This routine adjusts the given parameter type T to the actual parameter type used by semantic analysis (C99 6.7.5.3p[7,8], C++ [dcl.fct]p3). The adjusted parameter type is returned.

Definition at line 6949 of file ASTContext.cpp.

References getDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().

Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::BuildFunctionType(), clang::Sema::CheckParameter(), DeduceNonTypeTemplateArgument(), getSignatureParameterType(), and ProcessAPINotes().

◆ getAdjustedType() [1/2]

CanQualType clang::ASTContext::getAdjustedType ( CanQualType  Orig,
CanQualType  New 
) const
inline

Definition at line 1347 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getAdjustedType().

◆ getAdjustedType() [2/2]

QualType ASTContext::getAdjustedType ( QualType  Orig,
QualType  New 
) const

Return the uniqued reference to a type adjusted from the original type to a new type.

Definition at line 3306 of file ASTContext.cpp.

References getCanonicalType(), and clang::AdjustedType::Profile().

Referenced by clang::Sema::adjustMemberFunctionCC(), getAdjustedType(), and getCommonSugarTypeNode().

◆ getAlignOfGlobalVar()

unsigned ASTContext::getAlignOfGlobalVar ( QualType  T,
const VarDecl VD 
) const

Return the alignment in bits that should be given to a global variable with type T.

getAlignOfGlobalVar - Return the alignment in bits that should be given to a global variable of the specified type.

If VD is non-null it will be considered specifically for the query.

Definition at line 2520 of file ASTContext.cpp.

References getMinGlobalAlignOfVar(), getPreferredTypeAlign(), clang::QualType::getTypePtr(), and getTypeSize().

Referenced by getAlignOfGlobalVarInChars().

◆ getAlignOfGlobalVarInChars()

CharUnits ASTContext::getAlignOfGlobalVarInChars ( QualType  T,
const VarDecl VD 
) const

Return the alignment in characters that should be given to a global variable with type T.

getAlignOfGlobalVarInChars - Return the alignment in characters that should be given to a global variable of the specified type.

If VD is non-null it will be considered specifically for the query.

Definition at line 2528 of file ASTContext.cpp.

References getAlignOfGlobalVar(), and toCharUnitsFromBits().

Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), and clang::Sema::isOpenMPCapturedByRef().

◆ getAllocator()

llvm::BumpPtrAllocator & clang::ASTContext::getAllocator ( ) const
inline

◆ getArrayDecayedType()

QualType ASTContext::getArrayDecayedType ( QualType  Ty) const

Return the properly qualified result of decaying the specified array type to a pointer.

getArrayDecayedType - Return the properly qualified result of decaying the specified array type to a pointer.

This operation is non-trivial when handling typedefs etc. The canonical type of T must be an array type, this returns a pointer to a properly qualified element of the array.

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

This operation is non-trivial when handling typedefs etc. The canonical type of "T" must be an array type, this returns a pointer to a properly qualified element of the array.

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

Definition at line 6980 of file ASTContext.cpp.

References getAsArrayType(), getAttributedType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeQualifiers(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), getPointerType(), getQualifiedType(), and clang::Result.

Referenced by clang::Sema::ActOnStringLiteral(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::CreateBuiltinArraySubscriptExpr(), DecodeTypeFromStr(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DiagnoseAssignmentResult(), doRewriteToUTF8StringBoxedExpressionHelper(), GetBuiltinType(), getCanonicalParamType(), getDecayedType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), IsStandardConversion(), and clang::Sema::PerformImplicitConversion().

◆ getArrayInitLoopExprElementCount()

uint64_t ASTContext::getArrayInitLoopExprElementCount ( const ArrayInitLoopExpr AILE) const

Return number of elements initialized in an ArrayInitLoopExpr.

Definition at line 7032 of file ASTContext.cpp.

References clang::ArrayInitLoopExpr::getArraySize(), and clang::ArrayInitLoopExpr::getSubExpr().

◆ getAsArrayType()

const ArrayType * ASTContext::getAsArrayType ( QualType  T) const

Type Query functions.

If the type is an instance of the specified class, return the Type pointer for the underlying maximally pretty type. This is a member of ASTContext because this may need to do some amount of canonicalization, e.g. to move type qualifiers into the element type.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 6891 of file ASTContext.cpp.

References clang::Qualifiers::empty(), clang::QualType::getCanonicalType(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), getQualifiedType(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::ActOnFields(), actOnOMPReductionKindClause(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuiltinRemoveExtent(), clang::Sema::CheckAllocatedType(), CheckC23ConstexprInitStringLiteral(), checkFormatStringExpr(), clang::Sema::CheckStaticArrayArgument(), DeduceFromInitializerList(), clang::Sema::deduceOpenCLAddressSpace(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), DiagnoseDivisionSizeofPointerOrArray(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitPartialArrayDestroy(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsConstantArrayType(), getAsDependentSizedArrayType(), getAsIncompleteArrayType(), getAsVariableArrayType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getLValueType(), clang::ento::MemRegionManager::getStaticSize(), handleInitPriorityAttr(), clang::ASTNodeImporter::ImportAPValue(), clang::InitializationSequence::InitializeFrom(), isDesignatorAtObjectEnd(), isSameEntity(), IsStringInit(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TryOrBuildParenListInitialization(), TypeRequiresBuiltinLaunderImp(), unwrapCastAwayConstnessLevel(), UnwrapSimilarArrayTypes(), and clang::ASTNodeImporter::VisitVarDecl().

◆ getAsConstantArrayType()

const ConstantArrayType * clang::ASTContext::getAsConstantArrayType ( QualType  T) const
inline

◆ getAsDependentSizedArrayType()

const DependentSizedArrayType * clang::ASTContext::getAsDependentSizedArrayType ( QualType  T) const
inline

Definition at line 2751 of file ASTContext.h.

References getAsArrayType().

Referenced by DeduceTemplateArgumentsByTypeMatch().

◆ getAsIncompleteArrayType()

const IncompleteArrayType * clang::ASTContext::getAsIncompleteArrayType ( QualType  T) const
inline

◆ getAssumedTemplateName()

TemplateName ASTContext::getAssumedTemplateName ( DeclarationName  Name) const

Retrieve a template name representing an unqualified-id that has been assumed to name a template for ADL purposes.

Definition at line 9224 of file ASTContext.cpp.

Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), and clang::Sema::isTemplateName().

◆ getASTAllocatedMemory()

size_t clang::ASTContext::getASTAllocatedMemory ( ) const
inline

Return the total amount of physical memory allocated for representing AST nodes and type information.

Definition at line 741 of file ASTContext.h.

◆ getASTMutationListener()

ASTMutationListener * clang::ASTContext::getASTMutationListener ( ) const
inline

◆ getASTObjCImplementationLayout()

const ASTRecordLayout & ASTContext::getASTObjCImplementationLayout ( const ObjCImplementationDecl D) const

Get or compute information about the layout of the specified Objective-C implementation.

This may differ from the interface if synthesized ivars are present.

Definition at line 2982 of file ASTContext.cpp.

References clang::ObjCImplDecl::getClassInterface().

Referenced by lookupFieldBitOffset().

◆ getASTObjCInterfaceLayout()

const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout ( const ObjCInterfaceDecl D) const

Get or compute information about the layout of the specified Objective-C interface.

Definition at line 2977 of file ASTContext.cpp.

Referenced by getTypeUnadjustedAlign(), and lookupFieldBitOffset().

◆ getASTRecordLayout()

const ASTRecordLayout & ASTContext::getASTRecordLayout ( const RecordDecl D) const

Get or compute information about the layout of the specified record (struct/union/class) D, which indicates its size and field position information.

getASTRecordLayout - Get or compute information about the layout of the specified record (struct/union/class), which indicates its size and field position information.

Definition at line 3330 of file RecordLayoutBuilder.cpp.

References clang::ExternalASTSource::CompleteType(), DumpRecordLayout(), clang::CharUnits::fromQuantity(), clang::RecordDecl::getDefinition(), getExternalSource(), getLangOpts(), clang::RecordDecl::getMostRecentDecl(), getTargetInfo(), clang::DeclContext::hasExternalLexicalStorage(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), clang::Decl::isInvalidDecl(), isMsLayout(), mustSkipTailPadding(), and clang::CharUnits::Zero().

Referenced by AddIndirectPrimaryBases(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), clang::CodeGen::CGCXXABI::buildThisParam(), calculateOffset(), classifyType(), clang::RecordDecl::completeDefinition(), computeFullPathsForVFTables(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), computeOffsetHint(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpRecordLayout(), EmitNullBaseClassInitialization(), EmitNullConstant(), EncodeBitField(), findPathsToSubobject(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), getDerivedToBaseAlignmentAndOffset(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffsetInBits(), clang::VarDecl::getFlexibleArrayInitChars(), getMemberPointerPathAdjustment(), clang::CodeGen::CodeGenModule::getMinimumClassObjectSize(), getOffsetOfBaseWithVBPtr(), getOffsetOfFullPath(), getPreferredTypeAlign(), getTypeInfoDataSizeInChars(), getTypeUnadjustedAlign(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), isDesignatorAtObjectEnd(), isIntegerLikeType(), clang::Sema::LookupInlineAsmField(), setUsedBits(), structHasUniqueObjectRepresentations(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().

◆ getAsVariableArrayType()

const VariableArrayType * clang::ASTContext::getAsVariableArrayType ( QualType  T) const
inline

◆ getAtomicType()

QualType ASTContext::getAtomicType ( QualType  T) const

Return the uniqued reference to the atomic type for the specified type.

getAtomicType - Return the uniqued reference to the atomic type for the given value type.

Definition at line 5899 of file ASTContext.cpp.

References getAtomicType(), getCanonicalType(), clang::QualType::isCanonical(), and clang::AtomicType::Profile().

Referenced by clang::Sema::BuildAtomicType(), getAtomicType(), getCommonNonSugarTypeNode(), getVariableArrayDecayedType(), clang::Sema::Initialize(), makeQualifiedLValueReferenceType(), and mergeTypes().

◆ getAttributedType()

QualType ASTContext::getAttributedType ( attr::Kind  attrKind,
QualType  modifiedType,
QualType  equivalentType 
) const

◆ getAutoDeductType()

QualType ASTContext::getAutoDeductType ( ) const

◆ getAutoRRefDeductType()

QualType ASTContext::getAutoRRefDeductType ( ) const

C++11 deduction pattern for 'auto &&' type.

getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.

Definition at line 5937 of file ASTContext.cpp.

References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().

Referenced by clang::Sema::ActOnCXXForRangeStmt(), and clang::ASTReader::GetType().

◆ getAutoType()

QualType ASTContext::getAutoType ( QualType  DeducedType,
AutoTypeKeyword  Keyword,
bool  IsDependent,
bool  IsPack = false,
ConceptDecl TypeConstraintConcept = nullptr,
ArrayRef< TemplateArgument TypeConstraintArgs = {} 
) const

C++11 deduced auto type.

getAutoType - Return the uniqued reference to the 'auto' type which has been deduced to the given type, or to the canonical undeduced 'auto' type, or the canonical deduced-but-dependent 'auto' type.

Definition at line 5842 of file ASTContext.cpp.

Referenced by ConvertDeclSpecToType(), getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), getUnconstrainedType(), clang::TreeTransform< Derived >::RebuildAutoType(), and clang::TreeTransform< Derived >::RebuildQualifiedType().

◆ getAuxTargetInfo()

const TargetInfo * clang::ASTContext::getAuxTargetInfo ( ) const
inline

◆ getBaseElementType() [1/2]

QualType ASTContext::getBaseElementType ( const ArrayType VAT) const

Return the innermost element type of an array type.

For example, will return "int" for int[m][n]

Definition at line 7002 of file ASTContext.cpp.

References getBaseElementType(), and clang::ArrayType::getElementType().

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnInitializerError(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildArrayType(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXTypeConstructExpr(), BuildImplicitMemberInitializer(), clang::Sema::BuiltinRemoveExtent(), CheckAggExprForMemSetUse(), clang::Sema::CheckAllocatedType(), clang::Sema::checkArrayElementAlignment(), CheckC23ConstexprVarType(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckNontrivialField(), checkTrivialClassMembers(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CollectIvarsToConstructOrDestruct(), defaultedSpecialMemberIsConstexpr(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), DiagnoseDivisionSizeofPointerOrArray(), diagnoseOpenCLTypes(), EmitMemberInitializer(), emitReadOnlyPlacementAttrWarning(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), getBaseElementType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getInnerObjCOwnership(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), getTypeAlignIfKnown(), handleInitPriorityAttr(), hasUniqueObjectRepresentations(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::isAbstractType(), isConstNotMutableType(), clang::QualType::isCXX98PODType(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isNonConstantStorage(), isTriviallyCopyableTypeImpl(), clang::QualType::isTriviallyRelocatableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), PerformConstructorInitialization(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::Sema::RequireLiteralType(), clang::Sema::RequireNonAbstractType(), clang::Sema::RequireStructuralType(), clang::Sema::SetIvarInitializers(), setUsedBits(), TryDefaultInitialization(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryValueInitialization(), TypeRequiresBuiltinLaunderImp(), and clang::UsedDeclVisitor< Derived >::VisitCXXDeleteExpr().

◆ getBaseElementType() [2/2]

QualType ASTContext::getBaseElementType ( QualType  QT) const

◆ getBitIntType()

QualType ASTContext::getBitIntType ( bool  Unsigned,
unsigned  NumBits 
) const

Return a bit-precise integer type with the specified signedness and bit count.

Definition at line 4560 of file ASTContext.cpp.

References clang::BitIntType::Profile().

Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::BuildBitIntType(), ChangeIntegralSignedness(), getCorrespondingSignedType(), and getCorrespondingUnsignedType().

◆ getBlockDescriptorExtendedType()

QualType ASTContext::getBlockDescriptorExtendedType ( ) const

◆ getBlockDescriptorType()

QualType ASTContext::getBlockDescriptorType ( ) const

◆ getBlockPointerType()

QualType ASTContext::getBlockPointerType ( QualType  T) const

◆ getBlockVarCopyInit()

BlockVarCopyInit ASTContext::getBlockVarCopyInit ( const VarDecl VD) const

Get the copy initialization expression of the VarDecl VD, or nullptr if none exists.

Get the copy initialization expression of VarDecl, or nullptr if none exists.

Definition at line 2936 of file ASTContext.cpp.

References clang::Decl::hasAttr().

Referenced by BlockRequiresCopying(), getBlockCaptureStr(), and clang::ASTDeclWriter::VisitVarDecl().

◆ getBOOLDecl()

TypedefDecl * clang::ASTContext::getBOOLDecl ( ) const
inline

Retrieve declaration of 'BOOL' typedef.

Definition at line 2079 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral(), and getBOOLType().

◆ getBoolName()

IdentifierInfo * clang::ASTContext::getBoolName ( ) const
inline

Retrieve the identifier 'bool'.

Definition at line 1909 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by clang::Sema::getPrintingPolicy().

◆ getBOOLType()

QualType clang::ASTContext::getBOOLType ( ) const
inline

type of 'BOOL' type.

Definition at line 2089 of file ASTContext.h.

References getBOOLDecl(), and getTypeDeclType().

Referenced by clang::Sema::ActOnObjCBoolLiteral().

◆ getBTFTagAttributedType()

QualType ASTContext::getBTFTagAttributedType ( const BTFTypeTagAttr *  BTFAttr,
QualType  Wrapped 
)

Definition at line 4779 of file ASTContext.cpp.

References getCanonicalType(), and clang::BTFTagAttributedType::Profile().

Referenced by getCommonSugarTypeNode().

◆ getBuiltinMSVaListDecl()

TypedefDecl * ASTContext::getBuiltinMSVaListDecl ( ) const

Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type.

Definition at line 9175 of file ASTContext.cpp.

References CreateMSVaListDecl().

Referenced by getBuiltinMSVaListType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getBuiltinMSVaListType()

QualType clang::ASTContext::getBuiltinMSVaListType ( ) const
inline

Retrieve the type of the __builtin_ms_va_list type.

Definition at line 2117 of file ASTContext.h.

References getBuiltinMSVaListDecl(), and getTypeDeclType().

Referenced by clang::Sema::BuildVAArgExpr(), and clang::desugarForDiagnostic().

◆ GetBuiltinType()

QualType ASTContext::GetBuiltinType ( unsigned  ID,
GetBuiltinTypeError Error,
unsigned IntegerConstantArgs = nullptr 
) const

◆ getBuiltinVaListDecl()

TypedefDecl * ASTContext::getBuiltinVaListDecl ( ) const

Retrieve the C type declaration corresponding to the predefined __builtin_va_list type.

Definition at line 9157 of file ASTContext.cpp.

References CreateVaListDecl(), and clang::Decl::isImplicit().

Referenced by getBuiltinVaListType(), GetFullTypeForDeclarator(), getPredefinedDecl(), getVaListTagDecl(), and clang::Sema::Initialize().

◆ getBuiltinVaListType()

QualType clang::ASTContext::getBuiltinVaListType ( ) const
inline

Retrieve the type of the __builtin_va_list type.

Definition at line 2103 of file ASTContext.h.

References getBuiltinVaListDecl(), and getTypeDeclType().

Referenced by clang::Sema::BuildVAArgExpr(), DecodeTypeFromStr(), clang::desugarForDiagnostic(), and clang::CodeGen::getVAListElementType().

◆ getBuiltinVectorTypeInfo()

ASTContext::BuiltinVectorTypeInfo ASTContext::getBuiltinVectorTypeInfo ( const BuiltinType VecTy) const

◆ getByrefLifetime()

bool ASTContext::getByrefLifetime ( QualType  Ty,
Qualifiers::ObjCLifetime Lifetime,
bool HasByrefExtendedLayout 
) const

Returns true, if given type has a known lifetime.

HasByrefExtendedLayout is set to false in this case. If HasByrefExtendedLayout returns true, byref variable has extended lifetime.

Definition at line 7585 of file ASTContext.cpp.

References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptionsBase::NonGC, clang::ObjC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.

◆ getCanonicalFunctionResultType()

CanQualType ASTContext::getCanonicalFunctionResultType ( QualType  ResultType) const

◆ getCanonicalNestedNameSpecifier()

NestedNameSpecifier * ASTContext::getCanonicalNestedNameSpecifier ( NestedNameSpecifier NNS) const

Retrieves the "canonical" nested name specifier for a given nested name specifier.

The canonical nested name specifier is a nested name specifier that uniquely identifies a type or namespace within the type system. For example, given:

namespace N {
struct S {
template<typename T> struct X { typename T* type; };
};
}
template<typename T> struct Y {
typename N::S::X<T>::type member;
};
#define X(type, name)
Definition: Value.h:142
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
RangeSelector member(std::string ID)
Given a MemberExpr, selects the member token.

Here, the nested-name-specifier for N::S::X<T>:: will be S::X<template-param-0-0>, since 'S' and 'X' are uniquely defined by declarations in the type system and the canonical type for the template type parameter 'T' is template-param-0-0.

Definition at line 6832 of file ASTContext.cpp.

References clang::NestedNameSpecifier::Create(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsType(), getCanonicalNestedNameSpecifier(), getCanonicalType(), clang::NestedNameSpecifier::getKind(), clang::NamespaceAliasDecl::getNamespace(), clang::NamespaceDecl::getOriginalNamespace(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by clang::Sema::CheckUsingDeclRedeclaration(), clang::NamedDecl::declarationReplaces(), getCanonicalNestedNameSpecifier(), getCommonNNS(), getDependentNameType(), getDependentTemplateName(), and getDependentTemplateSpecializationType().

◆ getCanonicalParamType()

CanQualType ASTContext::getCanonicalParamType ( QualType  T) const

◆ getCanonicalTemplateArgument()

TemplateArgument ASTContext::getCanonicalTemplateArgument ( const TemplateArgument Arg) const

Retrieve the "canonical" template argument.

The canonical template argument is the simplest template argument (which may be a type, value, expression, or declaration) that expresses the value of the argument.

Definition at line 6777 of file ASTContext.cpp.

References clang::TemplateArgument::CreatePackCopy(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsStructuralValue(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateArguments(), getCanonicalTemplateName(), getCanonicalType(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getIsDefaulted(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getParamTypeForDecl(), clang::TemplateArgument::getStructuralValueType(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), ConvertDeducedTemplateArguments(), getCanonicalTemplateName(), getSubstTemplateTypeParmPackType(), isSubstitutedTemplateArgument(), and clang::ASTRecordReader::readTemplateArgument().

◆ getCanonicalTemplateName()

TemplateName ASTContext::getCanonicalTemplateName ( const TemplateName Name) const

Retrieves the "canonical" template name that refers to a given template.

The canonical template name is the simplest expression that can be used to refer to a given template. For most templates, this expression is just the template declaration itself. For example, the template std::vector can be referred to via a variety of names—std::vector, ::std::vector, vector (if vector is in scope), etc.—but all of these names map down to the same TemplateDecl, which is used to form the canonical template name.

Dependent template names are more interesting. Here, the template name could be something like T::template apply or std::allocator<T>::template rebind, where the nested name specifier itself is dependent. In this case, the canonical template name uses the shortest form of the dependent nested-name-specifier, which itself contains all canonical types, values, and templates.

Definition at line 6278 of file ASTContext.cpp.

References clang::TemplateName::AssumedTemplate, clang::TemplateName::DependentTemplate, clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::SubstTemplateTemplateParmPackStorage::getAssociatedDecl(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateArgument(), getCanonicalTemplateName(), clang::SubstTemplateTemplateParmPackStorage::getFinal(), clang::SubstTemplateTemplateParmPackStorage::getIndex(), clang::SubstTemplateTemplateParmStorage::getReplacement(), getSubstTemplateTemplateParmPack(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, clang::TemplateName::Template, and clang::TemplateName::UsingTemplate.

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateName(), getCanonicalTemplateSpecializationType(), getCommonTemplateName(), clang::Sema::getMoreSpecializedPartialSpecialization(), hasSameTemplateName(), clang::Sema::isMoreSpecializedThanPrimary(), isSameTemplateArg(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().

◆ getCanonicalTemplateSpecializationType()

QualType ASTContext::getCanonicalTemplateSpecializationType ( TemplateName  T,
ArrayRef< TemplateArgument Args 
) const

◆ getCanonicalType() [1/2]

const Type * clang::ASTContext::getCanonicalType ( const Type T) const
inline

◆ getCanonicalType() [2/2]

CanQualType clang::ASTContext::getCanonicalType ( QualType  T) const
inline

Return the canonical (structural) type corresponding to the specified potentially non-canonical type T.

The non-canonical version of a type may have many "decorated" versions of types. Decorators can include typedefs, 'typeof' operators, etc. The returned type is guaranteed to be free of any of these, allowing two canonical types to be compared for exact equality with a simple pointer comparison.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 2549 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and clang::QualType::getCanonicalType().

Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCXXMemberReference(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), clang::Sema::AddConversionCandidate(), addFunctionPointerConversion(), clang::Sema::AddOverriddenMethods(), clang::Sema::areMultiversionVariantFunctionsCompatible(), clang::Sema::AttachBaseSpecifiers(), buildDeclareReductionRef(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildReferenceType(), BuildSimilarlyQualifiedPointerType(), buildSingleCopyAssignRecursively(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAssignmentConstraints(), CheckC23ConstexprVarType(), clang::Sema::CheckConstructor(), clang::Sema::CheckDerivedToBaseConversion(), clang::CheckEquivalentExceptionSpecImpl(), clang::Sema::CheckFunctionDeclaration(), CheckImplicitConversion(), clang::Sema::CheckMain(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCMethodOverrides(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CodeCompleteConstructorInitializer(), CollectVRQualifiers(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceTemplateArguments(), DiagnoseBadConversion(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::Sema::FindCompositeObjCPointerType(), findDecomposableBaseClass(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), clang::CodeGen::CodeGenTBAA::getBaseTypeInfo(), getBlockPointerType(), getBTFTagAttributedType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), getComplexType(), getConstantArrayType(), getConstantMatrixType(), getConstructors(), GetConversionType(), getDecayedType(), getDecltypeType(), getDependentAddressSpaceType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), getDependentSizedMatrixType(), getDependentVectorType(), clang::CXXRecordDecl::getDestructor(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), GetKeyForBase(), getLValueReferenceType(), getMacroQualifiedType(), getMemberPointerType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getPackExpansionType(), getPackIndexingType(), getParenType(), getPointerType(), getRValueReferenceType(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTemplateSpecializationType(), getTypedefType(), clang::CodeGen::CodeGenTBAA::getTypeInfo(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), clang::ento::MemRegionManager::getVarRegion(), getVectorType(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::handlerCanCatch(), hasSameType(), hasSameUnqualifiedType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitBuiltinTypes(), InitCatchParam(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::Sema::IsFunctionConversion(), IsImplicitBoolFloatConversion(), IsInvalidCmseNSCallConversion(), clang::Sema::IsInvalidSMECallConversion(), IsModifiable(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Sema::isObjCPointerConversion(), IsOverloadOrOverrideImpl(), clang::Sema::IsQualificationConversion(), isSameTemplateArg(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), IsStandardConversion(), IsStringInit(), IsStructurallyEquivalent(), clang::Expr::isUnusedResultAWarning(), clang::Sema::LookupConstructors(), LookupMemberExpr(), clang::Sema::LookupSpecialMember(), MarkUsedTemplateParameters(), matchTypes(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypeLists(), mergeTypes(), MightInstantiateTo(), NoteIndirectBases(), OpenCLArithmeticConversions(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::LookupResult::resolveKind(), ResolveOverloadedFunctionForReferenceBinding(), rewriteToObjCProperty(), SelectPropertyForSynthesisFromProtocols(), clang::cross_tu::shouldImport(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ento::ExprEngine::VisitInitListExpr().

◆ getCFConstantStringDecl()

TypedefDecl * ASTContext::getCFConstantStringDecl ( ) const

Objective-C ABI

typedef struct __NSConstantString_tag { const int *isa; int flags; const char *str; long length; } __NSConstantString;

Swift ABI (4.1, 4.2)

typedef struct __NSConstantString_tag { uintptr_t _cfisa; uintptr_t _swift_rc; _Atomic(uint64_t) _cfinfoa; const char *_ptr; uint32_t _length; } __NSConstantString;

Swift ABI (5.0)

typedef struct __NSConstantString_tag { uintptr_t _cfisa; uintptr_t _swift_rc; _Atomic(uint64_t) _cfinfoa; const char *_ptr; uintptr_t _length; } __NSConstantString;

Definition at line 7316 of file ASTContext.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), buildImplicitTypedef(), clang::LangOptions::CFRuntime, CharTy, clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getLangOpts(), getPointerType(), getTagDeclType(), getUIntPtrType(), clang::ICIS_NoInit, Idents, IntTy, LongTy, clang::TagDecl::startDefinition(), clang::LangOptionsBase::Swift, clang::LangOptionsBase::Swift4_1, clang::LangOptionsBase::Swift4_2, clang::ast_matchers::tagType, and clang::CanQual< T >::withConst().

Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getCFConstantStringTagDecl()

RecordDecl * ASTContext::getCFConstantStringTagDecl ( ) const

Definition at line 7400 of file ASTContext.cpp.

References getCFConstantStringDecl().

Referenced by getPredefinedDecl().

◆ getCFConstantStringType()

QualType ASTContext::getCFConstantStringType ( ) const

Return the C structure type used to represent constant CFStrings.

Definition at line 7407 of file ASTContext.cpp.

References getCFConstantStringDecl(), and getTypedefType().

Referenced by DecodeTypeFromStr(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().

◆ getCharWidth()

uint64_t clang::ASTContext::getCharWidth ( ) const
inline

◆ getCommentCommandTraits()

comments::CommandTraits & clang::ASTContext::getCommentCommandTraits ( ) const
inline

◆ getCommentForDecl()

comments::FullComment * ASTContext::getCommentForDecl ( const Decl D,
const Preprocessor PP 
) const

◆ getCommonSugaredType()

QualType ASTContext::getCommonSugaredType ( QualType  X,
QualType  Y,
bool  Unqualified = false 
)

◆ getComplexType() [1/2]

CanQualType clang::ASTContext::getComplexType ( CanQualType  T) const
inline

Definition at line 1333 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getComplexType().

◆ getComplexType() [2/2]

QualType ASTContext::getComplexType ( QualType  T) const

Return the uniqued reference to the type for a complex number with the specified element type.

getComplexType - Return the uniqued reference to the type for a complex number with the specified element type.

Definition at line 3252 of file ASTContext.cpp.

References getCanonicalType(), getComplexType(), clang::QualType::isCanonical(), and clang::ComplexType::Profile().

Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::AddModeAttr(), ConvertDeclSpecToType(), DecodeTypeFromStr(), getCommonNonSugarTypeNode(), getComplexType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleIntToFloatConversion(), and clang::Sema::UsualUnaryConversions().

◆ getConstantArrayElementCount()

uint64_t ASTContext::getConstantArrayElementCount ( const ConstantArrayType CA) const

Return number of constant array elements.

getConstantArrayElementCount - Returns number of constant array elements.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 7022 of file ASTContext.cpp.

References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().

Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable(), and setUsedBits().

◆ getConstantArrayType()

QualType ASTContext::getConstantArrayType ( QualType  EltTy,
const llvm::APInt &  ArySize,
const Expr SizeExpr,
ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const

Return the unique reference to the type for a constant array of the specified element type.

getConstantArrayType - Return the unique reference to the type for an array of the specified element type.

Definition at line 3515 of file ASTContext.cpp.

References Allocate(), getCanonicalType(), getConstantArrayType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Expr::isInstantiationDependent(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnNumericConstant(), actOnOMPReductionKindClause(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildPredefinedExpr(), CheckStringInit(), CreateHexagonBuiltinVaListDecl(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::desugarForDiagnostic(), diagnoseListInit(), EmitDoacrossOrdered(), clang::Sema::FindCompositePointerType(), getAsArrayType(), getCommonNonSugarTypeNode(), getConstantArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getStringLiteralArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), TryInitializerListConstruction(), TryListConversion(), TryOrBuildParenListInitialization(), and TryToFixInvalidVariablyModifiedType().

◆ getConstantMatrixType()

QualType ASTContext::getConstantMatrixType ( QualType  ElementType,
unsigned  NumRows,
unsigned  NumColumns 
) const

◆ getConstType()

QualType clang::ASTContext::getConstType ( QualType  T) const
inline

Return the uniqued reference to the type for a const qualified type.

The resulting type has a union of the qualifiers from T and const.

It can be reasonably expected that this will always be equivalent to calling T.withConst().

Definition at line 1292 of file ASTContext.h.

References clang::QualType::withConst().

Referenced by clang::Sema::EvaluateStaticAssertMessageAsString(), makeLaunchBoundsArgExpr(), and RVVType2Qual().

◆ getCopyConstructorForExceptionObject()

const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject ( CXXRecordDecl RD)

◆ getCorrespondingSaturatedType()

QualType ASTContext::getCorrespondingSaturatedType ( QualType  Ty) const

◆ getCorrespondingSignedFixedPointType()

QualType ASTContext::getCorrespondingSignedFixedPointType ( QualType  Ty) const

◆ getCorrespondingSignedType()

QualType ASTContext::getCorrespondingSignedType ( QualType  T) const

◆ getCorrespondingUnsaturatedType()

QualType ASTContext::getCorrespondingUnsaturatedType ( QualType  Ty) const

◆ getCorrespondingUnsignedType()

QualType ASTContext::getCorrespondingUnsignedType ( QualType  T) const

◆ getcudaConfigureCallDecl()

FunctionDecl * clang::ASTContext::getcudaConfigureCallDecl ( )
inline

Definition at line 1409 of file ASTContext.h.

Referenced by clang::Sema::ActOnCUDAExecConfigExpr().

◆ getCUIDHash()

StringRef ASTContext::getCUIDHash ( ) const

◆ getCurrentKeyFunction()

const CXXMethodDecl * ASTContext::getCurrentKeyFunction ( const CXXRecordDecl RD)

Get our current best idea for the key function of the given record decl, or nullptr if there isn't one.

The key function is, according to the Itanium C++ ABI section 5.2.3: ...the first non-pure virtual function that is not inline at the point of class definition.

Other ABIs use the same idea. However, the ARM C++ ABI ignores virtual functions that are defined 'inline', which means that the result of this computation can change.

Definition at line 3426 of file RecordLayoutBuilder.cpp.

References computeKeyFunction(), clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::CXXRecordDecl::getDefinition(), getExternalSource(), getTargetInfo(), clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), clang::LazyOffsetPtr< T, OffsT, Get >::isValid(), and clang::Result.

Referenced by clang::Sema::ActOnFinishFunctionBody(), DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::installapi::getVTableLinkage(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::installapi::hasVTable(), clang::installapi::isRTTIWeakDef(), clang::CodeGen::CodeGenVTables::isVTableExternal(), and clang::ASTDeclWriter::VisitCXXRecordDecl().

◆ getCurrentNamedModule()

Module * clang::ASTContext::getCurrentNamedModule ( ) const
inline

Get module under construction, nullptr if this is not a C++20 module.

Definition at line 1066 of file ASTContext.h.

Referenced by clang::ReducedBMIGenerator::getEmittingModule(), clang::Decl::isInAnotherModuleUnit(), and clang::CodeGen::CodeGenModule::Release().

◆ getCVRQualifiedType()

QualType clang::ASTContext::getCVRQualifiedType ( QualType  T,
unsigned  CVR 
) const
inline

Return a type with additional const, volatile, or restrict qualifiers.

Definition at line 2136 of file ASTContext.h.

References clang::Qualifiers::fromCVRMask(), and getQualifiedType().

Referenced by clang::Sema::CheckPointerToMemberOperands().

◆ getCXXABIKind()

TargetCXXABI::Kind ASTContext::getCXXABIKind ( ) const

Return the C++ ABI kind that should be used.

The C++ ABI can be overriden at compile time with -fc++-abi=. If this is not provided, we instead use the default ABI set by the target.

Definition at line 818 of file ASTContext.cpp.

References clang::LangOptions::CXXABI, clang::TargetInfo::getCXXABI(), clang::TargetCXXABI::getKind(), getLangOpts(), and getTargetInfo().

Referenced by createCXXABI(), and clang::CodeGen::CreateItaniumCXXABI().

◆ getDecayedType() [1/3]

CanQualType clang::ASTContext::getDecayedType ( CanQualType  T) const
inline

Definition at line 1356 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getDecayedType().

◆ getDecayedType() [2/3]

QualType ASTContext::getDecayedType ( QualType  Orig,
QualType  Decayed 
) const

Return the uniqued reference to a specified decay from the original type to the decayed type.

Definition at line 3327 of file ASTContext.cpp.

References getCanonicalType(), and clang::AdjustedType::Profile().

◆ getDecayedType() [3/3]

QualType ASTContext::getDecayedType ( QualType  T) const

◆ getDeclAlign()

CharUnits ASTContext::getDeclAlign ( const Decl D,
bool  ForAlignof = false 
) const

Return a conservative estimate of the alignment of the specified decl D.

Precondition
D must not be a bitfield type, as bitfields do not have a valid alignment.

If ForAlignof, references are treated like their underlying type and large arrays don't get any special treatment. If not ForAlignof it computes the value expected by CodeGen: references are treated like pointers and large arrays get extra alignment.

Definition at line 1639 of file ASTContext.cpp.

References clang::TypeInfo::Align, clang::ast_matchers::arrayType, clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getMaxAlignedAttribute(), clang::Decl::getMaxAlignment(), getMinGlobalAlignOfVar(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), clang::QualType::getQualifiers(), getTargetInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Qualifiers::hasUnaligned(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), Parent, clang::SC_Static, toBits(), and toCharUnitsFromBits().

Referenced by clang::Sema::CheckThreadLocalForLargeAlignment(), emitAddrOfVarFromArray(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), emitOutlinedFunctionPrologue(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), getBaseAlignmentAndOffsetFromLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), clang::Sema::getNamedReturnInfo(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Sema::RefersToMemberWithReducedAlignment(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().

◆ getDeclaratorForUnnamedTagDecl()

DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl ( const TagDecl TD)

Definition at line 12263 of file ASTContext.cpp.

◆ getDeclAttrs()

AttrVec & ASTContext::getDeclAttrs ( const Decl D)

Retrieve the attributes for the given declaration.

Definition at line 1424 of file ASTContext.cpp.

References Allocate(), and clang::Result.

Referenced by clang::Decl::getAttrs().

◆ getDecltypeType()

QualType ASTContext::getDecltypeType ( Expr e,
QualType  UnderlyingType 
) const

C++11 decltype.

Unlike many "get<Type>" functions, we don't unique DecltypeType nodes.

This would never be helpful, since each such type has its own expression, and would not give a significant memory saving, since there is an Expr tree under each such type.

Definition at line 5690 of file ASTContext.cpp.

References DependentTy, getCanonicalType(), clang::Expr::isInstantiationDependent(), and clang::DependentDecltypeType::Profile().

Referenced by clang::Sema::BuildDecltypeType().

◆ getDeducedTemplateSpecializationType()

QualType ASTContext::getDeducedTemplateSpecializationType ( TemplateName  Template,
QualType  DeducedType,
bool  IsDependent 
) const

C++17 deduced class template specialization type.

Return the uniqued reference to the deduced template specialization type which has been deduced to the given type, or to the canonical undeduced such type, or the canonical deduced-but-dependent such type.

Definition at line 5876 of file ASTContext.cpp.

References clang::DeducedTemplateSpecializationType::Profile().

Referenced by clang::Sema::CheckTypenameType(), clang::Sema::getTypeName(), and clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType().

◆ getDefaultCallingConvention()

CallingConv ASTContext::getDefaultCallingConvention ( bool  IsVariadic,
bool  IsCXXMethod,
bool  IsBuiltin = false 
) const

◆ getDefaultOpenCLPointeeAddrSpace()

LangAS clang::ASTContext::getDefaultOpenCLPointeeAddrSpace ( )
inline

Returns default address space based on OpenCL version and enabled features.

Definition at line 1400 of file ASTContext.h.

References clang::opencl_generic, and clang::opencl_private.

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), deduceOpenCLPointeeAddrSpace(), clang::Sema::getDefaultCXXMethodAddrSpace(), and clang::Expr::isNullPointerConstant().

◆ getDependentAddressSpaceType()

QualType ASTContext::getDependentAddressSpaceType ( QualType  PointeeType,
Expr AddrSpaceExpr,
SourceLocation  AttrLoc 
) const

◆ getDependentBitIntType()

QualType ASTContext::getDependentBitIntType ( bool  Unsigned,
Expr BitsExpr 
) const

Return a dependent bit-precise integer type with the specified signedness and bit count.

Definition at line 4574 of file ASTContext.cpp.

References clang::Expr::isInstantiationDependent(), and clang::DependentBitIntType::Profile().

Referenced by clang::Sema::BuildBitIntType().

◆ getDependentNameType()

QualType ASTContext::getDependentNameType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
QualType  Canon = QualType() 
) const

◆ getDependentSizedArrayType()

QualType ASTContext::getDependentSizedArrayType ( QualType  EltTy,
Expr NumElts,
ArraySizeModifier  ASM,
unsigned  IndexTypeQuals,
SourceRange  Brackets 
) const

Return a non-unique reference to the type for a dependently-sized array of the specified element type.

getDependentSizedArrayType - Returns a non-unique reference to the type for a dependently-sized array of the specified element type.

FIXME: We will need these to be uniqued, or at least comparable, at some point.

Definition at line 3737 of file ASTContext.cpp.

References getCanonicalType(), getQualifiedType(), clang::DependentSizedArrayType::getSizeExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::DependentSizedArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.

Referenced by clang::Sema::BuildArrayType(), clang::desugarForDiagnostic(), getAsArrayType(), getCommonNonSugarTypeNode(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and clang::InitializationSequence::Perform().

◆ getDependentSizedExtVectorType()

QualType ASTContext::getDependentSizedExtVectorType ( QualType  VectorType,
Expr SizeExpr,
SourceLocation  AttrLoc 
) const
Precondition
Return a non-unique reference to the type for a dependently-sized vector of the specified element type.

FIXME: We will need these to be uniqued, or at least comparable, at some point.

Definition at line 4138 of file ASTContext.cpp.

References getCanonicalType(), getDependentSizedExtVectorType(), and clang::DependentSizedExtVectorType::Profile().

Referenced by clang::Sema::BuildExtVectorType(), getCommonNonSugarTypeNode(), and getDependentSizedExtVectorType().

◆ getDependentSizedMatrixType()

QualType ASTContext::getDependentSizedMatrixType ( QualType  ElementType,
Expr RowExpr,
Expr ColumnExpr,
SourceLocation  AttrLoc 
) const

Return the unique reference to the matrix type of the specified element type and size.

Definition at line 4210 of file ASTContext.cpp.

References getCanonicalType(), clang::MatrixType::getElementType(), clang::DependentSizedMatrixType::getRowExpr(), and clang::DependentSizedMatrixType::Profile().

Referenced by clang::Sema::BuildMatrixType(), and getCommonNonSugarTypeNode().

◆ getDependentTemplateName() [1/2]

TemplateName ASTContext::getDependentTemplateName ( NestedNameSpecifier NNS,
const IdentifierInfo Name 
) const

◆ getDependentTemplateName() [2/2]

TemplateName ASTContext::getDependentTemplateName ( NestedNameSpecifier NNS,
OverloadedOperatorKind  Operator 
) const

Retrieve the template name that represents a dependent template name such as MetaFun::template operator+.

Definition at line 9291 of file ASTContext.cpp.

References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().

◆ getDependentTemplateSpecializationType() [1/2]

QualType ASTContext::getDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
ArrayRef< TemplateArgument Args 
) const

◆ getDependentTemplateSpecializationType() [2/2]

QualType ASTContext::getDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
ArrayRef< TemplateArgumentLoc Args 
) const

◆ getDependentVectorType()

QualType ASTContext::getDependentVectorType ( QualType  VectorType,
Expr SizeExpr,
SourceLocation  AttrLoc,
VectorKind  VecKind 
) const

Return the unique reference to the type for a dependently sized vector of the specified element type.

Definition at line 4064 of file ASTContext.cpp.

References getCanonicalType(), getDependentVectorType(), and clang::DependentVectorType::Profile().

Referenced by clang::Sema::BuildVectorType(), getCommonNonSugarTypeNode(), and getDependentVectorType().

◆ getDiagAllocator()

PartialDiagnostic::DiagStorageAllocator & clang::ASTContext::getDiagAllocator ( )
inline

Definition at line 748 of file ASTContext.h.

Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().

◆ getDiagnostics()

DiagnosticsEngine & ASTContext::getDiagnostics ( ) const

◆ getElaboratedType()

QualType ASTContext::getElaboratedType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
QualType  NamedType,
TagDecl OwnedTagDecl = nullptr 
) const

◆ getEnumType()

QualType ASTContext::getEnumType ( const EnumDecl Decl) const

◆ getExceptionObjectType()

QualType ASTContext::getExceptionObjectType ( QualType  T) const

◆ getExnObjectAlignment()

CharUnits ASTContext::getExnObjectAlignment ( ) const

Return the alignment (in bytes) of the thrown exception object.

This is only meaningful for targets that allocate C++ exceptions in a system runtime, such as those using the Itanium C++ ABI.

Definition at line 1738 of file ASTContext.cpp.

References toCharUnitsFromBits().

Referenced by clang::Sema::CheckCXXThrowOperand().

◆ getExternalSource()

ExternalASTSource * clang::ASTContext::getExternalSource ( ) const
inline

◆ getExternCContextDecl()

ExternCContextDecl * ASTContext::getExternCContextDecl ( ) const

◆ getExtVectorType()

QualType ASTContext::getExtVectorType ( QualType  vecType,
unsigned  NumElts 
) const

◆ getFieldOffset()

uint64_t ASTContext::getFieldOffset ( const ValueDecl FD) const

◆ getFILEType()

QualType clang::ASTContext::getFILEType ( ) const
inline

Retrieve the C FILE type.

Definition at line 1941 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

◆ getFixedPointIBits()

unsigned char ASTContext::getFixedPointIBits ( QualType  Ty) const

◆ getFixedPointMax()

llvm::APFixedPoint ASTContext::getFixedPointMax ( QualType  Ty) const

◆ getFixedPointMin()

llvm::APFixedPoint ASTContext::getFixedPointMin ( QualType  Ty) const

Definition at line 13515 of file ASTContext.cpp.

References getFixedPointSemantics(), and clang::Type::isFixedPointType().

Referenced by CheckImplicitConversion().

◆ getFixedPointScale()

unsigned char ASTContext::getFixedPointScale ( QualType  Ty) const

◆ getFixedPointSemantics()

llvm::FixedPointSemantics ASTContext::getFixedPointSemantics ( QualType  Ty) const

◆ getFloatingTypeOrder()

int ASTContext::getFloatingTypeOrder ( QualType  LHS,
QualType  RHS 
) const

Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e.

getFloatingTypeOrder - Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e.

'double' == '_Complex double').

If LHS > RHS, returns 1. If LHS == RHS, returns 0. If LHS < RHS, return -1.

'double' == '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.

Definition at line 7070 of file ASTContext.cpp.

References getFloatingRank().

Referenced by clang::ento::SMTConv::doFloatTypeConversion(), getFloatingTypeSemanticOrder(), clang::StandardConversionSequence::getNarrowingKind(), handleComplexConversion(), handleFloatConversion(), isArithmeticArgumentPromotion(), tryGCCVectorConvertAndSplat(), tryVectorConvertAndSplat(), and clang::Sema::UsualUnaryConversions().

◆ getFloatingTypeSemanticOrder()

int ASTContext::getFloatingTypeSemanticOrder ( QualType  LHS,
QualType  RHS 
) const

Compare the rank of two floating point types as above, but compare equal if both types have the same floating-point semantics on the target (i.e.

long double and double on AArch64 will return 0).

Definition at line 7081 of file ASTContext.cpp.

References getFloatingTypeOrder(), and getFloatTypeSemantics().

Referenced by AnalyzeCompoundAssignment(), and CheckImplicitConversion().

◆ getFloatTypeSemantics()

const llvm::fltSemantics & ASTContext::getFloatTypeSemantics ( QualType  T) const

◆ getFullLoc()

FullSourceLoc clang::ASTContext::getFullLoc ( SourceLocation  Loc) const
inline

◆ getFunctionFeatureMap() [1/2]

void ASTContext::getFunctionFeatureMap ( llvm::StringMap< bool > &  FeatureMap,
const FunctionDecl FD 
) const

◆ getFunctionFeatureMap() [2/2]

void ASTContext::getFunctionFeatureMap ( llvm::StringMap< bool > &  FeatureMap,
GlobalDecl  GD 
) const

◆ getFunctionNoProtoType() [1/2]

QualType clang::ASTContext::getFunctionNoProtoType ( QualType  ResultTy) const
inline

Definition at line 1548 of file ASTContext.h.

References getFunctionNoProtoType().

◆ getFunctionNoProtoType() [2/2]

QualType ASTContext::getFunctionNoProtoType ( QualType  ResultTy,
const FunctionType::ExtInfo Info 
) const

◆ getFunctionType()

QualType clang::ASTContext::getFunctionType ( QualType  ResultTy,
ArrayRef< QualType Args,
const FunctionProtoType::ExtProtoInfo EPI 
) const
inline

Return a normal function type with a typed argument list.

Definition at line 1553 of file ASTContext.h.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPRegionStart(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::adjustCCAndNoReturn(), adjustDeducedFunctionResultType(), clang::Sema::AdjustDestructorExceptionSpec(), clang::TemplateDeclInstantiator::adjustForRewrite(), adjustFunctionType(), adjustFunctionTypeForInstantiation(), clang::Sema::BuildFunctionType(), buildTypeForLambdaCallOperator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::CodeGen::CodeGenModule::CreateKCFITypeId(), clang::Sema::DeclareGlobalAllocationFunction(), clang::desugarForDiagnostic(), emitOutlinedFunctionPrologue(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositePointerType(), clang::Sema::findInheritingConstructor(), GeneralizeFunctionType(), GetBuiltinType(), getCommonNonSugarTypeNode(), getDummyLambdaType(), GetFullTypeForDeclarator(), clang::CodeGen::CGDebugInfo::getFunctionType(), getFunctionTypeWithExceptionSpec(), getFunctionTypeWithoutPtrSizes(), clang::Sema::getLambdaConversionFunctionResultType(), GetOpenCLBuiltinFctOverloads(), clang::ento::MemRegionManager::getVarRegion(), handleFunctionTypeAttr(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::Sema::IsFunctionConversion(), LookupDirect(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), ProcessAPINotes(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTNodeImporter::VisitFunctionDecl().

◆ getFunctionTypeWithExceptionSpec()

QualType ASTContext::getFunctionTypeWithExceptionSpec ( QualType  Orig,
const FunctionProtoType::ExceptionSpecInfo ESI 
) const

Get a function type and produce the equivalent function type with the specified exception specification.

Type sugar that can be present on a declaration of a function with an exception specification is permitted and preserved. Other type sugar (for instance, typedefs) is not.

Definition at line 3163 of file ASTContext.cpp.

References clang::Type::castAs(), getAttributedType(), getFunctionType(), getFunctionTypeWithExceptionSpec(), getMacroQualifiedType(), and getParenType().

Referenced by adjustExceptionSpec(), extractPBaseFlags(), getFunctionTypeWithExceptionSpec(), handleFunctionTypeAttr(), hasSameFunctionTypeIgnoringExceptionSpec(), and clang::Sema::IsFunctionConversion().

◆ getFunctionTypeWithoutPtrSizes()

QualType ASTContext::getFunctionTypeWithoutPtrSizes ( QualType  T)

Get a function type and produce the equivalent function type where pointer size address spaces in the return type and parameter tyeps are replaced with the default address space.

Definition at line 3199 of file ASTContext.cpp.

References clang::Type::getAs(), getFunctionNoProtoType(), getFunctionType(), and removePtrSizeAddrSpace().

Referenced by hasSameFunctionTypeIgnoringPtrSizes().

◆ GetGVALinkageForFunction()

GVALinkage ASTContext::GetGVALinkageForFunction ( const FunctionDecl FD) const

◆ GetGVALinkageForVariable()

GVALinkage ASTContext::GetGVALinkageForVariable ( const VarDecl VD) const

◆ getIncompleteArrayType()

QualType ASTContext::getIncompleteArrayType ( QualType  EltTy,
ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const

◆ getInjectedClassNameType()

QualType ASTContext::getInjectedClassNameType ( CXXRecordDecl Decl,
QualType  TST 
) const

getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration.

Definition at line 4608 of file ASTContext.cpp.

References clang::Decl::getPreviousDecl(), and NeedsInjectedClassNameType().

Referenced by clang::Sema::CheckClassTemplate(), clang::ClassTemplatePartialSpecializationDecl::Create(), getCommonNonSugarTypeNode(), clang::ASTDeclReader::VisitClassTemplateDecl(), and clang::ASTNodeImporter::VisitRecordDecl().

◆ getInjectedTemplateArg()

TemplateArgument ASTContext::getInjectedTemplateArg ( NamedDecl ParamDecl)

◆ getInjectedTemplateArgs()

void ASTContext::getInjectedTemplateArgs ( const TemplateParameterList Params,
SmallVectorImpl< TemplateArgument > &  Args 
)

Get a template argument list with one argument per template parameter in a template parameter list, such as for the injected class name of a class template.

Definition at line 5219 of file ASTContext.cpp.

References getInjectedTemplateArg(), and clang::TemplateParameterList::size().

Referenced by clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::RedeclarableTemplateDecl::getInjectedTemplateArgs(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().

◆ getInlineVariableDefinitionKind()

ASTContext::InlineVariableDefinitionKind ASTContext::getInlineVariableDefinitionKind ( const VarDecl VD) const

Determine whether a definition of this inline variable should be treated as a weak or strong definition.

For compatibility with C++14 and before, for a constexpr static data member, if there is an out-of-line declaration of the member, we may promote it from weak to strong.

Definition at line 7667 of file ASTContext.cpp.

References clang::First, clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::isInline(), None, clang::Redeclarable< decl_type >::redecls(), Strong, Weak, and WeakUnknown.

Referenced by basicGVALinkageForVariable(), and clang::CodeGen::CodeGenModule::EmitGlobal().

◆ getInnerObjCOwnership()

Qualifiers::ObjCLifetime ASTContext::getInnerObjCOwnership ( QualType  T) const

Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownership.

Recurses in pointer/array types until it finds an objc retainable type and returns its ownership.

Definition at line 7243 of file ASTContext.cpp.

References clang::Type::getAs(), getBaseElementType(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::Type::isArrayType(), clang::QualType::isNull(), and clang::Qualifiers::OCL_None.

Referenced by clang::Sema::GetTypeForDeclaratorCast().

◆ getInstantiatedFromStaticDataMember()

MemberSpecializationInfo * ASTContext::getInstantiatedFromStaticDataMember ( const VarDecl Var)

If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated.

Definition at line 1445 of file ASTContext.cpp.

References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().

◆ getInstantiatedFromUnnamedFieldDecl()

FieldDecl * ASTContext::getInstantiatedFromUnnamedFieldDecl ( FieldDecl Field)

Definition at line 1521 of file ASTContext.cpp.

Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitFieldDecl().

◆ getInstantiatedFromUsingDecl()

NamedDecl * ASTContext::getInstantiatedFromUsingDecl ( NamedDecl Inst)

If the given using decl Inst is an instantiation of another (possibly unresolved) using decl, return it.

Definition at line 1480 of file ASTContext.cpp.

Referenced by isInstantiationOfUnresolvedUsingDecl(), clang::ASTNodeImporter::VisitUsingDecl(), and clang::ASTDeclWriter::VisitUsingDecl().

◆ getInstantiatedFromUsingEnumDecl()

UsingEnumDecl * ASTContext::getInstantiatedFromUsingEnumDecl ( UsingEnumDecl Inst)

If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.

Definition at line 1499 of file ASTContext.cpp.

Referenced by clang::ASTNodeImporter::VisitUsingEnumDecl(), and clang::ASTDeclWriter::VisitUsingEnumDecl().

◆ getInstantiatedFromUsingShadowDecl()

UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst)

◆ getInt128Decl()

TypedefDecl * ASTContext::getInt128Decl ( ) const

Retrieve the declaration for the 128-bit signed integer type.

Definition at line 1170 of file ASTContext.cpp.

References buildImplicitTypedef(), and Int128Ty.

Referenced by getPredefinedDecl(), and clang::Sema::Initialize().

◆ getIntegerTypeOrder()

int ASTContext::getIntegerTypeOrder ( QualType  LHS,
QualType  RHS 
) const

Return the highest ranked integer type, see C99 6.3.1.8p1.

getIntegerTypeOrder - Returns the highest ranked integer type: C99 6.3.1.8p1.

If LHS > RHS, returns 1. If LHS == RHS, returns 0. If LHS < RHS, return -1.

If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.

Definition at line 7271 of file ASTContext.cpp.

References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().

Referenced by canConvertIntToOtherIntTy(), clang::ento::SMTConv::doIntTypeConversion(), handleIntegerConversion(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().

◆ getInterpContext()

interp::Context & ASTContext::getInterpContext ( )

Returns the clang bytecode interpreter context.

Definition at line 844 of file ASTContext.cpp.

◆ getIntMaxType()

CanQualType ASTContext::getIntMaxType ( ) const

Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.

getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5).

Definition at line 5967 of file ASTContext.cpp.

Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getIntPtrType()

QualType ASTContext::getIntPtrType ( ) const

Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.

Definition at line 5990 of file ASTContext.cpp.

Referenced by getUIntPtrType(), and clang::Sema::Initialize().

◆ getIntTypeForBitwidth()

QualType ASTContext::getIntTypeForBitwidth ( unsigned  DestWidth,
unsigned  Signed 
) const

◆ getIntWidth()

unsigned ASTContext::getIntWidth ( QualType  T) const

Definition at line 11053 of file ASTContext.cpp.

References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOpenMPCanonicalLoop(), clang::Sema::ActOnOpenMPUnrollDirective(), clang::Sema::ActOnStringLiteral(), AnalyzeComparison(), buildDistanceFunc(), clang::Sema::BuildPackIndexingExpr(), clang::Sema::BuildPackIndexingType(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckEnumConstant(), CheckICE(), CheckImplicitConversion(), clang::Sema::CheckTemplateArgument(), clang::interp::Context::classify(), ConvertAPValueToString(), DeduceFromInitializerList(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadShiftValues(), DiagnoseFloatingImpCast(), clang::ento::BasicValueFactory::getAPSIntType(), clang::interp::Context::getBitWidth(), getFixedPointSemantics(), getIntegerWidthAndSignedness(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), clang::EnumDecl::getValueRange(), handleIntegerConversion(), handleVectorUnaryOperator(), clang::InitializationSequence::InitializeFrom(), isOverflowingIntegerType(), isRepresentableIntegerValue(), isValidStructGUID(), MakeIntValue(), clang::InitializationSequence::Perform(), clang::TreeTransform< Derived >::RebuildArrayType(), clang::TreeTransform< Derived >::RebuildBitIntType(), clang::TreeTransform< Derived >::RebuildExtVectorType(), SemaBuiltinAlignment(), SemaBuiltinOverflow(), and clang::Sema::VerifyBitField().

◆ getjmp_bufType()

QualType clang::ASTContext::getjmp_bufType ( ) const
inline

Retrieve the C jmp_buf type.

Definition at line 1953 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

◆ getLangASForBuiltinAddressSpace()

LangAS ASTContext::getLangASForBuiltinAddressSpace ( unsigned  AS) const

◆ getLangOpts()

const LangOptions & clang::ASTContext::getLangOpts ( ) const
inline
Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 770 of file ASTContext.h.

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnDependentIdExpression(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnVarTemplateSpecialization(), AddEnumerators(), clang::ASTRecordWriter::AddFunctionDefinition(), AddOverloadParameterChunks(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), adjustGVALinkageForAttributes(), AlignOfType(), AllowOverloadingOfFunction(), clang::arcmt::MigrationProcess::applyTransform(), areLaxCompatibleRVVTypes(), areLaxCompatibleSveTypes(), basicGVALinkageForFunction(), basicGVALinkageForVariable(), buildGlobalBlock(), buildImplicitRecord(), clang::Sema::BuildMatrixType(), CalculateHiddenNames(), clang::arcmt::trans::canApplyWeak(), canAssignObjCInterfacesInBlockPointer(), clang::Sema::CheckCompletedCXXClass(), CheckForIncompatibleAttributes(), clang::arcmt::checkForManualIssues(), CheckICE(), clang::Sema::CheckLogicalOperands(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::RecordDecl::completeDefinition(), clang::computeDependence(), computeKeyFunction(), clang::LinkageComputer::computeLVForDecl(), clang::PredefinedExpr::ComputeName(), clang::analyze_os_log::computeOSLogBufferLayout(), constructDebugPieceForTrackedCondition(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXThisExpr::Create(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinUnaryOp(), createDataFixit(), createOverloadsForFixedParams(), clang::Sema::CreateRecoveryExpr(), clang::tooling::createRenameAtomicChanges(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), createSpanTypeForVarDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DecodeTypeFromStr(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::Stmt::dumpPretty(), clang::LocationContext::dumpStack(), EmitDeclDestroy(), EmitDeclInit(), emitMappingInformation(), EncodeBitField(), clang::Expr::EvaluateAsInitializer(), clang::SourceLocExpr::EvaluateInContext(), clang::ASTMergeAction::ExecuteAction(), clang::arcmt::trans::findSemiAfterLocation(), fixParamWithSpan(), fixUPCAddressofArraySubscriptWithSpan(), fixVarDeclWithArray(), FixVarInitializerWithSpan(), clang::FormatASTNodeDiagnosticArgument(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), clang::tooling::getAssociatedRange(), getASTRecordLayout(), getAttrForPlatform(), clang::ento::MemRegionManager::getBlockDataRegion(), clang::FunctionDecl::getBuiltinID(), GetBuiltinType(), getByrefLifetime(), getCallingConvMangling(), getCFConstantStringDecl(), clang::ASTNameGenerator::Implementation::getClassSymbolPrefix(), clang::ento::SValBuilder::getConditionType(), getCXXABIKind(), clang::LinkageComputer::getDeclLinkageAndVisibility(), GetDiagForGotoScopeDecl(), clang::ento::retaincountchecker::RefLeakReportVisitor::getEndPath(), DerefSimplePtrArithFixableGadget::getFixits(), UPCPreIncrementGadget::getFixits(), UUCAddAssignGadget::getFixits(), getFloatTypeSemantics(), clang::AnalysisDeclContext::getFunctionName(), GetGCAttrTypeForType(), clang::Expr::getIntegerConstantExpr(), clang::ASTWriter::getLangOpts(), clang::ento::CheckerContext::getLangOpts(), clang::interp::Context::getLangOpts(), clang::index::IndexingContext::getLangOpts(), clang::Decl::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getLogicalOperationType(), clang::LinkageComputer::getLVForDecl(), getMacroName(), getMoreSpecialized(), clang::Sema::getMoreSpecializedTemplate(), clang::CXXRecordDecl::getMSVtorDispMode(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCEncodingForBlock(), getObjCGCAttrKind(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), clang::Sema::getPrintingPolicy(), getRealizedPlatform(), clang::DeclContext::getRedeclContext(), getRVVTypeSize(), clang::ObjCMethodDecl::getSelfType(), clang::ento::MemRegionManager::getStaticSize(), getStringLiteralArrayType(), getSVETypeSize(), clang::tooling::getText(), getTypeInfoDataSizeInChars(), getVTableContext(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::ento::retaincountchecker::RetainCountChecker::handleAutoreleaseCounts(), handleBuiltinAliasAttr(), clang::Sema::handleTagNumbering(), clang::Decl::hasLocalOwningModuleStorage(), clang::installapi::hasRTTI(), hasSameFunctionTypeIgnoringExceptionSpec(), InsertOCLBuiltinDeclarationsFromTable(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::Expr::isCXX11ConstantExpr(), clang::ParmVarDecl::isDestroyedInCallee(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCPropertyDecl::isDirectProperty(), clang::installapi::isInlined(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::Expr::isIntegerConstantExpr(), clang::Sema::IsIntegralPromotion(), clang::Type::isIntegralType(), clang::VarDecl::isKnownToBeDefined(), clang::Sema::isLaxVectorConversion(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::VarDecl::isNoDestroy(), clang::QualType::isNonConstantStorage(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::Expr::isNullPointerConstant(), isOutOfScopePreviousDeclaration(), clang::QualType::isPODType(), isPromotableBitField(), isPromotableIntegerType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), IsStringInit(), isTypeSubstitutable(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), isUserWritingOffTheEnd(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsWideCharCompatible(), clang::CodeGen::ABIInfo::isZeroLengthBitfieldPermittedInHomogeneousAggregate(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), LocPropertyAttribute(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), clang::tooling::maybeExtendRange(), clang::RecordDecl::mayInsertExtraPadding(), clang::ASTDeclReader::mergeLambda(), clang::ASTDeclReader::mergeMergeable(), clang::ASTDeclReader::mergeRedeclarable(), mergeTypes(), needsConversionOfHalfVec(), clang::ento::ConditionBRVisitor::patternMatch(), printExprAsWritten(), clang::ProgramPoint::printJson(), clang::LocationContext::printJson(), printNode(), printQualifier(), PrintStats(), clang::ento::retaincountchecker::RetainCountChecker::processLeaks(), ProcessStmtAttribute(), clang::randstruct::randomizeStructureLayout(), clang::ASTDeclReader::ReadFunctionDefinition(), clang::CodeGen::CodeGenModule::Release(), reportAnalyzerFunctionMisuse(), resolveAllocationOverload(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::edit::rewriteToObjCLiteralSyntax(), clang::CodeGen::CodeGenModule::setGlobalVisibility(), setObjCGCLValueClass(), shouldNotRewriteImmediateMessageArgs(), clang::Decl::shouldSkipCheckingODR(), ShouldUseExternalRTTIDescriptor(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenModule::stopAutoInit(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarArrayTypes(), UnwrapSimilarTypes(), clang::QualType::UseExcessPrecision(), useInlineVisibilityHidden(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTDeclReader::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::installapi::InstallAPIVisitor::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().

◆ getLegacyIntegralTypeEncoding()

void ASTContext::getLegacyIntegralTypeEncoding ( QualType PointeeTy) const

getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always.

For typedefs, we need to use 'i' or 'I' instead if encoding a struct field, or a pointer!

Definition at line 7979 of file ASTContext.cpp.

References clang::Type::getAs(), getIntWidth(), IntTy, and UnsignedIntTy.

◆ getLifetimeQualifiedType()

QualType clang::ASTContext::getLifetimeQualifiedType ( QualType  type,
Qualifiers::ObjCLifetime  lifetime 
)
inline

Return a type with the given lifetime qualifier.

Precondition
Neither type.ObjCLifetime() nor lifetime may be OCL_None.

Definition at line 2164 of file ASTContext.h.

References clang::Qualifiers::addObjCLifetime(), getQualifiedType(), clang::Qualifiers::OCL_None, and clang::ast_matchers::type.

Referenced by clang::Sema::AdjustParameterTypeForObjCAutoRefCount(), clang::Sema::BuildCXXNew(), clang::Sema::CheckParameter(), and clang::Sema::inferObjCARCLifetime().

◆ getLocalCommentForDeclUncached()

comments::FullComment * ASTContext::getLocalCommentForDeclUncached ( const Decl D) const

Return parsed documentation comment attached to a given declaration.

Returns nullptr if no comment is attached. Does not look at any redeclarations of the declaration.

Definition at line 573 of file ASTContext.cpp.

References getRawCommentForDeclNoCache(), and clang::RawComment::parse().

Referenced by clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().

◆ getLogicalOperationType()

QualType clang::ASTContext::getLogicalOperationType ( ) const
inline

◆ getLValueReferenceType()

QualType ASTContext::getLValueReferenceType ( QualType  T,
bool  SpelledAsLValue = true 
) const

Return the uniqued reference to the type for an lvalue reference to the specified type.

getLValueReferenceType - Return the uniqued reference to the type for an lvalue reference to the specified type.

Definition at line 3405 of file ASTContext.cpp.

References clang::Type::getAs(), getCanonicalType(), getLValueReferenceType(), clang::QualType::isCanonical(), clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), and clang::ReferenceType::Profile().

Referenced by AddBuiltinAssignmentOperatorCandidates(), AdjustFunctionParmAndArgTypesForDeduction(), alignReferenceTypes(), buildDistanceFunc(), buildLoopVarFunc(), clang::Sema::BuildReferenceType(), clang::Sema::BuildVAArgExpr(), captureInCapturedRegion(), captureInLambda(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), DecodeTypeFromStr(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::desugarForDiagnostic(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), getCaptureFieldType(), getCommonNonSugarTypeNode(), clang::Sema::getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), GetImplicitObjectParameterType(), getLValueReferenceType(), clang::SubstNonTypeTemplateParmExpr::getParameterType(), getReferenceQualifiedType(), getVariableArrayDecayedType(), HandleHLSLParamModifierAttr(), clang::ento::ExprEngine::handleLValueBitCast(), implicitObjectParamIsLifetimeBound(), instantiateDependentHLSLParamModifierAttr(), lookupPromiseType(), makeQualifiedLValueReferenceType(), NoteSurrogateCandidate(), clang::InitializationSequence::Perform(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::tryCaptureVariable(), and clang::CodeGen::ConstantEmitter::tryEmitConstantExpr().

◆ getMacroQualifiedType()

QualType ASTContext::getMacroQualifiedType ( QualType  UnderlyingTy,
const IdentifierInfo MacroII 
) const

◆ getMakeIntegerSeqDecl()

BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl ( ) const

◆ getMakeIntegerSeqName()

IdentifierInfo * clang::ASTContext::getMakeIntegerSeqName ( ) const
inline

Definition at line 1915 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by getMakeIntegerSeqDecl().

◆ getManglingNumber()

unsigned ASTContext::getManglingNumber ( const NamedDecl ND,
bool  ForAuxTarget = false 
) const

◆ getManglingNumberContext() [1/2]

MangleNumberingContext & ASTContext::getManglingNumberContext ( const DeclContext DC)

Retrieve the context for computing mangling numbers in the given DeclContext.

Definition at line 12212 of file ASTContext.cpp.

References createMangleNumberingContext().

Referenced by clang::Sema::getCurrentMangleNumberContext(), clang::Sema::handleLambdaNumbering(), and clang::Sema::handleTagNumbering().

◆ getManglingNumberContext() [2/2]

MangleNumberingContext & ASTContext::getManglingNumberContext ( NeedExtraManglingDecl_t  ,
const Decl D 
)

Definition at line 12221 of file ASTContext.cpp.

References createMangleNumberingContext().

◆ getMemberPointerPathAdjustment()

CharUnits ASTContext::getMemberPointerPathAdjustment ( const APValue MP) const

◆ getMemberPointerType()

QualType ASTContext::getMemberPointerType ( QualType  T,
const Type Cls 
) const

◆ getMinGlobalAlignOfVar()

unsigned ASTContext::getMinGlobalAlignOfVar ( uint64_t  Size,
const VarDecl VD 
) const

Return the minimum alignement as specified by the target.

If VD is non-null it may be used to identify external or weak variables.

Definition at line 2533 of file ASTContext.cpp.

References clang::TargetInfo::getMinGlobalAlign(), getTargetInfo(), clang::VarDecl::hasDefinition(), and clang::ValueDecl::isWeak().

Referenced by getAlignOfGlobalVar(), and getDeclAlign().

◆ getModuleInitializers()

ArrayRef< Decl * > ASTContext::getModuleInitializers ( Module M)

Get the initializations to perform when importing a module, if any.

Definition at line 1093 of file ASTContext.cpp.

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), and clang::TextNodeDumper::VisitImportDecl().

◆ getModulesWithMergedDefinition()

ArrayRef< Module * > ASTContext::getModulesWithMergedDefinition ( const NamedDecl Def)

Get the additional modules in which the definition Def has been merged.

Definition at line 1034 of file ASTContext.cpp.

References clang::Decl::getCanonicalDecl().

Referenced by clang::Sema::diagnoseMissingImport(), clang::Sema::hasMergedDefinitionInCurrentModule(), clang::Sema::hasVisibleMergedDefinition(), and clang::TextNodeDumper::Visit().

◆ getMSGuidDecl()

MSGuidDecl * ASTContext::getMSGuidDecl ( MSGuidDeclParts  Parts) const

Return a declaration for the global GUID object representing the given GUID value.

Definition at line 12304 of file ASTContext.cpp.

References getMSGuidType(), MSGuidTagDecl, clang::MSGuidDecl::Profile(), and clang::QualType::withConst().

Referenced by clang::Sema::BuildCXXUuidof(), and handleUuidAttr().

◆ getMSGuidTagDecl()

TagDecl * clang::ASTContext::getMSGuidTagDecl ( ) const
inline

Retrieve the implicitly-predeclared 'struct _GUID' declaration.

Definition at line 2122 of file ASTContext.h.

References MSGuidTagDecl.

Referenced by getPredefinedDecl().

◆ getMSGuidType()

QualType clang::ASTContext::getMSGuidType ( ) const
inline

Retrieve the implicitly-predeclared 'struct _GUID' type.

Definition at line 2125 of file ASTContext.h.

References getTagDeclType(), and MSGuidTagDecl.

Referenced by clang::Sema::ActOnCXXUuidof(), and getMSGuidDecl().

◆ getNameForTemplate()

DeclarationNameInfo ASTContext::getNameForTemplate ( TemplateName  Name,
SourceLocation  NameLoc 
) const

◆ getNewOMPTraitInfo()

OMPTraitInfo & ASTContext::getNewOMPTraitInfo ( )

Return a new OMPTraitInfo object owned by this context.

Definition at line 13657 of file ASTContext.cpp.

Referenced by instantiateOMPDeclareVariantAttr(), and clang::ASTRecordReader::readOMPTraitInfo().

◆ getNextLocalImport()

static ImportDecl * clang::ASTContext::getNextLocalImport ( ImportDecl Import)
inlinestatic

Definition at line 1020 of file ASTContext.h.

◆ getNoSanitizeList()

const NoSanitizeList & clang::ASTContext::getNoSanitizeList ( ) const
inline

◆ getNSCopyingName()

IdentifierInfo * clang::ASTContext::getNSCopyingName ( )
inline

Retrieve the identifier 'NSCopying'.

Definition at line 1896 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by clang::Type::isBlockCompatibleObjCPointerType().

◆ getNSIntegerType()

CanQualType ASTContext::getNSIntegerType ( ) const

Definition at line 7616 of file ASTContext.cpp.

References LongLongTy, and LongTy.

Referenced by shouldNotPrintDirectly().

◆ getNSObjectName()

IdentifierInfo * clang::ASTContext::getNSObjectName ( ) const
inline

Retrieve the identifier 'NSObject'.

Definition at line 1887 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by clang::ObjCMethodDecl::definedInNSObject(), and clang::Type::isBlockCompatibleObjCPointerType().

◆ getNSUIntegerType()

CanQualType ASTContext::getNSUIntegerType ( ) const

Definition at line 7607 of file ASTContext.cpp.

References UnsignedLongLongTy, and UnsignedLongTy.

Referenced by shouldNotPrintDirectly().

◆ getObjCClassDecl()

TypedefDecl * ASTContext::getObjCClassDecl ( ) const

Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.

Definition at line 8749 of file ASTContext.cpp.

References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinClassTy.

Referenced by getObjCClassType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getObjCClassRedefinitionType()

QualType clang::ASTContext::getObjCClassRedefinitionType ( ) const
inline

Retrieve the type that Class has been defined to, which may be different from the built-in Class if Class has been typedef'd.

Definition at line 1862 of file ASTContext.h.

References getObjCClassType().

Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::FindCompositeObjCPointerType(), and ShouldTryAgainWithRedefinitionType().

◆ getObjCClassType()

QualType clang::ASTContext::getObjCClassType ( ) const
inline

Represents the Objective-C Class type.

This is set up lazily, by Sema. Class is always a (typedef for a) pointer type, a pointer to a struct.

Definition at line 2070 of file ASTContext.h.

References getObjCClassDecl(), and getTypeDeclType().

Referenced by clang::desugarForDiagnostic(), getObjCClassRedefinitionType(), clang::ObjCMethodDecl::getSelfType(), isObjCClassType(), LookupMemberExpr(), and clang::Sema::MergeTypedefNameDecl().

◆ getObjCConstantStringInterface()

QualType clang::ASTContext::getObjCConstantStringInterface ( ) const
inline

Definition at line 1835 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

◆ getObjCEncodingForBlock()

std::string ASTContext::getObjCEncodingForBlock ( const BlockExpr blockExpr) const

◆ getObjCEncodingForFunctionDecl()

std::string ASTContext::getObjCEncodingForFunctionDecl ( const FunctionDecl Decl) const

Emit the encoded type for the function Decl into S.

This is in the same format as Objective-C method encodings.

Returns
true if an error occurred (e.g., because one of the parameter types is incomplete), false otherwise.

Definition at line 7749 of file ASTContext.cpp.

References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), and clang::CharUnits::Zero().

◆ getObjCEncodingForMethodDecl()

std::string ASTContext::getObjCEncodingForMethodDecl ( const ObjCMethodDecl Decl,
bool  Extended = false 
) const

◆ getObjCEncodingForMethodParameter()

void ASTContext::getObjCEncodingForMethodParameter ( Decl::ObjCDeclQualifier  QT,
QualType  T,
std::string &  S,
bool  Extended 
) const

getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return type.

If Extended, include class names and block object types.

Definition at line 7790 of file ASTContext.cpp.

References getObjCEncodingForTypeQualifier().

Referenced by getObjCEncodingForBlock(), and getObjCEncodingForMethodDecl().

◆ getObjCEncodingForPropertyDecl()

std::string ASTContext::getObjCEncodingForPropertyDecl ( const ObjCPropertyDecl PD,
const Decl Container 
) const

getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.

getObjCEncodingForPropertyDecl - Return the encoded type for this property declaration.

If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties.

If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties. Property attributes are stored as a comma-delimited C string. The simple attributes readonly and bycopy are encoded as single characters. The parametrized attributes, getter=name, setter=name, and ivar=name, are encoded as single characters, followed by an identifier. Property types are also encoded as a parametrized attribute. The characters used to encode these attributes are defined by the following enumeration:

enum PropertyAttributes {
kPropertyReadOnly = 'R', // property is read-only.
kPropertyBycopy = 'C', // property is a copy of the value last assigned
kPropertyByref = '&', // property is a reference to the value last assigned
kPropertyDynamic = 'D', // property is dynamic
kPropertyGetter = 'G', // followed by getter selector name
kPropertySetter = 'S', // followed by setter selector name
kPropertyInstanceVariable = 'V' // followed by instance variable name
kPropertyType = 'T' // followed by old-style type encoding.
kPropertyWeak = 'W' // 'weak' property
kPropertyStrong = 'P' // property GC'able
kPropertyNonAtomic = 'N' // property non-atomic
kPropertyOptional = '?' // property optional
};

Definition at line 7905 of file ASTContext.cpp.

References clang::ObjCPropertyDecl::Assign, clang::ObjCPropertyDecl::Copy, clang::ObjCPropertyImplDecl::Dynamic, clang::Selector::getAsString(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getNameAsString(), getObjCEncodingForPropertyType(), getObjCPropertyImplDeclForPropertyDecl(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyDecl::getSetterKind(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ObjCPropertyDecl::isOptional(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_weak, clang::ObjCPropertyDecl::Retain, and clang::ObjCPropertyDecl::Weak.

◆ getObjCEncodingForPropertyType()

void ASTContext::getObjCEncodingForPropertyType ( QualType  T,
std::string &  S 
) const

Emit the Objective-C property type encoding for the given type T into S.

Definition at line 8006 of file ASTContext.cpp.

Referenced by getObjCEncodingForPropertyDecl().

◆ getObjCEncodingForType()

void ASTContext::getObjCEncodingForType ( QualType  T,
std::string &  S,
const FieldDecl Field = nullptr,
QualType NotEncodedT = nullptr 
) const

Emit the Objective-CC type encoding for the given type T into S.

If Field is specified then record field names are also encoded.

Definition at line 7991 of file ASTContext.cpp.

Referenced by clang::Sema::BuildObjCEncodeExpression(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), getObjCEncodingForBlock(), and getObjCEncodingForFunctionDecl().

◆ getObjCEncodingForTypeQualifier()

void ASTContext::getObjCEncodingForTypeQualifier ( Decl::ObjCDeclQualifier  QT,
std::string &  S 
) const

◆ getObjCEncodingTypeSize()

CharUnits ASTContext::getObjCEncodingTypeSize ( QualType  T) const

Return the size of type T for Objective-C encoding purpose, in characters.

getObjCEncodingTypeSize returns size of type for objective-c encoding purpose.

Definition at line 7644 of file ASTContext.cpp.

References getTypeSizeInChars(), IntTy, clang::CharUnits::isPositive(), clang::ast_matchers::type, VoidPtrTy, and clang::CharUnits::Zero().

Referenced by getObjCEncodingForBlock(), getObjCEncodingForFunctionDecl(), and getObjCEncodingForMethodDecl().

◆ getObjCGCAttrKind()

Qualifiers::GC ASTContext::getObjCGCAttrKind ( QualType  Ty) const

◆ getObjCGCQualType()

QualType ASTContext::getObjCGCQualType ( QualType  T,
Qualifiers::GC  gcAttr 
) const

◆ getObjCIdDecl()

TypedefDecl * ASTContext::getObjCIdDecl ( ) const

Retrieve the typedef corresponding to the predefined id type in Objective-C.

Definition at line 8732 of file ASTContext.cpp.

References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinIdTy.

Referenced by getObjCIdType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getObjCIdRedefinitionType()

QualType clang::ASTContext::getObjCIdRedefinitionType ( ) const
inline

Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd.

Definition at line 1849 of file ASTContext.h.

References getObjCIdType().

Referenced by clang::Sema::FindCompositeObjCPointerType(), and ShouldTryAgainWithRedefinitionType().

◆ getObjCIdType()

QualType clang::ASTContext::getObjCIdType ( ) const
inline

◆ getObjCImplementation() [1/2]

ObjCCategoryImplDecl * ASTContext::getObjCImplementation ( ObjCCategoryDecl D)

Get the implementation of the ObjCCategoryDecl D, or nullptr if none exists.

Get the implementation of ObjCCategoryDecl, or nullptr if none exists.

Definition at line 2889 of file ASTContext.cpp.

◆ getObjCImplementation() [2/2]

ObjCImplementationDecl * ASTContext::getObjCImplementation ( ObjCInterfaceDecl D)

Get the implementation of the ObjCInterfaceDecl D, or nullptr if none exists.

Get the implementation of ObjCInterfaceDecl, or nullptr if none exists.

Definition at line 2879 of file ASTContext.cpp.

Referenced by clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCCategoryDecl::getImplementation().

◆ getObjCInstanceType()

QualType clang::ASTContext::getObjCInstanceType ( )
inline

◆ getObjCInstanceTypeDecl()

TypedefDecl * ASTContext::getObjCInstanceTypeDecl ( )

Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.

Definition at line 7625 of file ASTContext.cpp.

References buildImplicitTypedef(), and getObjCIdType().

Referenced by getObjCInstanceType(), getPredefinedDecl(), and handleFormatArgAttr().

◆ getObjCInterfaceType()

QualType ASTContext::getObjCInterfaceType ( const ObjCInterfaceDecl Decl,
ObjCInterfaceDecl PrevDecl = nullptr 
) const

◆ getObjCMethodRedeclaration()

const ObjCMethodDecl * ASTContext::getObjCMethodRedeclaration ( const ObjCMethodDecl MD) const

Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.

Definition at line 2912 of file ASTContext.cpp.

Referenced by setObjCMethodRedeclaration(), and clang::ASTDeclWriter::VisitObjCMethodDecl().

◆ getObjCNSStringType()

QualType clang::ASTContext::getObjCNSStringType ( ) const
inline

Definition at line 1839 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

◆ getObjCObjectPointerType()

QualType ASTContext::getObjCObjectPointerType ( QualType  OIT) const

Return a ObjCObjectPointerType type for the given ObjCObjectType.

getObjCObjectPointerType - Return a ObjCObjectPointerType type for the given object type.

Definition at line 5561 of file ASTContext.cpp.

References Allocate(), getCanonicalType(), getObjCObjectPointerType(), clang::QualType::isCanonical(), and clang::ObjCObjectPointerType::Profile().

Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnFields(), clang::Sema::actOnObjCProtocolQualifierType(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnSuperMessage(), applyObjCProtocolQualifiers(), areCommonBaseCompatible(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildReturnStmt(), BuildSimilarlyQualifiedPointerType(), canBindObjCObjectType(), clang::Sema::CheckAddressOfOperand(), checkObjCKindOfType(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CreatePropertyDecl(), clang::desugarForDiagnostic(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::Sema::FindCompositePointerType(), getBaseMessageSendResultType(), getCommonNonSugarTypeNode(), GetFullTypeForDeclarator(), clang::ento::TypedValueRegion::getLocationType(), clang::Sema::getMessageSendResultType(), getNSNumberFactoryMethod(), getObjCClassDecl(), getObjCIdDecl(), getObjCObjectPointerType(), GetReturnType(), clang::ObjCMethodDecl::getSelfType(), clang::ObjCObjectPointerType::getSuperClassType(), handleFormatArgAttr(), clang::Sema::ParseObjCProtocolExpression(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildObjCObjectPointerType(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().

◆ getObjCObjectType() [1/2]

QualType ASTContext::getObjCObjectType ( QualType  Base,
ArrayRef< QualType typeArgs,
ArrayRef< ObjCProtocolDecl * >  protocols,
bool  isKindOf 
) const

◆ getObjCObjectType() [2/2]

QualType ASTContext::getObjCObjectType ( QualType  Base,
ObjCProtocolDecl *const *  Protocols,
unsigned  NumProtocols 
) const

◆ getObjContainingInterface()

const ObjCInterfaceDecl * ASTContext::getObjContainingInterface ( const NamedDecl ND) const

Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc.

that is part of an interface, otherwise returns null.

Definition at line 2922 of file ASTContext.cpp.

References clang::Decl::getDeclContext().

Referenced by clang::edit::rewriteToObjCSubscriptSyntax().

◆ getObjCPropertyImplDeclForPropertyDecl()

ObjCPropertyImplDecl * ASTContext::getObjCPropertyImplDeclForPropertyDecl ( const ObjCPropertyDecl PD,
const Decl Container 
) const

Definition at line 7860 of file ASTContext.cpp.

Referenced by getObjCEncodingForPropertyDecl().

◆ getObjCProtocolDecl()

ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl ( ) const

Retrieve the Objective-C class declaration corresponding to the predefined Protocol class.

Definition at line 8758 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), and Idents.

Referenced by getObjCProtoType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getObjCProtoType()

QualType clang::ASTContext::getObjCProtoType ( ) const
inline

Retrieve the type of the Objective-C Protocol class.

Definition at line 2094 of file ASTContext.h.

References getObjCInterfaceType(), and getObjCProtocolDecl().

Referenced by clang::desugarForDiagnostic(), and clang::Sema::ParseObjCProtocolExpression().

◆ getObjCSelDecl()

TypedefDecl * ASTContext::getObjCSelDecl ( ) const

Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.

Definition at line 8741 of file ASTContext.cpp.

References buildImplicitTypedef(), getPointerType(), and ObjCBuiltinSelTy.

Referenced by getObjCSelType(), getPredefinedDecl(), and clang::Sema::Initialize().

◆ getObjCSelRedefinitionType()

QualType clang::ASTContext::getObjCSelRedefinitionType ( ) const
inline

Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd.

Definition at line 1875 of file ASTContext.h.

References getObjCSelType().

Referenced by clang::Sema::FindCompositeObjCPointerType(), and LookupMemberExpr().

◆ getObjCSelType()

QualType clang::ASTContext::getObjCSelType ( ) const
inline

◆ getObjCSuperType()

QualType ASTContext::getObjCSuperType ( ) const

Returns the C struct type for objc_super.

Definition at line 7411 of file ASTContext.cpp.

References clang::DeclContext::addDecl(), buildImplicitRecord(), getTagDeclType(), getTranslationUnitDecl(), and clang::QualType::isNull().

Referenced by DecodeTypeFromStr().

◆ getObjCTypeParamType()

QualType ASTContext::getObjCTypeParamType ( const ObjCTypeParamDecl Decl,
ArrayRef< ObjCProtocolDecl * >  protocols 
) const

◆ getOffsetOfBaseWithVBPtr()

CharUnits ASTContext::getOffsetOfBaseWithVBPtr ( const CXXRecordDecl RD) const

Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero.

This is usually OK because the first slot in the vbtable points backwards to the top of the MDC. However, the MDC might be reusing a vbptr from an nv-base. In this case, the first slot in the vbtable points to the start of the nv-base which introduced the vbptr and not the MDC. Modify the NonVirtualBaseAdjustment to account for this.

Definition at line 2541 of file ASTContext.cpp.

References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), and clang::CharUnits::Zero().

◆ getOpenCLTypeAddrSpace()

LangAS ASTContext::getOpenCLTypeAddrSpace ( const Type T) const

Get address space for OpenCL type.

Definition at line 7538 of file ASTContext.cpp.

References getOpenCLTypeKind().

Referenced by clang::CodeGen::CGOpenCLRuntime::getPointerType().

◆ getOpenCLTypeKind()

OpenCLTypeKind ASTContext::getOpenCLTypeKind ( const Type T) const

◆ getOpenMPDefaultSimdAlign()

unsigned ASTContext::getOpenMPDefaultSimdAlign ( QualType  T) const

Get default simd alignment of the specified complete type in bits.

Definition at line 2411 of file ASTContext.cpp.

References clang::TargetOptions::FeatureMap, getTargetInfo(), and clang::TargetInfo::getTargetOpts().

Referenced by emitAlignedClause(), and GetAlignedMapping().

◆ getOverloadedTemplateName()

TemplateName ASTContext::getOverloadedTemplateName ( UnresolvedSetIterator  Begin,
UnresolvedSetIterator  End 
) const

Retrieve the template name that corresponds to a non-empty lookup.

Definition at line 9200 of file ASTContext.cpp.

References Allocate(), Begin, and clang::NamedDecl::getUnderlyingDecl().

Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), and clang::Sema::isTemplateName().

◆ getOverriddenMethods()

void ASTContext::getOverriddenMethods ( const NamedDecl Method,
SmallVectorImpl< const NamedDecl * > &  Overridden 
) const

Return C++ or ObjC overridden methods for the given Method.

An ObjC method is considered to override any method in the class's base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.

Definition at line 1566 of file ASTContext.cpp.

References overridden_methods_begin(), and overridden_methods_end().

Referenced by getCommentForDecl().

◆ getPackExpansionType()

QualType ASTContext::getPackExpansionType ( QualType  Pattern,
std::optional< unsigned NumExpansions,
bool  ExpectPackInType = true 
)

Form a pack expansion type with the given pattern.

Parameters
NumExpansionsThe number of expansions for the pack, if known.
ExpectPackInTypeIf false, we should not expect Pattern to contain an unexpanded pack. This only makes sense if the pack expansion is used in a context where the arity is inferred from elsewhere, such as if the pattern contains a placeholder type or if this is the canonical type of another pack expansion type.

Definition at line 5227 of file ASTContext.cpp.

References clang::Type::containsUnexpandedParameterPack(), getCanonicalType(), getPackExpansionType(), clang::QualType::isCanonical(), and clang::PackExpansionType::Profile().

Referenced by clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::CheckPackExpansion(), getCommonNonSugarTypeNode(), GetFullTypeForDeclarator(), getInjectedTemplateArg(), getPackExpansionType(), and clang::TreeTransform< Derived >::TransformExceptionSpec().

◆ getPackIndexingType()

QualType ASTContext::getPackIndexingType ( QualType  Pattern,
Expr IndexExpr,
bool  FullySubstituted = false,
ArrayRef< QualType Expansions = {},
int  Index = -1 
) const

◆ getParameterIndex()

unsigned ASTContext::getParameterIndex ( const ParmVarDecl D) const

Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield.

Definition at line 12271 of file ASTContext.cpp.

◆ getParentMapContext()

ParentMapContext & ASTContext::getParentMapContext ( )

Returns the dynamic AST node parent map context.

Definition at line 851 of file ASTContext.cpp.

Referenced by getParents(), and setTraversalScope().

◆ getParents() [1/2]

template<>
DynTypedNodeList clang::ASTContext::getParents ( const DynTypedNode Node)
inline

◆ getParents() [2/2]

template<typename NodeT >
DynTypedNodeList clang::ASTContext::getParents ( const NodeT &  Node)
inline

◆ getParenType()

QualType ASTContext::getParenType ( QualType  NamedType) const

◆ getPointerDiffType()

QualType ASTContext::getPointerDiffType ( ) const

◆ getPointerType() [1/2]

CanQualType clang::ASTContext::getPointerType ( CanQualType  T) const
inline

Definition at line 1340 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getPointerType().

◆ getPointerType() [2/2]

QualType ASTContext::getPointerType ( QualType  T) const

Return the uniqued reference to the type for a pointer to the specified type.

getPointerType - Return the uniqued reference to the type for a pointer to the specified type.

Definition at line 3280 of file ASTContext.cpp.

References getCanonicalType(), getPointerType(), clang::QualType::isCanonical(), and clang::PointerType::Profile().

Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnIndirectGotoStmt(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnSourceLocExpr(), clang::Sema::AddConversionCandidate(), addFunctionPointerConversion(), adjustCVQualifiersForCXXThisWithinLambda(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPointerType(), clang::Sema::BuildResolvedCallExpr(), BuildSimilarlyQualifiedPointerType(), clang::Sema::CallExprUnaryConversions(), castValueFromUintptr(), clang::Sema::CheckAddressOfOperand(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckFunctionCall(), clang::Sema::CheckMain(), checkOpenCLPipePacketType(), clang::Sema::checkOpenMPDeclareVariantFunction(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::Sema::ConstantFoldAttrArgs(), clang::SYCLUniqueStableNameExpr::Create(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateCharPtrNamedVaListDecl(), clang::SYCLUniqueStableNameExpr::CreateEmpty(), CreateFunctionRefExpr(), CreateHexagonBuiltinVaListDecl(), clang::Sema::CreateOverloadedBinOp(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::CStyleCastPtrExpr(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DeclareGlobalNewDelete(), DecodePPCMMATypeFromStr(), DecodeTypeFromStr(), decomposeTypeForEH(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::desugarForDiagnostic(), clang::APValue::dump(), emitDeclTargetVarDeclLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EvaluateBooleanTypeTrait(), clang::Sema::EvaluateStaticAssertMessageAsString(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), GeneralizeType(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCFConstantStringDecl(), getCommonNonSugarTypeNode(), clang::Sema::getCurrentThisType(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), getErrnoFunc(), clang::TypeName::getFullyQualifiedType(), clang::ento::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionCodeRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), getPointerType(), getPreferredTypeOfUnaryArg(), GetTypeOfFunction(), getVariableArrayDecayedType(), handleCleanupAttr(), handleMSPointerTypeQualifierAttr(), HandleWebAssemblyFuncrefAttr(), InitBuiltinTypes(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), IsStandardConversion(), LookupMemberExpr(), LookupStdSourceLocationImpl(), clang::ento::SValBuilder::makeNullWithType(), mergeTypes(), NoteSurrogateCandidate(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), recordFixedType(), clang::CodeGen::CGOpenMPRuntime::registerTargetGlobalVariable(), removePtrSizeAddrSpace(), ResolveOverloadForDeduction(), rewriteBuiltinFunctionDecl(), RVVType2Qual(), SemaBuiltinCallWithStaticChain(), SemaBuiltinLaunder(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), tryObjCWritebackConversion(), clang::ConversionFixItGenerator::tryToFixConversion(), TryToFixInvalidVariablyModifiedType(), clang::ento::ExprEngine::VisitCast(), and clang::ento::ExprEngine::VisitDeclStmt().

◆ getPredefinedStringLiteralFromCache()

StringLiteral * ASTContext::getPredefinedStringLiteralFromCache ( StringRef  Key) const

Return a string representing the human readable name for the specified function declaration or file name.

Used by SourceLocExpr and PredefinedExpr to cache evaluated results.

Definition at line 12293 of file ASTContext.cpp.

References CharTy, clang::StringLiteral::Create(), getStringLiteralArrayType(), clang::Ordinary, and clang::Result.

Referenced by clang::SourceLocExpr::EvaluateInContext().

◆ getPreferredTypeAlign() [1/2]

unsigned ASTContext::getPreferredTypeAlign ( const Type T) const

getPreferredTypeAlign - Return the "preferred" alignment of the specified type for the current target in bits.

This can be different than the ABI alignment in cases where it is beneficial for performance or backwards compatibility preserving to overalign a data type. (Note: despite the name, the preferred alignment is ABI-impacting, and not an optimization.)

Definition at line 2460 of file ASTContext.cpp.

References clang::TypeInfo::Align, clang::TypeInfo::AlignRequirement, clang::Type::getAs(), getASTRecordLayout(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), getPreferredTypeAlign(), getTypeInfo(), getTypeSize(), clang::TypeInfo::isAlignRequired(), clang::Decl::isInvalidDecl(), clang::Type::isMemberPointerType(), clang::Type::isSpecificBuiltinType(), clang::RequiredByTypedef, and toBits().

◆ getPreferredTypeAlign() [2/2]

unsigned clang::ASTContext::getPreferredTypeAlign ( QualType  T) const
inline

Return the "preferred" alignment of the specified type T for the current target, in bits.

This can be different than the ABI alignment in cases where it is beneficial for performance or backwards compatibility preserving to overalign a data type. (Note: despite the name, the preferred alignment is ABI-impacting, and not an optimization.)

Definition at line 2406 of file ASTContext.h.

References getPreferredTypeAlign(), and clang::QualType::getTypePtr().

Referenced by AlignOfType(), getAlignOfGlobalVar(), getDeclAlign(), getPreferredTypeAlign(), getPreferredTypeAlignInChars(), and getTypeAlignIfKnown().

◆ getPreferredTypeAlignInChars()

CharUnits clang::ASTContext::getPreferredTypeAlignInChars ( QualType  T) const
inline

Return the PreferredAlignment of a (complete) type T, in characters.

Definition at line 2374 of file ASTContext.h.

References getPreferredTypeAlign(), and toCharUnitsFromBits().

◆ getPrimaryMergedDecl()

Decl * clang::ASTContext::getPrimaryMergedDecl ( Decl D)
inline

Definition at line 1030 of file ASTContext.h.

References clang::Result.

Referenced by clang::getPrimaryMergedDecl().

◆ getPrintingPolicy()

const clang::PrintingPolicy & clang::ASTContext::getPrintingPolicy ( ) const
inline

Definition at line 692 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), annotateConsumedSummaryMismatch(), clang::Sema::BuildAnonymousStructOrUnion(), checkTypeParamListConsistency(), convertCallArgsToString(), ConvertDeclSpecToType(), ConvertTypeToDiagnosticString(), clang::ExtractAPIAction::CreateASTConsumer(), clang::WrappingExtractAPIAction::CreateASTConsumer(), clang::ento::CallEvent::dump(), clang::Decl::dump(), clang::DeclContext::dumpDeclContext(), clang::Expr::EvaluateWithSubstitution(), clang::FormatASTNodeDiagnosticArgument(), generateDiagnosticsForCallLike(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::GetFullTypeName(), clang::Sema::getPrintingPolicy(), getTupleLikeElementType(), clang::Sema::ImplicitlyDefineFunction(), clang::Expr::isPotentialConstantExpr(), isTupleLike(), lookupStdTypeTraitMember(), clang::Sema::ParsedFreeStandingDeclSpec(), print(), clang::PrettyDeclStackTraceEntry::print(), printIndicesOfElementsToConstructJson(), clang::ProgramPoint::printJson(), clang::ento::Environment::printJson(), printObjectsUnderConstructionJson(), printPendingInitLoopJson(), clang::APValue::printPretty(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), clang::TextNodeDumper::VisitUnresolvedUsingTypenameDecl(), clang::TextNodeDumper::VisitUnresolvedUsingValueDecl(), clang::TextNodeDumper::VisitUsingDecl(), clang::JSONNodeDumper::VisitUsingDecl(), and WarnUndefinedMethod().

◆ getProcessIDType()

QualType ASTContext::getProcessIDType ( ) const

Return the unique type for "pid_t" defined in <sys/types.h>.

We need this to compute the correct type for vfork().

Definition at line 6013 of file ASTContext.cpp.

Referenced by DecodeTypeFromStr().

◆ getProfileList()

const ProfileList & clang::ASTContext::getProfileList ( ) const
inline

◆ getPromotedIntegerType()

QualType ASTContext::getPromotedIntegerType ( QualType  PromotableType) const

◆ getQualifiedTemplateName()

TemplateName ASTContext::getQualifiedTemplateName ( NestedNameSpecifier NNS,
bool  TemplateKeyword,
TemplateName  Template 
) const

◆ getQualifiedType() [1/3]

QualType clang::ASTContext::getQualifiedType ( const Type T,
Qualifiers  Qs 
) const
inline

Return a type with additional qualifiers.

Definition at line 2155 of file ASTContext.h.

References clang::Qualifiers::getFastQualifiers(), and clang::Qualifiers::hasNonFastQualifiers().

◆ getQualifiedType() [2/3]

QualType clang::ASTContext::getQualifiedType ( QualType  T,
Qualifiers  Qs 
) const
inline

◆ getQualifiedType() [3/3]

QualType clang::ASTContext::getQualifiedType ( SplitQualType  split) const
inline

Un-split a SplitQualType.

Definition at line 2141 of file ASTContext.h.

References getQualifiedType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnPropertyImplDecl(), AdoptQualifiers(), clang::QualifierCollector::apply(), clang::Sema::BuildCallExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildFieldReferenceExpr(), BuildImplicitBaseInitializer(), clang::Sema::BuildMemberExpr(), clang::Sema::BuildQualifiedType(), BuildSimilarlyQualifiedPointerType(), clang::Sema::BuiltinChangeCVRQualifiers(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::BuiltinDecay(), clang::Sema::BuiltinRemoveReference(), checkARCPropertyImpl(), checkBlockPointerTypesForAssignment(), checkComplexDecomposition(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkMemberDecomposition(), CheckOriginalCallArgDeduction(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckTemplateTypeArgument(), checkVectorDecomposition(), CompareStandardConversionSequences(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getCommonSugaredType(), getCommonSugarTypeNode(), getConstantArrayType(), getCVRQualifiedType(), getDependentSizedArrayType(), clang::TypeName::getFullyQualifiedType(), GetImplicitObjectParameterType(), getIncompleteArrayType(), getLifetimeQualifiedType(), getNonMemoryType(), getQualifiedType(), clang::ObjCMethodDecl::getSelfType(), getUnconstrainedType(), getUnqualifiedObjCPointerType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCLifetimeForPointee(), inferARCWriteback(), InitBuiltinTypes(), clang::Sema::isObjCWritebackConversion(), isSubstitutedType(), LookupMemberExpr(), clang::TreeTransform< Derived >::RebuildQualifiedType(), rewriteToObjCProperty(), SemaOpenCLBuiltinToAddr(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), transferARCOwnershipToDeclSpec(), TryObjectArgumentInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), and withoutUnaligned().

◆ getRawCFConstantStringType()

QualType clang::ASTContext::getRawCFConstantStringType ( ) const
inline

Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.

Definition at line 1824 of file ASTContext.h.

References getTypedefType().

◆ getRawCommentForAnyRedecl()

const RawComment * ASTContext::getRawCommentForAnyRedecl ( const Decl D,
const Decl **  OriginalDecl = nullptr 
) const

Return the documentation comment attached to a given declaration.

Returns nullptr if no comment is attached.

Parameters
OriginalDeclif not nullptr, is set to declaration AST node that had the comment, if the comment we found comes from a redeclaration.

Definition at line 402 of file ASTContext.cpp.

References adjustDeclToTemplate(), cacheRawCommentForDecl(), CommentlessRedeclChains, DeclRawComments, clang::Decl::getCanonicalDecl(), getRawCommentForDeclNoCache(), RedeclChainComments, and clang::Decl::redecls().

Referenced by getCommentForDecl(), clang::getCompletionComment(), clang::getParameterComment(), and clang::getPatternCompletionComment().

◆ getRawCommentForDeclNoCache()

RawComment * ASTContext::getRawCommentForDeclNoCache ( const Decl D) const

◆ getRawCommentForDeclNoCacheImpl()

RawComment * ASTContext::getRawCommentForDeclNoCacheImpl ( const Decl D,
const SourceLocation  RepresentativeLocForDecl,
const std::map< unsigned, RawComment * > &  CommentsInFile 
) const

◆ getReadPipeType()

QualType ASTContext::getReadPipeType ( QualType  T) const

Return a read_only pipe type for the specified type.

Definition at line 4552 of file ASTContext.cpp.

Referenced by clang::Sema::BuildReadPipeType(), and getCommonNonSugarTypeNode().

◆ getRealTypeForBitwidth()

QualType ASTContext::getRealTypeForBitwidth ( unsigned  DestWidth,
FloatModeKind  ExplicitType 
) const

getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.

Returns empty type if there is no appropriate target types.

Definition at line 12157 of file ASTContext.cpp.

References clang::Double, DoubleTy, clang::Float, clang::Float128, Float128Ty, FloatTy, clang::TargetInfo::getRealTypeByWidth(), getTargetInfo(), clang::Half, HalfTy, clang::Ibm128, Ibm128Ty, clang::LongDouble, LongDoubleTy, and clang::NoFloat.

Referenced by clang::Sema::AddModeAttr().

◆ getRecordType()

QualType ASTContext::getRecordType ( const RecordDecl Decl) const

Definition at line 4716 of file ASTContext.cpp.

References clang::Decl::getPreviousDecl().

Referenced by clang::Sema::ActOnSourceLocExpr(), clang::Sema::AddOverloadCandidate(), clang::ODRHash::AddStructuralValue(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), checkMemberDecomposition(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckStructuredBindingMemberAccess(), clang::CodeGen::CGDebugInfo::completeClass(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), ComputeDefaultedSpecialMemberExceptionSpec(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateHexagonBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::interp::InterpFrame::describe(), clang::Sema::DiagnoseInvalidExplicitObjectParameterInLambda(), clang::Sema::DiagnoseNontrivial(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata(), clang::Sema::FindDeallocationFunction(), clang::Sema::FindDeallocationFunctionForDestructor(), findDecomposableBaseClass(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), clang::ento::CXXInstanceCall::getInitialStackFrameContents(), getLValueType(), hasCopyOrMoveCtorParam(), clang::ASTNodeImporter::ImportAPValue(), clang::Sema::LookupInSuper(), recordFixedType(), recoverFromTypeInKnownDependentBase(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), clang::Sema::SpecialMemberIsTrivial(), and clang::interp::Pointer::toRValue().

◆ getReferenceQualifiedType()

QualType ASTContext::getReferenceQualifiedType ( const Expr e) const

getReferenceQualifiedType - Given an expr, will return the type for that expression, as in [dcl.type.simple]p4 but without taking id-expressions and class member access into account.

Definition at line 5666 of file ASTContext.cpp.

References getLValueReferenceType(), getRValueReferenceType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.

Referenced by clang::Sema::BuildExprRequirement(), diagnoseUnsatisfiedRequirement(), clang::ObjCMessageExpr::getCallReturnType(), clang::Sema::getDecltypeForExpr(), and clang::ento::CallEvent::getResultType().

◆ getRestrictType()

QualType clang::ASTContext::getRestrictType ( QualType  T) const
inline

Return the uniqued reference to the type for a restrict qualified type.

The resulting type has a union of the qualifiers from T and restrict.

Definition at line 1272 of file ASTContext.h.

References clang::Qualifiers::Restrict, and clang::QualType::withFastQualifiers().

◆ getRValueReferenceType()

QualType ASTContext::getRValueReferenceType ( QualType  T) const

◆ getScalableVectorType()

QualType ASTContext::getScalableVectorType ( QualType  EltTy,
unsigned  NumElts,
unsigned  NumFields = 1 
) const

Return the unique reference to a scalable vector type of the specified element type and scalable number of elements.

getScalableVectorType - Return the unique reference to a scalable vector type of the specified element type and size.

For RISC-V, number of fields is also provided when it fetching for tuple type.

Precondition
EltTy must be a built-in type.

VectorType must be a built-in type.

Definition at line 3987 of file ASTContext.cpp.

References getTypeSize().

Referenced by clang::Sema::CheckSizelessVectorConditionalTypes(), checkSizelessVectorShift(), DecodeTypeFromStr(), clang::Sema::GetSignedSizelessVectorType(), and RVVType2Qual().

◆ getSideTableAllocatedMemory()

size_t ASTContext::getSideTableAllocatedMemory ( ) const

Return the total memory used for various side tables.

Definition at line 12125 of file ASTContext.cpp.

◆ getsigjmp_bufType()

QualType clang::ASTContext::getsigjmp_bufType ( ) const
inline

Retrieve the C sigjmp_buf type.

Definition at line 1965 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

◆ getSignatureParameterType()

QualType ASTContext::getSignatureParameterType ( QualType  T) const

Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and function types and removing top-level cv-qualifiers.

Definition at line 6955 of file ASTContext.cpp.

References getAdjustedParameterType(), clang::QualType::getUnqualifiedType(), and getVariableArrayDecayedType().

◆ getSignedSizeType()

CanQualType ASTContext::getSignedSizeType ( ) const

Return the unique signed counterpart of the integer type corresponding to size_t.

Definition at line 5962 of file ASTContext.cpp.

Referenced by clang::Sema::ActOnNumericConstant(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getSignedWCharType()

QualType ASTContext::getSignedWCharType ( ) const

Return the type of "signed wchar_t".

getSignedWCharType - Return the type of "signed wchar_t".

Used when in C++, as a GCC extension.

Definition at line 5978 of file ASTContext.cpp.

References WCharTy.

Referenced by ConvertDeclSpecToType(), and getCorrespondingSignedType().

◆ getSizeType()

CanQualType ASTContext::getSizeType ( ) const

Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.

getSizeType - Return the unique type for "size_t" (C99 7.17), the result of the sizeof operator (C99 6.5.3.4p4).

The sizeof operator requires this (C99 6.5.3.4p4).

The value is target dependent and needs to agree with the definition in <stddef.h>.

Definition at line 5956 of file ASTContext.cpp.

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnNumericConstant(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStringLiteral(), appendParameterTypes(), clang::Sema::BuildArrayType(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), clang::Sema::BuildPackIndexingExpr(), clang::Sema::BuildPackIndexingType(), buildSingleCopyAssignRecursively(), captureVariablyModifiedType(), checkArraySize(), clang::Sema::CheckLiteralOperatorDeclaration(), checkOpenCLEnqueueLocalSizeArgs(), CheckOperatorNewDeclaration(), checkTupleLikeDecomposition(), clang::SizeOfPackExpr::Create(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), CreateHexagonBuiltinVaListDecl(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareGlobalNewDelete(), DecodeTypeFromStr(), DeduceFromInitializerList(), DeduceTemplateArgumentsByTypeMatch(), diagnoseListInit(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFixups(), clang::Sema::EvaluateStaticAssertMessageAsString(), clang::Sema::FindAllocationFunctions(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBytesReturnedByAllocSizeCall(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPointerAndSize(), getTupleLikeElementType(), clang::ento::SymbolExtent::getType(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CXXMethodDecl::isUsualDeallocationFunction(), matchesStlAllocatorFn(), clang::InitializationSequence::Perform(), RVVType2Qual(), TryInitializerListConstruction(), and TryListConversion().

◆ getSourceManager() [1/2]

SourceManager & clang::ASTContext::getSourceManager ( )
inline

Definition at line 700 of file ASTContext.h.

Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnLabelStmt(), clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), AddOverloadParameterChunks(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::CodeGen::CGDebugInfo::AddStringLiteralDebugInfo(), clang::arcmt::MigrationProcess::applyTransform(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::arcmt::checkForManualIssues(), clang::StmtSequence::contains(), clang::index::CommentToXMLConverter::convertCommentToXML(), createDataFixit(), clang::CodeGen::CGOpenMPRuntime::createOffloadEntriesAndInfoMetadata(), createOverloadsForFixedParams(), clang::tooling::createRenameAtomicChanges(), createSpanTypeForVarDecl(), disambiguateSpellingInScope(), clang::Decl::dump(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), emitBody(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), emitMappingInformation(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::SourceLocExpr::EvaluateInContext(), clang::tooling::findSelectedASTNodes(), clang::arcmt::trans::findSemiAfterLocation(), fixLocalVarDeclWithSpan(), fixParamWithSpan(), fixUPCAddressofArraySubscriptWithSpan(), fixVarDeclWithArray(), FixVarInitializerWithSpan(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getAsmSrcLocInfo(), clang::tooling::getAssociatedRange(), clang::BackendConsumer::getBestLocationFromDebugLoc(), getEnclosingStmtLocation(), getEntryInfoFromPresumedLoc(), getErrnoFunc(), DerefSimplePtrArithFixableGadget::getFixits(), UPCPreIncrementGadget::getFixits(), UUCAddAssignGadget::getFixits(), getFixIts(), clang::AnalysisDeclContext::getFunctionName(), getIdentStringFromSourceLocation(), getLiteralInfo(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ento::AnalysisManager::getSourceManager(), clang::tooling::getText(), clang::ento::MemRegionManager::getVarRegion(), clang::BackendConsumer::HandleInlineFunctionDefinition(), clang::BackendConsumer::HandleTagDeclDefinition(), clang::BackendConsumer::HandleTopLevelDecl(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), clang::FilenamePatternConstraint::isAutoGenerated(), isEmptyARCMTMacroStatement(), isForbiddenTypeAllowed(), clang::CodeGen::CodeGenModule::isFunctionBlockedByProfileList(), clang::ento::AnalysisManager::isInCodeFile(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::isInSystemHeader(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), isStandardNewDelete(), LocPropertyAttribute(), makeLocation(), clang::Sema::makeUnavailableInSystemHeader(), clang::tooling::maybeExtendRange(), clang::Sema::MergeTypedefNameDecl(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), clang::PrettyDeclStackTraceEntry::print(), printExprAsWritten(), printIndicesOfElementsToConstructJson(), clang::ProgramPoint::printJson(), clang::LocationContext::printJson(), printPendingInitLoopJson(), clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::CodeGen::CGDebugInfo::setLocation(), clang::BackendConsumer::SrcMgrDiagHandler(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), and clang::Sema::warnOnReservedIdentifier().

◆ getSourceManager() [2/2]

const SourceManager & clang::ASTContext::getSourceManager ( ) const
inline

Definition at line 701 of file ASTContext.h.

◆ getStaticLocalNumber()

unsigned ASTContext::getStaticLocalNumber ( const VarDecl VD) const

Definition at line 12206 of file ASTContext.cpp.

Referenced by clang::Sema::BuildVariableInstantiation().

◆ getStringLiteralArrayType()

QualType ASTContext::getStringLiteralArrayType ( QualType  EltTy,
unsigned  Length 
) const

◆ getSubstTemplateTemplateParm()

TemplateName ASTContext::getSubstTemplateTemplateParm ( TemplateName  replacement,
Decl AssociatedDecl,
unsigned  Index,
std::optional< unsigned PackIndex 
) const

◆ getSubstTemplateTemplateParmPack()

TemplateName ASTContext::getSubstTemplateTemplateParmPack ( const TemplateArgument ArgPack,
Decl AssociatedDecl,
unsigned  Index,
bool  Final 
) const

◆ getSubstTemplateTypeParmPackType()

QualType ASTContext::getSubstTemplateTypeParmPackType ( Decl AssociatedDecl,
unsigned  Index,
bool  Final,
const TemplateArgument ArgPack 
)

◆ getSubstTemplateTypeParmType()

QualType ASTContext::getSubstTemplateTypeParmType ( QualType  Replacement,
Decl AssociatedDecl,
unsigned  Index,
std::optional< unsigned PackIndex 
) const

Retrieve a substitution-result type.

Definition at line 4801 of file ASTContext.cpp.

References Allocate(), and clang::SubstTemplateTypeParmType::Profile().

Referenced by getCommonSugarTypeNode().

◆ getTagDeclType()

QualType ASTContext::getTagDeclType ( const TagDecl Decl) const

◆ getTargetAddressSpace()

unsigned ASTContext::getTargetAddressSpace ( LangAS  AS) const

◆ getTargetDefaultAlignForAttributeAligned()

unsigned ASTContext::getTargetDefaultAlignForAttributeAligned ( ) const

Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.

getTargetDefaultAlignForAttributeAligned - Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.

Definition at line 2514 of file ASTContext.cpp.

References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().

◆ getTargetInfo()

const TargetInfo & clang::ASTContext::getTargetInfo ( ) const
inline

Definition at line 752 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnHLSLTopLevelFunction(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCAvailabilityCheckExpr(), actOnOMPReductionKindClause(), clang::Sema::ActOnPragmaMSSeg(), clang::Sema::ActOnPragmaOptionsAlign(), clang::Sema::ActOnSEHTryBlock(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagFinishDefinition(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::AddImplicitlyDeclaredMembersToClass(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), basicGVALinkageForFunction(), basicGVALinkageForVariable(), clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildBitIntType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildFunctionType(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildVAArgExpr(), clang::arcmt::trans::canApplyWeak(), canPassInRegisters(), clang::ento::SMTConstraintManager::canReasonAbout(), captureInLambda(), ChangeIntegralSignedness(), clang::Sema::CheckAddressOfOperand(), checkAliasedGlobal(), clang::Sema::CheckAssignmentConstraints(), checkAttributesAfterMerging(), clang::Sema::CheckAttrTarget(), CheckAvailability(), clang::Sema::CheckBaseSpecifier(), CheckBuiltinTargetInSupported(), CheckBuiltinTargetNotInUnsupported(), clang::Sema::CheckCallingConvAttr(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckCompleteDestructorVariant(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::checkConstantPointerAuthKey(), clang::Sema::CheckCXXThrowOperand(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFieldDecl(), CheckFormatString(), checkForMultipleExportedDefaultConstructors(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CheckMain(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), CheckMultiVersionValue(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckParameter(), clang::Sema::CheckRegparmAttr(), clang::Sema::CheckSpecializationInstantiationRedecl(), clang::Sema::checkTargetAttr(), CheckTargetCausesMultiVersioning(), clang::Sema::checkTargetClonesAttrString(), clang::Sema::checkTargetVersionAttr(), clang::Sema::CheckThreadLocalForLargeAlignment(), clang::Sema::checkTypeSupport(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVariableDeclarationType(), checkVAStartABI(), clang::Sema::CheckVectorOperands(), clang::CodeGen::DefaultABIInfo::classifyArgumentType(), clang::Sema::CodeCompleteAttribute(), computeKeyFunction(), clang::analyze_os_log::computeOSLogBufferLayout(), ConvertDeclSpecToType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Interpreter::CreateExecutor(), clang::CodeGen::CreateItaniumCXXABI(), clang::Sema::CreateLaunchBoundsAttr(), DeclMustBeEmitted(), DecodeTypeFromStr(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineUsedVTables(), DiagnoseObjCImplementedDeprecations(), clang::Sema::diagnoseUnavailableAlignedAllocation(), clang::Sema::DiagnoseUseOfDecl(), DoEmitAvailabilityWarning(), clang::CodeGen::CodeGenModule::EmitMainVoidAlias(), emitOMPAtomicRMW(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::SourceLocExpr::EvaluateInContext(), clang::DeclSpec::Finish(), clang::Sema::FixOverloadedFunctionReference(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::Sema::FormatStringHasSArg(), funcHasParameterSizeMangling(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::ASTNameGenerator::Implementation::getAllManglings(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getASTRecordLayout(), getAttrForPlatform(), clang::FunctionDecl::getBuiltinID(), getCallingConvMangling(), getCCForDeclaratorChunk(), clang::interp::Context::getCharBit(), getConstantArrayInfoInChars(), clang::Sema::getCudaConfigureFuncName(), getCurrentKeyFunction(), getCXXABIKind(), getDeclAlign(), getDefaultCallingConvention(), getFixedPointIBits(), getFixedPointScale(), getFixedPointSemantics(), GetFullTypeForDeclarator(), getInstrProfSection(), getIntTypeForBitwidth(), getLangASForBuiltinAddressSpace(), clang::Sema::getLocationOfStringLiteralByte(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMinGlobalAlignOfVar(), getOpenMPDefaultSimdAlign(), clang::CodeGen::CGOpenMPRuntime::getOrCreateThreadPrivateCache(), getRealTypeForBitwidth(), getRVVTypeSize(), getTargetAddressSpace(), getTargetDefaultAlignForAttributeAligned(), getTargetNullPointerValue(), getTypeInfoLinkage(), clang::Decl::getVersionIntroduced(), handleAliasAttr(), handleAnyX86InterruptAttr(), handleArmBuiltinAliasAttr(), HandleArmSveVectorBitsTypeAttr(), handleAvailabilityAttr(), handleBuiltinAliasAttr(), handleCPUSpecificAttr(), handleDeclspecThreadAttr(), handleDLLAttr(), handleHLSLNumThreadsAttr(), handleInterruptAttr(), handleMSPointerTypeQualifierAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handlePackedAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleTargetClonesAttr(), handleVisibilityAttr(), handleWeakImportAttr(), hasNewExtendedAlignment(), InitDeviceMC(), clang::CodeGen::initializationPatternFor(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), clang::Sema::InstantiateDefaultCtorDefaultArgs(), clang::Sema::InstantiateFunctionDefinition(), isAIXLayout(), isArc4RandomAvailable(), isDefaultStdCall(), clang::Type::isIncompleteType(), clang::installapi::isInlined(), clang::CodeGen::swiftcall::isLegalIntegerType(), clang::FunctionDecl::isMSExternInline(), isMsLayout(), isMSStaticDataMemberInlineDefinition(), clang::FunctionDecl::isMSVCRTEntryPoint(), isPermittedNeonBaseType(), isStdBuiltin(), clang::Sema::isValidSectionSpecifier(), clang::Sema::isValidVarArgType(), isVarDeclStrongDefinition(), IsVectorConversion(), clang::FieldDecl::isZeroSize(), clang::MangleContext::mangleName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MarkVTableUsed(), needsConversionOfHalfVec(), parseModeAttrArg(), clang::Sema::PerformImplicitConversion(), ProcessDeclAttribute(), ProcessStmtAttribute(), ReferenceDllExportedMembers(), clang::CodeGen::CodeGenModule::Release(), repeatForLambdaConversionFunctionCallingConvs(), roundUpSizeToCharAlignment(), shouldDiagnoseAvailabilityByDefault(), clang::TargetOMPContext::TargetOMPContext(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryEvaluateBuiltinNaN(), clang::QualType::UseExcessPrecision(), and clang::Sema::VerifyBitField().

◆ getTargetNullPointerValue()

uint64_t ASTContext::getTargetNullPointerValue ( QualType  QT) const

◆ getTemplateOrSpecializationInfo()

ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo ( const VarDecl Var)

◆ getTemplateParamObjectDecl()

TemplateParamObjectDecl * ASTContext::getTemplateParamObjectDecl ( QualType  T,
const APValue V 
) const

Return the template parameter object of the given type with the given value.

Definition at line 12338 of file ASTContext.cpp.

References clang::QualType::addConst(), clang::Type::isRecordType(), clang::TemplateParamObjectDecl::Profile(), and V.

Referenced by getAsSimpleValueDeclRef().

◆ getTemplateSpecializationType() [1/2]

QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
ArrayRef< TemplateArgument Args,
QualType  Canon = QualType() 
) const

◆ getTemplateSpecializationType() [2/2]

QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
ArrayRef< TemplateArgumentLoc Args,
QualType  Canon = QualType() 
) const

◆ getTemplateSpecializationTypeInfo()

TypeSourceInfo * ASTContext::getTemplateSpecializationTypeInfo ( TemplateName  T,
SourceLocation  TLoc,
const TemplateArgumentListInfo Args,
QualType  Canon = QualType() 
) const

◆ getTemplateTypeParmType()

QualType ASTContext::getTemplateTypeParmType ( unsigned  Depth,
unsigned  Index,
bool  ParameterPack,
TemplateTypeParmDecl ParmDecl = nullptr 
) const

Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name.

Definition at line 4866 of file ASTContext.cpp.

References getTemplateTypeParmType(), and clang::TemplateTypeParmType::Profile().

Referenced by getCommonNonSugarTypeNode(), and getTemplateTypeParmType().

◆ getTranslationUnitDecl()

TranslationUnitDecl * clang::ASTContext::getTranslationUnitDecl ( ) const
inline

Definition at line 1068 of file ASTContext.h.

References clang::Decl::getMostRecentDecl().

Referenced by clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnGlobalModuleFragmentDecl(), clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPragmaDetectMismatch(), clang::Sema::ActOnPragmaMSComment(), clang::Sema::ActOnPrivateModuleFragmentDecl(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTranslationUnitScope(), clang::Sema::ActOnTypeParameter(), addFunctionPointerConversion(), clang::ASTImporter::ASTImporter(), buildBuiltinTemplateDecl(), buildImplicitRecord(), buildImplicitTypedef(), clang::Sema::BuildModuleInclude(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildPredefinedExpr(), clang::arcmt::trans::checkAPIUses(), checkGlobalOrExternCConflict(), cleanupDeallocOrFinalize(), clang::Sema::CodeCompleteNamespaceDecl(), clang::Sema::CodeCompleteObjCClassForwardDecl(), clang::Sema::CodeCompleteObjCImplementationDecl(), clang::Sema::CodeCompleteObjCInterfaceCategory(), clang::Sema::CodeCompleteObjCInterfaceDecl(), clang::Sema::CodeCompleteObjCProtocolDecl(), clang::Sema::CodeCompleteObjCProtocolReferences(), clang::Sema::CodeCompleteObjCSuperclass(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltin(), clang::Sema::createImplicitModuleImportForErrorRecovery(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), emitOutlinedFunctionPrologue(), EvaluateBooleanTypeTrait(), clang::ASTMergeAction::ExecuteAction(), clang::IncrementalSyntaxOnlyAction::ExecuteAction(), clang::Sema::ExpandFunctionLocalPredefinedMacros(), clang::Sema::FindAllocationFunctions(), clang::Interpreter::FindRuntimeInterface(), clang::tooling::findSelectedASTNodes(), clang::Sema::FindUsualDeallocationFunction(), clang::Sema::GatherGlobalCodeCompletions(), GCRewriteFinalize(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getErrnoFunc(), getExternCContextDecl(), getObjCProtocolDecl(), getObjCSuperType(), clang::Sema::getOrCreateStdNamespace(), getPredefinedDecl(), clang::installapi::InstallAPIVisitor::HandleTranslationUnit(), InitBuiltinTypes(), clang::ASTReader::InitializeContext(), clang::HLSLExternalSemaSource::InitializeSema(), InsertOCLBuiltinDeclarationsFromTable(), InventTemplateParameter(), clang::ento::BugSuppression::isSuppressed(), LookupObjCInterfaceDeclForLiteral(), lookupStdNamespace(), clang::arcmt::trans::makeAssignARCSafe(), makeLocation(), clang::ExternalASTMerger::MaybeRecordOrigin(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), clang::arcmt::trans::rewriteAutoreleasePool(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), clang::RecursiveASTVisitor< Derived >::TraverseAST(), traverseAST(), clang::arcmt::trans::GCAttrsTraverser::traverseTU(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::ASTNodeImporter::VisitTranslationUnitDecl(), clang::ASTNodeImporter::VisitTypeAliasTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateDecl().

◆ getTraversalScope()

std::vector< Decl * > clang::ASTContext::getTraversalScope ( ) const
inline

Definition at line 685 of file ASTContext.h.

◆ getTrivialTypeSourceInfo()

TypeSourceInfo * ASTContext::getTrivialTypeSourceInfo ( QualType  T,
SourceLocation  Loc = SourceLocation() 
) const

Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.

Definition at line 2969 of file ASTContext.cpp.

References CreateTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), and clang::TypeLoc::initialize().

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnArrayTypeTrait(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBuiltinOffsetOf(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnCompoundLiteral(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnObjCBridgedCast(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::actOnObjCTypeParam(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStringLiteral(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnSYCLUniqueStableNameExpr(), clang::Sema::ActOnTypeTrait(), clang::Sema::ActOnUsingEnumDeclaration(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::TemplateDeclInstantiator::adjustForRewrite(), adjustObjCTypeParamBoundType(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCaptureField(), clang::Sema::BuildClassMessageImplicit(), clang::Sema::buildCoroutinePromise(), clang::Sema::BuildCXXForRangeStmt(), buildDistanceFunc(), clang::Sema::BuildEmptyCXXFoldExpr(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildImplicitBaseInitializer(), buildImplicitTypedef(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildParmVarDeclForTypedef(), buildPostUpdate(), clang::Sema::BuildPseudoDestructorExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), buildVarDecl(), castForMoving(), CastForMoving(), checkBuiltinTemplateIdType(), CheckDeducedPlaceholderConstraints(), checkOpenMPLoop(), clang::Sema::CheckTemplateArgument(), checkTupleLikeDecomposition(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::CreatePropertyDecl(), clang::CStyleCastPtrExpr(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DefineInheritingConstructor(), emitOutlinedFunctionPrologue(), clang::Sema::findInheritingConstructor(), clang::Sema::getDestructorName(), getDummyLambdaType(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), clang::Sema::getObjCMessageKind(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTrivialTemplateArgumentLoc(), getTypeSourceInfoForStdAlignValT(), clang::Sema::HandleField(), handleIBOutletCollection(), clang::Sema::HandleMSProperty(), handlePreferredName(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ObjCObjectTypeLoc::initializeLocal(), clang::TypeOfTypeLoc::initializeLocal(), clang::UnaryTransformTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), lookupCoroutineHandleType(), lookupPromiseType(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::Sema::ParseObjCEncodeExpression(), clang::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), ProcessAPINotes(), RebuildDeclaratorInCurrentInstantiation(), translateTemplateArgument(), TryToFixInvalidVariablyModifiedTypeSourceInfo(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ASTNodeImporter::VisitFunctionDecl().

◆ getTypeAlign() [1/2]

unsigned clang::ASTContext::getTypeAlign ( const Type T) const
inline

Definition at line 2347 of file ASTContext.h.

References clang::TypeInfo::Align, and getTypeInfo().

◆ getTypeAlign() [2/2]

unsigned clang::ASTContext::getTypeAlign ( QualType  T) const
inline

◆ getTypeAlignIfKnown()

unsigned ASTContext::getTypeAlignIfKnown ( QualType  T,
bool  NeedsPreferredAlignment = false 
) const

Return the alignment of a type, in bits, or 0 if the type is incomplete and we cannot determine the alignment (for example, from alignment attributes).

The returned alignment is the Preferred alignment if NeedsPreferredAlignment is true, otherwise is the ABI alignment.

Definition at line 1841 of file ASTContext.cpp.

References clang::Type::getAs(), getBaseElementType(), getPreferredTypeAlign(), getTypeAlign(), and clang::Type::isIncompleteType().

Referenced by hasNewExtendedAlignment(), and isVarDeclStrongDefinition().

◆ getTypeAlignInChars() [1/2]

CharUnits ASTContext::getTypeAlignInChars ( const Type T) const

Definition at line 2441 of file ASTContext.cpp.

References getTypeAlign(), and toCharUnitsFromBits().

◆ getTypeAlignInChars() [2/2]

CharUnits ASTContext::getTypeAlignInChars ( QualType  T) const

◆ getTypeDeclType()

QualType clang::ASTContext::getTypeDeclType ( const TypeDecl Decl,
const TypeDecl PrevDecl = nullptr 
) const
inline

Return the unique reference to the type for the specified type declaration.

Definition at line 1575 of file ASTContext.h.

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddOverriddenMethods(), AddResultTypeChunk(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTypenameType(), clang::Sema::ClassifyName(), clang::Sema::CodeCompleteObjCSuperMessage(), ConvertDeclSpecToType(), clang::ClassTemplateSpecializationDecl::Create(), clang::LambdaExpr::Create(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAmbiguousLookup(), DiagnoseBadAccess(), clang::Sema::diagnoseQualifiedDeclaration(), clang::Sema::DiagnoseUninstantiableTemplate(), DumpRecordLayout(), EmitMemberInitializer(), clang::Sema::FindAllocationFunctions(), FindBaseInitializer(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FixOverloadedFunctionReference(), clang::FormatASTNodeDiagnosticArgument(), clang::Sema::getAmbiguousPathsDisplayString(), getBOOLType(), getBuiltinMSVaListType(), getBuiltinVaListType(), clang::Sema::getConstructorName(), getConstructors(), clang::Sema::getCurrentThisType(), GetDeclSpecTypeForDeclarator(), clang::CXXRecordDecl::getDestructor(), clang::Sema::getDestructorName(), clang::Expr::getEnumCoercedType(), getFILEType(), GetFullTypeForDeclarator(), getInjectedTemplateArg(), getjmp_bufType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCClassType(), getObjCIdType(), getObjCInstanceType(), clang::Sema::getObjCMessageKind(), getObjCSelType(), getRequiredQualification(), getsigjmp_bufType(), getTagDeclType(), getTupleLikeElementType(), clang::Sema::getTypeName(), GetTypeOfFunction(), getTypeSourceInfoForStdAlignValT(), getucontext_tType(), clang::ASTNodeImporter::ImportDefinition(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Sema::isIncompatibleTypedef(), clang::CXXMethodDecl::isMoveAssignmentOperator(), isNonPlacementDeallocationFunction(), IsOverloadOrOverrideImpl(), IsStandardConversion(), IsStructurallyEquivalent(), clang::Sema::LookupConstructors(), lookupPromiseType(), clang::Sema::LookupQualifiedName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Sema::PerformObjectMemberConversion(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildEnumType(), clang::TreeTransform< Derived >::RebuildRecordType(), clang::TreeTransform< Derived >::RebuildTypedefType(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), clang::Sema::RequireCompleteDeclContext(), clang::LookupResult::resolveKind(), ShouldDiagnoseSwitchCaseNotInEnum(), TryDiagnoseProtectedAccess(), TryObjectArgumentInitialization(), clang::CXXRecordDecl::viewInheritance(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ASTNodeImporter::VisitRecordDecl().

◆ getTypedefNameForUnnamedTagDecl()

TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl ( const TagDecl TD)

Definition at line 12254 of file ASTContext.cpp.

◆ getTypedefType()

QualType ASTContext::getTypedefType ( const TypedefNameDecl Decl,
QualType  Underlying = QualType() 
) const

Return the unique reference to the type for the specified typedef-name decl.

getTypedefType - Return the unique reference to the type for the specified typedef name decl.

Definition at line 4655 of file ASTContext.cpp.

References Allocate(), getCanonicalType(), hasSameType(), clang::QualType::isNull(), and clang::TypedefType::Profile().

Referenced by CheckExtVectorComponent(), CreateHexagonBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), getCFConstantStringType(), getCommonSugarTypeNode(), getOpenCLTypedefType(), and getRawCFConstantStringType().

◆ getTypeInfo() [1/2]

TypeInfo ASTContext::getTypeInfo ( const Type T) const

◆ getTypeInfo() [2/2]

TypeInfo clang::ASTContext::getTypeInfo ( QualType  T) const
inline

Definition at line 2309 of file ASTContext.h.

References getTypeInfo(), and clang::QualType::getTypePtr().

Referenced by getTypeInfo().

◆ getTypeInfoDataSizeInChars()

TypeInfoChars ASTContext::getTypeInfoDataSizeInChars ( QualType  T) const

◆ getTypeInfoInChars() [1/2]

TypeInfoChars ASTContext::getTypeInfoInChars ( const Type T) const

◆ getTypeInfoInChars() [2/2]

TypeInfoChars ASTContext::getTypeInfoInChars ( QualType  T) const

Definition at line 1791 of file ASTContext.cpp.

References getTypeInfoInChars(), and clang::QualType::getTypePtr().

◆ getTypeOfExprType()

QualType ASTContext::getTypeOfExprType ( Expr tofExpr,
TypeOfKind  Kind 
) const

C23 feature and GCC extension.

getTypeOfExprType - Unlike many "get<Type>" functions, we can't unique TypeOfExprType AST's (since expression's are never shared).

For example, multiple declarations that refer to "typeof(x)" all contain different DeclRefExpr's. This doesn't effect the type checker, since it operates on canonical type's (which are always unique).

Definition at line 5619 of file ASTContext.cpp.

References getCanonicalType(), clang::Expr::getType(), clang::Expr::isTypeDependent(), clang::DependentTypeOfExprType::Profile(), and clang::Unqualified.

Referenced by clang::Sema::BuildTypeofExprType().

◆ getTypeOfType()

QualType ASTContext::getTypeOfType ( QualType  tofType,
TypeOfKind  Kind 
) const

getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes.

The only motivation to unique these nodes would be memory savings. Since typeof(t) is fairly uncommon, space shouldn't be an issue. This doesn't affect the type checker, since it operates on canonical types (which are always unique).

Definition at line 5655 of file ASTContext.cpp.

References getCanonicalType().

Referenced by ConvertDeclSpecToType(), getCommonSugarTypeNode(), and clang::TreeTransform< Derived >::RebuildTypeOfType().

◆ getTypePackElementDecl()

BuiltinTemplateDecl * ASTContext::getTypePackElementDecl ( ) const

◆ getTypePackElementName()

IdentifierInfo * clang::ASTContext::getTypePackElementName ( ) const
inline

Definition at line 1921 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by getTypePackElementDecl().

◆ getTypes()

const SmallVectorImpl< Type * > & clang::ASTContext::getTypes ( ) const
inline

Definition at line 1200 of file ASTContext.h.

Referenced by clang::TypoCorrectionConsumer::addNamespaces().

◆ getTypeSize() [1/2]

uint64_t clang::ASTContext::getTypeSize ( const Type T) const
inline

Definition at line 2316 of file ASTContext.h.

References getTypeInfo(), and clang::TypeInfo::Width.

◆ getTypeSize() [2/2]

uint64_t clang::ASTContext::getTypeSize ( QualType  T) const
inline

Return the size of the specified (complete) type T, in bits.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 2315 of file ASTContext.h.

References getTypeInfo(), and clang::TypeInfo::Width.

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNumericConstant(), actOnOMPReductionKindClause(), clang::Sema::ActOnVariableDeclarator(), addFieldSizes(), clang::Sema::AddModeAttr(), areCompatibleRVVTypes(), areCompatibleSveTypes(), areLaxCompatibleRVVTypes(), areLaxCompatibleSveTypes(), clang::Sema::areVectorTypesSameSize(), assertEqualBitWidths(), BitsContainNoUserData(), clang::Sema::BuildArrayType(), clang::Sema::BuildAsTypeExpr(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), clang::Sema::BuildVectorType(), calculateElementType(), calculateOffset(), canConvertIntTyToFloatTy(), canPassInRegisters(), ChangeIntegralSignedness(), checkAPINotesReplacementType(), checkAVXParam(), CheckC23ConstexprInitStringLiteral(), clang::Sema::CheckCompatibleReinterpretCast(), CheckImplicitConversion(), CheckInvalidVLENandLMUL(), clang::Sema::CheckSizelessVectorConditionalTypes(), checkSizelessVectorShift(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorOperands(), checkVectorResult(), checkVectorShift(), clang::CodeGen::DefaultABIInfo::classifyArgumentType(), clang::CodeGen::coerceToIntArray(), CompareStandardConversionSequences(), ConvertDeclSpecToType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), CreateHexagonBuiltinVaListDecl(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadShiftValues(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseForRangeConstVariableCopies(), diagnoseListInit(), clang::ento::SMTConv::doFloatTypeConversion(), clang::ento::SMTConv::doIntTypeConversion(), clang::ento::SMTConv::doTypeConversion(), EmitAsmStores(), EmitBinaryAtomicPost(), emitDispatchForLoopBounds(), clang::CodeGen::ConstantEmitter::emitForMemory(), emitOMPAtomicRMW(), emitReplacement(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), clang::Sema::FindAllocationFunctions(), clang::ento::SMTConv::fixAPSInt(), clang::ento::SMTConv::fromData(), getAlignOfGlobalVar(), getBestAbsFunction(), getBytesReturnedByAllocSizeCall(), clang::ento::SMTConv::getCastExpr(), GetCFNumberSize(), getCharWidth(), getDeclAlign(), getFieldSize(), getFixedPointSemantics(), getIntWidth(), clang::ConstantArrayType::getMaxSizeBits(), getNextLargerIntegralType(), clang::ConstantArrayType::getNumAddressingBits(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), getRVVTypeSize(), getScalableVectorType(), clang::Sema::GetSignedSizelessVectorType(), clang::Sema::GetSignedVectorType(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), handleAnyX86InterruptAttr(), HandleArmSveVectorBitsTypeAttr(), HandleNeonVectorTypeAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleTransparentUnionAttr(), hasUniqueObjectRepresentations(), clang::Expr::IgnoreParenNoopCasts(), clang::Sema::Initialize(), is32Or64BitBasicType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), clang::CodeGen::isSIMDVectorType(), clang::CodeGen::isSingleElementStruct(), isZeroSized(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), mergeEnumWithInteger(), OpenCLConvertScalarsToVectors(), RecoverCastedSymbol(), rewriteToNumericBoxedExpression(), tryGCCVectorConvertAndSplat(), TryInitializerListConstruction(), TryListConversion(), and clang::Sema::VerifyBitField().

◆ getTypeSizeInChars() [1/2]

CharUnits ASTContext::getTypeSizeInChars ( const Type T) const

Definition at line 2432 of file ASTContext.cpp.

References getTypeInfoInChars(), and clang::TypeInfoChars::Width.

◆ getTypeSizeInChars() [2/2]

CharUnits ASTContext::getTypeSizeInChars ( QualType  T) const

Return the size of the specified (complete) type T, in characters.

getTypeSizeInChars - Return the size of the specified type, in characters.

This method does not work on incomplete types.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 2429 of file ASTContext.cpp.

References getTypeInfoInChars(), and clang::TypeInfoChars::Width.

Referenced by clang::Sema::ActOnFields(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), AtomicUsesUnsupportedLibcall(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), clang::Sema::BuildPredefinedExpr(), clang::ento::StoreManager::castRegion(), castValueToType(), clang::Sema::checkArrayElementAlignment(), CheckAtomicAlignment(), clang::Sema::CheckSubtractionOperands(), computeOffset(), createRuntimeShuffleFunction(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), EmitArrayDelete(), emitArraySubscriptGEP(), EmitCXXNewAllocSize(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), EmitDeclInvariant(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPointerArithmetic(), emitStructGetterCall(), emitStructSetterCall(), evenFlexibleArraySize(), clang::Sema::FillInlineAsmIdentifierInfo(), forConstantArrayExpansion(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), getAlignmentAndOffsetFromBinAddOrSub(), getDerivedSymbolForBinding(), getExceedsMsgs(), clang::VarDecl::getFlexibleArrayInitChars(), clang::CodeGen::CodeGenModule::getMinimumObjectSize(), clang::ConstantArrayType::getNumAddressingBits(), GetNumNonZeroBytesInInit(), getObjCEncodingForBlock(), getObjCEncodingForMethodDecl(), getObjCEncodingTypeSize(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::AggValueSlot::getPreferredSize(), getSubobjectSizeInBits(), getTypeExpansion(), getTypeSizeInCharsIfKnown(), isOnePastTheEndOfCompleteObject(), clang::Sema::isOpenMPCapturedByRef(), clang::CodeGen::CodeGenModule::Release(), setUsedBits(), shuffleAndStore(), unionHasUniqueObjectRepresentations(), clang::Value::Value(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().

◆ getTypeSizeInCharsIfKnown() [1/2]

std::optional< CharUnits > clang::ASTContext::getTypeSizeInCharsIfKnown ( const Type Ty) const
inline

Definition at line 2340 of file ASTContext.h.

References getTypeSizeInCharsIfKnown().

◆ getTypeSizeInCharsIfKnown() [2/2]

std::optional< CharUnits > clang::ASTContext::getTypeSizeInCharsIfKnown ( QualType  Ty) const
inline

◆ getTypeUnadjustedAlign() [1/2]

unsigned ASTContext::getTypeUnadjustedAlign ( const Type T) const

◆ getTypeUnadjustedAlign() [2/2]

unsigned clang::ASTContext::getTypeUnadjustedAlign ( QualType  T) const
inline

Return the ABI-specified natural alignment of a (complete) type T, before alignment adjustments, in bits.

This alignment is curently used only by ARM and AArch64 when passing arguments of a composite type.

Definition at line 2354 of file ASTContext.h.

References clang::QualType::getTypePtr(), and getTypeUnadjustedAlign().

Referenced by getTypeUnadjustedAlign(), and getTypeUnadjustedAlignInChars().

◆ getTypeUnadjustedAlignInChars() [1/2]

CharUnits ASTContext::getTypeUnadjustedAlignInChars ( const Type T) const

Definition at line 2451 of file ASTContext.cpp.

References getTypeUnadjustedAlign(), and toCharUnitsFromBits().

◆ getTypeUnadjustedAlignInChars() [2/2]

CharUnits ASTContext::getTypeUnadjustedAlignInChars ( QualType  T) const

getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments.

This method does not work on incomplete types.

Definition at line 2448 of file ASTContext.cpp.

References getTypeUnadjustedAlign(), and toCharUnitsFromBits().

◆ getucontext_tType()

QualType clang::ASTContext::getucontext_tType ( ) const
inline

Retrieve the C ucontext_t type.

Definition at line 1977 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

◆ getUInt128Decl()

TypedefDecl * ASTContext::getUInt128Decl ( ) const

Retrieve the declaration for the 128-bit unsigned integer type.

Definition at line 1176 of file ASTContext.cpp.

References buildImplicitTypedef(), and UnsignedInt128Ty.

Referenced by getPredefinedDecl(), and clang::Sema::Initialize().

◆ getUIntMaxType()

CanQualType ASTContext::getUIntMaxType ( ) const

Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.

getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5).

Definition at line 5972 of file ASTContext.cpp.

Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getUIntPtrType()

QualType ASTContext::getUIntPtrType ( ) const

◆ getUnaryTransformType()

QualType ASTContext::getUnaryTransformType ( QualType  BaseType,
QualType  UnderlyingType,
UnaryTransformType::UTTKind  UKind 
) const

Unary type transforms.

getUnaryTransformationType - We don't unique these, since the memory savings are minimal and these are rare.

Definition at line 5755 of file ASTContext.cpp.

References getCanonicalType(), clang::Type::isDependentType(), and clang::DependentUnaryTransformType::Profile().

Referenced by clang::Sema::BuildUnaryTransformType(), getCommonNonSugarTypeNode(), and getCommonSugarTypeNode().

◆ getUnconstrainedType()

QualType ASTContext::getUnconstrainedType ( QualType  T) const

Remove any type constraints from a template parameter type, for equivalence comparison of template parameters.

Definition at line 5853 of file ASTContext.cpp.

References clang::Type::containsUnexpandedParameterPack(), clang::Type::getAs(), getAutoType(), clang::QualType::getCanonicalType(), clang::Type::getContainedAutoType(), getQualifiedType(), clang::QualType::getQualifiers(), and clang::AutoType::isConstrained().

Referenced by MatchTemplateParameterKind().

◆ getUnnamedGlobalConstantDecl()

UnnamedGlobalConstantDecl * ASTContext::getUnnamedGlobalConstantDecl ( QualType  Ty,
const APValue Value 
) const

Return a declaration for a uniquified anonymous global constant corresponding to a given APValue.

Definition at line 12321 of file ASTContext.cpp.

References clang::UnnamedGlobalConstantDecl::Profile().

Referenced by clang::SourceLocExpr::EvaluateInContext().

◆ getUnqualifiedArrayType()

QualType ASTContext::getUnqualifiedArrayType ( QualType  T,
Qualifiers Quals 
)

Return this type as a completely-unqualified array type, capturing the qualifiers in Quals.

This will remove the minimal amount of sugaring from the types, similar to the behavior of QualType::getUnqualifiedType().

Parameters
Tis the qualified type, which may be an ArrayType
Qualswill receive the full set of qualifiers that were applied to the array.
Returns
if this is an array type, the completely unqualified array type that corresponds to it. Otherwise, returns T.getUnqualifiedType().

Definition at line 6039 of file ASTContext.cpp.

References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), getUnqualifiedArrayType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, clang::SplitQualType::Ty, and clang::ast_matchers::type.

Referenced by clang::Sema::BuildCXXTypeId(), clang::Sema::BuiltinChangeCVRQualifiers(), clang::Sema::BuiltinRemoveReference(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::FindCompositePointerType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), getUnqualifiedArrayType(), clang::Sema::handlerCanCatch(), hasCvrSimilarType(), hasSimilarType(), isSubstitutedType(), shouldBeModeledWithNoOp(), TryReferenceInitialization(), TryReferenceListInitialization(), and withoutUnaligned().

◆ getUnqualifiedObjCPointerType()

QualType clang::ASTContext::getUnqualifiedObjCPointerType ( QualType  type) const
inline

getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.

Definition at line 2176 of file ASTContext.h.

References getQualifiedType(), clang::Qualifiers::removeObjCLifetime(), and clang::ast_matchers::type.

Referenced by clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVar(), and clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVarTemplate().

◆ getUnresolvedUsingType()

QualType ASTContext::getUnresolvedUsingType ( const UnresolvedUsingTypenameDecl Decl) const

Definition at line 4742 of file ASTContext.cpp.

References clang::Decl::getCanonicalDecl().

◆ getUnsignedPointerDiffType()

QualType ASTContext::getUnsignedPointerDiffType ( ) const

Return the unique unsigned counterpart of "ptrdiff_t" integer type.

The standard (C11 7.21.6.1p7) refers to this type in the definition of tu format specifier.

Definition at line 6007 of file ASTContext.cpp.

References clang::Default.

Referenced by clang::Sema::ActOnOpenMPCanonicalLoop(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getUnsignedWCharType()

QualType ASTContext::getUnsignedWCharType ( ) const

Return the type of "unsigned wchar_t".

getUnsignedWCharType - Return the type of "unsigned wchar_t".

Used when in C++, as a GCC extension.

Definition at line 5985 of file ASTContext.cpp.

References UnsignedIntTy.

Referenced by ConvertDeclSpecToType(), and getCorrespondingUnsignedType().

◆ getUsingType()

QualType ASTContext::getUsingType ( const UsingShadowDecl Found,
QualType  Underlying 
) const

◆ getVaListTagDecl()

Decl * ASTContext::getVaListTagDecl ( ) const

Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets.

Definition at line 9166 of file ASTContext.cpp.

References getBuiltinVaListDecl(), and VaListTagDecl.

Referenced by clang::ASTImporterLookupTable::ASTImporterLookupTable(), getPredefinedDecl(), and isImportedDeclContext().

◆ getVariableArrayDecayedType()

QualType ASTContext::getVariableArrayDecayedType ( QualType  Ty) const

Returns a vla type where known sizes are replaced with [*].

getVariableArrayDecayedType - Turns the given type, which may be variably-modified, into the corresponding type with all the known sizes replaced with [*].

Definition at line 3572 of file ASTContext.cpp.

References getAtomicType(), getConstantArrayType(), getDependentSizedArrayType(), getLValueReferenceType(), getPointerType(), getQualifiedType(), getRValueReferenceType(), clang::Type::getTypeClass(), getVariableArrayDecayedType(), getVariableArrayType(), clang::Normal, clang::SplitQualType::Quals, clang::Star, clang::SplitQualType::Ty, and clang::ast_matchers::type.

Referenced by getCanonicalParamType(), getExceptionObjectType(), getSignatureParameterType(), and getVariableArrayDecayedType().

◆ getVariableArrayType()

QualType ASTContext::getVariableArrayType ( QualType  EltTy,
Expr NumElts,
ArraySizeModifier  ASM,
unsigned  IndexTypeQuals,
SourceRange  Brackets 
) const

Return a non-unique reference to the type for a variable array of the specified element type.

getVariableArrayType - Returns a non-unique reference to the type for a variable array of the specified element type.

Definition at line 3709 of file ASTContext.cpp.

References getCanonicalType(), getQualifiedType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.

Referenced by actOnOMPReductionKindClause(), clang::Sema::BuildArrayType(), clang::desugarForDiagnostic(), getAsArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and getVariableArrayType().

◆ getVectorType()

QualType ASTContext::getVectorType ( QualType  vecType,
unsigned  NumElts,
VectorKind  VecKind 
) const

◆ getVolatileType()

QualType clang::ASTContext::getVolatileType ( QualType  T) const
inline

Return the uniqued reference to the type for a volatile qualified type.

The resulting type has a union of the qualifiers from T and volatile.

Definition at line 1281 of file ASTContext.h.

References clang::Qualifiers::Volatile, and clang::QualType::withFastQualifiers().

Referenced by AddBuiltinAssignmentOperatorCandidates(), DecodeTypeFromStr(), and makeQualifiedLValueReferenceType().

◆ getVTableContext()

VTableContextBase * ASTContext::getVTableContext ( )

◆ getWCharType()

QualType clang::ASTContext::getWCharType ( ) const
inline

Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).

Definition at line 1773 of file ASTContext.h.

References WCharTy.

◆ getWebAssemblyExternrefType()

QualType ASTContext::getWebAssemblyExternrefType ( ) const

Return a WebAssembly externref type.

getExternrefType - Return a WebAssembly externref type, which represents an opaque reference to a host value.

Definition at line 3973 of file ASTContext.cpp.

◆ getWideCharType()

QualType clang::ASTContext::getWideCharType ( ) const
inline

Return the type of wide characters.

In C++, this returns the unique wchar_t type. In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.

Definition at line 1778 of file ASTContext.h.

References WideCharTy.

Referenced by clang::Sema::ActOnStringLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCNumericLiteral(), DecodeTypeFromStr(), clang::analyze_scanf::ScanfSpecifier::getArgType(), IsStringInit(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), IsWideCharCompatible(), and clang::CodeGen::CodeGenModule::Release().

◆ getWIntType()

QualType clang::ASTContext::getWIntType ( ) const
inline

In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.

Definition at line 1792 of file ASTContext.h.

References WIntTy.

◆ getWritePipeType()

QualType ASTContext::getWritePipeType ( QualType  T) const

Return a write_only pipe type for the specified type.

Definition at line 4556 of file ASTContext.cpp.

Referenced by clang::Sema::BuildWritePipeType(), getCommonNonSugarTypeNode(), and HandleOpenCLAccessAttr().

◆ getXRayFilter()

const XRayFunctionFilter & clang::ASTContext::getXRayFilter ( ) const
inline

Definition at line 782 of file ASTContext.h.

Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().

◆ hasCvrSimilarType()

bool ASTContext::hasCvrSimilarType ( QualType  T1,
QualType  T2 
)

Determine if two types are similar, ignoring only CVR qualifiers.

Definition at line 6201 of file ASTContext.cpp.

References getUnqualifiedArrayType(), hasSameType(), clang::Qualifiers::removeCVRQualifiers(), and UnwrapSimilarTypes().

Referenced by clang::Sema::CheckAssignmentConstraints(), and clang::Sema::PrepareScalarCast().

◆ hasDirectOwnershipQualifier()

bool ASTContext::hasDirectOwnershipQualifier ( QualType  Ty) const

Return true if the type has been explicitly qualified with ObjC ownership.

A type may be implicitly qualified with ownership under ObjC ARC, and in some cases the compiler treats these differently.

Definition at line 9659 of file ASTContext.cpp.

References Paren.

Referenced by clang::Sema::ActOnFields(), captureInBlock(), and handleObjCOwnershipTypeAttr().

◆ hasSameExpr()

bool ASTContext::hasSameExpr ( const Expr X,
const Expr Y 
) const

Determine whether the given expressions X and Y are equivalent.

Definition at line 12421 of file ASTContext.cpp.

References clang::Stmt::Profile(), and X.

Referenced by getCommonNonSugarTypeNode(), and getCommonSizeExpr().

◆ hasSameFunctionTypeIgnoringExceptionSpec()

bool ASTContext::hasSameFunctionTypeIgnoringExceptionSpec ( QualType  T,
QualType  U 
) const

Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.

Definition at line 3191 of file ASTContext.cpp.

References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), and hasSameType().

Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::DeduceTemplateArguments(), isSameEntity(), and clang::Sema::MergeFunctionDecl().

◆ hasSameFunctionTypeIgnoringPtrSizes()

bool ASTContext::hasSameFunctionTypeIgnoringPtrSizes ( QualType  T,
QualType  U 
)

Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types.

Definition at line 3216 of file ASTContext.cpp.

References getFunctionTypeWithoutPtrSizes(), and hasSameType().

Referenced by clang::Sema::MergeFunctionDecl().

◆ hasSameNullabilityTypeQualifier()

bool clang::ASTContext::hasSameNullabilityTypeQualifier ( QualType  SubT,
QualType  SuperT,
bool  IsParam 
) const
inline

◆ hasSameTemplateName()

bool ASTContext::hasSameTemplateName ( const TemplateName X,
const TemplateName Y 
) const

◆ hasSameType() [1/2]

bool clang::ASTContext::hasSameType ( const Type T1,
const Type T2 
) const
inline

Definition at line 2568 of file ASTContext.h.

References getCanonicalType().

◆ hasSameType() [2/2]

bool clang::ASTContext::hasSameType ( QualType  T1,
QualType  T2 
) const
inline

Determine whether the given types T1 and T2 are equivalent.

Definition at line 2565 of file ASTContext.h.

References getCanonicalType().

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnPropertyImplDecl(), AddResultTypeChunk(), adjustBlockReturnsToEnum(), areCompatibleRVVTypes(), areCompatibleSveTypes(), areCompatibleVectorTypes(), AreSpecialMemberFunctionsSameKind(), buildCounterInit(), buildCounterUpdate(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDeclaratorGroup(), buildDeclareReductionRef(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildUserDefinedMapperRef(), clang::Sema::BuildVAArgExpr(), castToBase(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), checkDeducedTemplateArguments(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMain(), clang::Sema::CheckMatrixElementwiseOperands(), clang::Sema::CheckMatrixMultiplyOperands(), clang::Sema::CheckMemberSpecialization(), checkOpenCLPipePacketType(), checkOpenMPLoop(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), clang::Sema::CheckTemplateArgument(), checkTypeParamListConsistency(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorOperands(), ClassImplementsAllMethodsAndProperties(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), compareStandardConversionSubsets(), clang::Sema::computeDeclContext(), ConvertQualTypeToKind(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadDeduction(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::diagnoseQualifiedDeclaration(), diagnoseVarDeclTypeMismatch(), filterNonConflictingPreviousTypedefDecls(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), findDecomposableBaseClass(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), clang::Sema::FixOverloadedFunctionReference(), forEachMultiversionedFunctionVersion(), clang::Sema::FunctionParamTypesAreEqual(), getBestAbsFunction(), getCommonSugaredType(), getCommonSugarTypeNode(), getCommonTemplateArgument(), getFixedEnumPromtion(), clang::Sema::getMoreSpecializedTemplate(), getTypedefType(), clang::Sema::HandleFunctionTypeMismatch(), clang::Sema::HandlePropertyInClassExtension(), handleVecTypeHint(), hasCompatibleArrayTypes(), hasCvrSimilarType(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSameFunctionTypeIgnoringPtrSizes(), hasSimilarType(), implicitObjectParamIsLifetimeBound(), clang::Sema::IsBlockPointerConversion(), IsEquivalentForUsingDecl(), clang::Sema::isEquivalentInternalLinkageDeclaration(), clang::Sema::isIncompatibleTypedef(), IsOverloadOrOverrideImpl(), isRelevantAttr(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameDefaultTemplateArgument(), isSameEntity(), clang::Sema::isSameOrCompatibleFunctionType(), isSameTemplateArg(), clang::ASTImporter::IsStructurallyEquivalent(), isSubstitutedType(), isValidInteropVariable(), loadToBegin(), MatchTemplateParameterKind(), mergeEnumWithInteger(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::Sema::PrepareScalarCast(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), rewriteToNumberLiteral(), sameFunctionParameterTypeLists(), sameObjCTypeArgs(), clang::Sema::setTagNameForLinkagePurposes(), TryConstructorInitialization(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), typesAreCompatible(), and clang::Sema::UsualArithmeticConversions().

◆ hasSameUnqualifiedType()

bool clang::ASTContext::hasSameUnqualifiedType ( QualType  T1,
QualType  T2 
) const
inline

Determine whether the given types are equivalent after cvr-qualifiers have been removed.

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 2592 of file ASTContext.h.

References getCanonicalType(), and clang::CanQual< T >::getTypePtr().

Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPDetachClause(), clang::Sema::ActOnOpenMPUsesAllocatorClause(), clang::Sema::AddConversionCandidate(), AddObjCKeyValueCompletions(), clang::Sema::AddOverloadCandidate(), AddSuperSendCompletion(), allowAmbiguity(), AnalyzeComparison(), areCompatibleVectorTypes(), argTypeIsABIEquivalent(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPseudoDestructorExpr(), checkArithmeticOrEnumeralThreeWayCompare(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckConstraintExpression(), checkEnumArithmeticConversions(), clang::Sema::CheckEnumRedeclaration(), checkEnumTypesInSwitchStmt(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckMain(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMoveOnConstruction(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSubtractionOperands(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CodeCompleteConstructorInitializer(), CompareDerivedToBaseConversions(), CompareImplicitConversionSequences(), clang::Sema::CompareReferenceRelationship(), CopyObject(), createObjCPropertyGetter(), clang::Sema::CreateOverloadedBinOp(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::deduceVarTypeFromInitializer(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseDivisionSizeofPointerOrArray(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitAtomicCmpXchgForMSIntrin(), EmitBinaryAtomicPost(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), FindBaseInitializer(), FindImplementableMethods(), FunctionsCorrespond(), getCommonSugaredType(), clang::Sema::getCopyElisionCandidate(), clang::Sema::getDestructorName(), clang::Sema::getDestructorTypeForDecltype(), getExistingLazyBinding(), clang::Sema::getMoreSpecializedTemplate(), getParamType(), getPreferredArgumentTypeForMessageSend(), getRangeOfTypeInNestedNameSpecifier(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::Sema::handlerCanCatch(), hasCopyOrMoveCtorParam(), hasSimilarParameters(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), isAllowableExplicitConversion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), isFirstArgumentCompatibleWithType(), clang::Sema::IsFunctionConversion(), clang::Sema::IsIntegralPromotion(), clang::Sema::IsMemberPointerConversion(), clang::Sema::isMicrosoftMissingTypename(), clang::CXXMethodDecl::isMoveAssignmentOperator(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsPointerConversion(), clang::Sema::IsQualificationConversion(), IsStandardConversion(), IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsVectorConversion(), IsVectorElementConversion(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::ProcessPropertyDecl(), clang::Sema::SemaBuiltinShuffleVector(), clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), ShouldDiagnoseSwitchCaseNotInEnum(), TryConstructorInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryUserDefinedConversion(), and UnwrapSimilarTypes().

◆ hasSimilarType()

bool ASTContext::hasSimilarType ( QualType  T1,
QualType  T2 
)

Determine if two types are similar, according to the C++ rules.

That is, determine if they are the same other than qualifiers on the initial sequence of pointer / pointer-to-member / array (and in Clang, object pointer) types and their element types.

Clang offers a number of qualifiers in addition to the C++ qualifiers; those qualifiers are also ignored in the 'similarity' check.

Definition at line 6189 of file ASTContext.cpp.

References getUnqualifiedArrayType(), hasSameType(), and UnwrapSimilarTypes().

Referenced by clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::CompareReferenceRelationship(), and compareStandardConversionSubsets().

◆ hasUniqueObjectRepresentations()

bool ASTContext::hasUniqueObjectRepresentations ( QualType  Ty,
bool  CheckIfTriviallyCopyable = true 
) const

◆ InitBuiltinTypes()

void ASTContext::InitBuiltinTypes ( const TargetInfo Target,
const TargetInfo AuxTarget = nullptr 
)

Initialize built-in types.

This routine may only be invoked once for a given ASTContext object. It is normally invoked after ASTContext construction.

Parameters
TargetThe target

Definition at line 1188 of file ASTContext.cpp.

References AccumTy, clang::DeclContext::addDecl(), ARCUnbridgedCastTy, BFloat16Ty, BoolTy, BoundMemberTy, buildImplicitRecord(), BuiltinFnTy, Char16Ty, Char32Ty, Char8Ty, CharTy, DependentTy, DoubleTy, Float128Ty, Float16Ty, FloatTy, FractTy, getCanonicalType(), getPointerType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), getTranslationUnitDecl(), clang::CanQual< T >::getUnqualifiedType(), HalfTy, Ibm128Ty, IncompleteMatrixIdxTy, Int128Ty, IntTy, isAddrSpaceMapManglingEnabled(), clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongAccumTy, LongDoubleTy, LongFractTy, LongLongTy, LongTy, MSGuidTagDecl, NullPtrTy, ObjCBuiltinBoolTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OCLClkEventTy, OCLEventTy, OCLQueueTy, OCLReserveIDTy, OCLSamplerTy, OMPArraySectionTy, OMPArrayShapingTy, OMPIteratorTy, clang::opencl_generic, OverloadTy, PseudoObjectTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, SatUnsignedShortFractTy, clang::Qualifiers::setAddressSpace(), ShortAccumTy, ShortFractTy, ShortTy, SignedCharTy, UnknownAnyTy, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, UnsignedShortTy, VaListTagDecl, VoidPtrTy, VoidTy, WCharTy, WideCharTy, and WIntTy.

◆ isAlignmentRequired() [1/2]

bool ASTContext::isAlignmentRequired ( const Type T) const

Determine if the alignment the type has was required using an alignment attribute.

Definition at line 1833 of file ASTContext.cpp.

References clang::TypeInfo::AlignRequirement, getTypeInfo(), and clang::None.

Referenced by isAlignmentRequired(), and isVarDeclStrongDefinition().

◆ isAlignmentRequired() [2/2]

bool ASTContext::isAlignmentRequired ( QualType  T) const

Definition at line 1837 of file ASTContext.cpp.

References clang::QualType::getTypePtr(), and isAlignmentRequired().

◆ isDependenceAllowed()

bool clang::ASTContext::isDependenceAllowed ( ) const
inline

◆ isMSStaticDataMemberInlineDefinition()

bool ASTContext::isMSStaticDataMemberInlineDefinition ( const VarDecl VD) const

◆ isNearlyEmpty()

bool ASTContext::isNearlyEmpty ( const CXXRecordDecl RD) const

Definition at line 12053 of file ASTContext.cpp.

◆ isObjCClassType()

bool clang::ASTContext::isObjCClassType ( QualType  T) const
inline

Definition at line 2880 of file ASTContext.h.

References getObjCClassType().

◆ isObjCIdType()

bool clang::ASTContext::isObjCIdType ( QualType  T) const
inline

Definition at line 2874 of file ASTContext.h.

References getObjCIdType().

Referenced by maybeAdjustInterfaceForSubscriptingCheck().

◆ isObjCNSObjectType()

static bool clang::ASTContext::isObjCNSObjectType ( QualType  Ty)
inlinestatic

Return true if this is an NSObject object with its NSObject attribute set.

Definition at line 2295 of file ASTContext.h.

References clang::Type::isObjCNSObjectType().

Referenced by BlockRequiresCopying(), clang::Sema::BuildInstanceMessage(), and clang::Sema::CheckAssignmentOperands().

◆ isObjCSelType()

bool clang::ASTContext::isObjCSelType ( QualType  T) const
inline

Definition at line 2886 of file ASTContext.h.

References getObjCSelType().

Referenced by clang::Sema::FindCompositeObjCPointerType().

◆ isPromotableBitField()

QualType ASTContext::isPromotableBitField ( Expr E) const

Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).

Returns
the type this bit-field will promote to, or NULL if no promotion occurs.

Definition at line 7145 of file ASTContext.cpp.

References clang::CPlusPlus, getLangOpts(), clang::Expr::getSourceBitField(), clang::Expr::getType(), getTypeSize(), IntTy, clang::Type::isEnumeralType(), clang::Type::isSignedIntegerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UnsignedIntTy.

Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().

◆ isPromotableIntegerType()

bool ASTContext::isPromotableIntegerType ( QualType  T) const

◆ isSameConstraintExpr()

bool ASTContext::isSameConstraintExpr ( const Expr XCE,
const Expr YCE 
) const

Determine whether two 'requires' expressions are similar enough that they may be used in re-declarations.

Use of 'requires' isn't mandatory, works with constraints expressed in other ways too.

Definition at line 6327 of file ASTContext.cpp.

References clang::Stmt::Profile().

Referenced by isSameEntity(), isSameTemplateParameter(), isSameTemplateParameterList(), and isSameTypeConstraint().

◆ isSameDefaultTemplateArgument()

bool ASTContext::isSameDefaultTemplateArgument ( const NamedDecl X,
const NamedDecl Y 
) const

Determine whether two default template arguments are similar enough that they may be used in declarations of the same template.

Definition at line 6423 of file ASTContext.cpp.

References clang::TemplateArgument::getAsTemplate(), hasSameTemplateName(), hasSameType(), clang::Expr::IgnoreImpCasts(), isSameTemplateParameter(), clang::Stmt::Profile(), and X.

◆ isSameEntity()

bool ASTContext::isSameEntity ( const NamedDecl X,
const NamedDecl Y 
) const

◆ isSameTemplateParameter()

bool ASTContext::isSameTemplateParameter ( const NamedDecl X,
const NamedDecl Y 
) const

Determine whether two template parameters are similar enough that they may be used in declarations of the same template.

Definition at line 6381 of file ASTContext.cpp.

References clang::Decl::getKind(), isSameConstraintExpr(), isSameTemplateParameterList(), isSameTypeConstraint(), and X.

Referenced by isSameDefaultTemplateArgument(), and isSameTemplateParameterList().

◆ isSameTemplateParameterList()

bool ASTContext::isSameTemplateParameterList ( const TemplateParameterList X,
const TemplateParameterList Y 
) const

Determine whether two template parameter lists are similar enough that they may be used in declarations of the same template.

Definition at line 6411 of file ASTContext.cpp.

References clang::TemplateParameterList::getParam(), clang::TemplateParameterList::getRequiresClause(), isSameConstraintExpr(), isSameTemplateParameter(), clang::TemplateParameterList::size(), and X.

Referenced by FunctionsCorrespond(), isSameEntity(), and isSameTemplateParameter().

◆ isSameTypeConstraint()

bool ASTContext::isSameTypeConstraint ( const TypeConstraint XTC,
const TypeConstraint YTC 
) const

◆ isSentinelNullExpr()

bool ASTContext::isSentinelNullExpr ( const Expr E)

◆ local_imports()

import_range clang::ASTContext::local_imports ( ) const
inline

Definition at line 1026 of file ASTContext.h.

◆ lookupFieldBitOffset()

uint64_t ASTContext::lookupFieldBitOffset ( const ObjCInterfaceDecl OID,
const ObjCImplementationDecl ID,
const ObjCIvarDecl Ivar 
) const

◆ MakeIntValue()

llvm::APSInt clang::ASTContext::MakeIntValue ( uint64_t  Value,
QualType  Type 
) const
inline

Make an APSInt of the appropriate width and signedness for the given Value and integer Type.

Definition at line 3000 of file ASTContext.h.

References getIntWidth(), and clang::Type::isSignedIntegerOrEnumerationType().

Referenced by clang::SourceLocExpr::EvaluateInContext(), getTrivialIntegralTemplateArgument(), and clang::APValue::toIntegralConstant().

◆ mayExternalize()

bool ASTContext::mayExternalize ( const Decl D) const

Whether a C++ static variable or CUDA/HIP kernel may be externalized.

Definition at line 13670 of file ASTContext.cpp.

References basicGVALinkageForFunction(), basicGVALinkageForVariable(), clang::Decl::getAttr(), clang::GVA_Internal, and clang::Decl::hasAttr().

Referenced by shouldExternalize().

◆ mergeDefinitionIntoModule()

void ASTContext::mergeDefinitionIntoModule ( NamedDecl ND,
Module M,
bool  NotifyListeners = true 
)

Note that the definition ND has been merged into module M, and should be visible whenever M is visible.

Definition at line 1011 of file ASTContext.cpp.

References getASTMutationListener(), clang::Decl::getCanonicalDecl(), Listener, and clang::ASTMutationListener::RedefinedHiddenDefinition().

Referenced by clang::Sema::makeMergedDefinitionVisible(), and clang::ASTDeclReader::UpdateDecl().

◆ mergeExceptionSpecs()

FunctionProtoType::ExceptionSpecInfo ASTContext::mergeExceptionSpecs ( FunctionProtoType::ExceptionSpecInfo  ESI1,
FunctionProtoType::ExceptionSpecInfo  ESI2,
SmallVectorImpl< QualType > &  ExceptionTypeStorage,
bool  AcceptDependent 
)

◆ mergeExtParameterInfo()

bool ASTContext::mergeExtParameterInfo ( const FunctionProtoType FirstFnType,
const FunctionProtoType SecondFnType,
bool CanUseFirst,
bool CanUseSecond,
SmallVectorImpl< FunctionProtoType::ExtParameterInfo > &  NewParamInfos 
)

This function merges the ExtParameterInfo lists of two functions.

It returns true if the lists are compatible. The merged list is returned in NewParamInfos.

Parameters
FirstFnTypeThe type of the first function.
SecondFnTypeThe type of the second function.
CanUseFirstThis flag is set to true if the first function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo.
CanUseSecondThis flag is set to true if the second function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo.
NewParamInfosThe composite list of ExtParameterInfo. The list is empty if none of the flags are set.

Definition at line 10923 of file ASTContext.cpp.

References clang::FunctionProtoType::getExtParameterInfo(), clang::FunctionProtoType::getExtParameterInfos(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionType::ExtParameterInfo::isNoEscape(), and clang::FunctionType::ExtParameterInfo::withIsNoEscape().

Referenced by clang::Sema::IsBlockPointerConversion(), clang::Sema::IsFunctionConversion(), and mergeFunctionTypes().

◆ mergeFunctionParameterTypes()

QualType ASTContext::mergeFunctionParameterTypes ( QualType  lhs,
QualType  rhs,
bool  OfBlockPointer = false,
bool  Unqualified = false 
)

mergeFunctionParameterTypes - merge two types which appear as function parameter types

Definition at line 10326 of file ASTContext.cpp.

References clang::QualType::isNull(), mergeTransparentUnionType(), mergeTypes(), and clang::Unqualified.

Referenced by mergeFunctionTypes().

◆ mergeFunctionTypes()

QualType ASTContext::mergeFunctionTypes ( QualType  lhs,
QualType  rhs,
bool  OfBlockPointer = false,
bool  Unqualified = false,
bool  AllowCXX = false,
bool  IsConditionalOperator = false 
)

◆ mergeObjCGCQualifiers()

QualType ASTContext::mergeObjCGCQualifiers ( QualType  LHS,
QualType  RHS 
)

◆ mergeTransparentUnionType()

QualType ASTContext::mergeTransparentUnionType ( QualType  T,
QualType  SubType,
bool  OfBlockPointer = false,
bool  Unqualified = false 
)

mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType()

Definition at line 10306 of file ASTContext.cpp.

References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::Decl::hasAttr(), clang::QualType::isNull(), mergeTypes(), and clang::Unqualified.

Referenced by mergeFunctionParameterTypes().

◆ mergeTypes()

QualType ASTContext::mergeTypes ( QualType  LHS,
QualType  RHS,
bool  OfBlockPointer = false,
bool  Unqualified = false,
bool  BlockReturnType = false,
bool  IsConditionalOperator = false 
)

Definition at line 10564 of file ASTContext.cpp.

References areCompatMatrixTypes(), areCompatVectorTypes(), canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Type::castAs(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), clang::ReferenceType::getPointeeType(), getPointerType(), clang::QualType::getQualifiers(), clang::ConstantArrayType::getSize(), clang::ConstantArrayType::getSizeExpr(), clang::VariableArrayType::getSizeExpr(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasUnaligned(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isBlockPointerType(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), isUnsigned(), mergeEnumWithInteger(), mergeFunctionTypes(), mergeTypes(), clang::OpenCL, clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::Strong, clang::Unqualified, and clang::Qualifiers::Weak.

Referenced by checkConditionalPointerCompatibility(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeFunctionDecl(), mergeFunctionParameterTypes(), mergeFunctionTypes(), mergeTransparentUnionType(), mergeTypes(), clang::Sema::MergeVarDeclTypes(), typesAreBlockPointerCompatible(), and typesAreCompatible().

◆ ObjCMethodsAreEqual()

bool ASTContext::ObjCMethodsAreEqual ( const ObjCMethodDecl MethodDecl,
const ObjCMethodDecl MethodImp 
)

◆ ObjCObjectAdoptsQTypeProtocols()

bool ASTContext::ObjCObjectAdoptsQTypeProtocols ( QualType  QT,
ObjCInterfaceDecl Decl 
)

ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list.

Definition at line 5496 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().

Referenced by CheckObjCBridgeNSCast().

◆ ObjCQualifiedClassTypesAreCompatible()

bool ASTContext::ObjCQualifiedClassTypesAreCompatible ( const ObjCObjectPointerType LHS,
const ObjCObjectPointerType RHS 
)

ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.

Definition at line 9700 of file ASTContext.cpp.

References clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().

Referenced by canAssignObjCInterfaces().

◆ ObjCQualifiedIdTypesAreCompatible()

bool ASTContext::ObjCQualifiedIdTypesAreCompatible ( const ObjCObjectPointerType LHS,
const ObjCObjectPointerType RHS,
bool  ForCompare 
)

◆ operator=()

ASTContext & clang::ASTContext::operator= ( const ASTContext )
delete

◆ overridden_methods()

ASTContext::overridden_method_range ASTContext::overridden_methods ( const CXXMethodDecl Method) const

◆ overridden_methods_begin()

ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin ( const CXXMethodDecl Method) const

◆ overridden_methods_end()

ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end ( const CXXMethodDecl Method) const

◆ overridden_methods_size()

unsigned ASTContext::overridden_methods_size ( const CXXMethodDecl Method) const

Definition at line 1546 of file ASTContext.cpp.

References overridden_methods().

Referenced by clang::CXXMethodDecl::size_overridden_methods().

◆ PrintStats()

void ASTContext::PrintStats ( ) const

◆ propertyTypesAreCompatible()

bool ASTContext::propertyTypesAreCompatible ( QualType  LHS,
QualType  RHS 
)

◆ ProtocolCompatibleWithProtocol()

bool ASTContext::ProtocolCompatibleWithProtocol ( ObjCProtocolDecl lProto,
ObjCProtocolDecl rProto 
) const

ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.

Definition at line 9688 of file ASTContext.cpp.

References clang::declaresSameEntity(), ProtocolCompatibleWithProtocol(), and clang::ObjCProtocolDecl::protocols().

Referenced by ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), ProtocolCompatibleWithProtocol(), and QIdProtocolsAdoptObjCObjectProtocols().

◆ QIdProtocolsAdoptObjCObjectProtocols()

bool ASTContext::QIdProtocolsAdoptObjCObjectProtocols ( QualType  QT,
ObjCInterfaceDecl IDecl 
)

QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.

Definition at line 5515 of file ASTContext.cpp.

References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), and ProtocolCompatibleWithProtocol().

Referenced by CheckObjCBridgeCFCast().

◆ removeAddrSpaceQualType()

QualType ASTContext::removeAddrSpaceQualType ( QualType  T) const

◆ removePtrSizeAddrSpace()

QualType ASTContext::removePtrSizeAddrSpace ( QualType  T) const

Remove the existing address space on the type if it is a pointer size address space and return the type with qualifiers intact.

Definition at line 3115 of file ASTContext.cpp.

References clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), getPointerType(), clang::isPtrSizeAddressSpace(), and removeAddrSpaceQualType().

Referenced by clang::Sema::FunctionParamTypesAreEqual(), and getFunctionTypeWithoutPtrSizes().

◆ ResetObjCLayout()

void ASTContext::ResetObjCLayout ( const ObjCContainerDecl CD)

Definition at line 10970 of file ASTContext.cpp.

Referenced by clang::Sema::ActOnFields().

◆ setASTMutationListener()

void clang::ASTContext::setASTMutationListener ( ASTMutationListener Listener)
inline

Attach an AST mutation listener to the AST context.

The AST mutation listener provides the ability to track modifications to the abstract syntax tree entities committed after they were initially created.

Definition at line 1191 of file ASTContext.h.

References Listener.

Referenced by clang::FrontendAction::BeginSourceFile(), and clang::CompilerInstance::createASTReader().

◆ setBlockVarCopyInit()

void ASTContext::setBlockVarCopyInit ( const VarDecl VD,
Expr CopyExpr,
bool  CanThrow 
)

Set the copy initialization expression of a block var decl.

CanThrow indicates whether the copy expression can throw or not.

Definition at line 2947 of file ASTContext.cpp.

References CanThrow(), and clang::Decl::hasAttr().

Referenced by checkEscapingByref(), and clang::ASTDeclReader::VisitVarDeclImpl().

◆ setBOOLDecl()

void clang::ASTContext::setBOOLDecl ( TypedefDecl TD)
inline

Save declaration of 'BOOL' typedef.

Definition at line 2084 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral().

◆ setCFConstantStringType()

void ASTContext::setCFConstantStringType ( QualType  T)

◆ setcudaConfigureCallDecl()

void clang::ASTContext::setcudaConfigureCallDecl ( FunctionDecl FD)
inline

◆ setCurrentNamedModule()

void ASTContext::setCurrentNamedModule ( Module M)

Set the (C++20) module we are building.

Definition at line 1103 of file ASTContext.cpp.

References clang::Module::isNamedModule().

Referenced by clang::Sema::ActOnModuleDecl().

◆ setExternalSource()

void ASTContext::setExternalSource ( IntrusiveRefCntPtr< ExternalASTSource Source)

Attach an external AST source to the AST context.

The external AST source provides the ability to load parts of the abstract syntax tree as needed from some external storage, e.g., a precompiled header.

Definition at line 946 of file ASTContext.cpp.

Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::createASTReader(), clang::CompilerInstance::createPCHExternalASTSource(), and clang::IncrementalSyntaxOnlyAction::ExecuteAction().

◆ setFILEDecl()

void clang::ASTContext::setFILEDecl ( TypeDecl FILEDecl)
inline

Set the type for the C FILE type.

Definition at line 1938 of file ASTContext.h.

Referenced by clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

◆ setInstantiatedFromStaticDataMember()

void ASTContext::setInstantiatedFromStaticDataMember ( VarDecl Inst,
VarDecl Tmpl,
TemplateSpecializationKind  TSK,
SourceLocation  PointOfInstantiation = SourceLocation() 
)

Note that the static data member Inst is an instantiation of the static data member template Tmpl of a class template.

Definition at line 1462 of file ASTContext.cpp.

References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().

Referenced by clang::VarDecl::setInstantiationOfStaticDataMember(), and clang::ASTDeclReader::VisitVarDeclImpl().

◆ setInstantiatedFromUnnamedFieldDecl()

void ASTContext::setInstantiatedFromUnnamedFieldDecl ( FieldDecl Inst,
FieldDecl Tmpl 
)

Definition at line 1525 of file ASTContext.cpp.

References clang::NamedDecl::getDeclName().

Referenced by clang::ASTDeclReader::VisitFieldDecl().

◆ setInstantiatedFromUsingDecl()

void ASTContext::setInstantiatedFromUsingDecl ( NamedDecl Inst,
NamedDecl Pattern 
)

Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template.

Definition at line 1485 of file ASTContext.cpp.

Referenced by clang::ASTNodeImporter::VisitUsingDecl(), and clang::ASTDeclReader::VisitUsingDecl().

◆ setInstantiatedFromUsingEnumDecl()

void ASTContext::setInstantiatedFromUsingEnumDecl ( UsingEnumDecl Inst,
UsingEnumDecl Pattern 
)

Remember that the using enum decl Inst is an instantiation of the using enum decl Pattern of a class template.

Definition at line 1503 of file ASTContext.cpp.

Referenced by clang::ASTNodeImporter::VisitUsingEnumDecl(), and clang::ASTDeclReader::VisitUsingEnumDecl().

◆ setInstantiatedFromUsingShadowDecl()

void ASTContext::setInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst,
UsingShadowDecl Pattern 
)

◆ setjmp_bufDecl()

void clang::ASTContext::setjmp_bufDecl ( TypeDecl jmp_bufDecl)
inline

Set the type for the C jmp_buf type.

Definition at line 1948 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

◆ setManglingNumber()

void ASTContext::setManglingNumber ( const NamedDecl ND,
unsigned  Number 
)

◆ setNonKeyFunction()

void ASTContext::setNonKeyFunction ( const CXXMethodDecl method)

Observe that the given method cannot be a key function.

Checks the key-function cache for the method's class and clears it if matches the given declaration.

This is used in ABIs where out-of-line definitions marked inline are not considered to be key functions.

Parameters
methodshould be the declaration from the class definition

Definition at line 3449 of file RecordLayoutBuilder.cpp.

References clang::LazyOffsetPtr< T, OffsT, Get >::get(), getExternalSource(), clang::Redeclarable< decl_type >::getFirstDecl(), and clang::CXXMethodDecl::getParent().

Referenced by clang::Sema::ActOnFinishFunctionBody().

◆ setObjCClassRedefinitionType()

void clang::ASTContext::setObjCClassRedefinitionType ( QualType  RedefType)
inline

Set the user-written type that redefines 'SEL'.

Definition at line 1869 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

◆ setObjCConstantStringInterface()

void ASTContext::setObjCConstantStringInterface ( ObjCInterfaceDecl Decl)

◆ setObjCIdRedefinitionType()

void clang::ASTContext::setObjCIdRedefinitionType ( QualType  RedefType)
inline

Set the user-written type that redefines id.

Definition at line 1856 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

◆ setObjCImplementation() [1/2]

void ASTContext::setObjCImplementation ( ObjCCategoryDecl CatD,
ObjCCategoryImplDecl ImplD 
)

Set the implementation of ObjCCategoryDecl.

Definition at line 2905 of file ASTContext.cpp.

◆ setObjCImplementation() [2/2]

void ASTContext::setObjCImplementation ( ObjCInterfaceDecl IFaceD,
ObjCImplementationDecl ImplD 
)

◆ setObjCMethodRedeclaration()

void ASTContext::setObjCMethodRedeclaration ( const ObjCMethodDecl MD,
const ObjCMethodDecl Redecl 
)

◆ setObjCNSStringType()

void clang::ASTContext::setObjCNSStringType ( QualType  T)
inline

Definition at line 1843 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

◆ setObjCSelRedefinitionType()

void clang::ASTContext::setObjCSelRedefinitionType ( QualType  RedefType)
inline

Set the user-written type that redefines 'SEL'.

Definition at line 1882 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

◆ setObjCSuperType()

void clang::ASTContext::setObjCSuperType ( QualType  ST)
inline

Definition at line 1820 of file ASTContext.h.

Referenced by LookupPredefedObjCSuperType().

◆ setParameterIndex()

void ASTContext::setParameterIndex ( const ParmVarDecl D,
unsigned  index 
)

Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield.

Definition at line 12267 of file ASTContext.cpp.

◆ setPrimaryMergedDecl()

void clang::ASTContext::setPrimaryMergedDecl ( Decl D,
Decl Primary 
)
inline

◆ setPrintingPolicy()

void clang::ASTContext::setPrintingPolicy ( const clang::PrintingPolicy Policy)
inline

◆ setsigjmp_bufDecl()

void clang::ASTContext::setsigjmp_bufDecl ( TypeDecl sigjmp_bufDecl)
inline

Set the type for the C sigjmp_buf type.

Definition at line 1960 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

◆ setStaticLocalNumber()

void ASTContext::setStaticLocalNumber ( const VarDecl VD,
unsigned  Number 
)

◆ setTemplateOrSpecializationInfo()

void ASTContext::setTemplateOrSpecializationInfo ( VarDecl Inst,
TemplateOrSpecializationInfo  TSI 
)

◆ setTraversalScope()

void ASTContext::setTraversalScope ( const std::vector< Decl * > &  TopLevelDecls)

Definition at line 936 of file ASTContext.cpp.

References clang::ParentMapContext::clear(), and getParentMapContext().

◆ setucontext_tDecl()

void clang::ASTContext::setucontext_tDecl ( TypeDecl ucontext_tDecl)
inline

Set the type for the C ucontext_t type.

Definition at line 1972 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

◆ shouldExternalize()

bool ASTContext::shouldExternalize ( const Decl D) const

Whether a C++ static variable or CUDA/HIP kernel should be externalized.

Definition at line 13688 of file ASTContext.cpp.

References CUDADeviceVarODRUsedByHost, clang::Decl::hasAttr(), and mayExternalize().

Referenced by adjustGVALinkageForAttributes(), and getMangledNameImpl().

◆ toBits()

int64_t ASTContext::toBits ( CharUnits  CharSize) const

◆ toCharUnitsFromBits()

CharUnits ASTContext::toCharUnitsFromBits ( int64_t  BitSize) const

◆ typesAreBlockPointerCompatible()

bool ASTContext::typesAreBlockPointerCompatible ( QualType  LHS,
QualType  RHS 
)

◆ typesAreCompatible()

bool ASTContext::typesAreCompatible ( QualType  LHS,
QualType  RHS,
bool  CompareUnqualified = false 
)

◆ UnwrapSimilarArrayTypes()

void ASTContext::UnwrapSimilarArrayTypes ( QualType T1,
QualType T2,
bool  AllowPiMismatch = true 
)

Attempt to unwrap two types that may both be array types with the same bound (or both be array types of unknown bound) for the purpose of comparing the cv-decomposition of two types per C++ [conv.qual].

Parameters
AllowPiMismatchAllow the Pi1 and Pi2 to differ as described in C++20 [conv.qual], if permitted by the current language mode.

Definition at line 6101 of file ASTContext.cpp.

References clang::CPlusPlus20, getAsArrayType(), and getLangOpts().

Referenced by unwrapCastAwayConstnessLevel(), and UnwrapSimilarTypes().

◆ UnwrapSimilarTypes()

bool ASTContext::UnwrapSimilarTypes ( QualType T1,
QualType T2,
bool  AllowPiMismatch = true 
)

Attempt to unwrap two types that may be similar (C++ [conv.qual]).

If T1 and T2 are both pointer types of the same kind, or both array types with the same bound, unwraps layers from T1 and T2 until a pointer type is unwrapped. Top-level qualifiers on T1 and T2 are ignored.

This function will typically be called in a loop that successively "unwraps" pointer and pointer-to-member types to compare them at each level.

Parameters
AllowPiMismatchAllow the Pi1 and Pi2 to differ as described in C++20 [conv.qual], if permitted by the current language mode.
Returns
true if a pointer type was unwrapped, false if we reached a pair of types that can't be unwrapped further.

Definition at line 6152 of file ASTContext.cpp.

References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), hasSameUnqualifiedType(), and UnwrapSimilarArrayTypes().

Referenced by clang::Sema::CompareReferenceRelationship(), hasCvrSimilarType(), hasSimilarType(), clang::Sema::IsQualificationConversion(), shouldBeModeledWithNoOp(), and unwrapCastAwayConstnessLevel().

Friends And Related Function Documentation

◆ ASTDeclReader

friend class ASTDeclReader
friend

Definition at line 474 of file ASTContext.h.

◆ ASTReader

friend class ASTReader
friend

Definition at line 475 of file ASTContext.h.

◆ ASTWriter

friend class ASTWriter
friend

Definition at line 476 of file ASTContext.h.

◆ CXXRecordDecl

friend class CXXRecordDecl
friend

Definition at line 478 of file ASTContext.h.

◆ DeclarationNameTable

friend class DeclarationNameTable
friend

Definition at line 3322 of file ASTContext.h.

◆ DeclContext

friend class DeclContext
friend

Definition at line 3323 of file ASTContext.h.

◆ IncrementalParser

friend class IncrementalParser
friend

Definition at line 479 of file ASTContext.h.

◆ NestedNameSpecifier

friend class NestedNameSpecifier
friend

Definition at line 183 of file ASTContext.h.

◆ serialization::AbstractTypeReader

template<class >
friend class serialization::AbstractTypeReader
friend

Definition at line 477 of file ASTContext.h.

Member Data Documentation

◆ AccumTy

CanQualType clang::ASTContext::AccumTy

◆ ARCUnbridgedCastTy

CanQualType clang::ASTContext::ARCUnbridgedCastTy

◆ AutoDeductTy

QualType clang::ASTContext::AutoDeductTy
mutable

◆ AutoRRefDeductTy

QualType clang::ASTContext::AutoRRefDeductTy
mutable

Definition at line 1143 of file ASTContext.h.

Referenced by getAutoRRefDeductType().

◆ BFloat16Ty

CanQualType clang::ASTContext::BFloat16Ty

◆ BoolTy

CanQualType clang::ASTContext::BoolTy

Definition at line 1087 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXBoolLiteral(), clang::Sema::ActOnNoexceptSpec(), clang::Sema::ActOnObjCAvailabilityCheckExpr(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::AddBuiltinCandidate(), clang::TemplateDeclInstantiator::adjustForRewrite(), areCompatibleRVVTypes(), clang::ento::SimpleConstraintManager::assumeInternal(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildExpressionTrait(), clang::Sema::BuildResolvedCallExpr(), buildSingleCopyAssignRecursively(), clang::Sema::CheckAssignmentConstraints(), CheckBoolLikeConversion(), clang::Sema::CheckConstraintExpression(), clang::Sema::checkExceptionSpecification(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckHLSLBuiltinFunctionCall(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckPointerConversion(), ConvertDeclSpecToType(), clang::Sema::CreateBuiltinUnaryOp(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitStructGetterCall(), emitStructSetterCall(), clang::PreferredTypeBuilder::enterCondition(), clang::ento::SMTConv::fixAPSInt(), clang::ento::SMTConv::getBinExpr(), getBuiltinVectorTypeInfo(), clang::ento::SValBuilder::getConditionType(), getLogicalOperationType(), getPreferredTypeOfBinaryRHS(), getPreferredTypeOfUnaryArg(), getRVVTypeSize(), clang::Sema::GetSignedVectorType(), clang::ASTReader::GetType(), HandleRISCVRVVVectorBitsTypeAttr(), InitBuiltinTypes(), IsStandardConversion(), mapCodeCompletionContext(), clang::Sema::PerformContextuallyConvertToBool(), clang::Sema::PerformImplicitConversion(), clang::Sema::PreferredConditionType(), RVVType2Qual(), SemaBuiltinAlignment(), TryContextuallyConvertToBool(), clang::Sema::tryResolveExplicitSpecifier(), and clang::dataflow::UncheckedOptionalAccessModel::UncheckedOptionalAccessModel().

◆ BoundMemberTy

CanQualType clang::ASTContext::BoundMemberTy

◆ BuiltinFnTy

CanQualType clang::ASTContext::BuiltinFnTy

◆ BuiltinInfo

Builtin::Context& clang::ASTContext::BuiltinInfo

◆ Char16Ty

CanQualType clang::ASTContext::Char16Ty

◆ Char32Ty

CanQualType clang::ASTContext::Char32Ty

◆ Char8Ty

CanQualType clang::ASTContext::Char8Ty

◆ CharTy

CanQualType clang::ASTContext::CharTy

◆ CommentlessRedeclChains

llvm::DenseMap<const Decl *, const Decl *> clang::ASTContext::CommentlessRedeclChains
mutable

Keeps track of redeclaration chains that don't have any comment attached.

Mapping from canonical declaration to redeclaration chain that has no comments attached to any redeclaration. Specifically it's mapping to the last redeclaration we've checked.

Shall not contain declarations that have comments attached to any redeclaration in their chain.

Definition at line 825 of file ASTContext.h.

Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().

◆ Comments

RawCommentList clang::ASTContext::Comments

◆ CommentsLoaded

bool clang::ASTContext::CommentsLoaded = false
mutable

True if comments are already loaded from ExternalASTSource.

Definition at line 803 of file ASTContext.h.

Referenced by getRawCommentForDeclNoCache().

◆ CompCategories

ComparisonCategories clang::ASTContext::CompCategories

Types and expressions required to build C++2a three-way comparisons using operator<=>, including the values return by builtin <=> operators.

Definition at line 2246 of file ASTContext.h.

Referenced by clang::Sema::BuildSynthesizedThreeWayComparison(), and clang::Sema::CheckComparisonCategoryType().

◆ CUDAConstantEvalCtx

struct clang::ASTContext::CUDAConstantEvalContext clang::ASTContext::CUDAConstantEvalCtx

◆ CUDADeviceVarODRUsedByHost

llvm::DenseSet<const VarDecl *> clang::ASTContext::CUDADeviceVarODRUsedByHost

Keep track of CUDA/HIP device-side variables ODR-used by host code.

This does not include extern shared variables used by device host functions as addresses of shared variables are per warp, therefore cannot be accessed by host code.

Definition at line 1156 of file ASTContext.h.

Referenced by MarkVarDeclODRUsed(), and shouldExternalize().

◆ CUDAExternalDeviceDeclODRUsedByHost

llvm::DenseSet<const ValueDecl *> clang::ASTContext::CUDAExternalDeviceDeclODRUsedByHost

Keep track of CUDA/HIP external kernels or device variables ODR-used by host code.

Definition at line 1160 of file ASTContext.h.

Referenced by clang::Sema::CheckCUDACall(), MarkVarDeclODRUsed(), and clang::CodeGen::CodeGenModule::Release().

◆ CUDAImplicitHostDeviceFunUsedByDevice

llvm::DenseSet<const FunctionDecl *> clang::ASTContext::CUDAImplicitHostDeviceFunUsedByDevice

Keep track of CUDA/HIP implicit host device functions used on device side in device compilation.

Definition at line 1164 of file ASTContext.h.

Referenced by clang::Sema::CUDARecordImplicitHostDeviceFuncUsedByDevice(), and clang::Sema::MarkFunctionReferenced().

◆ DeclarationNames

DeclarationNameTable clang::ASTContext::DeclarationNames
mutable

Definition at line 643 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXFoldExpr(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::AddOverriddenMethods(), clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToObjectOfClassType(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildOperatorCoawaitLookupExpr(), clang::Sema::BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFunctionDeclaration(), checkMappableExpressionList(), clang::Sema::CreateLambdaCallOperator(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindDeallocationFunctionForDestructor(), findDeleteForPromise(), findImplicitlyDeclaredEqualityComparisons(), getConstructors(), clang::CXXRecordDecl::getDestructor(), getLambdaCallOperatorHelper(), getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), hasMember(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), clang::Sema::LookupConstructors(), clang::Sema::LookupOverloadedBinOp(), clang::Sema::LookupOverloadedOperatorName(), clang::Sema::LookupSpecialMember(), clang::Parser::parseMapperModifier(), parseOpenMPReductionId(), processImplicitMapsWithDefaultMappers(), clang::Sema::ProduceCallSignatureHelp(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), shouldAddReversedEqEq(), clang::Sema::ShouldDeleteSpecialMember(), threadSafetyCheckIsSmartPointer(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

◆ DeclRawComments

llvm::DenseMap<const Decl *, const RawComment *> clang::ASTContext::DeclRawComments
mutable

Mapping from declaration to directly attached comment.

Raw comments are owned by Comments list. This mapping is populated lazily.

Definition at line 809 of file ASTContext.h.

Referenced by attachCommentsToJustParsedDecls(), cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().

◆ DependentTy

CanQualType clang::ASTContext::DependentTy

Definition at line 1114 of file ASTContext.h.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOMPArrayShapingExpr(), actOnOMPReductionKindClause(), clang::Sema::ActOnPseudoDestructorExpr(), AddResultTypeChunk(), clang::Sema::BuildBinOp(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallExpr(), clang::Sema::buildCoroutinePromise(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXFoldExpr(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildOverloadedCallExpr(), clang::Sema::buildOverloadedCallSet(), clang::Sema::BuildPredefinedExpr(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildUnresolvedCoawaitExpr(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckEnumConstant(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), clang::Sema::CheckPackExpansion(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), CheckRealImagOperand(), ConvertDeclSpecToType(), clang::PackIndexingExpr::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CreateRecoveryExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDecltypeForExpr(), getDecltypeType(), getDependentArraySubscriptType(), getDummyLambdaType(), GetFullTypeForDeclarator(), getInjectedTemplateArg(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::MergeVarDeclTypes(), clang::OverloadExpr::OverloadExpr(), clang::Sema::SubstAutoType(), and clang::Sema::SubstAutoTypeSourceInfo().

◆ DoubleTy

CanQualType clang::ASTContext::DoubleTy

◆ ExternalSource

IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource

Definition at line 644 of file ASTContext.h.

◆ Float128Ty

CanQualType clang::ASTContext::Float128Ty

◆ Float16Ty

CanQualType clang::ASTContext::Float16Ty

◆ FloatTy

CanQualType clang::ASTContext::FloatTy

◆ FractTy

CanQualType clang::ASTContext::FractTy

◆ HalfTy

CanQualType clang::ASTContext::HalfTy

◆ Ibm128Ty

CanQualType clang::ASTContext::Ibm128Ty

◆ Idents

IdentifierTable& clang::ASTContext::Idents

Definition at line 639 of file ASTContext.h.

Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnCompoundRequirement(), clang::Sema::ActOnInstanceMessage(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::ActOnOpenMPUsesAllocatorClause(), clang::Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnStringLiteral(), addFunctionPointerConversion(), clang::Sema::addImplicitTypedef(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), clang::Sema::BuildBuiltinCallExpr(), buildCapture(), buildImplicitRecord(), buildImplicitTypedef(), clang::Sema::BuildIvarRefExpr(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), buildSingleCopyAssignRecursively(), clang::CodeGen::CGCXXABI::buildThisParam(), CheckKeyForObjCARCConversion(), checkMappableExpressionList(), clang::Sema::CheckObjCForCollectionOperand(), clang::Sema::checkOpenMPDeclareVariantFunction(), CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinBinOp(), CreateHexagonBuiltinVaListDecl(), clang::ObjCMethodDecl::createImplicitParams(), CreatePowerABIBuiltinVaListDecl(), clang::Sema::CreatePropertyDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), CXXRecordMembersNamed(), clang::Sema::DefaultLvalueConversion(), DiagnoseDirectIsaAccess(), emitOutlinedFunctionPrologue(), emitReplacement(), clang::ExternalSource::FindExternalVisibleDeclsByName(), findOMPAllocatorHandleT(), clang::Interpreter::FindRuntimeInterface(), GCRewriteFinalize(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getBoolName(), getCFConstantStringDecl(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), getErrnoFunc(), clang::getKeywordSelector(), getLambdaStaticInvokers(), getMakeIntegerSeqName(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), getNSCopyingName(), clang::NSAPI::getNSDictionarySelector(), getNSNumberFactoryMethod(), clang::NSAPI::getNSNumberLiteralSelector(), getNSObjectName(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), getObjCProtocolDecl(), getOpenCLEnumType(), getOpenCLTypedefType(), clang::Sema::getSuperIdentifier(), getTypePackElementName(), clang::GetUnarySelector(), handleAliasAttr(), handleAvailabilityAttr(), handleFormatAttr(), handleIBOutletCollection(), hasMember(), hasTypedefNamed(), clang::ASTImporter::Import(), clang::Sema::Initialize(), clang::HLSLExternalSemaSource::InitializeSema(), clang::Sema::InventAbbreviatedTemplateParameterTypeName(), isCFStringType(), clang::Sema::isKnownName(), isMacroDefined(), clang::NSAPI::isMacroDefined(), isNSStringType(), IsValidIdentifier(), isValidInteropVariable(), lookupCXXRecordDecl(), clang::Sema::LookupInlineAsmField(), clang::Sema::LookupInlineAsmVarDeclField(), clang::LookupNamed(), clang::LookupNamespace(), LookupPredefedObjCSuperType(), lookupStdNamespace(), mergeDeclAttribute(), ProcessAPINotes(), processImplicitMapsWithDefaultMappers(), PropertyMemoryAttribute(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), shouldRunOnFunctionOrMethod(), and transferARCOwnershipToDeclaratorChunk().

◆ IncompleteMatrixIdxTy

CanQualType clang::ASTContext::IncompleteMatrixIdxTy

◆ Int128Ty

CanQualType clang::ASTContext::Int128Ty

◆ IntTy

CanQualType clang::ASTContext::IntTy
Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 1095 of file ASTContext.h.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOMPIteratorExpr(), clang::Sema::ActOnTag(), clang::Sema::AddModeAttr(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBoundDual(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildBinOp(), ChangeIntegralSignedness(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMain(), clang::Sema::CheckPlaceholderExpr(), checkPointerAuthKey(), ConvertDeclSpecToType(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), DecodePPCMMATypeFromStr(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), clang::PreferredTypeBuilder::enterSubscript(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringDecl(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), getCorrespondingSignedType(), GetDeclSpecTypeForDeclarator(), getErrnoFunc(), GetFullTypeForDeclarator(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getLogicalOperationType(), getNeonEltType(), getNextLargerIntegralType(), getObjCEncodingTypeSize(), getPreferredTypeOfBinaryRHS(), getPreferredTypeOfUnaryArg(), getPromotedIntegerType(), clang::Sema::GetSignedVectorType(), clang::ASTReader::GetType(), clang::Sema::getTypeName(), clang::Sema::HandleField(), handleMIGServerRoutineAttr(), clang::Sema::HandleMSProperty(), clang::Sema::ImplicitlyDefineFunction(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::InitializationSequence::InitializeFrom(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::IsIntegralPromotion(), isOverflowingIntegerType(), isPromotableBitField(), makeLaunchBoundsArgExpr(), mayBeSuccess(), clang::Sema::PreferredConditionType(), clang::Sema::prepareVectorSplat(), clang::TreeTransform< Derived >::RebuildBitIntType(), clang::TreeTransform< Derived >::RebuildExtVectorType(), rewriteToNumericBoxedExpression(), and shouldNotPrintDirectly().

◆ Listener

ASTMutationListener* clang::ASTContext::Listener = nullptr

◆ LongAccumTy

CanQualType clang::ASTContext::LongAccumTy

◆ LongDoubleTy

CanQualType clang::ASTContext::LongDoubleTy

◆ LongFractTy

CanQualType clang::ASTContext::LongFractTy

◆ LongLongTy

CanQualType clang::ASTContext::LongLongTy

◆ LongTy

CanQualType clang::ASTContext::LongTy

◆ MSGuidTagDecl

TagDecl* clang::ASTContext::MSGuidTagDecl = nullptr
mutable

Definition at line 1150 of file ASTContext.h.

Referenced by getMSGuidDecl(), getMSGuidTagDecl(), getMSGuidType(), and InitBuiltinTypes().

◆ NullPtrTy

CanQualType clang::ASTContext::NullPtrTy

◆ NumImplicitCopyAssignmentOperators

unsigned clang::ASTContext::NumImplicitCopyAssignmentOperators = 0

The number of implicitly-declared copy assignment operators.

Definition at line 3205 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitCopyAssignmentOperatorsDeclared

unsigned clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared = 0

The number of implicitly-declared copy assignment operators for which declarations were built.

Definition at line 3209 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitCopyAssignment(), and PrintStats().

◆ NumImplicitCopyConstructors

unsigned clang::ASTContext::NumImplicitCopyConstructors = 0

The number of implicitly-declared copy constructors.

Definition at line 3191 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitCopyConstructorsDeclared

unsigned clang::ASTContext::NumImplicitCopyConstructorsDeclared = 0

The number of implicitly-declared copy constructors for which declarations were built.

Definition at line 3195 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitCopyConstructor(), and PrintStats().

◆ NumImplicitDefaultConstructors

unsigned clang::ASTContext::NumImplicitDefaultConstructors = 0

The number of implicitly-declared default constructors.

Definition at line 3184 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitDefaultConstructorsDeclared

unsigned clang::ASTContext::NumImplicitDefaultConstructorsDeclared = 0

The number of implicitly-declared default constructors for which declarations were built.

Definition at line 3188 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitDefaultConstructor(), and PrintStats().

◆ NumImplicitDestructors

unsigned clang::ASTContext::NumImplicitDestructors = 0

The number of implicitly-declared destructors.

Definition at line 3219 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitDestructorsDeclared

unsigned clang::ASTContext::NumImplicitDestructorsDeclared = 0

The number of implicitly-declared destructors for which declarations were built.

Definition at line 3223 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitDestructor(), and PrintStats().

◆ NumImplicitMoveAssignmentOperators

unsigned clang::ASTContext::NumImplicitMoveAssignmentOperators = 0

The number of implicitly-declared move assignment operators.

Definition at line 3212 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitMoveAssignmentOperatorsDeclared

unsigned clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared = 0

The number of implicitly-declared move assignment operators for which declarations were built.

Definition at line 3216 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitMoveAssignment(), and PrintStats().

◆ NumImplicitMoveConstructors

unsigned clang::ASTContext::NumImplicitMoveConstructors = 0

The number of implicitly-declared move constructors.

Definition at line 3198 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

◆ NumImplicitMoveConstructorsDeclared

unsigned clang::ASTContext::NumImplicitMoveConstructorsDeclared = 0

The number of implicitly-declared move constructors for which declarations were built.

Definition at line 3202 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitMoveConstructor(), and PrintStats().

◆ ObjCBuiltinBoolTy

CanQualType clang::ASTContext::ObjCBuiltinBoolTy

Definition at line 1118 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral(), and InitBuiltinTypes().

◆ ObjCBuiltinClassTy

CanQualType clang::ASTContext::ObjCBuiltinClassTy

◆ ObjCBuiltinIdTy

CanQualType clang::ASTContext::ObjCBuiltinIdTy

◆ ObjCBuiltinSelTy

CanQualType clang::ASTContext::ObjCBuiltinSelTy

Definition at line 1117 of file ASTContext.h.

Referenced by getObjCSelDecl(), clang::ASTReader::GetType(), and InitBuiltinTypes().

◆ OCLClkEventTy

CanQualType clang::ASTContext::OCLClkEventTy

◆ OCLEventTy

CanQualType clang::ASTContext::OCLEventTy

◆ OCLQueueTy

CanQualType clang::ASTContext::OCLQueueTy

◆ OCLReserveIDTy

CanQualType clang::ASTContext::OCLReserveIDTy

◆ OCLSamplerTy

CanQualType clang::ASTContext::OCLSamplerTy

◆ OMPArraySectionTy

CanQualType clang::ASTContext::OMPArraySectionTy

◆ OMPArrayShapingTy

CanQualType clang::ASTContext::OMPArrayShapingTy

Definition at line 1125 of file ASTContext.h.

Referenced by clang::Sema::ActOnOMPArrayShapingExpr(), and InitBuiltinTypes().

◆ OMPIteratorTy

CanQualType clang::ASTContext::OMPIteratorTy

◆ OverloadTy

CanQualType clang::ASTContext::OverloadTy

◆ ParsedComments

llvm::DenseMap<const Decl *, comments::FullComment *> clang::ASTContext::ParsedComments
mutable

Mapping from declarations to parsed comments attached to any redeclaration.

Definition at line 829 of file ASTContext.h.

Referenced by attachCommentsToJustParsedDecls(), and getCommentForDecl().

◆ PseudoObjectTy

CanQualType clang::ASTContext::PseudoObjectTy

◆ RedeclChainComments

llvm::DenseMap<const Decl *, const Decl *> clang::ASTContext::RedeclChainComments
mutable

Mapping from canonical declaration to the first redeclaration in chain that has a comment attached.

Raw comments are owned by Comments list. This mapping is populated lazily.

Definition at line 816 of file ASTContext.h.

Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().

◆ SatAccumTy

CanQualType clang::ASTContext::SatAccumTy

◆ SatFractTy

CanQualType clang::ASTContext::SatFractTy

◆ SatLongAccumTy

CanQualType clang::ASTContext::SatLongAccumTy

◆ SatLongFractTy

CanQualType clang::ASTContext::SatLongFractTy

◆ SatShortAccumTy

CanQualType clang::ASTContext::SatShortAccumTy

◆ SatShortFractTy

CanQualType clang::ASTContext::SatShortFractTy

◆ SatUnsignedAccumTy

CanQualType clang::ASTContext::SatUnsignedAccumTy

◆ SatUnsignedFractTy

CanQualType clang::ASTContext::SatUnsignedFractTy

◆ SatUnsignedLongAccumTy

CanQualType clang::ASTContext::SatUnsignedLongAccumTy

◆ SatUnsignedLongFractTy

CanQualType clang::ASTContext::SatUnsignedLongFractTy

◆ SatUnsignedShortAccumTy

CanQualType clang::ASTContext::SatUnsignedShortAccumTy

◆ SatUnsignedShortFractTy

CanQualType clang::ASTContext::SatUnsignedShortFractTy

◆ SectionInfos

llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos

Definition at line 3375 of file ASTContext.h.

Referenced by clang::Sema::UnifySection().

◆ Selectors

SelectorTable& clang::ASTContext::Selectors

◆ ShortAccumTy

CanQualType clang::ASTContext::ShortAccumTy

◆ ShortFractTy

CanQualType clang::ASTContext::ShortFractTy

◆ ShortTy

CanQualType clang::ASTContext::ShortTy

◆ SignedCharTy

CanQualType clang::ASTContext::SignedCharTy

◆ TUKind

const TranslationUnitKind clang::ASTContext::TUKind

Definition at line 642 of file ASTContext.h.

Referenced by addTranslationUnitDecl().

◆ UnknownAnyTy

CanQualType clang::ASTContext::UnknownAnyTy

◆ UnsignedAccumTy

CanQualType clang::ASTContext::UnsignedAccumTy

◆ UnsignedCharTy

CanQualType clang::ASTContext::UnsignedCharTy

◆ UnsignedFractTy

CanQualType clang::ASTContext::UnsignedFractTy

◆ UnsignedInt128Ty

CanQualType clang::ASTContext::UnsignedInt128Ty

◆ UnsignedIntTy

CanQualType clang::ASTContext::UnsignedIntTy

◆ UnsignedLongAccumTy

CanQualType clang::ASTContext::UnsignedLongAccumTy

◆ UnsignedLongFractTy

CanQualType clang::ASTContext::UnsignedLongFractTy

◆ UnsignedLongLongTy

CanQualType clang::ASTContext::UnsignedLongLongTy

◆ UnsignedLongTy

CanQualType clang::ASTContext::UnsignedLongTy

◆ UnsignedShortAccumTy

CanQualType clang::ASTContext::UnsignedShortAccumTy

◆ UnsignedShortFractTy

CanQualType clang::ASTContext::UnsignedShortFractTy

◆ UnsignedShortTy

CanQualType clang::ASTContext::UnsignedShortTy

◆ VaListTagDecl

Decl* clang::ASTContext::VaListTagDecl = nullptr
mutable

◆ VoidPtrTy

CanQualType clang::ASTContext::VoidPtrTy

◆ VoidTy

CanQualType clang::ASTContext::VoidTy

Definition at line 1086 of file ASTContext.h.

Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnIndirectGotoStmt(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::AdjustDestructorExceptionSpec(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeUnprototypedMustTailThunk(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::Sema::BuildInitList(), buildPostUpdate(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildStmtExpr(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckARCMethodDecl(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckOperatorDeleteDeclaration(), ConvertDeclSpecToType(), ConvertQualTypeToKind(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateHexagonBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), DecodeTypeFromStr(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::CodeGen::CodeGenTypes::DeriveThisType(), diagOpenCLBuiltinTypeError(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitOutlinedFunctionPrologue(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::Sema::FindAllocationFunctions(), GeneralizeType(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::ento::CallEvent::getResultType(), clang::ASTReader::GetType(), clang::ento::MemRegionManager::getVarRegion(), handleCleanupAttr(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), RVVType2Qual(), TryListConversion(), and clang::ASTNodeImporter::VisitFunctionDecl().

◆ WCharTy

CanQualType clang::ASTContext::WCharTy

◆ WideCharTy

CanQualType clang::ASTContext::WideCharTy

◆ WIntTy

CanQualType clang::ASTContext::WIntTy

Definition at line 1091 of file ASTContext.h.

Referenced by getWIntType(), and InitBuiltinTypes().


The documentation for this class was generated from the following files: