clang 17.0.0git
|
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"
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::Context & | getInterpContext () |
Returns the clang bytecode interpreter context. | |
ParentMapContext & | getParentMapContext () |
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::PrintingPolicy & | getPrintingPolicy () const |
void | setPrintingPolicy (const clang::PrintingPolicy &Policy) |
SourceManager & | getSourceManager () |
const SourceManager & | getSourceManager () 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 |
DeclListNode * | AllocateDeclListNode (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::DiagStorageAllocator & | getDiagAllocator () |
const TargetInfo & | getTargetInfo () const |
const TargetInfo * | getAuxTargetInfo () 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 LangOptions & | getLangOpts () const |
bool | isDependenceAllowed () const |
const NoSanitizeList & | getNoSanitizeList () const |
const XRayFunctionFilter & | getXRayFilter () const |
const ProfileList & | getProfileList () const |
DiagnosticsEngine & | getDiagnostics () 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. | |
RawComment * | getRawCommentForDeclNoCacheImpl (const Decl *D, const SourceLocation RepresentativeLocForDecl, const std::map< unsigned, RawComment * > &CommentsInFile) const |
RawComment * | getRawCommentForDeclNoCache (const Decl *D) const |
Return the documentation comment attached to a given declaration, without looking into cache. | |
void | addComment (const RawComment &RC) |
const RawComment * | getRawCommentForAnyRedecl (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::FullComment * | getCommentForDecl (const Decl *D, const Preprocessor *PP) const |
Return parsed documentation comment attached to a given declaration. | |
comments::FullComment * | getLocalCommentForDeclUncached (const Decl *D) const |
Return parsed documentation comment attached to a given declaration. | |
comments::FullComment * | cloneFullComment (comments::FullComment *FC, const Decl *D) const |
comments::CommandTraits & | getCommentCommandTraits () const |
AttrVec & | getDeclAttrs (const Decl *D) |
Retrieve the attributes for the given declaration. | |
void | eraseDeclAttrs (const Decl *D) |
Erase the attributes corresponding to the given declaration. | |
MemberSpecializationInfo * | 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. | |
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) |
NamedDecl * | getInstantiatedFromUsingDecl (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. | |
UsingEnumDecl * | getInstantiatedFromUsingEnumDecl (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. | |
UsingShadowDecl * | getInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst) |
void | setInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst, UsingShadowDecl *Pattern) |
FieldDecl * | getInstantiatedFromUnnamedFieldDecl (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 |
Decl * | getPrimaryMergedDecl (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. | |
Module * | getCurrentNamedModule () const |
Get module under construction, nullptr if this is not a C++20 module. | |
TranslationUnitDecl * | getTranslationUnitDecl () const |
void | addTranslationUnitDecl () |
ExternCContextDecl * | getExternCContextDecl () const |
BuiltinTemplateDecl * | getMakeIntegerSeqDecl () const |
BuiltinTemplateDecl * | getTypePackElementDecl () const |
ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, TranslationUnitKind TUKind) | |
ASTContext (const ASTContext &)=delete | |
ASTContext & | operator= (const ASTContext &)=delete |
~ASTContext () | |
void | setExternalSource (IntrusiveRefCntPtr< ExternalASTSource > Source) |
Attach an external AST source to the AST context. | |
ExternalASTSource * | getExternalSource () 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. | |
ASTMutationListener * | getASTMutationListener () const |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any. | |
void | PrintStats () const |
const SmallVectorImpl< Type * > & | getTypes () const |
BuiltinTemplateDecl * | buildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const |
RecordDecl * | buildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration. | |
TypedefDecl * | buildImplicitTypedef (QualType T, StringRef Name) const |
Create a new implicit TU-level typedef declaration. | |
TypedefDecl * | getInt128Decl () const |
Retrieve the declaration for the 128-bit signed integer type. | |
TypedefDecl * | getUInt128Decl () 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 FunctionType * | adjustFunctionType (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) |
FunctionDecl * | getcudaConfigureCallDecl () |
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, ArrayType::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, ArrayType::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, ArrayType::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, ArrayType::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, VectorType::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, VectorType::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 |
TypeSourceInfo * | getTemplateSpecializationTypeInfo (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 |
C2x 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 | 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) |
TypedefDecl * | getCFConstantStringDecl () const |
RecordDecl * | getCFConstantStringTagDecl () 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'. | |
IdentifierInfo * | getNSObjectName () const |
Retrieve the identifier 'NSObject'. | |
IdentifierInfo * | getNSCopyingName () |
Retrieve the identifier 'NSCopying'. | |
CanQualType | getNSUIntegerType () const |
CanQualType | getNSIntegerType () const |
IdentifierInfo * | getBoolName () const |
Retrieve the identifier 'bool'. | |
IdentifierInfo * | getMakeIntegerSeqName () const |
IdentifierInfo * | getTypePackElementName () const |
QualType | getObjCInstanceType () |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. | |
TypedefDecl * | getObjCInstanceTypeDecl () |
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'. | |
ObjCPropertyImplDecl * | getObjCPropertyImplDeclForPropertyDecl (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. | |
TypedefDecl * | getObjCIdDecl () const |
Retrieve the typedef corresponding to the predefined id type in Objective-C. | |
QualType | getObjCIdType () const |
Represents the Objective-CC id type. | |
TypedefDecl * | getObjCSelDecl () 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. | |
TypedefDecl * | getObjCClassDecl () const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. | |
QualType | getObjCClassType () const |
Represents the Objective-C Class type. | |
ObjCInterfaceDecl * | getObjCProtocolDecl () const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. | |
TypedefDecl * | getBOOLDecl () 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. | |
TypedefDecl * | getBuiltinVaListDecl () 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. | |
Decl * | 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. | |
TypedefDecl * | getBuiltinMSVaListDecl () 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. | |
TagDecl * | getMSGuidTagDecl () 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< CharUnits > | getTypeSizeInCharsIfKnown (QualType Ty) const |
std::optional< CharUnits > | getTypeSizeInCharsIfKnown (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 |
Return the alignment in bits that should be given to a global variable with type T . | |
CharUnits | getAlignOfGlobalVarInChars (QualType T) const |
Return the alignment in characters that should be given to a global variable with type T . | |
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 ASTRecordLayout & | 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. | |
const ASTRecordLayout & | getASTObjCInterfaceLayout (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 ASTRecordLayout & | getASTObjCImplementationLayout (const ObjCImplementationDecl *D) const |
Get or compute information about the layout of the specified Objective-C implementation. | |
const CXXMethodDecl * | 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. | |
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 |
VTableContextBase * | getVTableContext () |
MangleContext * | createMangleContext (const TargetInfo *T=nullptr) |
If T is null pointer, assume the target in ASTContext. | |
MangleContext * | 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. | |
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 Type * | getCanonicalType (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. | |
NestedNameSpecifier * | getCanonicalNestedNameSpecifier (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 ArrayType * | getAsArrayType (QualType T) const |
Type Query functions. | |
const ConstantArrayType * | getAsConstantArrayType (QualType T) const |
const VariableArrayType * | getAsVariableArrayType (QualType T) const |
const IncompleteArrayType * | getAsIncompleteArrayType (QualType T) const |
const DependentSizedArrayType * | getAsDependentSizedArrayType (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 | 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) |
ObjCImplementationDecl * | getObjCImplementation (ObjCInterfaceDecl *D) |
Get the implementation of the ObjCInterfaceDecl D , or nullptr if none exists. | |
ObjCCategoryImplDecl * | getObjCImplementation (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 ObjCMethodDecl * | getObjCMethodRedeclaration (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 ObjCInterfaceDecl * | getObjContainingInterface (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. | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. | |
TypeSourceInfo * | 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. | |
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 CXXConstructorDecl * | getCopyConstructorForExceptionObject (CXXRecordDecl *RD) |
void | addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD) |
void | addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND) |
TypedefNameDecl * | getTypedefNameForUnnamedTagDecl (const TagDecl *TD) |
void | addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD) |
DeclaratorDecl * | getDeclaratorForUnnamedTagDecl (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 |
MangleNumberingContext & | getManglingNumberContext (const DeclContext *DC) |
Retrieve the context for computing mangling numbers in the given DeclContext. | |
MangleNumberingContext & | getManglingNumberContext (NeedExtraManglingDecl_t, const Decl *D) |
std::unique_ptr< MangleNumberingContext > | createMangleNumberingContext () 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. | |
StringLiteral * | getPredefinedStringLiteralFromCache (StringRef Key) const |
Return a string representing the human readable name for the specified function declaration or file name. | |
MSGuidDecl * | getMSGuidDecl (MSGuidDeclParts Parts) const |
Return a declaration for the global GUID object representing the given GUID value. | |
UnnamedGlobalConstantDecl * | getUnnamedGlobalConstantDecl (QualType Ty, const APValue &Value) const |
Return a declaration for a uniquified anonymous global constant corresponding to a given APValue. | |
TemplateParamObjectDecl * | getTemplateParamObjectDecl (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. | |
OMPTraitInfo & | getNewOMPTraitInfo () |
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 ImportDecl * | getNextLocalImport (ImportDecl *Import) |
static bool | isObjCNSObjectType (QualType Ty) |
Return true if this is an NSObject object with its NSObject attribute set. | |
Friends | |
class | NestedNameSpecifier |
class | ASTDeclReader |
class | ASTReader |
class | ASTWriter |
template<class > | |
class | serialization::AbstractTypeReader |
class | CXXRecordDecl |
class | IncrementalParser |
class | DeclarationNameTable |
class | DeclContext |
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file.
Definition at line 182 of file ASTContext.h.
using clang::ASTContext::import_range = llvm::iterator_range<import_iterator> |
Definition at line 1015 of file ASTContext.h.
using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
Definition at line 977 of file ASTContext.h.
using clang::ASTContext::overridden_method_range = llvm::iterator_range<overridden_cxx_method_iterator> |
Definition at line 986 of file ASTContext.h.
using clang::ASTContext::TemplateOrSpecializationInfo = llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 461 of file ASTContext.h.
Definition at line 2196 of file ASTContext.h.
|
strong |
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 3270 of file ASTContext.h.
Enumerator | |
---|---|
NeedExtraManglingDecl |
Definition at line 3105 of file ASTContext.h.
Enumerator | |
---|---|
PSF_None | |
PSF_Read | |
PSF_Write | |
PSF_Execute | |
PSF_Implicit | |
PSF_ZeroInit | |
PSF_Invalid |
Definition at line 3324 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins, | ||
TranslationUnitKind | TUKind | ||
) |
Definition at line 923 of file ASTContext.cpp.
References addTranslationUnitDecl().
|
delete |
ASTContext::~ASTContext | ( | ) |
Definition at line 983 of file ASTContext.cpp.
References cleanup().
void ASTContext::addComment | ( | const RawComment & | RC | ) |
Definition at line 385 of file ASTContext.cpp.
References clang::RawCommentList::addComment(), clang::LangOptions::CommentOpts, Comments, clang::SourceRange::getBegin(), clang::RawComment::getSourceRange(), and clang::SourceManager::isInSystemHeader().
Referenced by clang::Sema::ActOnComment().
void ASTContext::addCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD, |
CXXConstructorDecl * | CD | ||
) |
Definition at line 12207 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by clang::Sema::CheckCXXThrowOperand().
void ASTContext::AddDeallocation | ( | void(*)(void *) | Callback, |
void * | Data | ||
) | const |
Add a deallocation callback that will be invoked when the ASTContext is destroyed.
Callback | A callback function that will be invoked on destruction. |
Data | Pointer data that will be provided to the callback function when it is called. |
Definition at line 990 of file ASTContext.cpp.
References Data.
Referenced by addDestruction().
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 12224 of file ASTContext.cpp.
Referenced by clang::Sema::FinalizeDeclaratorGroup().
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 3057 of file ASTContext.h.
References AddDeallocation(), and V.
Referenced by clang::MSGuidDecl::getAsAPValue(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::ConstantExpr::MoveIntoResult(), clang::ASTDeclReader::ReadVarDeclInit(), and clang::ASTDeclReader::VisitLifetimeExtendedTemporaryDecl().
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 1628 of file ASTContext.cpp.
Referenced by clang::DeclContext::addHiddenDecl().
Definition at line 1134 of file ASTContext.cpp.
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 1108 of file ASTContext.cpp.
Referenced by clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnModuleImport(), clang::Sema::BuildModuleInclude(), and clang::Sema::CheckCompleteVariableDeclaration().
void ASTContext::addOverriddenMethod | ( | const CXXMethodDecl * | Method, |
const CXXMethodDecl * | Overridden | ||
) |
Note that the given C++ Method
overrides the given Overridden
method.
Definition at line 1602 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod(), and clang::ASTDeclReader::VisitCXXMethodDecl().
Definition at line 2812 of file ASTContext.h.
References clang::isTargetAddressSpace().
|
inline |
Definition at line 1062 of file ASTContext.h.
References clang::TranslationUnitDecl::Create(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TU_Incremental, and TUKind.
Referenced by ASTContext().
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 12214 of file ASTContext.cpp.
Referenced by clang::Sema::setTagNameForLinkagePurposes().
void ASTContext::adjustDeducedFunctionResultType | ( | FunctionDecl * | FD, |
QualType | ResultType | ||
) |
Change the result type of a function type once it is deduced.
Definition at line 3178 of file ASTContext.cpp.
References clang::Type::castAs(), getASTMutationListener(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), and clang::ASTReader::FinishedDeserializing().
void ASTContext::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.
Definition at line 3257 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType(), getFunctionTypeWithExceptionSpec(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::ValueDecl::setType().
Referenced by clang::Sema::actOnDelayedExceptionSpecification(), clang::ASTReader::FinishedDeserializing(), and clang::Sema::UpdateExceptionSpec().
const FunctionType * ASTContext::adjustFunctionType | ( | const FunctionType * | Fn, |
FunctionType::ExtInfo | EInfo | ||
) |
Change the ExtInfo on a function type.
Definition at line 3160 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), getFunctionNoProtoType(), getFunctionType(), and clang::Result.
Referenced by clang::Sema::adjustMemberFunctionCC(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), handleFunctionTypeAttr(), clang::Sema::IsFunctionConversion(), and clang::Sema::MergeFunctionDecl().
void ASTContext::adjustObjCTypeParamBoundType | ( | const ObjCTypeParamDecl * | Orig, |
ObjCTypeParamDecl * | New | ||
) | const |
Definition at line 5510 of file ASTContext.cpp.
References getObjCTypeParamType(), getTrivialTypeSourceInfo(), clang::TypeDecl::getTypeForDecl(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::TypeDecl::setTypeForDecl(), and clang::TypedefNameDecl::setTypeSourceInfo().
Referenced by checkTypeParamListConsistency().
Definition at line 4581 of file ASTContext.cpp.
References getAddrSpaceQualType(), and clang::opencl_constant.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::BuildPredefinedExpr(), and getStringLiteralArrayType().
|
inline |
Definition at line 707 of file ASTContext.h.
References Allocate().
Definition at line 704 of file ASTContext.h.
Referenced by Allocate(), clang::FunctionDecl::DefaultedFunctionInfo::Create(), clang::DependentFunctionTemplateSpecializationInfo::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::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(), getSubstTemplateTypeParmType(), getTemplateSpecializationType(), getTypedefType(), getUsingType(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::Decl::operator new(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::CXXRecordDecl::setCaptures(), and clang::TemplateArgument::TemplateArgument().
|
inline |
Allocates a DeclListNode
or returns one from the ListNodeFreeList
pool.
Definition at line 714 of file ASTContext.h.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2993 of file ASTContext.h.
Referenced by clang::Sema::DiagnoseUseOfUnimplementedSelectors().
QualType ASTContext::applyObjCProtocolQualifiers | ( | QualType | type, |
ArrayRef< ObjCProtocolDecl * > | protocols, | ||
bool & | hasError, | ||
bool | allowOnPointerType = false |
||
) | const |
Apply Objective-C protocol qualifiers to the given type.
allowOnPointerType | specifies 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 5409 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().
QualType ASTContext::areCommonBaseCompatible | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
Definition at line 10064 of file ASTContext.cpp.
References clang::Type::castAs(), clang::declaresSameEntity(), clang::ObjCInterfaceDecl::getCanonicalDecl(), clang::ObjCObjectType::getInterface(), getIntersectionOfProtocols(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCObjectType::getTypeArgsAsWritten(), clang::ObjCObjectType::isKindOfType(), clang::QualType::isNull(), clang::ObjCObjectType::isSpecialized(), clang::Result, and sameObjCTypeArgs().
Referenced by clang::Sema::FindCompositeObjCPointerType().
Definition at line 10249 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and clang::Type::getAs().
Referenced by clang::Sema::CheckCompareOperands().
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.
Definition at line 9572 of file ASTContext.cpp.
References clang::VectorType::GenericVector, clang::Type::getAs(), getBuiltinVectorTypeInfo(), clang::Type::getRVVEltType(), getRVVTypeSize(), getTypeSize(), hasSameType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isRVVVLSBuiltinType(), clang::Type::isVectorType(), and clang::VectorType::RVVFixedLengthDataVector.
Referenced by clang::Sema::CheckAssignmentConstraints(), CheckImplicitConversion(), CompareStandardConversionSequences(), and IsVectorConversion().
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.
Definition at line 9475 of file ASTContext.cpp.
References clang::VectorType::GenericVector, clang::Type::getAs(), getBuiltinVectorTypeInfo(), clang::Type::getSveEltType(), getSVETypeSize(), getTypeSize(), hasSameType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), clang::VectorType::SveFixedLengthDataVector, and clang::VectorType::SveFixedLengthPredicateVector.
Referenced by clang::Sema::CheckAssignmentConstraints(), CheckImplicitConversion(), CompareStandardConversionSequences(), and IsVectorConversion().
Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type.
Definition at line 9437 of file ASTContext.cpp.
References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::Type::castAs(), clang::First, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), hasSameType(), hasSameUnqualifiedType(), clang::Type::isVectorType(), clang::VectorType::RVVFixedLengthDataVector, clang::VectorType::SveFixedLengthDataVector, and clang::VectorType::SveFixedLengthPredicateVector.
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckVectorOperands(), CompareStandardConversionSequences(), clang::Sema::IsPointerConversion(), and IsVectorConversion().
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 9600 of file ASTContext.cpp.
References clang::LangOptions::All, clang::VectorType::GenericVector, clang::Type::getAs(), getLangOpts(), clang::Type::getRVVEltType(), getRVVTypeSize(), getTypeSize(), clang::LangOptions::Integer, clang::Type::isIntegerType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isVectorType(), and clang::VectorType::RVVFixedLengthDataVector.
Referenced by clang::Sema::CheckAssignmentConstraints(), CheckImplicitConversion(), and IsVectorConversion().
Return true if the given vector types are lax-compatible SVE vector types, false otherwise.
Definition at line 9505 of file ASTContext.cpp.
References clang::LangOptions::All, clang::VectorType::GenericVector, clang::Type::getAs(), getLangOpts(), clang::Type::getSveEltType(), getSVETypeSize(), getTypeSize(), clang::LangOptions::Integer, clang::Type::isIntegerType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), and clang::VectorType::SveFixedLengthDataVector.
Referenced by clang::Sema::CheckAssignmentConstraints(), CheckImplicitConversion(), and IsVectorConversion().
bool ASTContext::AtomicUsesUnsupportedLibcall | ( | const AtomicExpr * | E | ) | const |
Definition at line 12324 of file ASTContext.cpp.
References clang::TargetInfo::getMaxAtomicInlineWidth(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), getTypeAlignInChars(), getTypeSizeInChars(), and toBits().
Referenced by clang::Sema::BuildAtomicExpr().
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 555 of file ASTContext.cpp.
References adjustDeclToTemplate(), cacheRawCommentForDecl(), Comments, DeclRawComments, clang::RawCommentList::empty(), clang::File, clang::RawCommentList::getCommentsInFile(), getDeclLocForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), clang::SourceLocation::isFileID(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), and ParsedComments.
Referenced by clang::Sema::ActOnDocumentableDecls().
Returns true iff we need copy/dispose helpers for the given type.
BlockRequiresCopying - Returns true if byref variable "D" of type "Ty" requires copy/dispose.
Note that this must match the logic in buildByrefHelpers.
Definition at line 7537 of file ASTContext.cpp.
References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInit(), clang::BlockVarCopyInit::getCopyExpr(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), clang::QualType::isDestructedType(), clang::QualType::isNonTrivialToPrimitiveDestructiveMove(), isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1167 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::BuiltinTemplateDecl::Create(), and getTranslationUnitDecl().
Referenced by getMakeIntegerSeqDecl(), and getTypePackElementDecl().
RecordDecl * ASTContext::buildImplicitRecord | ( | StringRef | Name, |
RecordDecl::TagKind | TK = TTK_Struct |
||
) | const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
Definition at line 1193 of file ASTContext.cpp.
References clang::Decl::addAttr(), clang::CPlusPlus, clang::CXXRecordDecl::Create(), clang::RecordDecl::Create(), clang::IdentifierTable::get(), getLangOpts(), getTranslationUnitDecl(), Idents, and clang::Decl::setImplicit().
Referenced by CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateHexagonBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), InitBuiltinTypes(), and clang::Sema::Initialize().
TypedefDecl * ASTContext::buildImplicitTypedef | ( | QualType | T, |
StringRef | Name | ||
) | const |
Create a new implicit TU-level typedef declaration.
Definition at line 1209 of file ASTContext.cpp.
References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and clang::Decl::setImplicit().
Referenced by clang::Sema::addImplicitTypedef(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateCharPtrNamedVaListDecl(), CreateHexagonBuiltinVaListDecl(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), getCFConstantStringDecl(), getInt128Decl(), getObjCClassDecl(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCSelDecl(), and getUInt128Decl().
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 529 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().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS.
This handles validation of any protocol qualifiers on the LHS or RHS.
Definition at line 9821 of file ASTContext.cpp.
References canAssignObjCInterfaces(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCQualifiedClass(), clang::ObjCObjectType::isObjCQualifiedId(), clang::ObjCObjectType::isObjCUnqualifiedId(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by clang::Sema::ActOnPropertyImplDecl(), applyObjCTypeArgs(), areComparableObjCPointerTypes(), canAssignObjCInterfaces(), canAssignObjCObjectTypes(), canBindObjCObjectType(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::FindCompositeObjCPointerType(), findMethodDecl(), clang::Sema::isObjCPointerConversion(), isObjCTypeSubstitutable(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 10187 of file ASTContext.cpp.
References clang::Type::castAs(), CollectInheritedProtocols(), clang::declaresSameEntity(), clang::ObjCObjectType::getInterface(), clang::ObjCProtocolQualifiers< T >::getNumProtocols(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCObjectType::isSpecialized(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::ObjCProtocolQualifiers< T >::quals(), and sameObjCTypeArgs().
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 9874 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().
Definition at line 10261 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and getObjCObjectPointerType().
Referenced by clang::Sema::CompareReferenceRelationship().
bool ASTContext::canBuiltinBeRedeclared | ( | const FunctionDecl * | FD | ) | const |
Return whether a declaration to a builtin is allowed to be overloaded/redeclared.
Definition at line 9173 of file ASTContext.cpp.
References BuiltinInfo, clang::Builtin::Context::canBeRedeclared(), clang::FunctionDecl::getBuiltinID(), clang::Builtin::Context::hasCustomTypechecking(), and clang::Builtin::NotBuiltin.
void ASTContext::cleanup | ( | ) |
Definition at line 944 of file ASTContext.cpp.
References clang::Value::clear().
Referenced by ~ASTContext().
comments::FullComment * ASTContext::cloneFullComment | ( | comments::FullComment * | FC, |
const Decl * | D | ||
) | const |
Definition at line 611 of file ASTContext.cpp.
References clang::comments::DeclInfo::CommentDecl, clang::comments::FullComment::getBlocks(), clang::comments::FullComment::getDecl(), clang::comments::FullComment::getDeclInfo(), and clang::comments::DeclInfo::TemplateParameters.
Referenced by getCommentForDecl().
void ASTContext::CollectInheritedProtocols | ( | const Decl * | CDecl, |
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > & | Protocols | ||
) |
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
Definition at line 2626 of file ASTContext.cpp.
References CollectInheritedProtocols(), and clang::ObjCInterfaceDecl::getSuperClass().
Referenced by clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), canAssignObjCInterfaces(), CollectInheritedProtocols(), getIntersectionOfProtocols(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 2880 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
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 12060 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetInfo::getCXXABI(), getDiagnostics(), and clang::TargetCXXABI::getKind().
Referenced by InitDeviceMC().
MangleContext * ASTContext::createMangleContext | ( | const TargetInfo * | T = nullptr | ) |
If T
is null pointer, assume the target in ASTContext.
Definition at line 12039 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetInfo::getCXXABI(), getDiagnostics(), and clang::TargetCXXABI::getKind().
Referenced by clang::PredefinedExpr::ComputeName(), clang::ASTNameGenerator::Implementation::getAllManglings(), and InitDeviceMC().
std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 12197 of file ASTContext.cpp.
Referenced by getManglingNumberContext().
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.
T | the 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. |
Size | the size of the type info to create, or 0 if the size should be calculated based on the type. |
Definition at line 2990 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().
|
inline |
Definition at line 710 of file ASTContext.h.
Referenced by clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::AttachBaseSpecifiers(), clang::VarDecl::setInit(), clang::TagDecl::setQualifierInfo(), and clang::QualifierInfo::setTemplateParameterListsInfo().
|
inline |
Deallcates a DeclListNode
by returning it to the ListNodeFreeList
pool.
Definition at line 725 of file ASTContext.h.
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.
Definition at line 11841 of file ASTContext.cpp.
References clang::VarDecl::DeclarationOnly, DeclMustBeEmitted(), clang::CXXMethodDecl::getCanonicalDecl(), getCurrentKeyFunction(), clang::Decl::getDeclContext(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::DeclContext::getParent(), getTargetInfo(), clang::GVA_AvailableExternally, clang::Decl::hasAttr(), clang::DeclContext::isDependentContext(), clang::isDiscardableGVALinkage(), clang::CXXRecordDecl::isDynamicClass(), isMSStaticDataMemberInlineDefinition(), clang::SC_Register, and clang::FunctionDecl::TK_FunctionTemplate.
Referenced by clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::checkOpenMPDeclareVariantFunction(), DeclMustBeEmitted(), isConsumerInterestedIn(), isRequiredDecl(), and clang::Sema::ShouldWarnIfUnusedFileScopedDecl().
QualType ASTContext::DecodeTypeStr | ( | const char *& | Str, |
const ASTContext & | Context, | ||
ASTContext::GetBuiltinTypeError & | Error, | ||
bool & | RequireICE, | ||
bool | AllowTypeModifiers | ||
) | const |
Definition at line 11567 of file ASTContext.cpp.
References DecodeTypeFromStr().
Referenced by DecodePPCMMATypeFromStr().
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 1069 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl().
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 2609 of file ASTContext.cpp.
References DeepCollectObjCIvars(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), and clang::ObjCInterfaceDecl::ivars().
Referenced by clang::Sema::ActOnDefs(), and DeepCollectObjCIvars().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3699 of file RecordLayoutBuilder.cpp.
References DumpRecordLayout(), clang::ASTRecordLayout::getAlignment(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getPreferredAlignment(), clang::ASTRecordLayout::getSize(), getTypeDeclType(), isMsLayout(), clang::Target, and toBits().
Referenced by DumpRecordLayout(), and getASTRecordLayout().
void ASTContext::eraseDeclAttrs | ( | const Decl * | D | ) |
Erase the attributes corresponding to the given declaration.
Definition at line 1477 of file ASTContext.cpp.
Referenced by clang::Decl::dropAttrs().
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 13481 of file ASTContext.cpp.
References clang::TargetInfo::parseTargetAttr().
Referenced by getFunctionFeatureMap().
std::vector< std::string > ASTContext::filterFunctionTargetVersionAttrs | ( | const TargetVersionAttr * | TV | ) | const |
Definition at line 13467 of file ASTContext.cpp.
References clang::TargetInfo::validateCpuSupports().
Referenced by getFunctionFeatureMap().
void ASTContext::forEachMultiversionedFunctionVersion | ( | const FunctionDecl * | FD, |
llvm::function_ref< void(FunctionDecl *)> | Pred | ||
) | const |
Visits all versions of a multiversioned function with the passed predicate.
Definition at line 11961 of file ASTContext.cpp.
References clang::Decl::getAsFunction(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::DeclContext::getRedeclContext(), clang::ValueDecl::getType(), hasSameType(), clang::FunctionDecl::isMultiVersion(), and clang::DeclContext::lookup().
Referenced by clang::Sema::PerformPendingInstantiations().
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 3068 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by 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().
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 6941 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(), and getSignatureParameterType().
|
inline |
Definition at line 1330 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getAdjustedType().
Return the uniqued reference to a type adjusted from the original type to a new type.
Definition at line 3341 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::adjustMemberFunctionCC(), getAdjustedType(), and getCommonSugarTypeNode().
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.
Definition at line 2563 of file ASTContext.cpp.
References getPreferredTypeAlign(), getTargetInfo(), clang::QualType::getTypePtr(), and getTypeSize().
Referenced by getAlignOfGlobalVarInChars().
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.
Definition at line 2571 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), and clang::Sema::isOpenMPCapturedByRef().
|
inline |
Definition at line 700 of file ASTContext.h.
Referenced by clang::Decl::getID(), clang::CXXCtorInitializer::getID(), clang::Stmt::getID(), and clang::RawComment::parse().
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 6972 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().
uint64_t ASTContext::getArrayInitLoopExprElementCount | ( | const ArrayInitLoopExpr * | AILE | ) | const |
Return number of elements initialized in an ArrayInitLoopExpr.
Definition at line 7024 of file ASTContext.cpp.
References clang::ArrayInitLoopExpr::getArraySize(), and clang::ArrayInitLoopExpr::getSubExpr().
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.
Definition at line 6883 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(), checkFormatStringExpr(), clang::Sema::CheckStaticArrayArgument(), DeduceFromInitializerList(), clang::Sema::deduceOpenCLAddressSpace(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), DiagnoseDivisionSizeofPointerOrArray(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), 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(), isSafeToConvert(), 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().
|
inline |
Definition at line 2717 of file ASTContext.h.
References getAsArrayType().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), clang::Sema::BuildCXXNew(), buildSingleCopyAssignRecursively(), clang::Sema::CheckCompleteDecompositionDeclaration(), CheckFormatString(), clang::Sema::CheckStaticArrayArgument(), CompareImplicitConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EquivalentArrayTypes(), EvaluateArrayTypeTrait(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::Sema::FormatStringHasSArg(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::VarDecl::getFlexibleArrayInitChars(), getTypeExpansion(), clang::VarDecl::hasFlexibleArrayInit(), isConstantSizeArrayWithMoreThanOneElement(), isEmptyField(), clang::Expr::isFlexibleArrayMemberLike(), isIncompleteOrZeroLengthArrayType(), isSingleElementStruct(), isValidStructGUID(), isZeroSizedArray(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), populateInitializerFixItWithSpan(), setUsedBits(), and TryOrBuildParenListInitialization().
|
inline |
Definition at line 2726 of file ASTContext.h.
References getAsArrayType().
Referenced by DeduceTemplateArgumentsByTypeMatch().
|
inline |
Definition at line 2723 of file ASTContext.h.
References getAsArrayType().
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddInitializerToDecl(), DeduceTemplateArgumentsByTypeMatch(), clang::Expr::isFlexibleArrayMemberLike(), and clang::InitializationSequence::Perform().
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 9215 of file ASTContext.cpp.
Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), and clang::Sema::isTemplateName().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 732 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1181 of file ASTContext.h.
References Listener.
Referenced by clang::Sema::ActOnOpenMPDeclareTargetName(), adjustDeducedFunctionResultType(), applyOMPAllocateAttribute(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::ASTReader::FinishedDeserializing(), clang::Decl::getASTMutationListener(), and mergeDefinitionIntoModule().
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 3017 of file ASTContext.cpp.
References clang::ObjCImplDecl::getClassInterface().
Referenced by lookupFieldBitOffset().
const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout | ( | const ObjCInterfaceDecl * | D | ) | const |
Get or compute information about the layout of the specified Objective-C interface.
Definition at line 3012 of file ASTContext.cpp.
Referenced by getTypeUnadjustedAlign(), and lookupFieldBitOffset().
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 3283 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(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), EmitNullBaseClassInitialization(), EmitNullConstant(), EncodeBitField(), findPathsToSubobject(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), getDerivedToBaseAlignmentAndOffset(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), 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().
|
inline |
Definition at line 2720 of file ASTContext.h.
References getAsArrayType().
Referenced by clang::Sema::CheckVariableDeclarationType(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitArraySubscriptGEP(), emitGlobalToListReduceFunction(), emitListToGlobalReduceFunction(), emitPointerArithmetic(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), EquivalentArrayTypes(), getFixedSizeElementType(), mergeTypes(), and TryOrBuildParenListInitialization().
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 5894 of file ASTContext.cpp.
References getAtomicType(), getCanonicalType(), clang::QualType::isCanonical(), clang::AtomicType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildAtomicType(), getAtomicType(), getCommonNonSugarTypeNode(), getVariableArrayDecayedType(), clang::Sema::Initialize(), makeQualifiedLValueReferenceType(), mergeTypes(), and clang::ASTNodeImporter::VisitAtomicType().
QualType ASTContext::getAttributedType | ( | attr::Kind | attrKind, |
QualType | modifiedType, | ||
QualType | equivalentType | ||
) | const |
Definition at line 4793 of file ASTContext.cpp.
References getCanonicalType(), clang::AttributedType::Profile(), clang::ast_matchers::type, and clang::TypeAlignment.
Referenced by clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildObjCBoxedExpr(), computeConditionalNullability(), clang::desugarForDiagnostic(), getArrayDecayedType(), getBaseMessageSendResultType(), getCommonSugarTypeNode(), getFunctionTypeWithExceptionSpec(), clang::Sema::getMessageSendResultType(), mergeParamDeclTypes(), mergeTypeNullabilityForRedecl(), clang::Sema::ProcessPropertyDecl(), stripObjCInstanceType(), and clang::ASTNodeImporter::VisitAttributedType().
QualType ASTContext::getAutoDeductType | ( | ) | const |
C++11 deduction pattern for 'auto' type.
getAutoDeductType - Get type pattern for deducing against 'auto'.
Definition at line 5921 of file ASTContext.cpp.
References clang::Auto, AutoDeductTy, clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildCXXForRangeStmt(), clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::CheckExplicitlyDefaultedComparison(), ConvertDeclSpecToType(), clang::Sema::deduceVarTypeFromInitializer(), getAutoRRefDeductType(), getDummyLambdaType(), and clang::ASTReader::GetType().
QualType ASTContext::getAutoRRefDeductType | ( | ) | const |
C++11 deduction pattern for 'auto &&' type.
getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.
Definition at line 5932 of file ASTContext.cpp.
References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().
Referenced by clang::Sema::ActOnCXXForRangeStmt(), and clang::ASTReader::GetType().
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 5837 of file ASTContext.cpp.
Referenced by ConvertDeclSpecToType(), getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), getUnconstrainedType(), clang::TreeTransform< Derived >::RebuildAutoType(), clang::TreeTransform< Derived >::RebuildQualifiedType(), and clang::ASTNodeImporter::VisitAutoType().
|
inline |
Definition at line 744 of file ASTContext.h.
Referenced by clang::Sema::CheckCallingConvAttr(), InitDeviceMC(), clang::Sema::Initialize(), and ProcessStmtAttribute().
Return the innermost element type of an array type.
For example, will return "int" for int[m][n]
Definition at line 6994 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(), 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(), getTypeAlignIfKnown(), handleInitPriorityAttr(), hasUniqueObjectRepresentations(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::isAbstractType(), isConstNotMutableType(), clang::QualType::isCXX98PODType(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTriviallyRelocatableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), 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().
Return the innermost element type of a type (which needn't actually be an array type).
Definition at line 6998 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), getQualifiedType(), clang::SplitQualType::Quals, clang::SplitQualType::Ty, and clang::ast_matchers::type.
Return a bit-precise integer type with the specified signedness and bit count.
Definition at line 4595 of file ASTContext.cpp.
References clang::BitIntType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::BuildBitIntType(), ChangeIntegralSignedness(), getCorrespondingSignedType(), and getCorrespondingUnsignedType().
QualType ASTContext::getBlockDescriptorExtendedType | ( | ) | const |
Gets the struct used to keep track of the extended descriptor for pointer to blocks.
Definition at line 7455 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getPointerType(), getTagDeclType(), clang::ICIS_NoInit, Idents, clang::TagDecl::startDefinition(), UnsignedLongTy, and VoidPtrTy.
QualType ASTContext::getBlockDescriptorType | ( | ) | const |
Gets the struct used to keep track of the descriptor for pointer to blocks.
Definition at line 7420 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getTagDeclType(), clang::ICIS_NoInit, Idents, clang::TagDecl::startDefinition(), and UnsignedLongTy.
Return the uniqued reference to the type for a block of the specified type.
getBlockPointerType - Return the uniqued reference to the type for a pointer to the specified block.
Definition at line 3407 of file ASTContext.cpp.
References getBlockPointerType(), getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isFunctionType(), clang::BlockPointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnBlockStmtExpr(), addBlockPointerConversion(), clang::Sema::BuildBlockPointerType(), checkConditionalPointerCompatibility(), clang::Sema::DeduceReturnType(), getBlockPointerType(), getCommonNonSugarTypeNode(), clang::ento::MemRegionManager::getVarRegion(), mergeTypes(), clang::Sema::PerformImplicitConversion(), and clang::ASTNodeImporter::VisitBlockPointerType().
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 2971 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), getBlockCaptureStr(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 2060 of file ASTContext.h.
Referenced by clang::Sema::ActOnObjCBoolLiteral(), and getBOOLType().
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1890 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::Sema::getPrintingPolicy().
|
inline |
type of 'BOOL' type.
Definition at line 2070 of file ASTContext.h.
References getBOOLDecl(), and getTypeDeclType().
Referenced by clang::Sema::ActOnObjCBoolLiteral().
Definition at line 4813 of file ASTContext.cpp.
References getCanonicalType(), clang::BTFTagAttributedType::Profile(), and clang::TypeAlignment.
Referenced by getCommonSugarTypeNode().
TypedefDecl * ASTContext::getBuiltinMSVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list
type.
Definition at line 9166 of file ASTContext.cpp.
References CreateMSVaListDecl().
Referenced by getBuiltinMSVaListType(), getPredefinedDecl(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_ms_va_list
type.
Definition at line 2098 of file ASTContext.h.
References getBuiltinMSVaListDecl(), and getTypeDeclType().
Referenced by clang::Sema::BuildVAArgExpr(), and clang::desugarForDiagnostic().
QualType ASTContext::GetBuiltinType | ( | unsigned | ID, |
GetBuiltinTypeError & | Error, | ||
unsigned * | IntegerConstantArgs = nullptr |
||
) | const |
Return the type for the specified builtin.
GetBuiltinType - Return the type for the specified builtin.
If IntegerConstantArgs
is non-null, it is filled in with a bitmask of arguments to the builtin that are required to be integer constant expressions.
Definition at line 11574 of file ASTContext.cpp.
References BuiltinInfo, clang::CPlusPlus, DecodeTypeFromStr(), clang::EST_BasicNoexcept, clang::EST_DynamicNone, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, GE_Missing_type, GE_None, getArrayDecayedType(), getDefaultCallingConvention(), getFunctionNoProtoType(), getFunctionType(), getLangOpts(), clang::Builtin::Context::getTypeString(), Id, clang::Type::isArrayType(), clang::Builtin::Context::isNoReturn(), clang::Builtin::Context::isNoThrow(), clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by clang::Sema::ActOnFunctionDeclarator(), getAbsoluteValueArgumentType(), and clang::Sema::LazilyCreateBuiltin().
TypedefDecl * ASTContext::getBuiltinVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list
type.
Definition at line 9148 of file ASTContext.cpp.
References CreateVaListDecl(), clang::TargetInfo::getBuiltinVaListKind(), and clang::Decl::isImplicit().
Referenced by getBuiltinVaListType(), GetFullTypeForDeclarator(), getPredefinedDecl(), getVaListTagDecl(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_va_list
type.
Definition at line 2084 of file ASTContext.h.
References getBuiltinVaListDecl(), and getTypeDeclType().
Referenced by clang::Sema::BuildVAArgExpr(), DecodeTypeFromStr(), clang::desugarForDiagnostic(), and getVAListElementType().
ASTContext::BuiltinVectorTypeInfo ASTContext::getBuiltinVectorTypeInfo | ( | const BuiltinType * | VecTy | ) | const |
Returns the element type, element count and number of vectors (in case of tuple) for a builtin vector type.
Definition at line 3879 of file ASTContext.cpp.
References BFloat16Ty, BoolTy, DoubleTy, FloatTy, clang::BuiltinType::getKind(), HalfTy, SVE_ELTTY, and SVE_INT_ELTTY.
Referenced by areCompatibleRVVTypes(), areCompatibleSveTypes(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), checkSizelessVectorShift(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Type::getRVVEltType(), getRVVTypeSize(), clang::Sema::GetSignedSizelessVectorType(), clang::Type::getSveEltType(), and HandleRISCVRVVVectorBitsTypeAttr().
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 7577 of file ASTContext.cpp.
References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptions::NonGC, clang::ObjC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.
CanQualType ASTContext::getCanonicalFunctionResultType | ( | QualType | ResultType | ) | const |
Adjust the given function result type.
Definition at line 4368 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getCanonicalType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), clang::CanQual< T >::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), and clang::Qualifiers::removeObjCLifetime().
Referenced by clang::Sema::deduceClosureReturnType(), and getFunctionNoProtoType().
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:
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 6824 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().
CanQualType ASTContext::getCanonicalParamType | ( | QualType | T | ) | const |
Return the canonical parameter type corresponding to the specific potentially non-canonical one.
Qualifiers are stripped off, functions are turned into function pointers, and arrays decay one level into pointers.
Definition at line 6016 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::QualType::getTypePtr(), getVariableArrayDecayedType(), and clang::Result.
Referenced by clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionCall(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), arrangeFreeFunctionLikeCall(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), getArgTypesForCall(), and getArgTypesForDeclaration().
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 6774 of file ASTContext.cpp.
References clang::TemplateArgument::CreatePackCopy(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), 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::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), 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().
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 6273 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().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 5014 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), getCanonicalTemplateArguments(), getCanonicalTemplateName(), clang::Type::isDependentType(), clang::TemplateSpecializationType::Profile(), and clang::TypeAlignment.
Referenced by checkBuiltinTemplateIdType(), clang::Sema::CheckTemplateIdType(), getTemplateSpecializationType(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().
Definition at line 2528 of file ASTContext.h.
References clang::Type::getCanonicalTypeInternal(), and clang::QualType::getTypePtr().
|
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.
Definition at line 2524 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(), CastsAwayConstness(), clang::Sema::CheckAssignmentConstraints(), 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(), 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(), IsModifiable(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Sema::isObjCPointerConversion(), clang::Sema::IsOverload(), 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(), TryConstCast(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().
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 7308 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(), clang::TargetInfo::getUInt64Type(), getUIntPtrType(), clang::ICIS_NoInit, Idents, IntTy, LongTy, clang::TagDecl::startDefinition(), clang::LangOptions::Swift, clang::LangOptions::Swift4_1, clang::LangOptions::Swift4_2, clang::ast_matchers::tagType, and clang::CanQual< T >::withConst().
Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), getPredefinedDecl(), and clang::Sema::Initialize().
RecordDecl * ASTContext::getCFConstantStringTagDecl | ( | ) | const |
Definition at line 7392 of file ASTContext.cpp.
References getCFConstantStringDecl().
Referenced by getPredefinedDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 7399 of file ASTContext.cpp.
References getCFConstantStringDecl(), and getTypedefType().
Referenced by DecodeTypeFromStr(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().
|
inline |
Return the size of the character type, in bits.
Definition at line 2300 of file ASTContext.h.
References CharTy, and getTypeSize().
Referenced by clang::Sema::AddAlignedAttr(), clang::Sema::BuildCXXNew(), calculateOffset(), collectSubRegionBindings(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getSVETypeSize(), HandleArmSveVectorBitsTypeAttr(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), setUsedBits(), toBits(), and toCharUnitsFromBits().
|
inline |
comments::FullComment * ASTContext::getCommentForDecl | ( | const Decl * | D, |
const Preprocessor * | PP | ||
) | const |
Return parsed documentation comment attached to a given declaration.
Returns nullptr if no comment is attached.
PP | the Preprocessor used with this TU. Could be nullptr if preprocessor is not available. |
Definition at line 631 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), clang::AS_public, cloneFullComment(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getCanonicalDecl(), getCommentForDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::RawComment::parse(), and ParsedComments.
Referenced by getCommentForDecl().
Definition at line 13203 of file ASTContext.cpp.
References getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), getQualifiedType(), clang::QualType::getTypePtr(), clang::QualType::getTypePtrOrNull(), hasSameType(), hasSameUnqualifiedType(), clang::QualType::isCanonical(), clang::SplitQualType::Quals, clang::Qualifiers::removeCommonQualifiers(), clang::QualType::split(), clang::SplitQualType::Ty, clang::Unqualified, unwrapSugar(), and X.
Referenced by clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), checkDeducedTemplateArguments(), clang::Sema::CheckMatrixElementwiseOperands(), clang::Sema::CheckMatrixMultiplyOperands(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorOperands(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::FindCompositePointerType(), getCommonArrayElementType(), getCommonElementType(), getCommonNonSugarTypeNode(), getCommonPointeeType(), getCommonSugarTypeNode(), getCommonTemplateArgument(), getCommonTypes(), mergeTypeLists(), and clang::Sema::UsualArithmeticConversions().
|
inline |
Definition at line 1316 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getComplexType().
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 3287 of file ASTContext.cpp.
References getCanonicalType(), getComplexType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::AddModeAttr(), ConvertDeclSpecToType(), DecodeTypeFromStr(), getCommonNonSugarTypeNode(), getComplexType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleIntToFloatConversion(), clang::Sema::UsualUnaryConversions(), and clang::ASTNodeImporter::VisitComplexType().
uint64_t ASTContext::getConstantArrayElementCount | ( | const ConstantArrayType * | CA | ) | const |
Return number of constant array elements.
getConstantArrayElementCount - Returns number of constant array elements.
Definition at line 7014 of file ASTContext.cpp.
References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().
Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable(), and setUsedBits().
QualType ASTContext::getConstantArrayType | ( | QualType | EltTy, |
const llvm::APInt & | ArySize, | ||
const Expr * | SizeExpr, | ||
ArrayType::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 3547 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), getConstantArrayType(), clang::TargetInfo::getMaxPointerWidth(), 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(), clang::SplitQualType::Ty, and clang::TypeAlignment.
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(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossOrdered(), emitOffloadingArrays(), clang::Sema::FindCompositePointerType(), getAsArrayType(), getCommonNonSugarTypeNode(), getConstantArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getStringLiteralArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), TryInitializerListConstruction(), TryListConversion(), TryOrBuildParenListInitialization(), TryToFixInvalidVariablyModifiedType(), and clang::ASTNodeImporter::VisitConstantArrayType().
QualType ASTContext::getConstantMatrixType | ( | QualType | ElementType, |
unsigned | NumRows, | ||
unsigned | NumColumns | ||
) | const |
Return the unique reference to the matrix type of the specified element type and size.
ElementType
must be a valid matrix element type (see MatrixType::isValidElementType). Definition at line 4214 of file ASTContext.cpp.
References getCanonicalType(), getConstantMatrixType(), clang::QualType::isCanonical(), clang::ConstantMatrixType::isDimensionValid(), clang::MatrixType::isValidElementType(), clang::ConstantMatrixType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildMatrixType(), clang::Sema::CheckMatrixMultiplyOperands(), getCommonNonSugarTypeNode(), getConstantMatrixType(), and clang::TreeTransform< Derived >::RebuildConstantMatrixType().
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 1275 of file ASTContext.h.
References clang::QualType::withConst().
Referenced by makeLaunchBoundsArgExpr(), and RVVType2Qual().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 12202 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Definition at line 13266 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), clang::Type::isFixedPointType(), clang::Type::isSaturatedFixedPointType(), SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, and SatUnsignedShortFractTy.
Referenced by ConvertDeclSpecToType(), and handleFixedPointConversion().
Definition at line 13433 of file ASTContext.cpp.
References AccumTy, clang::Type::castAs(), FractTy, clang::BuiltinType::getKind(), clang::Type::isUnsignedFixedPointType(), LongAccumTy, LongFractTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, ShortAccumTy, and ShortFractTy.
Referenced by handleFixedPointConversion().
Definition at line 11125 of file ASTContext.cpp.
References AccumTy, clang::Type::castAs(), FractTy, clang::Type::getAs(), getBitIntType(), getCorrespondingSignedType(), clang::BuiltinType::getKind(), getSignedWCharType(), getVectorType(), clang::Type::hasIntegerRepresentation(), clang::Type::hasSignedIntegerRepresentation(), Int128Ty, IntTy, clang::Type::isEnumeralType(), clang::Type::isFixedPointType(), clang::Type::isSignedFixedPointType(), LongAccumTy, LongFractTy, LongLongTy, LongTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, ShortAccumTy, ShortFractTy, ShortTy, and SignedCharTy.
Referenced by clang::Sema::BuildVAArgExpr(), clang::Sema::BuiltinChangeSignedness(), and getCorrespondingSignedType().
Definition at line 11051 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Type::getAs(), getBitIntType(), getCorrespondingUnsignedType(), clang::BuiltinType::getKind(), getUnsignedWCharType(), getVectorType(), clang::Type::hasIntegerRepresentation(), clang::Type::hasUnsignedIntegerRepresentation(), clang::Type::isEnumeralType(), clang::Type::isFixedPointType(), clang::Type::isUnsignedFixedPointType(), SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, SatUnsignedShortFractTy, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, and UnsignedShortTy.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuiltinChangeSignedness(), checkPointerTypesForAssignment(), ConvertDeclSpecToType(), clang::ento::SMTConv::doIntTypeConversion(), getCorrespondingUnsignedType(), getUIntPtrType(), and handleIntegerConversion().
|
inline |
Definition at line 1392 of file ASTContext.h.
Referenced by clang::Sema::ActOnCUDAExecConfigExpr().
StringRef ASTContext::getCUIDHash | ( | ) | const |
Definition at line 13606 of file ASTContext.cpp.
References clang::LangOptions::CUID.
Referenced by clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl().
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 3377 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::CodeGen::CodeGenModule::getVTableLinkage(), clang::CodeGen::CodeGenVTables::isVTableExternal(), and clang::ASTDeclWriter::VisitCXXRecordDecl().
|
inline |
Get module under construction, nullptr if this is not a C++20 module.
Definition at line 1057 of file ASTContext.h.
Referenced by clang::Decl::isInAnotherModuleUnit(), and clang::CodeGen::CodeGenModule::Release().
Return a type with additional const
, volatile
, or restrict
qualifiers.
Definition at line 2117 of file ASTContext.h.
References clang::Qualifiers::fromCVRMask(), and getQualifiedType().
Referenced by clang::Sema::CheckPointerToMemberOperands().
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 871 of file ASTContext.cpp.
References clang::LangOptions::CXXABI, clang::TargetInfo::getCXXABI(), clang::TargetCXXABI::getKind(), getLangOpts(), and getTargetInfo().
Referenced by createCXXABI(), and clang::CodeGen::CreateItaniumCXXABI().
|
inline |
Definition at line 1339 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getDecayedType().
Return the uniqued reference to a specified decay from the original type to the decayed type.
Definition at line 3362 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Return the uniqued reference to the decayed version of the given type.
Can only be called on array and function types which decay to pointer types.
Definition at line 3382 of file ASTContext.cpp.
References getArrayDecayedType(), getDecayedType(), getPointerType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuiltinDecay(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::deduceOpenCLAddressSpace(), getAdjustedParameterType(), getCommonSugarTypeNode(), getDecayedType(), getExceptionObjectType(), SemaBuiltinAlignment(), and clang::ASTNodeImporter::VisitDecayedType().
Return a conservative estimate of the alignment of the specified decl D
.
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 1681 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::ast_matchers::arrayType, clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::TargetInfo::getCharWidth(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getLargeArrayAlign(), clang::TargetInfo::getLargeArrayMinWidth(), clang::TargetInfo::getMaxAlignedAttribute(), clang::Decl::getMaxAlignment(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), clang::QualType::getQualifiers(), getTargetInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Decl::hasAttr(), clang::Qualifiers::hasUnaligned(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), Offset, Parent, clang::SC_Static, toBits(), and toCharUnitsFromBits().
Referenced by clang::Sema::CheckThreadLocalForLargeAlignment(), emitAddrOfVarFromArray(), clang::CodeGen::CGOpenMPRuntime::emitDeclareTargetVarDefinition(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), emitOutlinedFunctionPrologue(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), getBaseAlignmentAndOffsetFromLValue(), clang::Sema::getNamedReturnInfo(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Sema::RefersToMemberWithReducedAlignment(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 12229 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1466 of file ASTContext.cpp.
References Allocate(), and clang::Result.
Referenced by clang::Decl::getAttrs().
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 5716 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentDecltypeType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildDecltypeType(), and clang::ASTNodeImporter::VisitDecltypeType().
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 5871 of file ASTContext.cpp.
References clang::DeducedTemplateSpecializationType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckTypenameType(), clang::Sema::getTypeName(), clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType(), and clang::ASTNodeImporter::VisitDeducedTemplateSpecializationType().
CallingConv ASTContext::getDefaultCallingConvention | ( | bool | IsVariadic, |
bool | IsCXXMethod, | ||
bool | IsBuiltin = false |
||
) | const |
Retrieves the default calling convention for the current target.
Definition at line 11981 of file ASTContext.cpp.
References clang::CC_C, clang::CC_X86FastCall, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86VectorCall, clang::LangOptions::DCC_CDecl, clang::LangOptions::DCC_FastCall, clang::LangOptions::DCC_None, clang::LangOptions::DCC_RegCall, clang::LangOptions::DCC_StdCall, clang::LangOptions::DCC_VectorCall, clang::TargetInfo::getDefaultCallingConv(), getTargetInfo(), and hasFeature().
Referenced by addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::Sema::CheckCallingConvAttr(), compareConversionFunctions(), clang::Sema::DeclareGlobalAllocationFunction(), DiagnoseCallingConvCast(), GetBuiltinType(), getCCForDeclaratorChunk(), getDummyLambdaType(), getImplicitMethodEPI(), getLambdaConversionFunctionCallConv(), GetOpenCLBuiltinFctOverloads(), hasDefaultCXXMethodCC(), and repeatForLambdaConversionFunctionCallingConvs().
|
inline |
Returns default address space based on OpenCL version and enabled features.
Definition at line 1383 of file ASTContext.h.
References clang::opencl_generic, and clang::opencl_private.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), deduceOpenCLPointeeAddrSpace(), clang::Sema::getDefaultCXXMethodAddrSpace(), and clang::Expr::isNullPointerConstant().
QualType ASTContext::getDependentAddressSpaceType | ( | QualType | PointeeType, |
Expr * | AddrSpaceExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
Definition at line 4286 of file ASTContext.cpp.
References clang::DependentAddressSpaceType::getAddrSpaceExpr(), getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentAddressSpaceType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildAddressSpaceAttr(), and getCommonNonSugarTypeNode().
Return a dependent bit-precise integer type with the specified signedness and bit count.
Definition at line 4609 of file ASTContext.cpp.
References clang::Expr::isInstantiationDependent(), clang::DependentBitIntType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildBitIntType().
QualType ASTContext::getDependentNameType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 5122 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), getDependentNameType(), clang::QualType::isNull(), clang::DependentNameType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnDependentTag(), clang::Sema::ActOnMSVCUnknownTypeName(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckTypenameType(), getCommonNonSugarTypeNode(), clang::Sema::getConstructorName(), getDependentNameType(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), clang::TreeTransform< Derived >::RebuildDependentNameType(), recoverFromTypeInKnownDependentBase(), and clang::ASTNodeImporter::VisitDependentNameType().
QualType ASTContext::getDependentSizedArrayType | ( | QualType | EltTy, |
Expr * | NumElts, | ||
ArrayType::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 3773 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(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::Sema::BuildArrayType(), clang::desugarForDiagnostic(), getAsArrayType(), getCommonNonSugarTypeNode(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), clang::InitializationSequence::Perform(), and clang::ASTNodeImporter::VisitDependentSizedArrayType().
QualType ASTContext::getDependentSizedExtVectorType | ( | QualType | VectorType, |
Expr * | SizeExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
FIXME: We will need these to be uniqued, or at least comparable, at some point.
Definition at line 4173 of file ASTContext.cpp.
References getCanonicalType(), getDependentSizedExtVectorType(), clang::DependentSizedExtVectorType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildExtVectorType(), getCommonNonSugarTypeNode(), and getDependentSizedExtVectorType().
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 4246 of file ASTContext.cpp.
References getCanonicalType(), clang::MatrixType::getElementType(), clang::DependentSizedMatrixType::getRowExpr(), clang::DependentSizedMatrixType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildMatrixType(), and getCommonNonSugarTypeNode().
TemplateName ASTContext::getDependentTemplateName | ( | NestedNameSpecifier * | NNS, |
const IdentifierInfo * | Name | ||
) | const |
Retrieve the template name that represents a dependent template name such as MetaFun::template
apply.
Definition at line 9246 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().
Referenced by clang::Sema::ActOnTemplateName(), clang::Sema::DiagnoseUnknownTemplateName(), getDependentTemplateName(), and clang::ASTImporter::Import().
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 9282 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 5158 of file ASTContext.cpp.
References Allocate(), clang::ETK_None, clang::ETK_Typename, getCanonicalNestedNameSpecifier(), getCanonicalTemplateArguments(), getDependentTemplateSpecializationType(), clang::NestedNameSpecifier::isDependent(), clang::DependentTemplateSpecializationType::Profile(), and clang::TypeAlignment.
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
ArrayRef< TemplateArgumentLoc > | Args | ||
) | const |
Definition at line 5147 of file ASTContext.cpp.
References getArgument(), and getDependentTemplateSpecializationType().
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::CheckTemplateIdType(), getCommonNonSugarTypeNode(), getDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), and clang::ASTNodeImporter::VisitDependentTemplateSpecializationType().
QualType ASTContext::getDependentVectorType | ( | QualType | VectorType, |
Expr * | SizeExpr, | ||
SourceLocation | AttrLoc, | ||
VectorType::VectorKind | VecKind | ||
) | const |
Return the unique reference to the type for a dependently sized vector of the specified element type.
Definition at line 4099 of file ASTContext.cpp.
References getCanonicalType(), getDependentVectorType(), clang::DependentVectorType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildVectorType(), getCommonNonSugarTypeNode(), and getDependentVectorType().
|
inline |
Definition at line 739 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1462 of file ASTContext.cpp.
References clang::SourceManager::getDiagnostics().
Referenced by checkNullabilityConsistency(), clang::SYCLUniqueStableNameExpr::ComputeName(), createDeviceMangleContext(), createMangleContext(), clang::StructuralEquivalenceContext::Diag1(), clang::StructuralEquivalenceContext::Diag2(), clang::QualType::dump(), clang::APValue::dump(), clang::comments::Comment::dump(), clang::Stmt::dump(), clang::Decl::dump(), clang::DeclContext::dumpAsDecl(), clang::cross_tu::CrossTranslationUnitContext::emitCrossTUDiagnostics(), clang::ASTImporter::FromDiag(), getFunctionFeatureMap(), clang::ASTImporter::Import(), clang::ASTReader::InitializeContext(), clang::RecordDecl::mayInsertExtraPadding(), clang::RawComment::parse(), rewriteToNumericBoxedExpression(), selectBestPath(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType, | ||
TagDecl * | OwnedTagDecl = nullptr |
||
) | const |
Definition at line 5056 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), clang::QualType::isCanonical(), clang::ElaboratedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTypenameType(), buildNamedType(), clang::Sema::BuildStdInitializerList(), clang::Sema::CheckComparisonCategoryType(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckTypenameType(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), getCommonSugarTypeNode(), clang::Sema::getDestructorName(), clang::Sema::getElaboratedType(), GetFullTypeForDeclarator(), clang::TypeName::getFullyQualifiedType(), lookupPromiseType(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildElaboratedType(), and clang::ASTNodeImporter::VisitElaboratedType().
Definition at line 4764 of file ASTContext.cpp.
References clang::Decl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by clang::CodeGen::CGDebugInfo::completeType(), and getOpenCLEnumType().
Definition at line 6953 of file ASTContext.cpp.
References getDecayedType(), clang::QualType::getUnqualifiedType(), getVariableArrayDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by clang::Sema::BuildCXXThrow(), clang::Sema::BuildExceptionDeclaration(), and decomposeTypeForEH().
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 1784 of file ASTContext.cpp.
References clang::TargetInfo::getExnObjectAlignment(), and toCharUnitsFromBits().
Referenced by clang::Sema::CheckCXXThrowOperand().
|
inline |
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition at line 1166 of file ASTContext.h.
References ExternalSource.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::FrontendAction::BeginSourceFile(), clang::ExternalASTMerger::CompleteType(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), getASTRecordLayout(), getCurrentKeyFunction(), clang::CXXRecordDecl::getLambdaContextDecl(), clang::Sema::getStdAlignValT(), clang::Sema::getStdBadAlloc(), clang::Sema::getStdNamespace(), clang::Sema::handleLambdaNumbering(), clang::Sema::hasAcceptableDefinition(), clang::Sema::Initialize(), isConsumerInterestedIn(), IsStructurallyEquivalent(), clang::RedeclarableTemplateDecl::loadLazySpecializationsImpl(), clang::DeclContext::lookup(), clang::DeclContext::lookups(), clang::LazyGenerationalUpdatePtr< Owner, T, Update >::makeValue(), clang::ParseAST(), clang::Parser::ParseFirstTopLevelDecl(), setNonKeyFunction(), shouldOmitDefinition(), clang::Decl::updateOutOfDate(), clang::ASTNodeImporter::VisitRecordDecl(), and clang::Sema::~Sema().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 1159 of file ASTContext.cpp.
References clang::ExternCContextDecl::Create(), and getTranslationUnitDecl().
Referenced by clang::Sema::findLocallyScopedExternCDecl(), getPredefinedDecl(), and clang::Sema::RegisterLocallyScopedExternCDecl().
Return the unique reference to an extended vector type of the specified element type and size.
getExtVectorType - Return the unique reference to an extended vector type of the specified element type and size.
VectorType
must be a built-in type.VectorType must be a built-in type.
Definition at line 4139 of file ASTContext.cpp.
References clang::VectorType::GenericVector, clang::Type::getAs(), getCanonicalType(), getExtVectorType(), clang::BitIntType::getNumBits(), clang::Type::isBitIntType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::Type::isDependentType(), clang::VectorType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildExtVectorType(), CheckExtVectorComponent(), clang::Sema::CheckVectorConditionalTypes(), checkVectorShift(), convertVector(), DecodeTypeFromStr(), getCommonNonSugarTypeNode(), getExtVectorType(), clang::Sema::GetSignedVectorType(), OpenCLConvertScalarsToVectors(), and clang::ASTNodeImporter::VisitExtVectorType().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3428 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain(), and getFieldOffset().
Referenced by emitAddrOfZeroSizeField(), getFieldOffset(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), getSubobjectOffset(), and clang::Sema::RefersToMemberWithReducedAlignment().
|
inline |
Retrieve the C FILE type.
Definition at line 1922 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
Definition at line 13366 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
llvm::APFixedPoint ASTContext::getFixedPointMax | ( | QualType | Ty | ) | const |
Definition at line 13423 of file ASTContext.cpp.
References getFixedPointSemantics(), and clang::Type::isFixedPointType().
Referenced by clang::Sema::ActOnNumericConstant(), and CheckImplicitConversion().
llvm::APFixedPoint ASTContext::getFixedPointMin | ( | QualType | Ty | ) | const |
Definition at line 13428 of file ASTContext.cpp.
References getFixedPointSemantics(), and clang::Type::isFixedPointType().
Referenced by CheckImplicitConversion().
Definition at line 13320 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
Referenced by clang::Sema::ActOnNumericConstant(), getFixedPointSemantics(), and clang::ASTNodeImporter::VisitFixedPointLiteral().
llvm::FixedPointSemantics ASTContext::getFixedPointSemantics | ( | QualType | Ty | ) | const |
Definition at line 13408 of file ASTContext.cpp.
References getFixedPointScale(), getIntWidth(), getTargetInfo(), getTypeSize(), clang::Type::isFixedPointType(), clang::Type::isIntegerType(), clang::Type::isSaturatedFixedPointType(), clang::Type::isSignedFixedPointType(), and clang::Type::isSignedIntegerType().
Referenced by CheckImplicitConversion(), DiagnoseBadShiftValues(), getFixedPointMax(), and getFixedPointMin().
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 7062 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().
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 7073 of file ASTContext.cpp.
References getFloatingTypeOrder(), and getFloatTypeSemantics().
Referenced by AnalyzeCompoundAssignment(), and CheckImplicitConversion().
const llvm::fltSemantics & ASTContext::getFloatTypeSemantics | ( | QualType | T | ) | const |
Return the APFloat 'semantics' for the specified scalar floating point type.
getFloatTypeSemantics - Return the APFloat 'semantics' for the specified scalar floating point type.
Definition at line 1648 of file ASTContext.cpp.
References clang::Type::castAs(), clang::TargetInfo::getBFloat16Format(), clang::TargetInfo::getDoubleFormat(), clang::TargetInfo::getFloat128Format(), clang::TargetInfo::getFloatFormat(), clang::TargetInfo::getHalfFormat(), clang::TargetInfo::getIbm128Format(), clang::BuiltinType::getKind(), getLangOpts(), clang::TargetInfo::getLongDoubleFormat(), and clang::HLSL.
Referenced by actOnOMPReductionKindClause(), BuildFloatingLiteral(), canConvertIntTyToFloatTy(), clang::Sema::CheckFloatComparison(), CheckImplicitConversion(), clang::Sema::checkTypeSupport(), clang::CodeGen::CodeGenTypes::ConvertType(), getFloatingTypeSemanticOrder(), clang::interp::Context::getFloatSemantics(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getZeroExpr(), IsStandardConversion(), TryEvaluateBuiltinNaN(), tryGCCVectorConvertAndSplat(), and unsupportedTypeConversion().
|
inline |
Definition at line 781 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and clang::CodeGen::CGCXXABI::ErrorUnsupportedABI().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
const FunctionDecl * | FD | ||
) | const |
Definition at line 13491 of file ASTContext.cpp.
References clang::TargetOptions::CPU, clang::TargetOptions::Features, getDiagnostics(), getFunctionFeatureMap(), clang::TargetInfo::getTargetOpts(), and clang::TargetInfo::initFeatureMap().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVariableDeclarationType(), getFunctionFeatureMap(), and initFeatureMaps().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
GlobalDecl | GD | ||
) | const |
Definition at line 13503 of file ASTContext.cpp.
References clang::TargetOptions::CPU, clang::TargetOptions::FeatureMap, clang::TargetOptions::FeaturesAsWritten, filterFunctionTargetAttrs(), filterFunctionTargetVersionAttrs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::TargetInfo::getCPUSpecificCPUDispatchFeatures(), clang::GlobalDecl::getDecl(), getDiagnostics(), clang::GlobalDecl::getMultiVersionIndex(), clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), clang::TargetInfo::initFeatureMap(), and clang::TargetInfo::isValidCPUName().
Definition at line 1534 of file ASTContext.h.
References getFunctionNoProtoType().
QualType ASTContext::getFunctionNoProtoType | ( | QualType | ResultTy, |
const FunctionType::ExtInfo & | Info | ||
) | const |
Return a K&R style C function type like 'int()'.
getFunctionNoProtoType - Return a K&R style C function type like 'int()'.
Definition at line 4330 of file ASTContext.cpp.
References getCanonicalFunctionResultType(), getFunctionNoProtoType(), isCanonicalResultType(), clang::FunctionNoProtoType::Profile(), and clang::TypeAlignment.
Referenced by adjustFunctionType(), clang::Sema::BuildDeclarationNameExpr(), clang::desugarForDiagnostic(), EmitFunctionDeclPointer(), GeneralizeFunctionType(), GetBuiltinType(), getCommonNonSugarTypeNode(), GetFullTypeForDeclarator(), getFunctionNoProtoType(), getFunctionTypeWithoutPtrSizes(), clang::Sema::ImplicitlyDefineFunction(), mergeFunctionTypes(), clang::TreeTransform< Derived >::RebuildFunctionNoProtoType(), and clang::ASTNodeImporter::VisitFunctionNoProtoType().
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1539 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(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::Sema::IsFunctionConversion(), LookupDirect(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), clang::ASTDeclReader::UpdateDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitFunctionProtoType().
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 3198 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().
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 3234 of file ASTContext.cpp.
References clang::Type::getAs(), getFunctionNoProtoType(), getFunctionType(), and removePtrSizeAddrSpace().
Referenced by hasSameFunctionTypeIgnoringPtrSizes().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 11752 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForFunction().
Referenced by clang::ASTRecordWriter::AddFunctionDefinition(), basicGVALinkageForVariable(), DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), isFunctionDefinitionDiscarded(), clang::FunctionDecl::isInlineBuiltinDeclaration(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) | const |
Definition at line 11835 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForVariable().
Referenced by DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), shouldBeInCOMDAT(), and clang::ASTDeclWriter::VisitVarDecl().
QualType ASTContext::getIncompleteArrayType | ( | QualType | EltTy, |
ArrayType::ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return a unique reference to the type for an incomplete array of the specified element type.
Definition at line 3841 of file ASTContext.cpp.
References getCanonicalType(), getIncompleteArrayType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::IncompleteArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), clang::desugarForDiagnostic(), clang::Sema::FindCompositePointerType(), getAsArrayType(), getCommonNonSugarTypeNode(), getIncompleteArrayType(), getUnqualifiedArrayType(), mergeTypes(), and clang::ASTNodeImporter::VisitIncompleteArrayType().
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 4643 of file ASTContext.cpp.
References clang::Decl::getPreviousDecl(), NeedsInjectedClassNameType(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckClassTemplate(), clang::ClassTemplatePartialSpecializationDecl::Create(), getCommonNonSugarTypeNode(), clang::ASTDeclReader::VisitClassTemplateDecl(), and clang::ASTNodeImporter::VisitRecordDecl().
TemplateArgument ASTContext::getInjectedTemplateArg | ( | NamedDecl * | ParamDecl | ) |
Definition at line 5207 of file ASTContext.cpp.
References clang::QualType::addConst(), clang::TemplateArgument::CreatePackCopy(), DependentTy, getPackExpansionType(), getTypeDeclType(), clang::Expr::getValueKindForType(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::Type::isRecordType(), and clang::Decl::isTemplateParameterPack().
Referenced by clang::Sema::getIdentityTemplateArgumentLoc(), and 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 5247 of file ASTContext.cpp.
References getInjectedTemplateArg(), and clang::TemplateParameterList::size().
Referenced by clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::RedeclarableTemplateDecl::getInjectedTemplateArgs(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().
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 7659 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().
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 7235 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().
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 1487 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1563 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitFieldDecl().
If the given using decl Inst
is an instantiation of another (possibly unresolved) using decl, return it.
Definition at line 1522 of file ASTContext.cpp.
Referenced by isInstantiationOfUnresolvedUsingDecl(), clang::ASTNodeImporter::VisitUsingDecl(), and clang::ASTDeclWriter::VisitUsingDecl().
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 1541 of file ASTContext.cpp.
Referenced by clang::ASTNodeImporter::VisitUsingEnumDecl(), and clang::ASTDeclWriter::VisitUsingEnumDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1552 of file ASTContext.cpp.
Referenced by clang::ASTNodeImporter::VisitUsingShadowDecl(), and clang::ASTDeclWriter::VisitUsingShadowDecl().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1219 of file ASTContext.cpp.
References buildImplicitTypedef(), and Int128Ty.
Referenced by getPredefinedDecl(), and clang::Sema::Initialize().
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 7263 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().
interp::Context & ASTContext::getInterpContext | ( | ) |
Returns the clang bytecode interpreter context.
Definition at line 897 of file ASTContext.cpp.
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 5962 of file ASTContext.cpp.
References clang::TargetInfo::getIntMaxType().
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getIntPtrType | ( | ) | const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 5985 of file ASTContext.cpp.
References clang::TargetInfo::getIntPtrType().
Referenced by getUIntPtrType(), and clang::Sema::Initialize().
getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned.
Returns empty type if there is no appropriate target types.
Definition at line 12111 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, clang::Signed, and UnsignedInt128Ty.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnNumericConstant(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCanonicalLoop(), clang::Sema::ActOnOpenMPRegionStart(), AddDirectArgument(), clang::Sema::AddModeAttr(), checkOpenMPLoop(), createKmpTaskTRecordDecl(), createRuntimeShuffleFunction(), EmitAsmStores(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitOffloadingArrays(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::ento::SMTConv::getAPSIntType(), clang::CodeGen::CGOpenMPRuntimeGPU::getDefaultDistScheduleAndChunk(), clang::CodeGen::CGOpenMPRuntime::getDefaultScheduleAndChunk(), clang::CodeGen::CGOpenMPRuntimeGPU::getDefaultScheduleAndChunk(), clang::Sema::GetSignedSizelessVectorType(), handleAnyX86InterruptAttr(), RVVType2Qual(), and shuffleAndStore().
Definition at line 11040 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(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckEnumConstant(), CheckICE(), CheckImplicitConversion(), clang::Sema::CheckTemplateArgument(), clang::interp::Context::classify(), DeduceFromInitializerList(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadShiftValues(), DiagnoseFloatingImpCast(), clang::SourceLocExpr::EvaluateInContext(), clang::ento::BasicValueFactory::getAPSIntType(), 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().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1934 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
Definition at line 13301 of file ASTContext.cpp.
References clang::TargetInfo::getCUDABuiltinAddressSpace(), clang::getLangASFromTargetAS(), clang::TargetInfo::getOpenCLBuiltinAddressSpace(), and getTargetInfo().
Referenced by DecodeTypeFromStr().
|
inline |
Definition at line 761 of file ASTContext.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), 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(), buildGlobalBlock(), buildImplicitRecord(), clang::Sema::BuildMatrixType(), CalculateHiddenNames(), clang::arcmt::trans::canApplyWeak(), canAssignObjCInterfacesInBlockPointer(), CastsAwayConstness(), 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(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateRecoveryExpr(), clang::tooling::createRenameAtomicChanges(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), DecodeTypeFromStr(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::Stmt::dumpPretty(), clang::LocationContext::dumpStack(), EmitDeclDestroy(), EmitDeclInit(), emitMappingInformation(), EncodeBitField(), clang::ento::BasicValueFactory::evalAPSInt(), clang::Expr::EvaluateAsInitializer(), clang::SourceLocExpr::EvaluateInContext(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), clang::arcmt::trans::findSemiAfterLocation(), fixUPCAddressofArraySubscriptWithSpan(), fixVarDeclWithSpan(), 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(), getDeclLanguageLinkage(), clang::LinkageComputer::getDeclLinkageAndVisibility(), GetDiagForGotoScopeDecl(), clang::ento::retaincountchecker::RefLeakReportVisitor::getEndPath(), DerefSimplePtrArithFixableGadget::getFixits(), UPCPreIncrementGadget::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::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(), hasSameFunctionTypeIgnoringExceptionSpec(), InsertOCLBuiltinDeclarationsFromTable(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::Expr::isCXX11ConstantExpr(), clang::ParmVarDecl::isDestroyedInCallee(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCPropertyDecl::isDirectProperty(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::VarDecl::isKnownToBeDefined(), clang::Sema::isLaxVectorConversion(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::VarDecl::isNoDestroy(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::Expr::isNullPointerConstant(), isOutOfScopePreviousDeclaration(), clang::QualType::isPODType(), isPromotableBitField(), isPromotableIntegerType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), IsStringInit(), clang::CodeGen::CodeGenModule::isTypeConstant(), 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(), populateInitializerFixItWithSpan(), 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(), setObjCGCLValueClass(), shouldNotRewriteImmediateMessageArgs(), ShouldUseExternalRTTIDescriptor(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenModule::stopAutoInit(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarArrayTypes(), UnwrapSimilarTypes(), clang::QualType::UseExcessPrecision(), useInlineVisibilityHidden(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ASTNodeImporter::VisitBuiltinType(), clang::ASTDeclReader::VisitDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTDeclReader::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
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 7967 of file ASTContext.cpp.
References clang::Type::getAs(), getIntWidth(), IntTy, and UnsignedIntTy.
|
inline |
Return a type with the given lifetime qualifier.
lifetime
may be OCL_None
. Definition at line 2145 of file ASTContext.h.
References clang::Qualifiers::addObjCLifetime(), getQualifiedType(), clang::Qualifiers::OCL_None, and clang::ast_matchers::type.
Referenced by clang::Sema::BuildCXXNew(), clang::Sema::CheckParameter(), and clang::Sema::inferObjCARCLifetime().
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 626 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
Referenced by clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1965 of file ASTContext.h.
References BoolTy, getLangOpts(), and IntTy.
Referenced by clang::Sema::BuildTypeTrait(), checkArithmeticOrEnumeralCompare(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CreateBuiltinUnaryOp(), and clang::ento::BasicValueFactory::getTruthValue().
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 3439 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), getLValueReferenceType(), clang::QualType::isCanonical(), clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AddBuiltinAssignmentOperatorCandidates(), AddImplicitObjectParameterType(), 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::desugarForDiagnostic(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), getCaptureFieldType(), getCommonNonSugarTypeNode(), clang::Sema::getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), getImplicitObjectParamType(), getLValueReferenceType(), clang::SubstNonTypeTemplateParmExpr::getParameterType(), getReferenceQualifiedType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), implicitObjectParamIsLifetimeBound(), lookupPromiseType(), makeQualifiedLValueReferenceType(), NoteSurrogateCandidate(), clang::InitializationSequence::Perform(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::tryCaptureVariable(), clang::CodeGen::ConstantEmitter::tryEmitConstantExpr(), and clang::ASTNodeImporter::VisitLValueReferenceType().
QualType ASTContext::getMacroQualifiedType | ( | QualType | UnderlyingTy, |
const IdentifierInfo * | MacroII | ||
) | const |
Definition at line 5110 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), and clang::TypeAlignment.
Referenced by getCommonSugarTypeNode(), getFunctionTypeWithExceptionSpec(), and clang::TreeTransform< Derived >::RebuildMacroQualifiedType().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1178 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
Referenced by getPredefinedDecl(), and clang::ASTNodeImporter::VisitBuiltinTemplateDecl().
|
inline |
Definition at line 1896 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by getMakeIntegerSeqDecl().
Definition at line 12152 of file ASTContext.cpp.
Referenced by clang::Sema::BuildVariableInstantiation(), and clang::TemplateDeclInstantiator::InitFunctionInstantiation().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | const DeclContext * | DC | ) |
Retrieve the context for computing mangling numbers in the given DeclContext.
Definition at line 12178 of file ASTContext.cpp.
References createMangleNumberingContext().
Referenced by clang::Sema::getCurrentMangleNumberContext(), clang::Sema::handleLambdaNumbering(), and clang::Sema::handleTagNumbering().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | NeedExtraManglingDecl_t | , |
const Decl * | D | ||
) |
Definition at line 12187 of file ASTContext.cpp.
References createMangleNumberingContext().
Find the 'this' offset for the member path in a pointer-to-member APValue.
Definition at line 2585 of file ASTContext.cpp.
References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::Decl::getDeclContext(), clang::APValue::getMemberPointerDecl(), clang::APValue::getMemberPointerPath(), clang::APValue::isMemberPointerToDerivedMember(), and clang::CharUnits::Zero().
Return the uniqued reference to the type for a member pointer to the specified type in the specified class.
getMemberPointerType - Return the uniqued reference to the type for a member pointer to the specified type, in the specified class.
The class Cls
is a Type
because it could be a dependent name.
Definition at line 3517 of file ASTContext.cpp.
References getCanonicalType(), getMemberPointerType(), clang::QualType::isCanonical(), clang::Type::isCanonicalUnqualified(), clang::MemberPointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildMemberPointerType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::checkOpenMPDeclareVariantFunction(), decomposeTypeForEH(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), getCommonNonSugarTypeNode(), clang::TypeName::getFullyQualifiedType(), getMemberPointerType(), GetTypeOfFunction(), clang::Sema::IsMemberPointerConversion(), IsStandardConversion(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), TryStaticMemberPointerUpcast(), and clang::ASTNodeImporter::VisitMemberPointerType().
Get the initializations to perform when importing a module, if any.
Definition at line 1142 of file ASTContext.cpp.
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), and clang::TextNodeDumper::VisitImportDecl().
Get the additional modules in which the definition Def
has been merged.
Definition at line 1083 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::diagnoseMissingImport(), clang::Sema::hasMergedDefinitionInCurrentModule(), clang::Sema::hasVisibleMergedDefinition(), and clang::TextNodeDumper::Visit().
MSGuidDecl * ASTContext::getMSGuidDecl | ( | MSGuidDeclParts | Parts | ) | const |
Return a declaration for the global GUID object representing the given GUID value.
Definition at line 12270 of file ASTContext.cpp.
References getMSGuidType(), MSGuidTagDecl, clang::MSGuidDecl::Profile(), and clang::QualType::withConst().
Referenced by clang::Sema::BuildCXXUuidof(), and handleUuidAttr().
|
inline |
Retrieve the implicitly-predeclared 'struct _GUID' declaration.
Definition at line 2103 of file ASTContext.h.
References MSGuidTagDecl.
Referenced by getPredefinedDecl().
|
inline |
Retrieve the implicitly-predeclared 'struct _GUID' type.
Definition at line 2106 of file ASTContext.h.
References getTagDeclType(), and MSGuidTagDecl.
Referenced by clang::Sema::ActOnCXXUuidof(), and getMSGuidDecl().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 6216 of file ASTContext.cpp.
References clang::TemplateName::AssumedTemplate, clang::OverloadedTemplateStorage::begin(), DeclarationNames, clang::TemplateName::DependentTemplate, clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getDeclName(), clang::AssumedTemplateStorage::getDeclName(), clang::DependentTemplateName::getIdentifier(), clang::DeclarationNameTable::getIdentifier(), clang::DependentTemplateName::getOperator(), clang::SubstTemplateTemplateParmStorage::getParameter(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::DependentTemplateName::isIdentifier(), clang::DeclarationNameLoc::makeCXXOperatorNameLoc(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, clang::TemplateName::Template, and clang::TemplateName::UsingTemplate.
Referenced by clang::Sema::DecomposeUnqualifiedId(), and clang::Sema::GetNameFromUnqualifiedId().
OMPTraitInfo & ASTContext::getNewOMPTraitInfo | ( | ) |
Return a new OMPTraitInfo object owned by this context.
Definition at line 13570 of file ASTContext.cpp.
Referenced by instantiateOMPDeclareVariantAttr(), and clang::ASTRecordReader::readOMPTraitInfo().
|
inlinestatic |
Definition at line 1011 of file ASTContext.h.
|
inline |
Definition at line 771 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::isInNoSanitizeList(), and clang::RecordDecl::mayInsertExtraPadding().
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1877 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
CanQualType ASTContext::getNSIntegerType | ( | ) | const |
Definition at line 7608 of file ASTContext.cpp.
References clang::TargetInfo::getTriple(), LongLongTy, and LongTy.
Referenced by shouldNotPrintDirectly().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1868 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::ObjCMethodDecl::definedInNSObject(), and clang::Type::isBlockCompatibleObjCPointerType().
CanQualType ASTContext::getNSUIntegerType | ( | ) | const |
Definition at line 7599 of file ASTContext.cpp.
References clang::TargetInfo::getTriple(), UnsignedLongLongTy, and UnsignedLongTy.
Referenced by shouldNotPrintDirectly().
TypedefDecl * ASTContext::getObjCClassDecl | ( | ) | const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
Definition at line 8739 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinClassTy.
Referenced by getObjCClassType(), getPredefinedDecl(), and clang::Sema::Initialize().
|
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 1843 of file ASTContext.h.
References getObjCClassType().
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::FindCompositeObjCPointerType(), and ShouldTryAgainWithRedefinitionType().
|
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 2051 of file ASTContext.h.
References getObjCClassDecl(), and getTypeDeclType().
Referenced by clang::desugarForDiagnostic(), getObjCClassRedefinitionType(), clang::ObjCMethodDecl::getSelfType(), isObjCClassType(), LookupMemberExpr(), and clang::Sema::MergeTypedefNameDecl().
|
inline |
Definition at line 1816 of file ASTContext.h.
Referenced by clang::Sema::BuildObjCStringLiteral().
std::string ASTContext::getObjCEncodingForBlock | ( | const BlockExpr * | blockExpr | ) | const |
Return the encoded type for this block declaration.
getObjCEncodingForBlock - Return the encoded type for this block declaration.
Definition at line 7685 of file ASTContext.cpp.
References clang::Type::castAs(), charUnitsToString(), clang::Type::getCanonicalTypeInternal(), getLangOpts(), getObjCEncodingForMethodParameter(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::Expr::getType(), getTypeSizeInChars(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::Decl::OBJC_TQ_None, and VoidPtrTy.
Referenced by buildBlockDescriptor(), and getBlockDescriptorName().
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.
Definition at line 7741 of file ASTContext.cpp.
References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), and clang::CharUnits::Zero().
std::string ASTContext::getObjCEncodingForMethodDecl | ( | const ObjCMethodDecl * | Decl, |
bool | Extended = false |
||
) | const |
Emit the encoded type for the method declaration Decl
into S
.
getObjCEncodingForMethodDecl - Return the encoded type for this method declaration.
Definition at line 7799 of file ASTContext.cpp.
References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), clang::ParmVarDecl::getObjCDeclQualifier(), getObjCEncodingForMethodParameter(), getObjCEncodingTypeSize(), clang::ParmVarDecl::getOriginalType(), clang::ValueDecl::getType(), getTypeSizeInChars(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), and VoidPtrTy.
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 7782 of file ASTContext.cpp.
References getObjCEncodingForTypeQualifier().
Referenced by getObjCEncodingForBlock(), and getObjCEncodingForMethodDecl().
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:
Definition at line 7896 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::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