clang
19.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. More... | |
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. More... | |
ParentMapContext & | getParentMapContext () |
Returns the dynamic AST node parent map context. More... | |
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. More... | |
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. More... | |
void | DeallocateDeclListNode (DeclListNode *N) |
Deallcates a DeclListNode by returning it to the ListNodeFreeList pool. More... | |
size_t | getASTAllocatedMemory () const |
Return the total amount of physical memory allocated for representing AST nodes and type information. More... | |
size_t | getSideTableAllocatedMemory () const |
Return the total memory used for various side tables. More... | |
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. More... | |
QualType | getRealTypeForBitwidth (unsigned DestWidth, FloatModeKind ExplicitType) const |
getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | attachCommentsToJustParsedDecls (ArrayRef< Decl * > Decls, const Preprocessor *PP) |
Searches existing comments for doc comments that should be attached to Decls . More... | |
comments::FullComment * | getCommentForDecl (const Decl *D, const Preprocessor *PP) const |
Return parsed documentation comment attached to a given declaration. More... | |
comments::FullComment * | getLocalCommentForDeclUncached (const Decl *D) const |
Return parsed documentation comment attached to a given declaration. More... | |
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. More... | |
void | eraseDeclAttrs (const Decl *D) |
Erase the attributes corresponding to the given declaration. More... | |
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. More... | |
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. More... | |
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. More... | |
void | setInstantiatedFromUsingDecl (NamedDecl *Inst, NamedDecl *Pattern) |
Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template. More... | |
UsingEnumDecl * | getInstantiatedFromUsingEnumDecl (UsingEnumDecl *Inst) |
If the given using-enum decl Inst is an instantiation of another using-enum decl, return it. More... | |
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. More... | |
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. More... | |
void | getOverriddenMethods (const NamedDecl *Method, SmallVectorImpl< const NamedDecl * > &Overridden) const |
Return C++ or ObjC overridden methods for the given Method . More... | |
void | addedLocalImportDecl (ImportDecl *Import) |
Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit. More... | |
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. More... | |
void | deduplicateMergedDefinitonsFor (NamedDecl *ND) |
Clean up the merged definition list. More... | |
ArrayRef< Module * > | getModulesWithMergedDefinition (const NamedDecl *Def) |
Get the additional modules in which the definition Def has been merged. More... | |
void | addModuleInitializer (Module *M, Decl *Init) |
Add a declaration to the list of declarations that are initialized for a module. More... | |
void | addLazyModuleInitializers (Module *M, ArrayRef< GlobalDeclID > IDs) |
ArrayRef< Decl * > | getModuleInitializers (Module *M) |
Get the initializations to perform when importing a module, if any. More... | |
void | setCurrentNamedModule (Module *M) |
Set the (C++20) module we are building. More... | |
Module * | getCurrentNamedModule () const |
Get module under construction, nullptr if this is not a C++20 module. More... | |
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. More... | |
ExternalASTSource * | getExternalSource () const |
Retrieve a pointer to the external AST source associated with this AST context, if any. More... | |
void | setASTMutationListener (ASTMutationListener *Listener) |
Attach an AST mutation listener to the AST context. More... | |
ASTMutationListener * | getASTMutationListener () const |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any. More... | |
void | PrintStats () const |
const SmallVectorImpl< Type * > & | getTypes () const |
BuiltinTemplateDecl * | buildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const |
RecordDecl * | buildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=RecordDecl::TagKind::Struct) const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration. More... | |
TypedefDecl * | buildImplicitTypedef (QualType T, StringRef Name) const |
Create a new implicit TU-level typedef declaration. More... | |
TypedefDecl * | getInt128Decl () const |
Retrieve the declaration for the 128-bit signed integer type. More... | |
TypedefDecl * | getUInt128Decl () const |
Retrieve the declaration for the 128-bit unsigned integer type. More... | |
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. More... | |
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) More... | |
QualType | applyObjCProtocolQualifiers (QualType type, ArrayRef< ObjCProtocolDecl * > protocols, bool &hasError, bool allowOnPointerType=false) const |
Apply Objective-C protocol qualifiers to the given type. More... | |
QualType | getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const |
Return the uniqued reference to the type for an Objective-C gc-qualified type. More... | |
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. More... | |
QualType | getRestrictType (QualType T) const |
Return the uniqued reference to the type for a restrict qualified type. More... | |
QualType | getVolatileType (QualType T) const |
Return the uniqued reference to the type for a volatile qualified type. More... | |
QualType | getConstType (QualType T) const |
Return the uniqued reference to the type for a const qualified type. More... | |
const FunctionType * | adjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo) |
Change the ExtInfo on a function type. More... | |
CanQualType | getCanonicalFunctionResultType (QualType ResultType) const |
Adjust the given function result type. More... | |
void | adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType) |
Change the result type of a function type once it is deduced. More... | |
QualType | getFunctionTypeWithExceptionSpec (QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI) const |
Get a function type and produce the equivalent function type with the specified exception specification. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | hasSameFunctionTypeIgnoringPtrSizes (QualType T, QualType U) |
Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types. More... | |
QualType | getComplexType (QualType T) const |
Return the uniqued reference to the type for a complex number with the specified element type. More... | |
CanQualType | getComplexType (CanQualType T) const |
QualType | getPointerType (QualType T) const |
Return the uniqued reference to the type for a pointer to the specified type. More... | |
CanQualType | getPointerType (CanQualType T) const |
QualType | getCountAttributedType (QualType T, Expr *CountExpr, bool CountInBytes, bool OrNull, ArrayRef< TypeCoupledDeclRefInfo > DependentDecls) const |
QualType | getAdjustedType (QualType Orig, QualType New) const |
Return the uniqued reference to a type adjusted from the original type to a new type. More... | |
CanQualType | getAdjustedType (CanQualType Orig, CanQualType New) const |
QualType | getDecayedType (QualType T) const |
Return the uniqued reference to the decayed version of the given type. More... | |
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. More... | |
QualType | getArrayParameterType (QualType Ty) const |
Return the uniqued reference to a specified array parameter type from the original array type. More... | |
QualType | getAtomicType (QualType T) const |
Return the uniqued reference to the atomic type for the specified type. More... | |
QualType | getBlockPointerType (QualType T) const |
Return the uniqued reference to the type for a block of the specified type. More... | |
QualType | getBlockDescriptorType () const |
Gets the struct used to keep track of the descriptor for pointer to blocks. More... | |
QualType | getReadPipeType (QualType T) const |
Return a read_only pipe type for the specified type. More... | |
QualType | getWritePipeType (QualType T) const |
Return a write_only pipe type for the specified type. More... | |
QualType | getBitIntType (bool Unsigned, unsigned NumBits) const |
Return a bit-precise integer type with the specified signedness and bit count. More... | |
QualType | getDependentBitIntType (bool Unsigned, Expr *BitsExpr) const |
Return a dependent bit-precise integer type with the specified signedness and bit count. More... | |
QualType | getBlockDescriptorExtendedType () const |
Gets the struct used to keep track of the extended descriptor for pointer to blocks. More... | |
OpenCLTypeKind | getOpenCLTypeKind (const Type *T) const |
Map an AST Type to an OpenCLTypeKind enum value. More... | |
LangAS | getOpenCLTypeAddrSpace (const Type *T) const |
Get address space for OpenCL type. More... | |
LangAS | getDefaultOpenCLPointeeAddrSpace () |
Returns default address space based on OpenCL version and enabled features. More... | |
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. More... | |
bool | getByrefLifetime (QualType Ty, Qualifiers::ObjCLifetime &Lifetime, bool &HasByrefExtendedLayout) const |
Returns true, if given type has a known lifetime. More... | |
QualType | getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const |
Return the uniqued reference to the type for an lvalue reference to the specified type. More... | |
QualType | getRValueReferenceType (QualType T) const |
Return the uniqued reference to the type for an rvalue reference to the specified type. More... | |
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. More... | |
QualType | getVariableArrayType (QualType EltTy, Expr *NumElts, ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const |
Return a non-unique reference to the type for a variable array of the specified element type. More... | |
QualType | getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const |
Return a non-unique reference to the type for a dependently-sized array of the specified element type. More... | |
QualType | getIncompleteArrayType (QualType EltTy, ArraySizeModifier ASM, unsigned IndexTypeQuals) const |
Return a unique reference to the type for an incomplete array of the specified element type. More... | |
QualType | getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, const Expr *SizeExpr, ArraySizeModifier ASM, unsigned IndexTypeQuals) const |
Return the unique reference to the type for a constant array of the specified element type. More... | |
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. More... | |
QualType | getVariableArrayDecayedType (QualType Ty) const |
Returns a vla type where known sizes are replaced with [*]. More... | |
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. More... | |
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. More... | |
QualType | getWebAssemblyExternrefType () const |
Return a WebAssembly externref type. More... | |
QualType | getVectorType (QualType VectorType, unsigned NumElts, VectorKind VecKind) const |
Return the unique reference to a vector type of the specified element type and size. More... | |
QualType | getDependentVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc, VectorKind VecKind) const |
Return the unique reference to the type for a dependently sized vector of the specified element type. More... | |
QualType | getExtVectorType (QualType VectorType, unsigned NumElts) const |
Return the unique reference to an extended vector type of the specified element type and size. More... | |
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. More... | |
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. More... | |
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()'. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
QualType | getSubstTemplateTypeParmPackType (Decl *AssociatedDecl, unsigned Index, bool Final, const TemplateArgument &ArgPack) |
Retrieve a. More... | |
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. More... | |
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. More... | |
QualType | getPackExpansionType (QualType Pattern, std::optional< unsigned > NumExpansions, bool ExpectPackInType=true) |
Form a pack expansion type with the given pattern. More... | |
QualType | getObjCInterfaceType (const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const |
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl. More... | |
QualType | getObjCObjectType (QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const |
Legacy interface: cannot provide type arguments or __kindof. More... | |
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. More... | |
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. More... | |
QualType | getObjCObjectPointerType (QualType OIT) const |
Return a ObjCObjectPointerType type for the given ObjCObjectType. More... | |
QualType | getTypeOfExprType (Expr *E, TypeOfKind Kind) const |
C23 feature and GCC extension. More... | |
QualType | getTypeOfType (QualType QT, TypeOfKind Kind) const |
getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes. More... | |
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. More... | |
QualType | getDecltypeType (Expr *e, QualType UnderlyingType) const |
C++11 decltype. More... | |
QualType | getPackIndexingType (QualType Pattern, Expr *IndexExpr, bool FullySubstituted=false, ArrayRef< QualType > Expansions={}, int Index=-1) const |
QualType | getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const |
Unary type transforms. More... | |
QualType | getAutoType (QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent, bool IsPack=false, ConceptDecl *TypeConstraintConcept=nullptr, ArrayRef< TemplateArgument > TypeConstraintArgs={}) const |
C++11 deduced auto type. More... | |
QualType | getAutoDeductType () const |
C++11 deduction pattern for 'auto' type. More... | |
QualType | getAutoRRefDeductType () const |
C++11 deduction pattern for 'auto &&' type. More... | |
QualType | getUnconstrainedType (QualType T) const |
Remove any type constraints from a template parameter type, for equivalence comparison of template parameters. More... | |
QualType | getDeducedTemplateSpecializationType (TemplateName Template, QualType DeducedType, bool IsDependent) const |
C++17 deduced class template specialization type. More... | |
QualType | getTagDeclType (const TagDecl *Decl) const |
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl. More... | |
CanQualType | getSizeType () const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>. More... | |
CanQualType | getSignedSizeType () const |
Return the unique signed counterpart of the integer type corresponding to size_t. More... | |
CanQualType | getIntMaxType () const |
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
CanQualType | getUIntMaxType () const |
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
QualType | getWCharType () const |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension). More... | |
QualType | getWideCharType () const |
Return the type of wide characters. More... | |
QualType | getSignedWCharType () const |
Return the type of "signed wchar_t". More... | |
QualType | getUnsignedWCharType () const |
Return the type of "unsigned wchar_t". More... | |
QualType | getWIntType () const |
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target. More... | |
QualType | getIntPtrType () const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target. More... | |
QualType | getUIntPtrType () const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target. More... | |
QualType | getPointerDiffType () const |
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>. More... | |
QualType | getUnsignedPointerDiffType () const |
Return the unique unsigned counterpart of "ptrdiff_t" integer type. More... | |
QualType | getProcessIDType () const |
Return the unique type for "pid_t" defined in <sys/types.h>. More... | |
QualType | getCFConstantStringType () const |
Return the C structure type used to represent constant CFStrings. More... | |
QualType | getObjCSuperType () const |
Returns the C struct type for objc_super. More... | |
void | setObjCSuperType (QualType ST) |
QualType | getRawCFConstantStringType () const |
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built. More... | |
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. More... | |
void | setObjCIdRedefinitionType (QualType RedefType) |
Set the user-written type that redefines id . More... | |
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. More... | |
void | setObjCClassRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
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. More... | |
void | setObjCSelRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
IdentifierInfo * | getNSObjectName () const |
Retrieve the identifier 'NSObject'. More... | |
IdentifierInfo * | getNSCopyingName () |
Retrieve the identifier 'NSCopying'. More... | |
CanQualType | getNSUIntegerType () const |
CanQualType | getNSIntegerType () const |
IdentifierInfo * | getBoolName () const |
Retrieve the identifier 'bool'. More... | |
IdentifierInfo * | getMakeIntegerSeqName () const |
IdentifierInfo * | getTypePackElementName () const |
QualType | getObjCInstanceType () |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. More... | |
TypedefDecl * | getObjCInstanceTypeDecl () |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type. More... | |
void | setFILEDecl (TypeDecl *FILEDecl) |
Set the type for the C FILE type. More... | |
QualType | getFILEType () const |
Retrieve the C FILE type. More... | |
void | setjmp_bufDecl (TypeDecl *jmp_bufDecl) |
Set the type for the C jmp_buf type. More... | |
QualType | getjmp_bufType () const |
Retrieve the C jmp_buf type. More... | |
void | setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl) |
Set the type for the C sigjmp_buf type. More... | |
QualType | getsigjmp_bufType () const |
Retrieve the C sigjmp_buf type. More... | |
void | setucontext_tDecl (TypeDecl *ucontext_tDecl) |
Set the type for the C ucontext_t type. More... | |
QualType | getucontext_tType () const |
Retrieve the C ucontext_t type. More... | |
QualType | getLogicalOperationType () const |
The result type of logical operations, '<', '>', '!=', etc. More... | |
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 . More... | |
void | getObjCEncodingForPropertyType (QualType T, std::string &S) const |
Emit the Objective-C property type encoding for the given type T into S . More... | |
void | getLegacyIntegralTypeEncoding (QualType &t) const |
getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always. More... | |
void | getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const |
Put the string version of the type qualifiers QT into S . More... | |
std::string | getObjCEncodingForFunctionDecl (const FunctionDecl *Decl) const |
Emit the encoded type for the function Decl into S . More... | |
std::string | getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, bool Extended=false) const |
Emit the encoded type for the method declaration Decl into S . More... | |
std::string | getObjCEncodingForBlock (const BlockExpr *blockExpr) const |
Return the encoded type for this block declaration. More... | |
std::string | getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const |
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration. More... | |
bool | ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'. More... | |
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. More... | |
TypedefDecl * | getObjCIdDecl () const |
Retrieve the typedef corresponding to the predefined id type in Objective-C. More... | |
QualType | getObjCIdType () const |
Represents the Objective-CC id type. More... | |
TypedefDecl * | getObjCSelDecl () const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C. More... | |
QualType | getObjCSelType () const |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type. More... | |
TypedefDecl * | getObjCClassDecl () const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. More... | |
QualType | getObjCClassType () const |
Represents the Objective-C Class type. More... | |
ObjCInterfaceDecl * | getObjCProtocolDecl () const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. More... | |
TypedefDecl * | getBOOLDecl () const |
Retrieve declaration of 'BOOL' typedef. More... | |
void | setBOOLDecl (TypedefDecl *TD) |
Save declaration of 'BOOL' typedef. More... | |
QualType | getBOOLType () const |
type of 'BOOL' type. More... | |
QualType | getObjCProtoType () const |
Retrieve the type of the Objective-C Protocol class. More... | |
TypedefDecl * | getBuiltinVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list type. More... | |
QualType | getBuiltinVaListType () const |
Retrieve the type of the __builtin_va_list type. More... | |
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. More... | |
TypedefDecl * | getBuiltinMSVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type. More... | |
QualType | getBuiltinMSVaListType () const |
Retrieve the type of the __builtin_ms_va_list type. More... | |
TagDecl * | getMSGuidTagDecl () const |
Retrieve the implicitly-predeclared 'struct _GUID' declaration. More... | |
QualType | getMSGuidType () const |
Retrieve the implicitly-predeclared 'struct _GUID' type. More... | |
bool | canBuiltinBeRedeclared (const FunctionDecl *) const |
Return whether a declaration to a builtin is allowed to be overloaded/redeclared. More... | |
QualType | getCVRQualifiedType (QualType T, unsigned CVR) const |
Return a type with additional const , volatile , or restrict qualifiers. More... | |
QualType | getQualifiedType (SplitQualType split) const |
Un-split a SplitQualType. More... | |
QualType | getQualifiedType (QualType T, Qualifiers Qs) const |
Return a type with additional qualifiers. More... | |
QualType | getQualifiedType (const Type *T, Qualifiers Qs) const |
Return a type with additional qualifiers. More... | |
QualType | getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime) |
Return a type with the given lifetime qualifier. More... | |
QualType | getUnqualifiedObjCPointerType (QualType type) const |
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed. More... | |
QualType | getPointerAuthType (QualType Ty, PointerAuthQualifier PointerAuth) |
Return a type with the given __ptrauth qualifier. More... | |
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. More... | |
TemplateName | getAssumedTemplateName (DeclarationName Name) const |
Retrieve a template name representing an unqualified-id that has been assumed to name a template for ADL purposes. More... | |
TemplateName | getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateName Template) const |
Retrieve the template name that represents a qualified template name such as std::vector . More... | |
TemplateName | getDependentTemplateName (NestedNameSpecifier *NNS, const IdentifierInfo *Name) const |
Retrieve the template name that represents a dependent template name such as MetaFun::template apply. More... | |
TemplateName | getDependentTemplateName (NestedNameSpecifier *NNS, OverloadedOperatorKind Operator) const |
Retrieve the template name that represents a dependent template name such as MetaFun::template operator+. More... | |
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. More... | |
Qualifiers::GC | getObjCGCAttrKind (QualType Ty) const |
Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes. More... | |
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. More... | |
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. More... | |
bool | areLaxCompatibleSveTypes (QualType FirstType, QualType SecondType) |
Return true if the given vector types are lax-compatible SVE vector types, false otherwise. More... | |
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. More... | |
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. More... | |
bool | hasDirectOwnershipQualifier (QualType Ty) const |
Return true if the type has been explicitly qualified with ObjC ownership. More... | |
const llvm::fltSemantics & | getFloatTypeSemantics (QualType T) const |
Return the APFloat 'semantics' for the specified scalar floating point type. More... | |
TypeInfo | getTypeInfo (const Type *T) const |
Get the size and alignment of the specified complete type in bits. More... | |
TypeInfo | getTypeInfo (QualType T) const |
unsigned | getOpenMPDefaultSimdAlign (QualType T) const |
Get default simd alignment of the specified complete type in bits. More... | |
uint64_t | getTypeSize (QualType T) const |
Return the size of the specified (complete) type T , in bits. More... | |
uint64_t | getTypeSize (const Type *T) const |
uint64_t | getCharWidth () const |
Return the size of the character type, in bits. More... | |
CharUnits | toCharUnitsFromBits (int64_t BitSize) const |
Convert a size in bits to a size in characters. More... | |
int64_t | toBits (CharUnits CharSize) const |
Convert a size in characters to a size in bits. More... | |
CharUnits | getTypeSizeInChars (QualType T) const |
Return the size of the specified (complete) type T , in characters. More... | |
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. More... | |
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. More... | |
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). More... | |
CharUnits | getTypeAlignInChars (QualType T) const |
Return the ABI-specified alignment of a (complete) type T , in characters. More... | |
CharUnits | getTypeAlignInChars (const Type *T) const |
CharUnits | getPreferredTypeAlignInChars (QualType T) const |
Return the PreferredAlignment of a (complete) type T , in characters. More... | |
CharUnits | getTypeUnadjustedAlignInChars (QualType T) const |
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments. More... | |
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. More... | |
bool | isAlignmentRequired (QualType T) const |
bool | isPromotableIntegerType (QualType T) const |
More type predicates useful for type checking/promotion. More... | |
unsigned | getPreferredTypeAlign (QualType T) const |
Return the "preferred" alignment of the specified type T for the current target, in bits. More... | |
unsigned | getPreferredTypeAlign (const Type *T) const |
getPreferredTypeAlign - Return the "preferred" alignment of the specified type for the current target in bits. More... | |
unsigned | getTargetDefaultAlignForAttributeAligned () const |
Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified. More... | |
unsigned | getAlignOfGlobalVar (QualType T, const VarDecl *VD) const |
Return the alignment in bits that should be given to a global variable with type T . More... | |
CharUnits | getAlignOfGlobalVarInChars (QualType T, const VarDecl *VD) const |
Return the alignment in characters that should be given to a global variable with type T . More... | |
unsigned | getMinGlobalAlignOfVar (uint64_t Size, const VarDecl *VD) const |
Return the minimum alignement as specified by the target. More... | |
CharUnits | getDeclAlign (const Decl *D, bool ForAlignof=false) const |
Return a conservative estimate of the alignment of the specified decl D . More... | |
CharUnits | getExnObjectAlignment () const |
Return the alignment (in bytes) of the thrown exception object. More... | |
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. More... | |
const ASTRecordLayout & | getASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const |
Get or compute information about the layout of the specified Objective-C interface. More... | |
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. More... | |
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. More... | |
void | setNonKeyFunction (const CXXMethodDecl *method) |
Observe that the given method cannot be a key function. More... | |
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. More... | |
uint64_t | getFieldOffset (const ValueDecl *FD) const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits. More... | |
uint64_t | lookupFieldBitOffset (const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) const |
Get the offset of an ObjCIvarDecl in bits. More... | |
CharUnits | getMemberPointerPathAdjustment (const APValue &MP) const |
Find the 'this' offset for the member path in a pointer-to-member APValue. More... | |
bool | isNearlyEmpty (const CXXRecordDecl *RD) const |
VTableContextBase * | getVTableContext () |
MangleContext * | createMangleContext (const TargetInfo *T=nullptr) |
If T is null pointer, assume the target in ASTContext. More... | |
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. More... | |
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. More... | |
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. More... | |
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) More... | |
CanQualType | getCanonicalType (QualType T) const |
Return the canonical (structural) type corresponding to the specified potentially non-canonical type T . More... | |
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. More... | |
bool | hasSameType (QualType T1, QualType T2) const |
Determine whether the given types T1 and T2 are equivalent. More... | |
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. More... | |
QualType | getUnqualifiedArrayType (QualType T, Qualifiers &Quals) const |
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals . More... | |
bool | hasSameUnqualifiedType (QualType T1, QualType T2) const |
Determine whether the given types are equivalent after cvr-qualifiers have been removed. More... | |
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]). More... | |
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]. More... | |
bool | hasSimilarType (QualType T1, QualType T2) |
Determine if two types are similar, according to the C++ rules. More... | |
bool | hasCvrSimilarType (QualType T1, QualType T2) |
Determine if two types are similar, ignoring only CVR qualifiers. More... | |
NestedNameSpecifier * | getCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const |
Retrieves the "canonical" nested name specifier for a given nested name specifier. More... | |
CallingConv | getDefaultCallingConvention (bool IsVariadic, bool IsCXXMethod, bool IsBuiltin=false) const |
Retrieves the default calling convention for the current target. More... | |
TemplateName | getCanonicalTemplateName (const TemplateName &Name) const |
Retrieves the "canonical" template name that refers to a given template. More... | |
bool | hasSameTemplateName (const TemplateName &X, const TemplateName &Y) const |
Determine whether the given template names refer to the same template. More... | |
bool | isSameEntity (const NamedDecl *X, const NamedDecl *Y) const |
Determine whether the two declarations refer to the same entity. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
TemplateArgument | getCanonicalTemplateArgument (const TemplateArgument &Arg) const |
Retrieve the "canonical" template argument. More... | |
const ArrayType * | getAsArrayType (QualType T) const |
Type Query functions. More... | |
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. More... | |
QualType | getBaseElementType (QualType QT) const |
Return the innermost element type of a type (which needn't actually be an array type). More... | |
uint64_t | getConstantArrayElementCount (const ConstantArrayType *CA) const |
Return number of constant array elements. More... | |
uint64_t | getArrayInitLoopExprElementCount (const ArrayInitLoopExpr *AILE) const |
Return number of elements initialized in an ArrayInitLoopExpr. More... | |
QualType | getAdjustedParameterType (QualType T) const |
Perform adjustment on the parameter type of a function. More... | |
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. More... | |
QualType | getExceptionObjectType (QualType T) const |
QualType | getArrayDecayedType (QualType T) const |
Return the properly qualified result of decaying the specified array type to a pointer. More... | |
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. More... | |
Qualifiers::ObjCLifetime | getInnerObjCOwnership (QualType T) const |
Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownership. More... | |
QualType | isPromotableBitField (Expr *E) const |
Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions). More... | |
int | getIntegerTypeOrder (QualType LHS, QualType RHS) const |
Return the highest ranked integer type, see C99 6.3.1.8p1. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | ObjCQualifiedClassTypesAreCompatible (const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS) |
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>. More... | |
bool | canAssignObjCInterfaces (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT) |
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS. More... | |
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. More... | |
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 More... | |
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() More... | |
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. More... | |
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. More... | |
void | ResetObjCLayout (const ObjCContainerDecl *CD) |
unsigned | getIntWidth (QualType T) const |
QualType | getCorrespondingUnsignedType (QualType T) const |
QualType | getCorrespondingSignedType (QualType T) const |
QualType | getCorrespondingSaturatedType (QualType Ty) const |
QualType | getCorrespondingUnsaturatedType (QualType Ty) const |
QualType | getCorrespondingSignedFixedPointType (QualType Ty) const |
llvm::APSInt | MakeIntValue (uint64_t Value, QualType Type) const |
Make an APSInt of the appropriate width and signedness for the given Value and integer Type . More... | |
bool | isSentinelNullExpr (const Expr *E) |
ObjCImplementationDecl * | getObjCImplementation (ObjCInterfaceDecl *D) |
Get the implementation of the ObjCInterfaceDecl D , or nullptr if none exists. More... | |
ObjCCategoryImplDecl * | getObjCImplementation (ObjCCategoryDecl *D) |
Get the implementation of the ObjCCategoryDecl D , or nullptr if none exists. More... | |
bool | AnyObjCImplementation () |
Return true if there is at least one @implementation in the TU. More... | |
void | setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD) |
Set the implementation of ObjCInterfaceDecl. More... | |
void | setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD) |
Set the implementation of ObjCCategoryDecl. More... | |
const ObjCMethodDecl * | getObjCMethodRedeclaration (const ObjCMethodDecl *MD) const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists. More... | |
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. More... | |
void | setBlockVarCopyInit (const VarDecl *VD, Expr *CopyExpr, bool CanThrow) |
Set the copy initialization expression of a block var decl. More... | |
BlockVarCopyInit | getBlockVarCopyInit (const VarDecl *VD) const |
Get the copy initialization expression of the VarDecl VD , or nullptr if none exists. More... | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. More... | |
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. More... | |
void | AddDeallocation (void(*Callback)(void *), void *Data) const |
Add a deallocation callback that will be invoked when the ASTContext is destroyed. More... | |
template<typename T > | |
void | addDestruction (T *Ptr) const |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction. More... | |
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. More... | |
void | forEachMultiversionedFunctionVersion (const FunctionDecl *FD, llvm::function_ref< void(FunctionDecl *)> Pred) const |
Visits all versions of a multiversioned function with the passed predicate. More... | |
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. More... | |
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. More... | |
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. More... | |
StringLiteral * | getPredefinedStringLiteralFromCache (StringRef Key) const |
Return a string representing the human readable name for the specified function declaration or file name. More... | |
MSGuidDecl * | getMSGuidDecl (MSGuidDeclParts Parts) const |
Return a declaration for the global GUID object representing the given GUID value. More... | |
UnnamedGlobalConstantDecl * | getUnnamedGlobalConstantDecl (QualType Ty, const APValue &Value) const |
Return a declaration for a uniquified anonymous global constant corresponding to a given APValue. More... | |
TemplateParamObjectDecl * | getTemplateParamObjectDecl (QualType T, const APValue &V) const |
Return the template parameter object of the given type with the given value. More... | |
ParsedTargetAttr | filterFunctionTargetAttrs (const TargetAttr *TD) const |
Parses the target attributes passed in, and returns only the ones that are valid feature names. More... | |
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. More... | |
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. More... | |
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. More... | |
InlineVariableDefinitionKind | getInlineVariableDefinitionKind (const VarDecl *VD) const |
Determine whether a definition of this inline variable should be treated as a weak or strong definition. More... | |
OMPTraitInfo & | getNewOMPTraitInfo () |
Return a new OMPTraitInfo object owned by this context. More... | |
bool | mayExternalize (const Decl *D) const |
Whether a C++ static variable or CUDA/HIP kernel may be externalized. More... | |
bool | shouldExternalize (const Decl *D) const |
Whether a C++ static variable or CUDA/HIP kernel should be externalized. More... | |
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. More... | |
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 185 of file ASTContext.h.
using clang::ASTContext::import_range = llvm::iterator_range<import_iterator> |
Definition at line 1032 of file ASTContext.h.
using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
Definition at line 994 of file ASTContext.h.
using clang::ASTContext::overridden_method_range = llvm::iterator_range<overridden_cxx_method_iterator> |
Definition at line 1003 of file ASTContext.h.
using clang::ASTContext::TemplateOrSpecializationInfo = llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 478 of file ASTContext.h.
Enumerator | |
---|---|
GE_None | No error. |
GE_Missing_type | Missing a type. |
GE_Missing_stdio | Missing a type from <stdio.h> |
GE_Missing_setjmp | Missing a type from <setjmp.h> |
GE_Missing_ucontext | Missing a type from <ucontext.h> |
Definition at line 2255 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 3339 of file ASTContext.h.
Enumerator | |
---|---|
NeedExtraManglingDecl |
Definition at line 3174 of file ASTContext.h.
Enumerator | |
---|---|
PSF_None | |
PSF_Read | |
PSF_Write | |
PSF_Execute | |
PSF_Implicit | |
PSF_ZeroInit | |
PSF_Invalid |
Definition at line 3393 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins, | ||
TranslationUnitKind | TUKind | ||
) |
Definition at line 870 of file ASTContext.cpp.
|
delete |
ASTContext::~ASTContext | ( | ) |
Definition at line 935 of file ASTContext.cpp.
References cleanup().
void ASTContext::addComment | ( | const RawComment & | RC | ) |
Definition at line 326 of file ASTContext.cpp.
References clang::RawCommentList::addComment(), clang::LangOptions::CommentOpts, Comments, clang::SourceRange::getBegin(), clang::RawComment::getSourceRange(), and clang::SourceManager::isInSystemHeader().
void ASTContext::addCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD, |
CXXConstructorDecl * | CD | ||
) |
Definition at line 12359 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
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 942 of file ASTContext.cpp.
Referenced by addDestruction().
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 12376 of file ASTContext.cpp.
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 3126 of file ASTContext.h.
References AddDeallocation(), clang::T, and V.
Referenced by clang::MSGuidDecl::getAsAPValue(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), 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 1594 of file ASTContext.cpp.
Referenced by clang::DeclContext::addHiddenDecl().
void ASTContext::addLazyModuleInitializers | ( | Module * | M, |
ArrayRef< GlobalDeclID > | IDs | ||
) |
Definition at line 1086 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 1060 of file ASTContext.cpp.
References ID.
void ASTContext::addOverriddenMethod | ( | const CXXMethodDecl * | Method, |
const CXXMethodDecl * | Overridden | ||
) |
Note that the given C++ Method
overrides the given Overridden
method.
Definition at line 1568 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod().
Definition at line 2877 of file ASTContext.h.
References clang::isTargetAddressSpace().
|
inline |
Definition at line 1079 of file ASTContext.h.
References clang::TranslationUnitDecl::Create(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TU_Incremental, and TUKind.
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 12366 of file ASTContext.cpp.
void ASTContext::adjustDeducedFunctionResultType | ( | FunctionDecl * | FD, |
QualType | ResultType | ||
) |
Change the result type of a function type once it is deduced.
Definition at line 3185 of file ASTContext.cpp.
References clang::Type::castAs(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by 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 3264 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 3167 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), getFunctionNoProtoType(), getFunctionType(), and clang::T.
Referenced by clang::Sema::adjustMemberFunctionCC().
void ASTContext::adjustObjCTypeParamBoundType | ( | const ObjCTypeParamDecl * | Orig, |
ObjCTypeParamDecl * | New | ||
) | const |
Definition at line 5553 of file ASTContext.cpp.
References getObjCTypeParamType(), getTrivialTypeSourceInfo(), clang::TypeDecl::getTypeForDecl(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::TypeDecl::setTypeForDecl(), and clang::TypedefNameDecl::setTypeSourceInfo().
Definition at line 4617 of file ASTContext.cpp.
References getAddrSpaceQualType(), and clang::opencl_constant.
Referenced by getStringLiteralArrayType().
Definition at line 724 of file ASTContext.h.
References Allocate(), and clang::T.
Definition at line 721 of file ASTContext.h.
Referenced by Allocate(), ASTAllocateString(), clang::RecoveryExpr::Create(), clang::ObjCTypeParamList::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::RecoveryExpr::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(), getCountAttributedType(), getDeclAttrs(), getElaboratedType(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getOverloadedTemplateName(), getTemplateSpecializationType(), getTypedefType(), getUsingType(), and clang::Sema::SaveNestedNameSpecifierAnnotation().
|
inline |
Allocates a DeclListNode
or returns one from the ListNodeFreeList
pool.
Definition at line 731 of file ASTContext.h.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 3062 of file ASTContext.h.
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 5452 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 getObjCTypeParamType().
QualType ASTContext::areCommonBaseCompatible | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
Definition at line 10166 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(), and sameObjCTypeArgs().
Definition at line 10351 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and clang::Type::getAs().
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 9671 of file ASTContext.cpp.
References BoolTy, clang::ASTContext::BuiltinVectorTypeInfo::ElementType, clang::Generic, clang::Type::getAs(), getBuiltinVectorTypeInfo(), getRVVTypeSize(), getTypeSize(), hasSameType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isRVVVLSBuiltinType(), clang::Type::isVectorType(), clang::RVVFixedLengthData, and clang::RVVFixedLengthMask.
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 9582 of file ASTContext.cpp.
References clang::Generic, clang::Type::getAs(), getBuiltinVectorTypeInfo(), clang::Type::getSveEltType(), getSVETypeSize(), getTypeSize(), hasSameType(), clang::SveFixedLengthData, and clang::SveFixedLengthPredicate.
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 9542 of file ASTContext.cpp.
References clang::AltiVecBool, clang::AltiVecPixel, clang::Type::castAs(), clang::First, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), hasSameType(), hasSameUnqualifiedType(), clang::Type::isVectorType(), clang::RVVFixedLengthData, clang::RVVFixedLengthMask, clang::SveFixedLengthData, and clang::SveFixedLengthPredicate.
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 9702 of file ASTContext.cpp.
References clang::LangOptionsBase::All, clang::Generic, clang::Type::getAs(), getLangOpts(), clang::Type::getRVVEltType(), getRVVTypeSize(), getTypeSize(), clang::LangOptionsBase::Integer, clang::Type::isIntegerType(), clang::Type::isRVVSizelessBuiltinType(), and clang::Type::isVectorType().
Return true if the given vector types are lax-compatible SVE vector types, false otherwise.
Definition at line 9607 of file ASTContext.cpp.
References clang::LangOptionsBase::All, clang::Generic, clang::Type::getAs(), getLangOpts(), clang::Type::getSveEltType(), getSVETypeSize(), getTypeSize(), clang::LangOptionsBase::Integer, clang::Type::isIntegerType(), and clang::SveFixedLengthData.
bool ASTContext::AtomicUsesUnsupportedLibcall | ( | const AtomicExpr * | E | ) | const |
Definition at line 12476 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(), clang::T, and toBits().
void ASTContext::attachCommentsToJustParsedDecls | ( | ArrayRef< Decl * > | Decls, |
const Preprocessor * | PP | ||
) |
Searches existing comments for doc comments that should be attached to Decls
.
If any doc comment is found, it is parsed.
Requirement: All Decls
are in the same file.
If the last comment in the file is already attached we assume there are not comments left to be attached to Decls
.
Definition at line 496 of file ASTContext.cpp.
References adjustDeclToTemplate(), cacheRawCommentForDecl(), Comments, DeclRawComments, clang::RawCommentList::empty(), clang::File, clang::RawCommentList::getCommentsInFile(), getDeclLocsForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), clang::SourceLocation::isValid(), Loc, and ParsedComments.
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 7635 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.
Referenced by clang::CodeGen::CodeGenFunction::getBlockByrefInfo().
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1120 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 = RecordDecl::TagKind::Struct |
||
) | const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
Definition at line 1146 of file ASTContext.cpp.
Referenced by 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 1162 of file ASTContext.cpp.
Referenced by 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 470 of file ASTContext.cpp.
References CommentlessRedeclChains, clang::LangOptions::CommentOpts, DeclRawComments, clang::Decl::getCanonicalDecl(), clang::RawComment::isDocumentation(), clang::CommentOptions::ParseAllComments, and RedeclChainComments.
Referenced by attachCommentsToJustParsedDecls(), and getRawCommentForAnyRedecl().
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 9920 of file ASTContext.cpp.
References 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 areComparableObjCPointerTypes(), canAssignObjCObjectTypes(), canBindObjCObjectType(), findMethodDecl(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 10289 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 9973 of file ASTContext.cpp.
References 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 mergeTypes().
Definition at line 10363 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 9278 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 896 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 558 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 2602 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
Referenced by canAssignObjCInterfaces(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 2855 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 12202 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), getDiagnostics(), and clang::T.
Referenced by InitDeviceMC().
MangleContext * ASTContext::createMangleContext | ( | const TargetInfo * | T = nullptr | ) |
If T
is null pointer, assume the target in ASTContext.
Definition at line 12181 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), getDiagnostics(), and clang::T.
Referenced by clang::ASTNameGenerator::Implementation::getAllManglings(), and InitDeviceMC().
std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 12349 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 2965 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType(), and clang::T.
Referenced by getTrivialTypeSourceInfo().
|
inline |
Definition at line 727 of file ASTContext.h.
Referenced by clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::Sema::AttachBaseSpecifiers(), clang::VarDecl::setInit(), and clang::TagDecl::setQualifierInfo().
|
inline |
Deallcates a DeclListNode
by returning it to the ListNodeFreeList
pool.
Definition at line 742 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 11965 of file ASTContext.cpp.
References clang::VarDecl::DeclarationOnly, 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.
QualType ASTContext::DecodeTypeStr | ( | const char *& | Str, |
const ASTContext & | Context, | ||
ASTContext::GetBuiltinTypeError & | Error, | ||
bool & | RequireICE, | ||
bool | AllowTypeModifiers | ||
) | const |
Definition at line 11669 of file ASTContext.cpp.
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 1021 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 2585 of file ASTContext.cpp.
References clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), and clang::ObjCInterfaceDecl::ivars().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3757 of file RecordLayoutBuilder.cpp.
References clang::ASTRecordLayout::getAlignment(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getPreferredAlignment(), clang::ASTRecordLayout::getSize(), getTypeDeclType(), isMsLayout(), and toBits().
void ASTContext::eraseDeclAttrs | ( | const Decl * | D | ) |
Erase the attributes corresponding to the given declaration.
Definition at line 1443 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 13725 of file ASTContext.cpp.
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), and getFunctionFeatureMap().
std::vector< std::string > ASTContext::filterFunctionTargetVersionAttrs | ( | const TargetVersionAttr * | TV | ) | const |
Definition at line 13711 of file ASTContext.cpp.
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 12099 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 isNonViableMultiVersionOverload(), and 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 3043 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), clang::QualifierCollector::strip(), and clang::T.
Referenced by adjustStringLiteralBaseType(), clang::Sema::BuildAddressSpaceAttr(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildQualifiedType(), 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 7023 of file ASTContext.cpp.
References getArrayParameterType(), getDecayedType(), getLangOpts(), clang::HLSL, clang::Type::isArrayType(), clang::Type::isConstantArrayType(), clang::Type::isFunctionType(), and clang::T.
Referenced by clang::Sema::BuildFunctionType(), and getSignatureParameterType().
|
inline |
Definition at line 1373 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 3348 of file ASTContext.cpp.
References getCanonicalType(), ID, and clang::AdjustedType::Profile().
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.
If VD
is non-null it will be considered specifically for the query.
Definition at line 2530 of file ASTContext.cpp.
References getMinGlobalAlignOfVar(), getPreferredTypeAlign(), getTypeSize(), max(), and clang::T.
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.
If VD
is non-null it will be considered specifically for the query.
Definition at line 2538 of file ASTContext.cpp.
References getAlignOfGlobalVar(), clang::T, and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), and clang::SemaOpenMP::isOpenMPCapturedByRef().
|
inline |
Definition at line 717 of file ASTContext.h.
Referenced by clang::Decl::getID().
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 7056 of file ASTContext.cpp.
References getAsArrayType(), getAttributedType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeQualifiers(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), getPointerType(), and getQualifiedType().
Referenced by clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::DeduceTemplateArguments(), doRewriteToUTF8StringBoxedExpressionHelper(), GetBuiltinType(), getCanonicalParamType(), getDecayedType(), and clang::Sema::PerformImplicitConversion().
uint64_t ASTContext::getArrayInitLoopExprElementCount | ( | const ArrayInitLoopExpr * | AILE | ) | const |
Return number of elements initialized in an ArrayInitLoopExpr.
Definition at line 7108 of file ASTContext.cpp.
References clang::ArrayInitLoopExpr::getArraySize(), and clang::ArrayInitLoopExpr::getSubExpr().
Return the uniqued reference to a specified array parameter type from the original array type.
Definition at line 3412 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::Type::isArrayParameterType(), clang::QualType::isCanonical(), and clang::Type::isConstantArrayType().
Referenced by getAdjustedParameterType(), getCanonicalParamType(), getCommonNonSugarTypeNode(), and clang::Sema::PerformImplicitConversion().
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 6965 of file ASTContext.cpp.
References clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), getQualifiedType(), getVariableArrayType(), clang::SplitQualType::Quals, clang::T, and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuiltinRemoveExtent(), clang::Sema::CheckAllocatedType(), CheckC23ConstexprInitStringLiteral(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitPartialArrayDestroy(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsConstantArrayType(), getAsDependentSizedArrayType(), getAsIncompleteArrayType(), getAsVariableArrayType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getLValueType(), clang::ento::MemRegionManager::getStaticSize(), clang::ASTNodeImporter::ImportAPValue(), isDesignatorAtObjectEnd(), isSameEntity(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), mergeTypes(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TypeRequiresBuiltinLaunderImp(), and UnwrapSimilarArrayTypes().
|
inline |
Definition at line 2782 of file ASTContext.h.
References getAsArrayType(), and clang::T.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::Sema::CheckCompleteDecompositionDeclaration(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EquivalentArrayTypes(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::Decl::isFlexibleArrayMemberLike(), isIncompleteOrZeroLengthArrayType(), isValidStructGUID(), and mergeTypes().
|
inline |
Definition at line 2791 of file ASTContext.h.
References getAsArrayType(), and clang::T.
|
inline |
Definition at line 2788 of file ASTContext.h.
References getAsArrayType(), and clang::T.
Referenced by clang::Decl::isFlexibleArrayMemberLike().
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 9320 of file ASTContext.cpp.
Referenced by clang::ASTImporter::Import().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 749 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1218 of file ASTContext.h.
References Listener.
Referenced by clang::ASTReader::FinishedDeserializing(), clang::Decl::getASTMutationListener(), mergeDefinitionIntoModule(), and clang::TranslationUnitDecl::setAnonymousNamespace().
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 2992 of file ASTContext.cpp.
References clang::ObjCImplDecl::getClassInterface().
const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout | ( | const ObjCInterfaceDecl * | D | ) | const |
Get or compute information about the layout of the specified Objective-C interface.
Definition at line 2987 of file ASTContext.cpp.
Referenced by getTypeUnadjustedAlign().
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 3336 of file RecordLayoutBuilder.cpp.
References clang::ExternalASTSource::CompleteType(), getAuxTargetInfo(), clang::RecordDecl::getDefinition(), getExternalSource(), getLangOpts(), clang::RecordDecl::getMostRecentDecl(), clang::DeclContext::hasExternalLexicalStorage(), clang::TagDecl::isCompleteDefinition(), clang::Decl::isInvalidDecl(), and isMsLayout().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::CodeGen::CGCXXABI::buildThisParam(), calculateOffset(), classifyType(), clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EmitNullBaseClassInitialization(), EmitNullConstant(), clang::CodeGen::CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), getDerivedToBaseAlignmentAndOffset(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffsetInBits(), getMemberPointerPathAdjustment(), clang::CodeGen::CodeGenModule::getMinimumClassObjectSize(), getOffsetOfBaseWithVBPtr(), clang::CodeGen::CodeGenFunction::getOverlapForBaseInit(), clang::CodeGen::CodeGenFunction::getOverlapForFieldInit(), getPreferredTypeAlign(), getTypeInfoDataSizeInChars(), getTypeUnadjustedAlign(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), isDesignatorAtObjectEnd(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().
|
inline |
Definition at line 2785 of file ASTContext.h.
References getAsArrayType(), and clang::T.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitArraySubscriptGEP(), emitGlobalToListReduceFunction(), emitListToGlobalReduceFunction(), emitPointerArithmetic(), EquivalentArrayTypes(), getFixedSizeElementType(), clang::CodeGen::CodeGenFunction::getVLAElements1D(), clang::CodeGen::CodeGenFunction::getVLASize(), and mergeTypes().
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 5971 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::AtomicType::Profile(), and clang::T.
Referenced by clang::Sema::BuildAtomicType(), getCommonNonSugarTypeNode(), getVariableArrayDecayedType(), clang::Sema::Initialize(), and mergeTypes().
QualType ASTContext::getAttributedType | ( | attr::Kind | attrKind, |
QualType | modifiedType, | ||
QualType | equivalentType | ||
) | const |
Definition at line 4830 of file ASTContext.cpp.
References getCanonicalType(), clang::AttributedType::Profile(), and clang::ast_matchers::type.
Referenced by computeConditionalNullability(), getArrayDecayedType(), getCommonSugarTypeNode(), getFunctionTypeWithExceptionSpec(), rebuildAttributedTypeWithoutNullability(), and clang::TreeTransform< Derived >::TransformAttributedType().
QualType ASTContext::getAutoDeductType | ( | ) | const |
C++11 deduction pattern for 'auto' type.
getAutoDeductType - Get type pattern for deducing against 'auto'.
Definition at line 5998 of file ASTContext.cpp.
References clang::Auto, AutoDeductTy, clang::QualType::isNull(), and clang::XRayInstrKind::None.
Referenced by getAutoRRefDeductType().
QualType ASTContext::getAutoRRefDeductType | ( | ) | const |
C++11 deduction pattern for 'auto &&' type.
getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.
Definition at line 6009 of file ASTContext.cpp.
References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().
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 5913 of file ASTContext.cpp.
Referenced by getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), getUnconstrainedType(), clang::TreeTransform< Derived >::RebuildAutoType(), and clang::TreeTransform< Derived >::RebuildQualifiedType().
|
inline |
Definition at line 761 of file ASTContext.h.
Referenced by clang::Sema::BuildBitIntType(), getASTRecordLayout(), InitDeviceMC(), and clang::Sema::Initialize().
Return the innermost element type of an array type.
For example, will return "int" for int[m][n]
Definition at line 7078 of file ASTContext.cpp.
References clang::ArrayType::getElementType().
Referenced by clang::SemaOpenMP::ActOnOpenMPCopyinClause(), clang::SemaOpenMP::ActOnOpenMPCopyprivateClause(), clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::SemaOpenMP::ActOnOpenMPLastprivateClause(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXTypeConstructExpr(), BuildImplicitMemberInitializer(), clang::Sema::BuiltinRemoveExtent(), CheckAggExprForMemSetUse(), clang::Sema::CheckAllocatedType(), clang::Sema::checkArrayElementAlignment(), CheckC23ConstexprVarType(), clang::SemaOpenACC::CheckReductionVar(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::Sema::FindAllocationFunctions(), clang::CodeGen::CodeGenModule::generateIntelFPGAAnnotation(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getInnerObjCOwnership(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), getTypeAlignIfKnown(), hasUniqueObjectRepresentations(), clang::SemaCUDA::inferTargetForImplicitSpecialMember(), clang::Sema::isAbstractType(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isNonConstantStorage(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::Sema::RequireLiteralType(), clang::Sema::RequireNonAbstractType(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), 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 7082 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 4631 of file ASTContext.cpp.
References ID, and clang::BitIntType::Profile().
Referenced by clang::Sema::BuildBitIntType(), 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 7547 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 7512 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 3445 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::Type::isFunctionType(), clang::BlockPointerType::Profile(), and clang::T.
Referenced by clang::Sema::BuildBlockPointerType(), clang::Sema::DeduceReturnType(), getCommonNonSugarTypeNode(), mergeTypes(), and clang::Sema::PerformImplicitConversion().
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 2946 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), and getBlockCaptureStr().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 2109 of file ASTContext.h.
Referenced by getBOOLType().
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1939 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
|
inline |
type of 'BOOL' type.
Definition at line 2119 of file ASTContext.h.
References getBOOLDecl(), and getTypeDeclType().
Definition at line 4850 of file ASTContext.cpp.
References getCanonicalType(), ID, and clang::BTFTagAttributedType::Profile().
Referenced by getCommonSugarTypeNode().
TypedefDecl * ASTContext::getBuiltinMSVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list
type.
Definition at line 9271 of file ASTContext.cpp.
References CreateMSVaListDecl().
Referenced by getBuiltinMSVaListType(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_ms_va_list
type.
Definition at line 2147 of file ASTContext.h.
References getBuiltinMSVaListDecl(), and getTypeDeclType().
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 11676 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().
TypedefDecl * ASTContext::getBuiltinVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list
type.
Definition at line 9253 of file ASTContext.cpp.
References CreateVaListDecl(), and clang::Decl::isImplicit().
Referenced by getBuiltinVaListType(), getVaListTagDecl(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_va_list
type.
Definition at line 2133 of file ASTContext.h.
References getBuiltinVaListDecl(), and getTypeDeclType().
Referenced by clang::CodeGen::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 3910 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::CodeGen::CodeGenTypes::ConvertType(), clang::Type::getRVVEltType(), and clang::Type::getSveEltType().
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 7675 of file ASTContext.cpp.
References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptionsBase::NonGC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.
Referenced by clang::CodeGen::CodeGenFunction::emitByrefStructureInit().
CanQualType ASTContext::getCanonicalFunctionResultType | ( | QualType | ResultType | ) | const |
Adjust the given function result type.
Definition at line 4403 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 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 6909 of file ASTContext.cpp.
References clang::NestedNameSpecifier::Create(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsType(), 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::T, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by clang::Sema::CheckUsingDeclRedeclaration(), getCommonNNS(), and getDependentTemplateName().
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 6093 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getArrayDecayedType(), getArrayParameterType(), getCanonicalType(), getLangOpts(), getPointerType(), getVariableArrayDecayedType(), clang::HLSL, and clang::T.
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 6854 of file ASTContext.cpp.
References clang::TemplateArgument::CreatePackCopy(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsStructuralValue(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateArguments(), getCanonicalTemplateName(), getCanonicalType(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getIsDefaulted(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getParamTypeForDecl(), clang::TemplateArgument::getStructuralValueType(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by 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 6352 of file ASTContext.cpp.
Referenced by getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), getCommonTemplateName(), hasSameTemplateName(), and clang::Sema::isMoreSpecializedThanPrimary().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 5054 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), getCanonicalTemplateArguments(), getCanonicalTemplateName(), ID, clang::Type::isDependentType(), and clang::TemplateSpecializationType::Profile().
Referenced by getTemplateSpecializationType().
Definition at line 2593 of file ASTContext.h.
References clang::Type::getCanonicalTypeInternal(), clang::QualType::getTypePtr(), and clang::T.
|
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 2589 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and clang::T.
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildReferenceType(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::ento::StoreManager::castRegion(), CheckC23ConstexprVarType(), clang::Sema::CheckConstructor(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CollectVRQualifiers(), clang::Sema::CompareReferenceRelationship(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeduceTemplateArguments(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), getAddrSpaceQualType(), getAdjustedType(), getArrayParameterType(), getAtomicType(), getAttributedType(), getBlockPointerType(), getBTFTagAttributedType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), getComplexType(), getConstantArrayType(), getConstantMatrixType(), getCountAttributedType(), getDecayedType(), getDecltypeType(), getDependentAddressSpaceType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), getDependentSizedMatrixType(), getDependentVectorType(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), GetKeyForBase(), getLValueReferenceType(), getMacroQualifiedType(), getMemberPointerType(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getPackExpansionType(), getParenType(), getPointerType(), getRValueReferenceType(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTemplateSpecializationType(), getTypedefType(), clang::CodeGen::CodeGenTBAA::getTypeInfo(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), getVectorType(), hasSameType(), hasSameUnqualifiedType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitBuiltinTypes(), InitCatchParam(), IsModifiable(), IsOverloadOrOverrideImpl(), clang::Expr::isUnusedResultAWarning(), clang::Sema::LookupConstructors(), clang::Sema::LookupSpecialMember(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypeLists(), mergeTypes(), NoteIndirectBases(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::cross_tu::shouldImport(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ento::ExprEngine::VisitInitListExpr().
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 7400 of file ASTContext.cpp.
References buildImplicitRecord(), and clang::TagDecl::startDefinition().
Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), and clang::Sema::Initialize().
RecordDecl * ASTContext::getCFConstantStringTagDecl | ( | ) | const |
Definition at line 7484 of file ASTContext.cpp.
References getCFConstantStringDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 7491 of file ASTContext.cpp.
References getCFConstantStringDecl(), and getTypedefType().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().
|
inline |
Return the size of the character type, in bits.
Definition at line 2359 of file ASTContext.h.
References CharTy, and getTypeSize().
Referenced by calculateOffset(), CheckC23ConstexprInitStringLiteral(), collectSubRegionBindings(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
|
inline |
Definition at line 939 of file ASTContext.h.
Referenced by clang::Decl::dump().
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 578 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), clang::AS_public, cloneFullComment(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getCanonicalDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::NonVirtualBase, clang::RawComment::parse(), ParsedComments, and clang::VirtualBase.
Definition at line 13411 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::CheckVectorConditionalTypes(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::FindCompositePointerType(), getCommonArrayElementType(), getCommonElementType(), getCommonNonSugarTypeNode(), getCommonPointeeType(), getCommonSugarTypeNode(), getCommonTemplateArgument(), getCommonTypes(), and mergeTypeLists().
|
inline |
Definition at line 1354 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), getComplexType(), and clang::T.
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 3294 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::ComplexType::Profile(), and clang::T.
Referenced by getCommonNonSugarTypeNode(), and getComplexType().
uint64_t ASTContext::getConstantArrayElementCount | ( | const ConstantArrayType * | CA | ) | const |
Return number of constant array elements.
getConstantArrayElementCount - Returns number of constant array elements.
Definition at line 7098 of file ASTContext.cpp.
References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getZExtSize().
Referenced by clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().
QualType ASTContext::getConstantArrayType | ( | QualType | EltTy, |
const llvm::APInt & | ArySize, | ||
const Expr * | SizeExpr, | ||
ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return the unique reference to the type for a constant array of the specified element type.
getConstantArrayType - Return the unique reference to the type for an array of the specified element type.
Definition at line 3588 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), ID, clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Expr::isInstantiationDependent(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuildArrayType(), EmitDoacrossOrdered(), clang::Sema::FindCompositePointerType(), getAsArrayType(), getCommonNonSugarTypeNode(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getStringLiteralArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and mergeTypes().
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 4249 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::QualType::isCanonical(), clang::ConstantMatrixType::isDimensionValid(), clang::MatrixType::isValidElementType(), and clang::ConstantMatrixType::Profile().
Referenced by clang::Sema::BuildMatrixType(), getCommonNonSugarTypeNode(), 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 1313 of file ASTContext.h.
References clang::T.
Referenced by clang::Sema::EvaluateStaticAssertMessageAsString().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 12354 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Definition at line 13510 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.
Definition at line 13677 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.
Definition at line 11228 of file ASTContext.cpp.
References AccumTy, clang::Type::castAs(), FractTy, clang::Type::getAs(), getBitIntType(), 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, SignedCharTy, and clang::T.
Referenced by clang::Sema::BuiltinChangeSignedness().
Definition at line 13474 of file ASTContext.cpp.
References AccumTy, clang::Type::castAs(), FractTy, clang::BuiltinType::getKind(), clang::Type::isFixedPointType(), clang::Type::isUnsaturatedFixedPointType(), LongAccumTy, LongFractTy, ShortAccumTy, ShortFractTy, UnsignedAccumTy, UnsignedFractTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedShortAccumTy, and UnsignedShortFractTy.
Definition at line 11154 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Type::getAs(), getBitIntType(), 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, clang::T, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, and UnsignedShortTy.
Referenced by clang::Sema::BuiltinChangeSignedness(), clang::ento::SMTConv::doIntTypeConversion(), and getUIntPtrType().
QualType ASTContext::getCountAttributedType | ( | QualType | T, |
Expr * | CountExpr, | ||
bool | CountInBytes, | ||
bool | OrNull, | ||
ArrayRef< TypeCoupledDeclRefInfo > | DependentDecls | ||
) | const |
Definition at line 3141 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), ID, clang::Type::isArrayType(), clang::Type::isPointerType(), clang::CountAttributedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildCountAttributedArrayOrPointerType().
|
inline |
Definition at line 1439 of file ASTContext.h.
StringRef ASTContext::getCUIDHash | ( | ) | const |
Definition at line 13848 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 3435 of file RecordLayoutBuilder.cpp.
References computeKeyFunction(), clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::CXXRecordDecl::getDefinition(), getExternalSource(), getTargetInfo(), clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), and clang::LazyOffsetPtr< T, OffsT, Get >::isValid().
Referenced by DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::installapi::getVTableLinkage(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::installapi::hasVTable(), clang::installapi::isRTTIWeakDef(), and clang::CodeGen::CodeGenVTables::isVTableExternal().
|
inline |
Get module under construction, nullptr if this is not a C++20 module.
Definition at line 1074 of file ASTContext.h.
Referenced by clang::CXX20ModulesGenerator::getEmittingModule(), clang::Decl::isInAnotherModuleUnit(), and clang::CodeGen::CodeGenModule::Release().
Return a type with additional const
, volatile
, or restrict
qualifiers.
Definition at line 2166 of file ASTContext.h.
References clang::Qualifiers::fromCVRMask(), getQualifiedType(), and clang::T.
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 818 of file ASTContext.cpp.
References clang::LangOptions::CXXABI, clang::TargetInfo::getCXXABI(), clang::TargetCXXABI::getKind(), getLangOpts(), and getTargetInfo().
Referenced by createCXXABI(), and clang::CodeGen::CreateItaniumCXXABI().
|
inline |
Definition at line 1382 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), getDecayedType(), and clang::T.
Return the uniqued reference to a specified decay from the original type to the decayed type.
Definition at line 3369 of file ASTContext.cpp.
References getCanonicalType(), ID, and clang::AdjustedType::Profile().
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 3389 of file ASTContext.cpp.
References getArrayDecayedType(), getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), and clang::T.
Referenced by clang::Sema::BuiltinDecay(), getAdjustedParameterType(), getCommonSugarTypeNode(), getDecayedType(), and getExceptionObjectType().
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 1639 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::ast_matchers::arrayType, clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getMaxAlignedAttribute(), clang::Decl::getMaxAlignment(), getMinGlobalAlignOfVar(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), clang::QualType::getQualifiers(), getTargetInfo(), getTypeSize(), clang::Qualifiers::hasUnaligned(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), max(), min(), Offset, Parent, clang::SC_Static, clang::T, toBits(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), emitOutlinedFunctionPrologue(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), getBaseAlignmentAndOffsetFromLValue(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 12381 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1432 of file ASTContext.cpp.
References Allocate().
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 5761 of file ASTContext.cpp.
References DependentTy, getCanonicalType(), ID, clang::Expr::isInstantiationDependent(), and clang::DependentDecltypeType::Profile().
Referenced by clang::Sema::BuildDecltypeType().
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 5948 of file ASTContext.cpp.
References ID, and clang::DeducedTemplateSpecializationType::Profile().
Referenced by clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType().
CallingConv ASTContext::getDefaultCallingConvention | ( | bool | IsVariadic, |
bool | IsCXXMethod, | ||
bool | IsBuiltin = false |
||
) | const |
Retrieves the default calling convention for the current target.
Definition at line 12119 of file ASTContext.cpp.
References clang::CC_C, clang::CC_M68kRTD, clang::CC_X86FastCall, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86VectorCall, clang::LangOptionsBase::DCC_CDecl, clang::LangOptionsBase::DCC_FastCall, clang::LangOptionsBase::DCC_None, clang::LangOptionsBase::DCC_RegCall, clang::LangOptionsBase::DCC_RtdCall, clang::LangOptionsBase::DCC_StdCall, clang::LangOptionsBase::DCC_VectorCall, getTargetInfo(), and hasFeature().
Referenced by clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), and GetBuiltinType().
|
inline |
Returns default address space based on OpenCL version and enabled features.
Definition at line 1430 of file ASTContext.h.
References clang::opencl_generic, and clang::opencl_private.
Referenced by clang::Sema::getDefaultCXXMethodAddrSpace(), and clang::Expr::isNullPointerConstant().
QualType ASTContext::getDependentAddressSpaceType | ( | QualType | PointeeType, |
Expr * | AddrSpaceExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
Definition at line 4322 of file ASTContext.cpp.
References clang::DependentAddressSpaceType::getAddrSpaceExpr(), getCanonicalType(), ID, clang::Expr::isInstantiationDependent(), and clang::DependentAddressSpaceType::Profile().
Referenced by clang::Sema::BuildAddressSpaceAttr(), and getCommonNonSugarTypeNode().
Return a dependent bit-precise integer type with the specified signedness and bit count.
Definition at line 4645 of file ASTContext.cpp.
References ID, clang::Expr::isInstantiationDependent(), and clang::DependentBitIntType::Profile().
Referenced by clang::Sema::BuildBitIntType().
QualType ASTContext::getDependentNameType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 5163 of file ASTContext.cpp.
Referenced by getCommonNonSugarTypeNode(), and clang::TreeTransform< Derived >::RebuildDependentNameType().
QualType ASTContext::getDependentSizedArrayType | ( | QualType | EltTy, |
Expr * | NumElts, | ||
ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals, | ||
SourceRange | Brackets | ||
) | const |
Return a non-unique reference to the type for a dependently-sized array of the specified element type.
getDependentSizedArrayType - Returns a non-unique reference to the type for a dependently-sized array of the specified element type.
FIXME: We will need these to be uniqued, or at least comparable, at some point.
Definition at line 3808 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::DependentSizedArrayType::getSizeExpr(), ID, clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::DependentSizedArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuildArrayType(), getAsArrayType(), getCommonNonSugarTypeNode(), getUnqualifiedArrayType(), and getVariableArrayDecayedType().
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 4209 of file ASTContext.cpp.
References getCanonicalType(), ID, and clang::DependentSizedExtVectorType::Profile().
Referenced by clang::Sema::BuildExtVectorType(), and getCommonNonSugarTypeNode().
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 4281 of file ASTContext.cpp.
References getCanonicalType(), clang::MatrixType::getElementType(), clang::DependentSizedMatrixType::getRowExpr(), ID, and clang::DependentSizedMatrixType::Profile().
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 9351 of file ASTContext.cpp.
Referenced by 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 9387 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), ID, clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 5200 of file ASTContext.cpp.
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
ArrayRef< TemplateArgumentLoc > | Args | ||
) | const |
Definition at line 5189 of file ASTContext.cpp.
Referenced by getCommonNonSugarTypeNode().
QualType ASTContext::getDependentVectorType | ( | QualType | VectorType, |
Expr * | SizeExpr, | ||
SourceLocation | AttrLoc, | ||
VectorKind | VecKind | ||
) | const |
Return the unique reference to the type for a dependently sized vector of the specified element type.
Definition at line 4135 of file ASTContext.cpp.
References getCanonicalType(), ID, and clang::DependentVectorType::Profile().
Referenced by clang::Sema::BuildVectorType(), and getCommonNonSugarTypeNode().
|
inline |
Definition at line 756 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1428 of file ASTContext.cpp.
References clang::SourceManager::getDiagnostics().
Referenced by createDeviceMangleContext(), createMangleContext(), clang::StructuralEquivalenceContext::Diag1(), clang::StructuralEquivalenceContext::Diag2(), clang::Decl::dump(), clang::DeclContext::dumpAsDecl(), clang::cross_tu::CrossTranslationUnitContext::emitCrossTUDiagnostics(), clang::ASTImporter::FromDiag(), getFunctionFeatureMap(), clang::installapi::InstallAPIVisitor::HandleTranslationUnit(), clang::ASTImporter::Import(), clang::interp::State::report(), rewriteToNumericBoxedExpression(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType, | ||
TagDecl * | OwnedTagDecl = nullptr |
||
) | const |
Definition at line 5096 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), ID, clang::QualType::isCanonical(), clang::ElaboratedType::Profile(), and clang::T.
Referenced by clang::Sema::CheckComparisonCategoryType(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), getCommonSugarTypeNode(), clang::Sema::getElaboratedType(), clang::TypeName::getFullyQualifiedType(), clang::TreeTransform< Derived >::RebuildDependentNameType(), and clang::TreeTransform< Derived >::RebuildElaboratedType().
Definition at line 4800 of file ASTContext.cpp.
References clang::Decl::getPreviousDecl().
Referenced by clang::CodeGen::CGDebugInfo::completeType().
Definition at line 7037 of file ASTContext.cpp.
References getDecayedType(), getVariableArrayDecayedType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), and clang::T.
CharUnits ASTContext::getExnObjectAlignment | ( | ) | const |
Return the alignment (in bytes) of the thrown exception object.
This is only meaningful for targets that allocate C++ exceptions in a system runtime, such as those using the Itanium C++ ABI.
Definition at line 1738 of file ASTContext.cpp.
References toCharUnitsFromBits().
|
inline |
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition at line 1203 of file ASTContext.h.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::ExternalASTMerger::CompleteType(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), getASTRecordLayout(), getCurrentKeyFunction(), clang::CXXRecordDecl::getLambdaContextDecl(), clang::Sema::getStdAlignValT(), clang::Sema::getStdBadAlloc(), clang::Sema::getStdNamespace(), clang::Sema::hasAcceptableDefinition(), clang::Sema::Initialize(), clang::DeclContext::lookups(), clang::LazyGenerationalUpdatePtr< Owner, T, Update >::makeValue(), clang::Parser::ParseFirstTopLevelDecl(), setNonKeyFunction(), clang::Decl::updateOutOfDate(), and clang::Sema::~Sema().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 1112 of file ASTContext.cpp.
References clang::ExternCContextDecl::Create(), and getTranslationUnitDecl().
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 4175 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Generic, getCanonicalType(), clang::BitIntType::getNumBits(), ID, clang::Type::isBitIntType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::Type::isDependentType(), and clang::VectorType::Profile().
Referenced by clang::Sema::BuildExtVectorType(), clang::Sema::CheckVectorConditionalTypes(), getCommonNonSugarTypeNode(), and clang::Sema::PerformImplicitConversion().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3486 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain().
Referenced by emitAddrOfZeroSizeField(), and clang::CodeGen::CodeGenModule::getMemberPointerConstant().
|
inline |
Retrieve the C FILE type.
Definition at line 1971 of file ASTContext.h.
References getTypeDeclType().
Definition at line 13610 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), and clang::Type::isFixedPointType().
llvm::APFixedPoint ASTContext::getFixedPointMax | ( | QualType | Ty | ) | const |
Definition at line 13667 of file ASTContext.cpp.
References getFixedPointSemantics(), and clang::Type::isFixedPointType().
llvm::APFixedPoint ASTContext::getFixedPointMin | ( | QualType | Ty | ) | const |
Definition at line 13672 of file ASTContext.cpp.
References getFixedPointSemantics(), and clang::Type::isFixedPointType().
Definition at line 13564 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), and clang::Type::isFixedPointType().
Referenced by getFixedPointSemantics(), and clang::ASTNodeImporter::VisitFixedPointLiteral().
llvm::FixedPointSemantics ASTContext::getFixedPointSemantics | ( | QualType | Ty | ) | const |
Definition at line 13652 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 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 7146 of file ASTContext.cpp.
References getFloatingRank().
Referenced by clang::ento::SMTConv::doFloatTypeConversion(), getFloatingTypeSemanticOrder(), and clang::StandardConversionSequence::getNarrowingKind().
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 7157 of file ASTContext.cpp.
References getFloatingTypeOrder(), and getFloatTypeSemantics().
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 1614 of file ASTContext.cpp.
References clang::Type::castAs(), clang::RISCV::Float, clang::TargetInfo::getFloat128Format(), clang::BuiltinType::getKind(), getLangOpts(), clang::TargetInfo::getLongDoubleFormat(), and clang::T.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), getFloatingTypeSemanticOrder(), clang::interp::Context::getFloatSemantics(), clang::StandardConversionSequence::getNarrowingKind(), and clang::ento::SMTConv::getZeroExpr().
|
inline |
Definition at line 798 of file ASTContext.h.
References Loc.
Referenced by clang::CodeGen::CodeGenModule::Error(), and clang::CodeGen::CodeGenModule::ErrorUnsupported().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
const FunctionDecl * | FD | ||
) | const |
Definition at line 13735 of file ASTContext.cpp.
References getDiagnostics().
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), and initFeatureMaps().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
GlobalDecl | GD | ||
) | const |
Definition at line 13747 of file ASTContext.cpp.
References filterFunctionTargetAttrs(), filterFunctionTargetVersionAttrs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::GlobalDecl::getDecl(), getDiagnostics(), and clang::GlobalDecl::getMultiVersionIndex().
Definition at line 1578 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 4365 of file ASTContext.cpp.
References getCanonicalFunctionResultType(), ID, isCanonicalResultType(), and clang::FunctionNoProtoType::Profile().
Referenced by adjustFunctionType(), GeneralizeFunctionType(), GetBuiltinType(), getCommonNonSugarTypeNode(), getFunctionNoProtoType(), getFunctionTypeWithoutPtrSizes(), mergeFunctionTypes(), and clang::TreeTransform< Derived >::RebuildFunctionNoProtoType().
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1583 of file ASTContext.h.
Referenced by clang::Sema::adjustCCAndNoReturn(), adjustDeducedFunctionResultType(), clang::Sema::AdjustDestructorExceptionSpec(), clang::TemplateDeclInstantiator::adjustForRewrite(), adjustFunctionType(), clang::Sema::BuildFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::CodeGen::CodeGenModule::CreateKCFITypeId(), emitOutlinedFunctionPrologue(), clang::Sema::FindCompositePointerType(), GeneralizeFunctionType(), GetBuiltinType(), getCommonNonSugarTypeNode(), clang::CodeGen::CGDebugInfo::getFunctionType(), getFunctionTypeWithExceptionSpec(), getFunctionTypeWithoutPtrSizes(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), mergeFunctionTypes(), mergeObjCGCQualifiers(), and clang::ASTDeclReader::UpdateDecl().
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 3205 of file ASTContext.cpp.
References clang::Type::castAs(), getAttributedType(), getFunctionType(), getMacroQualifiedType(), and getParenType().
Referenced by adjustExceptionSpec(), extractPBaseFlags(), clang::CodeGen::CodeGenFunction::getUBSanFunctionTypeHash(), and hasSameFunctionTypeIgnoringExceptionSpec().
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 3241 of file ASTContext.cpp.
References clang::Type::getAs(), getFunctionNoProtoType(), getFunctionType(), removePtrSizeAddrSpace(), and clang::T.
Referenced by hasSameFunctionTypeIgnoringPtrSizes().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 11866 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForFunction().
Referenced by clang::SemaCUDA::CheckCall(), DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), MarkVarDeclODRUsed(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) | const |
Definition at line 11959 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForVariable().
Referenced by DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), and shouldBeInCOMDAT().
QualType ASTContext::getIncompleteArrayType | ( | QualType | EltTy, |
ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return a unique reference to the type for an incomplete array of the specified element type.
Definition at line 3872 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), ID, clang::QualType::isCanonical(), clang::IncompleteArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuildArrayType(), clang::Sema::FindCompositePointerType(), getAsArrayType(), getCommonNonSugarTypeNode(), getUnqualifiedArrayType(), and mergeTypes().
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 4679 of file ASTContext.cpp.
References clang::Decl::getPreviousDecl(), and NeedsInjectedClassNameType().
Referenced by getCommonNonSugarTypeNode().
TemplateArgument ASTContext::getInjectedTemplateArg | ( | NamedDecl * | ParamDecl | ) |
Definition at line 5250 of file ASTContext.cpp.
References clang::TemplateArgument::CreatePackCopy(), DependentTy, getPackExpansionType(), getTypeDeclType(), clang::Expr::getValueKindForType(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::Type::isRecordType(), clang::Decl::isTemplateParameterPack(), and clang::T.
Referenced by 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 5290 of file ASTContext.cpp.
References getInjectedTemplateArg(), and clang::TemplateParameterList::size().
Referenced by 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 7757 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 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 7327 of file ASTContext.cpp.
References clang::Type::getAs(), getBaseElementType(), clang::Type::getPointeeType(), clang::Type::isArrayType(), clang::Qualifiers::OCL_None, and clang::T.
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 1453 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1529 of file ASTContext.cpp.
Referenced by isInstantiationOf().
If the given using decl Inst
is an instantiation of another (possibly unresolved) using decl, return it.
Definition at line 1488 of file ASTContext.cpp.
Referenced by isInstantiationOfUnresolvedUsingDecl().
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 1507 of file ASTContext.cpp.
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1518 of file ASTContext.cpp.
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1172 of file ASTContext.cpp.
References buildImplicitTypedef(), and Int128Ty.
Referenced by 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 7355 of file ASTContext.cpp.
References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().
Referenced by clang::ento::SMTConv::doIntTypeConversion().
interp::Context & ASTContext::getInterpContext | ( | ) |
Returns the clang bytecode interpreter context.
Definition at line 844 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 6039 of file ASTContext.cpp.
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 6062 of file ASTContext.cpp.
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 12253 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, clang::Signed, and UnsignedInt128Ty.
Referenced by clang::SemaOpenMP::ActOnOpenMPCanonicalLoop(), createKmpTaskTRecordDecl(), createRuntimeShuffleFunction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitRestoreIP(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::ento::SMTConv::getAPSIntType(), and shuffleAndStore().
Definition at line 11143 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), clang::Type::isBooleanType(), and clang::T.
Referenced by clang::Sema::ActOnCXXNew(), clang::SemaOpenMP::ActOnOpenMPCanonicalLoop(), buildDistanceFunc(), CheckICE(), clang::interp::Context::classify(), ConvertAPValueToString(), EncompassingIntegerType(), clang::ento::BasicValueFactory::getAPSIntType(), clang::interp::Context::getBitWidth(), getFixedPointSemantics(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), clang::EnumDecl::getValueRange(), handleVectorUnaryOperator(), isOverflowingIntegerType(), isValidStructGUID(), MakeIntValue(), clang::TreeTransform< Derived >::RebuildBitIntType(), and clang::TreeTransform< Derived >::RebuildExtVectorType().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1983 of file ASTContext.h.
References getTypeDeclType().
Definition at line 13545 of file ASTContext.cpp.
References clang::TargetInfo::getCUDABuiltinAddressSpace(), clang::getLangASFromTargetAS(), clang::TargetInfo::getOpenCLBuiltinAddressSpace(), and getTargetInfo().
|
inline |
Definition at line 778 of file ASTContext.h.
Referenced by clang::arcmt::trans::MigrationContext::addPropertyAttribute(), AlignOfType(), clang::arcmt::MigrationProcess::applyTransform(), areLaxCompatibleRVVTypes(), areLaxCompatibleSveTypes(), buildGlobalBlock(), clang::Sema::BuildMatrixType(), clang::arcmt::trans::canApplyWeak(), canAssignObjCInterfacesInBlockPointer(), clang::arcmt::checkForManualIssues(), CheckICE(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), clang::RecordDecl::completeDefinition(), clang::computeDependence(), clang::LinkageComputer::computeLVForDecl(), clang::analyze_os_log::computeOSLogBufferLayout(), constructDebugPieceForTrackedCondition(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXThisExpr::Create(), createDataFixit(), createSpanTypeForVarDecl(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), EmitDeclDestroy(), EmitDeclInit(), emitMappingInformation(), clang::ASTMergeAction::ExecuteAction(), clang::arcmt::trans::findSemiAfterLocation(), fixParamWithSpan(), fixVarDeclWithArray(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), GenerateFixForUnusedDecl(), getAdjustedParameterType(), getASTRecordLayout(), clang::ento::MemRegionManager::getBlockDataRegion(), GetBuiltinType(), getByrefLifetime(), getCanonicalParamType(), clang::ento::SValBuilder::getConditionType(), getCXXABIKind(), clang::LinkageComputer::getDeclLinkageAndVisibility(), clang::ento::retaincountchecker::RefLeakReportVisitor::getEndPath(), getFloatTypeSemantics(), clang::AnalysisDeclContext::getFunctionName(), GetGCAttrTypeForType(), clang::Expr::getIntegerConstantExpr(), clang::ASTWriter::getLangOpts(), clang::ento::CheckerContext::getLangOpts(), clang::interp::Context::getLangOpts(), clang::interp::State::getLangOpts(), clang::index::IndexingContext::getLangOpts(), clang::Decl::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getLogicalOperationType(), clang::LinkageComputer::getLVForDecl(), getMacroName(), clang::Sema::getMoreSpecializedTemplate(), clang::CXXRecordDecl::getMSVtorDispMode(), clang::StandardConversionSequence::getNarrowingKind(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCGCAttrKind(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), clang::DeclContext::getRedeclContext(), clang::ento::MemRegionManager::getStaticSize(), getStringLiteralArrayType(), getTypeInfoDataSizeInChars(), getVTableContext(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::Decl::hasLocalOwningModuleStorage(), clang::ASTNodeImporter::hasReturnTypeDeclaredInside(), clang::installapi::hasRTTI(), hasSameFunctionTypeIgnoringExceptionSpec(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::Expr::isCXX11ConstantExpr(), clang::ParmVarDecl::isDestroyedInCallee(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCPropertyDecl::isDirectProperty(), clang::installapi::isInlined(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::VarDecl::isNoDestroy(), clang::QualType::isNonConstantStorage(), clang::Expr::isNullPointerConstant(), isPromotableBitField(), isPromotableIntegerType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), isTypeSubstitutable(), clang::Expr::isUnusedResultAWarning(), isUserWritingOffTheEnd(), clang::CodeGen::ABIInfo::isZeroLengthBitfieldPermittedInHomogeneousAggregate(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), mergeTypes(), needsConversionOfHalfVec(), clang::ento::ConditionBRVisitor::patternMatch(), clang::LocationContext::printJson(), printNode(), PrintStats(), clang::ento::retaincountchecker::RetainCountChecker::processLeaks(), clang::CodeGen::CodeGenModule::Release(), reportAnalyzerFunctionMisuse(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::edit::rewriteToObjCLiteralSyntax(), clang::CodeGen::CodeGenModule::setGlobalVisibility(), setObjCGCLValueClass(), shouldNotRewriteImmediateMessageArgs(), clang::shouldSkipCheckingODR(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenModule::stopAutoInit(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarArrayTypes(), UnwrapSimilarTypes(), clang::QualType::UseExcessPrecision(), useInlineVisibilityHidden(), and clang::FunctionCallFilterCCC::ValidateCandidate().
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 8069 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 2194 of file ASTContext.h.
References clang::Qualifiers::addObjCLifetime(), getQualifiedType(), clang::Qualifiers::OCL_None, and clang::ast_matchers::type.
comments::FullComment * ASTContext::getLocalCommentForDeclUncached | ( | const Decl * | D | ) | const |
Return parsed documentation comment attached to a given declaration.
Returns nullptr if no comment is attached. Does not look at any redeclarations of the declaration.
Definition at line 573 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
Referenced by clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 2014 of file ASTContext.h.
References BoolTy, getLangOpts(), and IntTy.
Referenced by clang::Sema::BuildTypeTrait(), 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 3478 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), ID, clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::ReferenceType::Profile(), and clang::T.
Referenced by alignReferenceTypes(), buildDistanceFunc(), buildLoopVarFunc(), clang::Sema::BuildReferenceType(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), getCaptureFieldType(), getCommonNonSugarTypeNode(), clang::Sema::getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), getReferenceQualifiedType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), implicitObjectParamIsLifetimeBound(), clang::Sema::SpecialMemberIsTrivial(), and clang::CodeGen::ConstantEmitter::tryEmitConstantExpr().
QualType ASTContext::getMacroQualifiedType | ( | QualType | UnderlyingTy, |
const IdentifierInfo * | MacroII | ||
) | const |
Definition at line 5151 of file ASTContext.cpp.
References getCanonicalType(), and clang::QualType::isCanonical().
Referenced by getCommonSugarTypeNode(), getFunctionTypeWithExceptionSpec(), and clang::TreeTransform< Derived >::RebuildMacroQualifiedType().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1131 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
Referenced by clang::ASTNodeImporter::VisitBuiltinTemplateDecl().
|
inline |
Definition at line 1945 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by getMakeIntegerSeqDecl().
Definition at line 12299 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 12330 of file ASTContext.cpp.
References createMangleNumberingContext().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | NeedExtraManglingDecl_t | , |
const Decl * | D | ||
) |
Definition at line 12339 of file ASTContext.cpp.
References createMangleNumberingContext().
Find the 'this' offset for the member path in a pointer-to-member APValue.
Definition at line 2561 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().
Referenced by clang::ODRHash::AddStructuralValue().
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 3557 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::Type::isCanonicalUnqualified(), clang::MemberPointerType::Profile(), and clang::T.
Referenced by clang::Sema::BuildMemberPointerType(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), getCommonNonSugarTypeNode(), clang::TypeName::getFullyQualifiedType(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
Return the minimum alignement as specified by the target.
If VD
is non-null it may be used to identify external or weak variables.
Definition at line 2543 of file ASTContext.cpp.
References clang::TargetInfo::getMinGlobalAlign(), getTargetInfo(), clang::VarDecl::hasDefinition(), and clang::ValueDecl::isWeak().
Referenced by getAlignOfGlobalVar(), and getDeclAlign().
Get the initializations to perform when importing a module, if any.
Definition at line 1095 of file ASTContext.cpp.
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), and clang::TextNodeDumper::VisitImportDecl().
Get the additional modules in which the definition Def
has been merged.
Definition at line 1035 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::diagnoseMissingImport(), 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 12422 of file ASTContext.cpp.
References getMSGuidType(), ID, MSGuidTagDecl, clang::MSGuidDecl::Profile(), and clang::QualType::withConst().
|
inline |
Retrieve the implicitly-predeclared 'struct _GUID' declaration.
Definition at line 2152 of file ASTContext.h.
References MSGuidTagDecl.
|
inline |
Retrieve the implicitly-predeclared 'struct _GUID' type.
Definition at line 2155 of file ASTContext.h.
References getTagDeclType(), and MSGuidTagDecl.
Referenced by getMSGuidDecl().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 6295 of file ASTContext.cpp.
OMPTraitInfo & ASTContext::getNewOMPTraitInfo | ( | ) |
Return a new OMPTraitInfo object owned by this context.
Definition at line 13811 of file ASTContext.cpp.
Referenced by clang::ASTRecordReader::readOMPTraitInfo().
|
inlinestatic |
Definition at line 1028 of file ASTContext.h.
|
inline |
Definition at line 788 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), and clang::CodeGen::CodeGenFunction::ShouldEmitVTableTypeCheckedLoad().
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1926 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
CanQualType ASTContext::getNSIntegerType | ( | ) | const |
Definition at line 7706 of file ASTContext.cpp.
References LongLongTy, LongTy, and clang::T.
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1917 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 7697 of file ASTContext.cpp.
References clang::T, UnsignedLongLongTy, and UnsignedLongTy.
TypedefDecl * ASTContext::getObjCClassDecl | ( | ) | const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
Definition at line 8845 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), ObjCBuiltinClassTy, and clang::T.
Referenced by getObjCClassType(), 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 1892 of file ASTContext.h.
References getObjCClassType().
|
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 2100 of file ASTContext.h.
References getObjCClassDecl(), and getTypeDeclType().
Referenced by getObjCClassRedefinitionType(), and isObjCClassType().
|
inline |
Definition at line 1865 of file ASTContext.h.
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 7783 of file ASTContext.cpp.
Referenced by buildBlockDescriptor().
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 7839 of file ASTContext.cpp.
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 7897 of file ASTContext.cpp.
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 7880 of file ASTContext.cpp.
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 7995 of file ASTContext.cpp.
void ASTContext::getObjCEncodingForPropertyType | ( | QualType | T, |
std::string & | S | ||
) | const |
Emit the Objective-C property type encoding for the given type T
into S
.
Definition at line 8096 of file ASTContext.cpp.
void ASTContext::getObjCEncodingForType | ( | QualType | T, |
std::string & | S, | ||
const FieldDecl * | Field = nullptr , |
||
QualType * | NotEncodedT = nullptr |
||
) | const |
Emit the Objective-CC type encoding for the given type T
into S
.
If Field
is specified then record field names are also encoded.
Definition at line 8081 of file ASTContext.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode().
void ASTContext::getObjCEncodingForTypeQualifier | ( | Decl::ObjCDeclQualifier | QT, |
std::string & | S | ||
) | const |
Put the string version of the type qualifiers QT
into S
.
Definition at line 8812 of file ASTContext.cpp.
Return the size of type T
for Objective-C encoding purpose, in characters.
getObjCEncodingTypeSize returns size of type for objective-c encoding purpose.
Definition at line 7734 of file ASTContext.cpp.
References getTypeSizeInChars(), IntTy, clang::CharUnits::isPositive(), max(), clang::ast_matchers::type, VoidPtrTy, and clang::CharUnits::Zero().
Qualifiers::GC ASTContext::getObjCGCAttrKind | ( | QualType | Ty | ) | const |
Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes.
getObjCGCAttr - Returns one of GCNone, Weak or Strong objc's garbage collection attribute.
Definition at line 9491 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Qualifiers::GCNone, clang::Type::getCanonicalTypeInternal(), getLangOpts(), clang::QualType::getObjCGCAttr(), clang::PointerType::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::LangOptionsBase::NonGC, and clang::Qualifiers::Strong.
Referenced by clang::Expr::isOBJCGCCandidate().
QualType ASTContext::getObjCGCQualType | ( | QualType | T, |
Qualifiers::GC | gcAttr | ||
) | const |
Return the uniqued reference to the type for an Objective-C gc-qualified type.
The resulting type has a union of the qualifiers from T and the gc attribute.
Definition at line 3103 of file ASTContext.cpp.
References clang::Qualifiers::addObjCGCAttr(), clang::Type::getAs(), getCanonicalType(), clang::QualType::getObjCGCAttr(), clang::Type::getPointeeType(), getPointerType(), clang::Qualifiers::hasObjCGCAttr(), clang::Type::isAnyPointerType(), clang::QualifierCollector::strip(), and clang::T.
Referenced by mergeTypes().
TypedefDecl * ASTContext::getObjCIdDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined id
type in Objective-C.
Definition at line 8828 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), ObjCBuiltinIdTy, and clang::T.
Referenced by getObjCIdType(), and clang::Sema::Initialize().
|
inline |
Retrieve the type that id
has been defined to, which may be different from the built-in id
if id
has been typedef'd.
Definition at line 1879 of file ASTContext.h.
References getObjCIdType().
|
inline |
Represents the Objective-CC id
type.
This is set up lazily, by Sema. id
is always a (typedef for a) pointer type, a pointer to a struct.
Definition at line 2078 of file ASTContext.h.
References getObjCIdDecl(), and getTypeDeclType().
Referenced by clang::Sema::ActOnFinishFullExpr(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCIdRedefinitionType(), getObjCInstanceTypeDecl(), isObjCIdType(), and clang::Sema::PerformContextuallyConvertToObjCPointer().
ObjCCategoryImplDecl * ASTContext::getObjCImplementation | ( | ObjCCategoryDecl * | D | ) |
Get the implementation of the ObjCCategoryDecl D
, or nullptr if none exists.
Get the implementation of ObjCCategoryDecl, or nullptr if none exists.
Definition at line 2899 of file ASTContext.cpp.
ObjCImplementationDecl * ASTContext::getObjCImplementation | ( | ObjCInterfaceDecl * | D | ) |
Get the implementation of the ObjCInterfaceDecl D
, or nullptr if none exists.
Get the implementation of ObjCInterfaceDecl, or nullptr if none exists.
Definition at line 2889 of file ASTContext.cpp.
Referenced by clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCCategoryDecl::getImplementation().
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1959 of file ASTContext.h.
References getObjCInstanceTypeDecl(), and getTypeDeclType().
Referenced by clang::ObjCMessageExpr::getCallReturnType(), and ReplaceWithInstancetype().
TypedefDecl * ASTContext::getObjCInstanceTypeDecl | ( | ) |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
Definition at line 7715 of file ASTContext.cpp.
References buildImplicitTypedef(), and getObjCIdType().
Referenced by getObjCInstanceType().
QualType ASTContext::getObjCInterfaceType | ( | const ObjCInterfaceDecl * | Decl, |
ObjCInterfaceDecl * | PrevDecl = nullptr |
||
) | const |
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl.
The list of protocols is optional.
Definition at line 5663 of file ASTContext.cpp.
References Allocate(), and clang::T.
Referenced by areCommonBaseCompatible(), clang::ObjCObjectType::computeSuperClassTypeSlow(), getObjCProtoType(), clang::ObjCPropertyRefExpr::getReceiverType(), GetReturnType(), and setObjCConstantStringInterface().
const ObjCMethodDecl * ASTContext::getObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD | ) | const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
Definition at line 2922 of file ASTContext.cpp.
Referenced by setObjCMethodRedeclaration().
|
inline |
Definition at line 1869 of file ASTContext.h.
Return a ObjCObjectPointerType type for the given ObjCObjectType.
getObjCObjectPointerType - Return a ObjCObjectPointerType type for the given object type.
Definition at line 5632 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), ID, clang::QualType::isCanonical(), and clang::ObjCObjectPointerType::Profile().
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), canBindObjCObjectType(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::Sema::FindCompositePointerType(), getCommonNonSugarTypeNode(), clang::ento::TypedValueRegion::getLocationType(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildObjCObjectPointerType(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ArrayRef< QualType > | typeArgs, | ||
ArrayRef< ObjCProtocolDecl * > | protocols, | ||
bool | isKindOf | ||
) | const |
Definition at line 5371 of file ASTContext.cpp.
References Allocate(), areSortedAndUniqued(), clang::Type::getAs(), getCanonicalType(), getObjCObjectType(), ID, clang::QualType::isCanonical(), clang::ObjCObjectTypeImpl::Profile(), SortAndUniqueProtocols(), clang::T, and clang::ast_matchers::type.
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ObjCProtocolDecl *const * | Protocols, | ||
unsigned | NumProtocols | ||
) | const |
Legacy interface: cannot provide type arguments or __kindof.
Definition at line 5363 of file ASTContext.cpp.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), getCommonNonSugarTypeNode(), getObjCClassDecl(), getObjCIdDecl(), getObjCObjectType(), clang::Type::getObjCSubstitutions(), and clang::ObjCObjectType::stripObjCKindOfTypeAndQuals().
const ObjCInterfaceDecl * ASTContext::getObjContainingInterface | ( | const NamedDecl * | ND | ) | const |
Returns the Objective-C interface that ND
belongs to if it is an Objective-C method/property/ivar etc.
that is part of an interface, otherwise returns null.
Definition at line 2932 of file ASTContext.cpp.
References clang::Decl::getDeclContext(), and ID.
Referenced by clang::edit::rewriteToObjCSubscriptSyntax().
ObjCPropertyImplDecl * ASTContext::getObjCPropertyImplDeclForPropertyDecl | ( | const ObjCPropertyDecl * | PD, |
const Decl * | Container | ||
) | const |
Definition at line 7950 of file ASTContext.cpp.
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 8854 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), and Idents.
Referenced by getObjCProtoType(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the Objective-C Protocol
class.
Definition at line 2124 of file ASTContext.h.
References getObjCInterfaceType(), and getObjCProtocolDecl().
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 8837 of file ASTContext.cpp.
References buildImplicitTypedef(), getPointerType(), ObjCBuiltinSelTy, and clang::T.
Referenced by getObjCSelType(), and clang::Sema::Initialize().
|
inline |
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd.
Definition at line 1905 of file ASTContext.h.
References getObjCSelType().
|
inline |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
Definition at line 2088 of file ASTContext.h.
References getObjCSelDecl(), and getTypeDeclType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), emitCmdValueForGetterSetterBody(), getObjCSelRedefinitionType(), and isObjCSelType().
QualType ASTContext::getObjCSuperType | ( | ) | const |
Returns the C struct type for objc_super.
Definition at line 7495 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), buildImplicitRecord(), getTagDeclType(), getTranslationUnitDecl(), and clang::QualType::isNull().
QualType ASTContext::getObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl, |
ArrayRef< ObjCProtocolDecl * > | protocols | ||
) | const |
Definition at line 5523 of file ASTContext.cpp.
References Allocate(), applyObjCProtocolQualifiers(), getCanonicalType(), ID, and clang::ObjCTypeParamType::Profile().
Referenced by adjustObjCTypeParamBoundType(), applyObjCProtocolQualifiers(), and clang::ObjCTypeParamDecl::Create().
CharUnits ASTContext::getOffsetOfBaseWithVBPtr | ( | const CXXRecordDecl * | RD | ) | const |
Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero.
This is usually OK because the first slot in the vbtable points backwards to the top of the MDC. However, the MDC might be reusing a vbptr from an nv-base. In this case, the first slot in the vbtable points to the start of the nv-base which introduced the vbptr and not the MDC. Modify the NonVirtualBaseAdjustment to account for this.
Definition at line 2551 of file ASTContext.cpp.
References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), Offset, and clang::CharUnits::Zero().
Get address space for OpenCL type.
Definition at line 7628 of file ASTContext.cpp.
References getOpenCLTypeKind(), and clang::T.
Referenced by clang::CodeGen::CGOpenCLRuntime::getPointerType().
OpenCLTypeKind ASTContext::getOpenCLTypeKind | ( | const Type * | T | ) | const |
Map an AST Type to an OpenCLTypeKind enum value.
Definition at line 7586 of file ASTContext.cpp.
References clang::OCLTK_ClkEvent, clang::OCLTK_Default, clang::OCLTK_Event, clang::OCLTK_Pipe, clang::OCLTK_Queue, clang::OCLTK_ReserveID, clang::OCLTK_Sampler, and clang::T.
Referenced by getOpenCLTypeAddrSpace().
Get default simd alignment of the specified complete type in bits.
Definition at line 2421 of file ASTContext.cpp.
References clang::TargetOptions::FeatureMap, getTargetInfo(), and clang::TargetInfo::getTargetOpts().
Referenced by emitAlignedClause().
TemplateName ASTContext::getOverloadedTemplateName | ( | UnresolvedSetIterator | Begin, |
UnresolvedSetIterator | End | ||
) | const |
Retrieve the template name that corresponds to a non-empty lookup.
Definition at line 9296 of file ASTContext.cpp.
References Allocate(), Begin, End, and clang::NamedDecl::getUnderlyingDecl().
Referenced by clang::ASTImporter::Import().
void ASTContext::getOverriddenMethods | ( | const NamedDecl * | Method, |
SmallVectorImpl< const NamedDecl * > & | Overridden | ||
) | const |
Return C++ or ObjC overridden methods for the given Method
.
An ObjC method is considered to override any method in the class's base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.
Definition at line 1574 of file ASTContext.cpp.
References overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
QualType ASTContext::getPackExpansionType | ( | QualType | Pattern, |
std::optional< unsigned > | NumExpansions, | ||
bool | ExpectPackInType = true |
||
) |
Form a pack expansion type with the given pattern.
NumExpansions | The number of expansions for the pack, if known. |
ExpectPackInType | If false , we should not expect Pattern to contain an unexpanded pack. This only makes sense if the pack expansion is used in a context where the arity is inferred from elsewhere, such as if the pattern contains a placeholder type or if this is the canonical type of another pack expansion type. |
Definition at line 5298 of file ASTContext.cpp.
References clang::Type::containsUnexpandedParameterPack(), getCanonicalType(), ID, clang::QualType::isCanonical(), clang::PackExpansionType::Profile(), and clang::T.
Referenced by clang::Sema::CheckPackExpansion(), getCommonNonSugarTypeNode(), getInjectedTemplateArg(), and clang::TreeTransform< Derived >::TransformExceptionSpec().
QualType ASTContext::getPackIndexingType | ( | QualType | Pattern, |
Expr * | IndexExpr, | ||
bool | FullySubstituted = false , |
||
ArrayRef< QualType > | Expansions = {} , |
||
int | Index = -1 |
||
) | const |
Definition at line 5791 of file ASTContext.cpp.
unsigned ASTContext::getParameterIndex | ( | const ParmVarDecl * | D | ) | const |
Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield.
Definition at line 12389 of file ASTContext.cpp.
ParentMapContext & ASTContext::getParentMapContext | ( | ) |
Returns the dynamic AST node parent map context.
Definition at line 851 of file ASTContext.cpp.
Referenced by getParents(), and setTraversalScope().
|
inline |
Definition at line 136 of file ParentMapContext.h.
References getParentMapContext(), clang::ParentMapContext::getParents(), and Node.
|
inline |
Forwards to get node parents from the ParentMapContext.
New callers should use ParentMapContext::getParents() directly.
Definition at line 131 of file ParentMapContext.h.
References getParentMapContext(), clang::ParentMapContext::getParents(), and Node.
Referenced by clang::installapi::InstallAPIVisitor::VisitFunctionDecl().
Definition at line 5127 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::QualType::isCanonical(), clang::ParenType::Profile(), and clang::T.
Referenced by clang::Sema::BuildParenType(), and getFunctionTypeWithExceptionSpec().
|
inline |
Return a type with the given __ptrauth qualifier.
Definition at line 2216 of file ASTContext.h.
References clang::QualType::getPointerAuth(), getQualifiedType(), and clang::Qualifiers::setPointerAuth().
QualType ASTContext::getPointerDiffType | ( | ) | const |
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
getPointerDiffType - Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
Pointer - pointer requires this (C99 6.5.6p9).
Definition at line 6072 of file ASTContext.cpp.
References clang::Default.
Referenced by clang::ento::RangedConstraintManager::assumeSym(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CodeGenFunction::EmitIvarOffsetAsPointerDiff(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::ento::SMTConv::getBinExpr(), getItaniumDynamicCastFn(), getPreferredTypeAlign(), clang::Sema::Initialize(), and performTypeAdjustment().
|
inline |
Definition at line 1361 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), getPointerType(), and clang::T.
Return the uniqued reference to the type for a pointer to the specified type.
getPointerType - Return the uniqued reference to the type for a pointer to the specified type.
Definition at line 3322 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::PointerType::Profile(), and clang::T.
Referenced by adjustCVQualifiersForCXXThisWithinLambda(), clang::Sema::BuildPointerType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::Sema::CheckConversionDeclarator(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::Sema::ConstantFoldAttrArgs(), clang::SYCLUniqueStableIdExpr::Create(), clang::SYCLUniqueStableNameExpr::Create(), clang::SYCLUniqueStableNameExpr::CreateEmpty(), clang::SYCLUniqueStableIdExpr::CreateEmpty(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), emitDeclTargetVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaInAllocaCallOpBody(), clang::CodeGen::CodeGenFunction::EmitLambdaStaticInvokeBody(), clang::CodeGen::CodeGenFunction::EmitOMPUseDeviceAddrClause(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::Sema::EvaluateStaticAssertMessageAsString(), clang::Sema::FindCompositePointerType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCommonNonSugarTypeNode(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), clang::TypeName::getFullyQualifiedType(), clang::ento::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionCodeRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), getPointerType(), getVariableArrayDecayedType(), InitBuiltinTypes(), clang::ento::SValBuilder::makeNullWithType(), mergeTypes(), clang::Sema::PerformImplicitConversion(), recordFixedType(), removePtrSizeAddrSpace(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), clang::ento::ExprEngine::VisitCast(), and clang::ento::ExprEngine::VisitDeclStmt().
StringLiteral * ASTContext::getPredefinedStringLiteralFromCache | ( | StringRef | Key | ) | const |
Return a string representing the human readable name for the specified function declaration or file name.
Used by SourceLocExpr and PredefinedExpr to cache evaluated results.
Definition at line 12411 of file ASTContext.cpp.
References CharTy, clang::StringLiteral::Create(), getStringLiteralArrayType(), and clang::Ordinary.
getPreferredTypeAlign - Return the "preferred" alignment of the specified type for the current target in bits.
This can be different than the ABI alignment in cases where it is beneficial for performance or backwards compatibility preserving to overalign a data type. (Note: despite the name, the preferred alignment is ABI-impacting, and not an optimization.)
Definition at line 2470 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignRequirement, clang::Type::getAs(), getASTRecordLayout(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), getPreferredTypeAlign(), getTypeInfo(), getTypeSize(), clang::TypeInfo::isAlignRequired(), clang::Decl::isInvalidDecl(), clang::Type::isMemberPointerType(), clang::Type::isSpecificBuiltinType(), max(), clang::RequiredByTypedef, clang::T, and toBits().
Return the "preferred" alignment of the specified type T
for the current target, in bits.
This can be different than the ABI alignment in cases where it is beneficial for performance or backwards compatibility preserving to overalign a data type. (Note: despite the name, the preferred alignment is ABI-impacting, and not an optimization.)
Definition at line 2446 of file ASTContext.h.
References clang::T.
Referenced by AlignOfType(), getAlignOfGlobalVar(), getDeclAlign(), getPreferredTypeAlign(), getPreferredTypeAlignInChars(), and getTypeAlignIfKnown().
Return the PreferredAlignment of a (complete) type T
, in characters.
Definition at line 2414 of file ASTContext.h.
References getPreferredTypeAlign(), clang::T, and toCharUnitsFromBits().
Definition at line 1038 of file ASTContext.h.
Referenced by clang::getPrimaryMergedDecl().
|
inline |
Definition at line 700 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::addRecordTypeName(), annotateConsumedSummaryMismatch(), clang::ExtractAPIAction::CreateASTConsumer(), clang::WrappingExtractAPIAction::CreateASTConsumer(), clang::ento::CallEvent::dump(), clang::Decl::dump(), clang::DeclContext::dumpDeclContext(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::GetFullTypeName(), clang::interp::Record::getName(), print(), clang::PrettyDeclStackTraceEntry::print(), clang::ento::Environment::printJson(), printObjectsUnderConstructionJson(), clang::APValue::printPretty(), rewriteToNSMacroDecl(), clang::TextNodeDumper::VisitUnresolvedUsingTypenameDecl(), clang::TextNodeDumper::VisitUnresolvedUsingValueDecl(), and clang::TextNodeDumper::VisitUsingDecl().
QualType ASTContext::getProcessIDType | ( | ) | const |
Return the unique type for "pid_t" defined in <sys/types.h>.
We need this to compute the correct type for vfork().
Definition at line 6085 of file ASTContext.cpp.
|
inline |
Definition at line 794 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::isFunctionBlockedByProfileList().
Return the type that PromotableType
will promote to: C99 6.3.1.1p2, assuming that PromotableType
is a promotable integer type.
getPromotedIntegerType - Returns the type that Promotable will promote to: C99 6.3.1.1p2, assuming that Promotable is a promotable integer type.
Definition at line 7284 of file ASTContext.cpp.
References clang::Type::getAs(), getIntWidth(), getTypeSize(), IntTy, clang::QualType::isNull(), isPromotableIntegerType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), LongLongTy, LongTy, UnsignedIntTy, UnsignedLongLongTy, and UnsignedLongTy.
Referenced by clang::ento::SMTConv::doIntTypeConversion().
TemplateName ASTContext::getQualifiedTemplateName | ( | NestedNameSpecifier * | NNS, |
bool | TemplateKeyword, | ||
TemplateName | Template | ||
) | const |
Retrieve the template name that represents a qualified template name such as std::vector
.
Definition at line 9327 of file ASTContext.cpp.
References ID, and clang::QualifiedTemplateName::Profile().
Referenced by clang::TypeName::getFullyQualifiedTemplateName(), clang::ASTImporter::Import(), and clang::TreeTransform< Derived >::RebuildTemplateName().
|
inline |
Return a type with additional qualifiers.
Definition at line 2185 of file ASTContext.h.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasNonFastQualifiers(), and clang::T.
|
inline |
Return a type with additional qualifiers.
Definition at line 2176 of file ASTContext.h.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasNonFastQualifiers(), clang::QualifierCollector::strip(), and clang::T.
|
inline |
Un-split a SplitQualType.
Definition at line 2171 of file ASTContext.h.
References clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by BuildImplicitBaseInitializer(), clang::Sema::BuildQualifiedType(), clang::Sema::BuiltinChangeCVRQualifiers(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::BuiltinDecay(), clang::Sema::BuiltinRemoveReference(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getCommonSugaredType(), getCommonSugarTypeNode(), getConstantArrayType(), getCVRQualifiedType(), getDependentSizedArrayType(), clang::TypeName::getFullyQualifiedType(), getIncompleteArrayType(), getLifetimeQualifiedType(), getNonMemoryType(), getPointerAuthType(), getUnconstrainedType(), getUnqualifiedObjCPointerType(), getVariableArrayDecayedType(), getVariableArrayType(), clang::ASTImporter::Import(), InitBuiltinTypes(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), and withoutUnaligned().
|
inline |
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.
Definition at line 1854 of file ASTContext.h.
References getTypedefType().
const RawComment * ASTContext::getRawCommentForAnyRedecl | ( | const Decl * | D, |
const Decl ** | OriginalDecl = nullptr |
||
) | const |
Return the documentation comment attached to a given declaration.
Returns nullptr if no comment is attached.
OriginalDecl | if not nullptr, is set to declaration AST node that had the comment, if the comment we found comes from a redeclaration. |
Definition at line 402 of file ASTContext.cpp.
References adjustDeclToTemplate(), cacheRawCommentForDecl(), CommentlessRedeclChains, DeclRawComments, clang::Decl::getCanonicalDecl(), getRawCommentForDeclNoCache(), RedeclChainComments, and clang::Decl::redecls().
Referenced by getCommentForDecl(), clang::getCompletionComment(), clang::getParameterComment(), and clang::getPatternCompletionComment().
RawComment * ASTContext::getRawCommentForDeclNoCache | ( | const Decl * | D | ) | const |
Return the documentation comment attached to a given declaration, without looking into cache.
Definition at line 293 of file ASTContext.cpp.
References Comments, CommentsLoaded, clang::RawCommentList::empty(), clang::File, clang::RawCommentList::getCommentsInFile(), getDeclLocsForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), and clang::ExternalASTSource::ReadComments().
Referenced by clang::extractapi::ExtractAPIVisitor< Derived >::fetchRawCommentForDecl(), getLocalCommentForDeclUncached(), and getRawCommentForAnyRedecl().
RawComment * ASTContext::getRawCommentForDeclNoCacheImpl | ( | const Decl * | D, |
const SourceLocation | RepresentativeLocForDecl, | ||
const std::map< unsigned, RawComment * > & | CommentsInFile | ||
) | const |
CommentsInFile
for doc comment for D
.RepresentativeLocForDecl
is used as a location for searching doc comments. CommentsInFile
is a mapping offset -> comment of files in the same file where RepresentativeLocForDecl
is.
Definition at line 215 of file ASTContext.cpp.
References clang::LangOptions::CommentOpts, Comments, clang::SourceManager::getBufferData(), clang::RawCommentList::getCommentBeginLine(), clang::RawCommentList::getCommentEndOffset(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getLineNumber(), clang::RawComment::isDocumentation(), clang::SourceLocation::isFileID(), clang::SourceLocation::isInvalid(), clang::RawComment::isTrailingComment(), clang::CommentOptions::ParseAllComments, and Text.
Referenced by attachCommentsToJustParsedDecls(), and getRawCommentForDeclNoCache().
Return a read_only pipe type for the specified type.
Definition at line 4623 of file ASTContext.cpp.
References clang::T.
Referenced by clang::Sema::BuildReadPipeType(), and getCommonNonSugarTypeNode().
QualType ASTContext::getRealTypeForBitwidth | ( | unsigned | DestWidth, |
FloatModeKind | ExplicitType | ||
) | const |
getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.
Returns empty type if there is no appropriate target types.
Definition at line 12265 of file ASTContext.cpp.
References clang::Double, DoubleTy, clang::Float, clang::Float128, Float128Ty, FloatTy, clang::TargetInfo::getRealTypeByWidth(), getTargetInfo(), clang::Half, HalfTy, clang::Ibm128, Ibm128Ty, clang::LongDouble, LongDoubleTy, and clang::NoFloat.
QualType ASTContext::getRecordType | ( | const RecordDecl * | Decl | ) | const |
Definition at line 4787 of file ASTContext.cpp.
References clang::Decl::getPreviousDecl().
Referenced by clang::ODRHash::AddStructuralValue(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckOperatorDeleteDeclaration(), clang::CodeGen::CGDebugInfo::completeClass(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), clang::interp::InterpFrame::describe(), clang::Sema::DiagnoseNontrivial(), clang::CodeGen::CodeGenFunction::EmitLambdaInAllocaCallOpBody(), clang::CodeGen::CodeGenFunction::EmitLambdaStaticInvokeBody(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::ento::CXXInstanceCall::getInitialStackFrameContents(), getLValueType(), hasCopyOrMoveCtorParam(), clang::ASTNodeImporter::ImportAPValue(), clang::Sema::LookupInSuper(), recordFixedType(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), clang::Sema::SpecialMemberIsTrivial(), and clang::interp::Pointer::toRValue().
getReferenceQualifiedType - Given an expr, will return the type for that expression, as in [dcl.type.simple]p4 but without taking id-expressions and class member access into account.
Definition at line 5737 of file ASTContext.cpp.
References getLValueReferenceType(), getRValueReferenceType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::T, clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.
Referenced by clang::ObjCMessageExpr::getCallReturnType(), clang::Sema::getDecltypeForExpr(), and clang::ento::CallEvent::getResultType().
Return the uniqued reference to the type for a restrict
qualified type.
The resulting type has a union of the qualifiers from T
and restrict
.
Definition at line 1293 of file ASTContext.h.
References clang::Qualifiers::Restrict, and clang::T.
Return the uniqued reference to the type for an rvalue reference to the specified type.
getRValueReferenceType - Return the uniqued reference to the type for an rvalue reference to the specified type.
Definition at line 3518 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), ID, clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::ReferenceType::Profile(), and clang::T.
Referenced by alignReferenceTypes(), clang::Sema::BuildReferenceType(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), getAutoRRefDeductType(), getCommonNonSugarTypeNode(), clang::TypeName::getFullyQualifiedType(), getReferenceQualifiedType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), and clang::Sema::SpecialMemberIsTrivial().
QualType ASTContext::getScalableVectorType | ( | QualType | EltTy, |
unsigned | NumElts, | ||
unsigned | NumFields = 1 |
||
) | const |
Return the unique reference to a scalable vector type of the specified element type and scalable number of elements.
getScalableVectorType - Return the unique reference to a scalable vector type of the specified element type and size.
For RISC-V, number of fields is also provided when it fetching for tuple type.
EltTy
must be a built-in type.VectorType must be a built-in type.
Definition at line 4058 of file ASTContext.cpp.
References getTypeSize().
Referenced by clang::Sema::CheckSizelessVectorConditionalTypes().
size_t ASTContext::getSideTableAllocatedMemory | ( | ) | const |
Return the total memory used for various side tables.
Definition at line 12233 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1995 of file ASTContext.h.
References getTypeDeclType().
Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and function types and removing top-level cv-qualifiers.
Definition at line 7031 of file ASTContext.cpp.
References getAdjustedParameterType(), getVariableArrayDecayedType(), and clang::T.
CanQualType ASTContext::getSignedSizeType | ( | ) | const |
Return the unique signed counterpart of the integer type corresponding to size_t.
Definition at line 6034 of file ASTContext.cpp.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getSignedWCharType | ( | ) | const |
Return the type of "signed wchar_t".
getSignedWCharType - Return the type of "signed wchar_t".
Used when in C++, as a GCC extension.
Definition at line 6050 of file ASTContext.cpp.
References WCharTy.
Referenced by getCorrespondingSignedType().
CanQualType ASTContext::getSizeType | ( | ) | const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
getSizeType - Return the unique type for "size_t" (C99 7.17), the result of the sizeof operator (C99 6.5.3.4p4).
The sizeof operator requires this (C99 6.5.3.4p4).
The value is target dependent and needs to agree with the definition in <stddef.h>.
Definition at line 6028 of file ASTContext.cpp.
Referenced by clang::Sema::ActOnCXXNew(), appendParameterTypes(), clang::Sema::BuildArrayType(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::CheckLiteralOperatorDeclaration(), CheckOperatorNewDeclaration(), clang::Sema::DeclareGlobalNewDelete(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFixups(), clang::Sema::EvaluateStaticAssertMessageAsString(), clang::Sema::FindAllocationFunctions(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBytesReturnedByAllocSizeCall(), getPointerAndSize(), clang::Sema::Initialize(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), and matchesStlAllocatorFn().
|
inline |
Definition at line 708 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::arcmt::MigrationProcess::applyTransform(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::arcmt::checkForManualIssues(), clang::StmtSequence::contains(), createDataFixit(), clang::CodeGen::CGOpenMPRuntime::createOffloadEntriesAndInfoMetadata(), createSpanTypeForVarDecl(), disambiguateSpellingInScope(), clang::Decl::dump(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), clang::LocationContext::dumpStack(), clang::SYCLIntegrationHeader::emit(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), emitMappingInformation(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::arcmt::trans::findSemiAfterLocation(), fixLocalVarDeclWithSpan(), fixParamWithSpan(), fixUPCAddressofArraySubscriptWithSpan(), fixVarDeclWithArray(), FixVarInitializerWithSpan(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getAsmSrcLocInfo(), clang::BackendConsumer::getBestLocationFromDebugLoc(), getEntryInfoFromPresumedLoc(), DerefSimplePtrArithFixableGadget::getFixits(), clang::AnalysisDeclContext::getFunctionName(), getIdentStringFromSourceLocation(), getLiteralInfo(), clang::ASTWriter::getRawSourceLocationEncoding(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ento::AnalysisManager::getSourceManager(), clang::BackendConsumer::HandleInlineFunctionDefinition(), clang::BackendConsumer::HandleTagDeclDefinition(), clang::BackendConsumer::HandleTopLevelDecl(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), clang::CodeGen::CodeGenModule::isFunctionBlockedByProfileList(), clang::ento::AnalysisManager::isInCodeFile(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::isInSystemHeader(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), isStandardNewDelete(), clang::Sema::makeUnavailableInSystemHeader(), clang::CodeGen::noSystemDebugInfo(), clang::PrettyDeclStackTraceEntry::print(), clang::LocationContext::printJson(), clang::CodeGen::CodeGenModule::printPostfixForExternalizedDecl(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::CodeGen::CGDebugInfo::setLocation(), clang::BackendConsumer::SrcMgrDiagHandler(), and clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody().
|
inline |
Definition at line 709 of file ASTContext.h.
Definition at line 12324 of file ASTContext.cpp.
Referenced by clang::Sema::BuildVariableInstantiation().
Return a type for a constant array for a string literal of the specified element type and length.
Definition at line 12396 of file ASTContext.cpp.
References adjustStringLiteralBaseType(), clang::CPlusPlus, getConstantArrayType(), getLangOpts(), clang::Normal, and clang::QualType::withConst().
Referenced by getPredefinedStringLiteralFromCache().
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateName | replacement, |
Decl * | AssociatedDecl, | ||
unsigned | Index, | ||
std::optional< unsigned > | PackIndex | ||
) | const |
Definition at line 9421 of file ASTContext.cpp.
Referenced by clang::ASTImporter::Import().
TemplateName ASTContext::getSubstTemplateTemplateParmPack | ( | const TemplateArgument & | ArgPack, |
Decl * | AssociatedDecl, | ||
unsigned | Index, | ||
bool | Final | ||
) | const |
Definition at line 9442 of file ASTContext.cpp.
Referenced by clang::ASTImporter::Import().
QualType ASTContext::getSubstTemplateTypeParmPackType | ( | Decl * | AssociatedDecl, |
unsigned | Index, | ||
bool | Final, | ||
const TemplateArgument & | ArgPack | ||
) |
Retrieve a.
Definition at line 4897 of file ASTContext.cpp.
QualType ASTContext::getSubstTemplateTypeParmType | ( | QualType | Replacement, |
Decl * | AssociatedDecl, | ||
unsigned | Index, | ||
std::optional< unsigned > | PackIndex | ||
) | const |
Retrieve a substitution-result type.
Definition at line 4872 of file ASTContext.cpp.
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
getTagDeclType - Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
Definition at line 6018 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by BuildImplicitMemberInitializer(), clang::Sema::CheckConstructor(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), getMSGuidType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), clang::Sema::LookupSpecialMember(), clang::Sema::PerformImplicitConversion(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
Definition at line 12535 of file ASTContext.cpp.
References clang::TargetInfo::getTargetAddressSpace(), and getTargetInfo().
Referenced by buildGlobalBlock(), castStringLiteralToDefaultAddressSpace(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenModule::createUnnamedGlobalFrom(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenModule::EmitOMPAllocateDecl(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), GenerateStringLiteral(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CodeGenModule::getBlockDescriptorType(), clang::CodeGen::ConstantEmitter::getCurrentAddrPrivate(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), clang::CodeGen::CGOpenCLRuntime::getPointerType(), and clang::CodeGen::CodeGenTypes::getTargetAddressSpace().
unsigned ASTContext::getTargetDefaultAlignForAttributeAligned | ( | ) | const |
Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.
getTargetDefaultAlignForAttributeAligned - Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.
Definition at line 2524 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 760 of file ASTContext.h.
Referenced by clang::Sema::ActOnPragmaOptionsAlign(), clang::SemaHLSL::ActOnTopLevelFunction(), clang::Sema::AddImplicitlyDeclaredMembersToClass(), clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), clang::Sema::BuildArrayType(), clang::Sema::BuildFunctionType(), clang::arcmt::trans::canApplyWeak(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CheckBaseSpecifier(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCompleteDestructorVariant(), clang::Sema::CheckFunctionReturnType(), checkObjCMethodX86VectorTypes(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), clang::analyze_os_log::computeOSLogBufferLayout(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::Sema::diagnoseUnavailableAlignedAllocation(), clang::SYCLIntegrationHeader::emit(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CodeGen::CodeGenModule::EmitMainVoidAlias(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::Sema::FixOverloadedFunctionReference(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::ASTNameGenerator::Implementation::getAllManglings(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::interp::Context::getCharBit(), getCurrentKeyFunction(), getCXXABIKind(), getDeclAlign(), getDefaultCallingConvention(), getFixedPointIBits(), getFixedPointScale(), getFixedPointSemantics(), getInstrProfSection(), getIntTypeForBitwidth(), getLangASForBuiltinAddressSpace(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMinGlobalAlignOfVar(), getOpenMPDefaultSimdAlign(), clang::CodeGen::CGOpenMPRuntime::getOrCreateThreadPrivateCache(), getRealTypeForBitwidth(), getTargetAddressSpace(), getTargetDefaultAlignForAttributeAligned(), getTargetNullPointerValue(), getTypeInfoLinkage(), InitDeviceMC(), clang::CodeGen::initializationPatternFor(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), clang::Sema::InstantiateDefaultCtorDefaultArgs(), isArc4RandomAvailable(), clang::installapi::isInlined(), clang::CodeGen::swiftcall::isLegalIntegerType(), isMSStaticDataMemberInlineDefinition(), clang::FunctionDecl::isMSVCRTEntryPoint(), isNonViableMultiVersionOverload(), isStdBuiltin(), clang::FieldDecl::isZeroSize(), clang::MangleContext::mangleName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkVTableUsed(), MultiVersionTypesCompatible(), needsConversionOfHalfVec(), patchDefaultTargetVersion(), clang::Sema::PerformImplicitConversion(), clang::CodeGen::CodeGenModule::Release(), clang::TargetOMPContext::TargetOMPContext(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and clang::QualType::UseExcessPrecision().
uint64_t ASTContext::getTargetNullPointerValue | ( | QualType | QT | ) | const |
Get target-dependent integer value for null pointer which is used for constant folding.
Definition at line 12525 of file ASTContext.cpp.
References clang::Default, clang::QualType::getAddressSpace(), clang::TargetInfo::getNullPointerValue(), clang::Type::getPointeeType(), getTargetInfo(), clang::Type::getUnqualifiedDesugaredType(), and clang::Type::isNullPtrType().
Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable(), and clang::APValue::toIntegralConstant().
ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo | ( | const VarDecl * | Var | ) |
Definition at line 1460 of file ASTContext.cpp.
Referenced by clang::VarDecl::getDescribedVarTemplate(), getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::installapi::InstallAPIVisitor::VisitVarDecl(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl().
TemplateParamObjectDecl * ASTContext::getTemplateParamObjectDecl | ( | QualType | T, |
const APValue & | V | ||
) | const |
Return the template parameter object of the given type with the given value.
Definition at line 12456 of file ASTContext.cpp.
References ID, clang::Type::isRecordType(), clang::TemplateParamObjectDecl::Profile(), clang::T, and V.
Referenced by getAsSimpleValueDeclRef().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 5016 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateName::getAsTemplateDecl(), getCanonicalTemplateSpecializationType(), getCanonicalType(), hasAnyPackExpansions(), clang::QualType::isNull(), and clang::TemplateDecl::isTypeAlias().
Referenced by getCommonNonSugarTypeNode(), clang::TypeName::getFullyQualifiedTemplateType(), getTemplateSpecializationType(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::Sema::isMoreSpecializedThanPrimary().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgumentLoc > | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 4991 of file ASTContext.cpp.
References clang::TemplateName::getAsDependentTemplateName(), and getTemplateSpecializationType().
TypeSourceInfo * ASTContext::getTemplateSpecializationTypeInfo | ( | TemplateName | T, |
SourceLocation | TLoc, | ||
const TemplateArgumentListInfo & | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 4969 of file ASTContext.cpp.
QualType ASTContext::getTemplateTypeParmType | ( | unsigned | Depth, |
unsigned | Index, | ||
bool | ParameterPack, | ||
TemplateTypeParmDecl * | ParmDecl = nullptr |
||
) | const |
Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name.
Definition at line 4937 of file ASTContext.cpp.
Referenced by getCommonNonSugarTypeNode().
|
inline |
Definition at line 1076 of file ASTContext.h.
References clang::Decl::getMostRecentDecl().
Referenced by clang::Sema::ActOnPragmaMSComment(), clang::ASTImporter::ASTImporter(), buildBuiltinTemplateDecl(), clang::arcmt::trans::checkAPIUses(), cleanupDeallocOrFinalize(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), emitOutlinedFunctionPrologue(), clang::ASTMergeAction::ExecuteAction(), clang::IncrementalSyntaxOnlyAction::ExecuteAction(), clang::Sema::FindAllocationFunctions(), GCRewriteFinalize(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getExternCContextDecl(), getObjCProtocolDecl(), getObjCSuperType(), clang::Sema::getOrCreateStdNamespace(), clang::installapi::InstallAPIVisitor::HandleTranslationUnit(), InitBuiltinTypes(), clang::ento::BugSuppression::isSuppressed(), lookupStdNamespace(), clang::arcmt::trans::makeAssignARCSafe(), clang::ExternalASTMerger::MaybeRecordOrigin(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), clang::arcmt::trans::rewriteAutoreleasePool(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), clang::RecursiveASTVisitor< Derived >::TraverseAST(), traverseAST(), clang::arcmt::trans::GCAttrsTraverser::traverseTU(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), and clang::ASTNodeImporter::VisitTranslationUnitDecl().
|
inline |
Definition at line 693 of file ASTContext.h.
TypeSourceInfo * ASTContext::getTrivialTypeSourceInfo | ( | QualType | T, |
SourceLocation | Loc = SourceLocation() |
||
) | const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.
Definition at line 2979 of file ASTContext.cpp.
References CreateTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLoc::initialize(), and clang::T.
Referenced by clang::Sema::ActOnArrayTypeTrait(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnTypeTrait(), clang::SemaSYCL::ActOnUniqueStableNameExpr(), clang::TemplateDeclInstantiator::adjustForRewrite(), adjustObjCTypeParamBoundType(), buildDistanceFunc(), clang::Sema::BuildEmptyCXXFoldExpr(), BuildImplicitBaseInitializer(), clang::Sema::BuildPseudoDestructorExpr(), CastForMoving(), clang::Sema::DefineInheritingConstructor(), emitOutlinedFunctionPrologue(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::ASTImporter::Import(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), translateTemplateArgument(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
Definition at line 2387 of file ASTContext.h.
References clang::TypeInfo::Align, getTypeInfo(), and clang::T.
Return the ABI-specified alignment of a (complete) type T
, in bits.
Definition at line 2386 of file ASTContext.h.
References clang::TypeInfo::Align, getTypeInfo(), and clang::T.
Referenced by getTypeAlignIfKnown(), getTypeAlignInChars(), and getTypeUnadjustedAlign().
Return the alignment of a type, in bits, or 0 if the type is incomplete and we cannot determine the alignment (for example, from alignment attributes).
The returned alignment is the Preferred alignment if NeedsPreferredAlignment is true, otherwise is the ABI alignment.
Definition at line 1841 of file ASTContext.cpp.
References clang::Type::getAs(), getBaseElementType(), getPreferredTypeAlign(), getTypeAlign(), clang::Type::isIncompleteType(), and clang::T.
Definition at line 2451 of file ASTContext.cpp.
References getTypeAlign(), clang::T, and toCharUnitsFromBits().
Return the ABI-specified alignment of a (complete) type T
, in characters.
getTypeAlignInChars - Return the ABI-specified alignment of a type, in characters.
This method does not work on incomplete types.
Definition at line 2448 of file ASTContext.cpp.
References getTypeAlign(), clang::T, and toCharUnitsFromBits().
Referenced by AlignOfType(), AtomicUsesUnsupportedLibcall(), clang::Sema::checkArrayElementAlignment(), classifyType(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::CodeGen::CodeGenModule::GetAddrOfUnnamedGlobalConstantDecl(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), and clang::SemaOpenMP::isOpenMPCapturedByRef().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1605 of file ASTContext.h.
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::BuildBaseInitializer(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FixOverloadedFunctionReference(), getBOOLType(), getBuiltinMSVaListType(), getBuiltinVaListType(), GetDeclSpecTypeForDeclarator(), clang::Expr::getEnumCoercedType(), getFILEType(), getInjectedTemplateArg(), getjmp_bufType(), getObjCClassType(), getObjCIdType(), getObjCInstanceType(), getObjCSelType(), getsigjmp_bufType(), getTagDeclType(), getucontext_tType(), clang::ASTNodeImporter::ImportDefinition(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), IsOverloadOrOverrideImpl(), clang::Sema::LookupConstructors(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildEnumType(), clang::TreeTransform< Derived >::RebuildRecordType(), clang::TreeTransform< Derived >::RebuildTypedefType(), clang::Sema::RequireCompleteDeclContext(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 12372 of file ASTContext.cpp.
QualType ASTContext::getTypedefType | ( | const TypedefNameDecl * | Decl, |
QualType | Underlying = QualType() |
||
) | const |
Return the unique reference to the type for the specified typedef-name decl.
getTypedefType - Return the unique reference to the type for the specified typedef name decl.
Definition at line 4726 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), hasSameType(), ID, clang::QualType::isNull(), clang::TypedefType::Profile(), and clang::T.
Referenced by getCFConstantStringType(), and getRawCFConstantStringType().
Get the size and alignment of the specified complete type in bits.
Definition at line 1866 of file ASTContext.cpp.
References clang::T.
Referenced by EncompassingIntegerType(), getPreferredTypeAlign(), getTypeAlign(), getTypeAlignIfRequired(), getTypeInfoInChars(), getTypeSize(), and isAlignmentRequired().
Definition at line 2349 of file ASTContext.h.
References getTypeInfo(), and clang::T.
Referenced by getTypeInfo().
TypeInfoChars ASTContext::getTypeInfoDataSizeInChars | ( | QualType | T | ) | const |
Definition at line 1746 of file ASTContext.cpp.
References clang::CPlusPlus, clang::Type::getAs(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), clang::RecordType::getDecl(), getLangOpts(), getTypeInfoInChars(), clang::Decl::isInvalidDecl(), clang::T, and clang::TypeInfoChars::Width.
Referenced by clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::AggValueSlot::getPreferredSize(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
TypeInfoChars ASTContext::getTypeInfoInChars | ( | const Type * | T | ) | const |
Definition at line 1783 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignRequirement, getConstantArrayInfoInChars(), getTypeInfo(), clang::T, toCharUnitsFromBits(), and clang::TypeInfo::Width.
Referenced by computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::EmitVAArgInstr(), getTypeInfoDataSizeInChars(), getTypeInfoInChars(), and getTypeSizeInChars().
TypeInfoChars ASTContext::getTypeInfoInChars | ( | QualType | T | ) | const |
Definition at line 1791 of file ASTContext.cpp.
References getTypeInfoInChars(), and clang::T.
QualType ASTContext::getTypeOfExprType | ( | Expr * | tofExpr, |
TypeOfKind | Kind | ||
) | const |
C23 feature and GCC extension.
getTypeOfExprType - Unlike many "get<Type>" functions, we can't unique TypeOfExprType AST's (since expression's are never shared).
For example, multiple declarations that refer to "typeof(x)" all contain different DeclRefExpr's. This doesn't effect the type checker, since it operates on canonical type's (which are always unique).
Definition at line 5690 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::getType(), ID, clang::Expr::isTypeDependent(), clang::DependentTypeOfExprType::Profile(), and clang::Unqualified.
Referenced by clang::Sema::BuildTypeofExprType().
QualType ASTContext::getTypeOfType | ( | QualType | tofType, |
TypeOfKind | Kind | ||
) | const |
getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes.
The only motivation to unique these nodes would be memory savings. Since typeof(t) is fairly uncommon, space shouldn't be an issue. This doesn't affect the type checker, since it operates on canonical types (which are always unique).
Definition at line 5726 of file ASTContext.cpp.
References getCanonicalType().
Referenced by clang::TreeTransform< Derived >::RebuildTypeOfType().
BuiltinTemplateDecl * ASTContext::getTypePackElementDecl | ( | ) | const |
Definition at line 1139 of file ASTContext.cpp.
References clang::BTK__type_pack_element, buildBuiltinTemplateDecl(), and getTypePackElementName().
Referenced by clang::ASTNodeImporter::VisitBuiltinTemplateDecl().
|
inline |
Definition at line 1951 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by getTypePackElementDecl().
|
inline |
Definition at line 1221 of file ASTContext.h.
|
inline |
Definition at line 2356 of file ASTContext.h.
References getTypeInfo(), clang::T, and clang::TypeInfo::Width.
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 2355 of file ASTContext.h.
References getTypeInfo(), clang::T, and clang::TypeInfo::Width.
Referenced by areCompatibleRVVTypes(), areCompatibleSveTypes(), areLaxCompatibleRVVTypes(), areLaxCompatibleSveTypes(), assertEqualBitWidths(), clang::Sema::BuildArrayType(), clang::Sema::BuildVectorType(), checkAVXParam(), CheckC23ConstexprInitStringLiteral(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckVectorConditionalTypes(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), DiagnoseForRangeConstVariableCopies(), clang::ento::SMTConv::doFloatTypeConversion(), clang::ento::SMTConv::doIntTypeConversion(), clang::ento::SMTConv::doTypeConversion(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), clang::Sema::FindAllocationFunctions(), clang::ento::SMTConv::fixAPSInt(), clang::ento::SMTConv::fromData(), getAlignOfGlobalVar(), getBytesReturnedByAllocSizeCall(), clang::ento::SMTConv::getCastExpr(), GetCFNumberSize(), getCharWidth(), getDeclAlign(), getFieldSize(), getFixedPointSemantics(), getIntWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), getScalableVectorType(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), hasUniqueObjectRepresentations(), clang::Expr::IgnoreParenNoopCasts(), clang::Sema::Initialize(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isZeroSized(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), RecoverCastedSymbol(), and rewriteToNumericBoxedExpression().
Definition at line 2442 of file ASTContext.cpp.
References getTypeInfoInChars(), clang::T, and clang::TypeInfoChars::Width.
Return the size of the specified (complete) type T
, in characters.
getTypeSizeInChars - Return the size of the specified type, in characters.
This method does not work on incomplete types.
Definition at line 2439 of file ASTContext.cpp.
References getTypeInfoInChars(), clang::T, and clang::TypeInfoChars::Width.
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), AtomicUsesUnsupportedLibcall(), clang::ento::StoreManager::castRegion(), castValueToType(), clang::Sema::checkArrayElementAlignment(), CheckAtomicAlignment(), createRuntimeShuffleFunction(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitCXXNewAllocSize(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitISOVolatileLoad(), EmitISOVolatileStore(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPointerArithmetic(), emitStructSetterCall(), evenFlexibleArraySize(), clang::CodeGen::CodeGenModule::generateIntelFPGAAnnotation(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), getAlignmentAndOffsetFromBinAddOrSub(), getDerivedSymbolForBinding(), getExceedsMsgs(), clang::CodeGen::CodeGenModule::getMinimumObjectSize(), GetNumNonZeroBytesInInit(), getObjCEncodingTypeSize(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::AggValueSlot::getPreferredSize(), getTypeSizeInCharsIfKnown(), isOnePastTheEndOfCompleteObject(), clang::SemaOpenMP::isOpenMPCapturedByRef(), clang::CodeGen::CodeGenModule::Release(), shuffleAndStore(), clang::Value::Value(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
|
inline |
Definition at line 2380 of file ASTContext.h.
References getTypeSizeInCharsIfKnown().
Definition at line 2374 of file ASTContext.h.
References getTypeSizeInChars(), clang::Type::isDependentType(), and clang::Type::isIncompleteType().
Referenced by getTypeSizeInCharsIfKnown().
Definition at line 2400 of file ASTContext.cpp.
References clang::Type::getAs(), getASTObjCInterfaceLayout(), getASTRecordLayout(), getTypeAlign(), clang::ASTRecordLayout::getUnadjustedAlignment(), clang::Type::getUnqualifiedDesugaredType(), clang::T, and toBits().
Return the ABI-specified natural alignment of a (complete) type T
, before alignment adjustments, in bits.
This alignment is curently used only by ARM and AArch64 when passing arguments of a composite type.
Definition at line 2394 of file ASTContext.h.
References clang::T.
Referenced by getTypeUnadjustedAlignInChars().
Definition at line 2461 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), clang::T, and toCharUnitsFromBits().
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments.
This method does not work on incomplete types.
Definition at line 2458 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), clang::T, and toCharUnitsFromBits().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 2007 of file ASTContext.h.
References getTypeDeclType().
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 1178 of file ASTContext.cpp.
References buildImplicitTypedef(), and UnsignedInt128Ty.
Referenced by clang::Sema::Initialize().
CanQualType ASTContext::getUIntMaxType | ( | ) | const |
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5).
Definition at line 6044 of file ASTContext.cpp.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getUIntPtrType | ( | ) | const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 6066 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by emitOutlinedFunctionPrologue(), clang::Sema::Initialize(), and clang::SemaOpenMP::isOpenMPCapturedByRef().
QualType ASTContext::getUnaryTransformType | ( | QualType | BaseType, |
QualType | UnderlyingType, | ||
UnaryTransformType::UTTKind | UKind | ||
) | const |
Unary type transforms.
getUnaryTransformationType - We don't unique these, since the memory savings are minimal and these are rare.
Definition at line 5826 of file ASTContext.cpp.
References getCanonicalType(), ID, clang::Type::isDependentType(), and clang::DependentUnaryTransformType::Profile().
Referenced by clang::Sema::BuildUnaryTransformType(), and getCommonNonSugarTypeNode().
Remove any type constraints from a template parameter type, for equivalence comparison of template parameters.
Definition at line 5924 of file ASTContext.cpp.
References clang::Type::getAs(), getAutoType(), clang::Type::getContainedAutoType(), getQualifiedType(), clang::AutoType::isConstrained(), clang::Type::isDependentType(), and clang::T.
UnnamedGlobalConstantDecl * ASTContext::getUnnamedGlobalConstantDecl | ( | QualType | Ty, |
const APValue & | Value | ||
) | const |
Return a declaration for a uniquified anonymous global constant corresponding to a given APValue.
Definition at line 12439 of file ASTContext.cpp.
References ID, and clang::UnnamedGlobalConstantDecl::Profile().
QualType ASTContext::getUnqualifiedArrayType | ( | QualType | T, |
Qualifiers & | Quals | ||
) | const |
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals
.
This will remove the minimal amount of sugaring from the types, similar to the behavior of QualType::getUnqualifiedType().
T | is the qualified type, which may be an ArrayType |
Quals | will receive the full set of qualifiers that were applied to the array. |
Definition at line 6113 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, clang::SplitQualType::Ty, and clang::ast_matchers::type.
Referenced by clang::Sema::BuiltinChangeCVRQualifiers(), clang::Sema::BuiltinRemoveReference(), clang::Sema::CompareReferenceRelationship(), clang::Sema::FindCompositePointerType(), clang::Sema::handlerCanCatch(), hasCvrSimilarType(), hasSimilarType(), removeAddrSpaceQualType(), and withoutUnaligned().
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
Definition at line 2206 of file ASTContext.h.
References getQualifiedType(), clang::Qualifiers::removeObjCLifetime(), and clang::ast_matchers::type.
Referenced by clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVar(), and clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVarTemplate().
QualType ASTContext::getUnresolvedUsingType | ( | const UnresolvedUsingTypenameDecl * | Decl | ) | const |
Definition at line 4813 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl().
QualType ASTContext::getUnsignedPointerDiffType | ( | ) | const |
Return the unique unsigned counterpart of "ptrdiff_t" integer type.
The standard (C11 7.21.6.1p7) refers to this type in the definition of tu format specifier.
Definition at line 6079 of file ASTContext.cpp.
References clang::Default.
Referenced by clang::SemaOpenMP::ActOnOpenMPCanonicalLoop(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getUnsignedWCharType | ( | ) | const |
Return the type of "unsigned wchar_t".
getUnsignedWCharType - Return the type of "unsigned wchar_t".
Used when in C++, as a GCC extension.
Definition at line 6057 of file ASTContext.cpp.
References UnsignedIntTy.
Referenced by getCorrespondingUnsignedType().
QualType ASTContext::getUsingType | ( | const UsingShadowDecl * | Found, |
QualType | Underlying | ||
) | const |
Definition at line 4760 of file ASTContext.cpp.
References Allocate(), clang::Type::getCanonicalTypeInternal(), clang::UsingShadowDecl::getTargetDecl(), clang::QualType::getTypePtr(), clang::QualType::hasLocalQualifiers(), ID, clang::QualType::isNull(), clang::UsingType::Profile(), and clang::T.
Referenced by clang::TreeTransform< Derived >::RebuildUsingType().
Decl * ASTContext::getVaListTagDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __va_list_tag
type used to help define the __builtin_va_list
type for some targets.
Definition at line 9262 of file ASTContext.cpp.
References getBuiltinVaListDecl(), and VaListTagDecl.
Referenced by isImportedDeclContext().
Returns a vla type where known sizes are replaced with [*].
getVariableArrayDecayedType - Turns the given type, which may be variably-modified, into the corresponding type with all the known sizes replaced with [*].
Definition at line 3642 of file ASTContext.cpp.
References clang::transformer::cat(), getAtomicType(), getConstantArrayType(), getDependentSizedArrayType(), getLValueReferenceType(), getPointerType(), getQualifiedType(), getRValueReferenceType(), clang::Type::getTypeClass(), getVariableArrayType(), clang::Normal, clang::SplitQualType::Quals, clang::Star, clang::SplitQualType::Ty, and clang::ast_matchers::type.
Referenced by getCanonicalParamType(), getExceptionObjectType(), and getSignatureParameterType().
QualType ASTContext::getVariableArrayType | ( | QualType | EltTy, |
Expr * | NumElts, | ||
ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals, | ||
SourceRange | Brackets | ||
) | const |
Return a non-unique reference to the type for a variable array of the specified element type.
getVariableArrayType - Returns a non-unique reference to the type for a variable array of the specified element type.
Definition at line 3780 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuildArrayType(), getAsArrayType(), getUnqualifiedArrayType(), and getVariableArrayDecayedType().
QualType ASTContext::getVectorType | ( | QualType | vecType, |
unsigned | NumElts, | ||
VectorKind | VecKind | ||
) | const |
Return the unique reference to a vector type of the specified element type and size.
getVectorType - Return the unique reference to a 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 4102 of file ASTContext.cpp.
References clang::Type::castAs(), getCanonicalType(), clang::BitIntType::getNumBits(), ID, clang::Type::isBitIntType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), and clang::VectorType::Profile().
Referenced by clang::Sema::BuildVectorType(), clang::Sema::CheckVectorConditionalTypes(), getCommonNonSugarTypeNode(), getCorrespondingSignedType(), getCorrespondingUnsignedType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), and clang::TreeTransform< Derived >::RebuildVectorType().
Return the uniqued reference to the type for a volatile
qualified type.
The resulting type has a union of the qualifiers from T
and volatile
.
Definition at line 1302 of file ASTContext.h.
References clang::T, and clang::Qualifiers::Volatile.
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 12166 of file ASTContext.cpp.
References getLangOpts(), clang::ItaniumVTableContext::Pointer, and clang::ItaniumVTableContext::Relative.
Referenced by clang::ASTNameGenerator::Implementation::getAllManglings().
|
inline |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
Definition at line 1803 of file ASTContext.h.
References WCharTy.
QualType ASTContext::getWebAssemblyExternrefType | ( | ) | const |
Return a WebAssembly externref type.
getExternrefType - Return a WebAssembly externref type, which represents an opaque reference to a host value.
Definition at line 4044 of file ASTContext.cpp.
|
inline |
Return the type of wide characters.
In C++, this returns the unique wchar_t type. In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
Definition at line 1808 of file ASTContext.h.
References WideCharTy.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), and clang::CodeGen::CodeGenModule::Release().
|
inline |
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
Definition at line 1822 of file ASTContext.h.
References WIntTy.
Return a write_only pipe type for the specified type.
Definition at line 4627 of file ASTContext.cpp.
References clang::T.
Referenced by clang::Sema::BuildWritePipeType(), and getCommonNonSugarTypeNode().
|
inline |
Definition at line 790 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().
Determine if two types are similar, ignoring only CVR qualifiers.
Definition at line 6275 of file ASTContext.cpp.
References getUnqualifiedArrayType(), hasSameType(), clang::Qualifiers::removeCVRQualifiers(), and UnwrapSimilarTypes().
Return true if the type has been explicitly qualified with ObjC ownership.
A type may be implicitly qualified with ownership under ObjC ARC, and in some cases the compiler treats these differently.
Definition at line 9745 of file ASTContext.cpp.
References Paren.
Determine whether the given expressions X
and Y
are equivalent.
Definition at line 12539 of file ASTContext.cpp.
References clang::Stmt::Profile(), and X.
Referenced by getCommonNonSugarTypeNode(), and getCommonSizeExpr().
Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.
Definition at line 3233 of file ASTContext.cpp.
References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), hasSameType(), and clang::T.
Referenced by clang::Sema::DeduceTemplateArguments(), and isSameEntity().
Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types.
Definition at line 3258 of file ASTContext.cpp.
References getFunctionTypeWithoutPtrSizes(), hasSameType(), and clang::T.
|
inline |
Definition at line 2637 of file ASTContext.h.
References clang::Type::getNullability(), clang::NonNull, clang::Nullable, and clang::Unspecified.
bool ASTContext::hasSameTemplateName | ( | const TemplateName & | X, |
const TemplateName & | Y | ||
) | const |
Determine whether the given template names refer to the same template.
Definition at line 6395 of file ASTContext.cpp.
References clang::TemplateName::getAsVoidPointer(), getCanonicalTemplateName(), and X.
Referenced by clang::Sema::CheckDeductionGuideDeclarator(), and isSameDefaultTemplateArgument().
Definition at line 2608 of file ASTContext.h.
References getCanonicalType().
Determine whether the given types T1
and T2
are equivalent.
Definition at line 2605 of file ASTContext.h.
References getCanonicalType().
Referenced by areCompatibleRVVTypes(), areCompatibleSveTypes(), areCompatibleVectorTypes(), castToBase(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckVectorConditionalTypes(), ClassImplementsAllMethodsAndProperties(), clang::Sema::computeDeclContext(), clang::ConvertQualTypeToKind(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), forEachMultiversionedFunctionVersion(), getCommonSugaredType(), getCommonSugarTypeNode(), getCommonTemplateArgument(), clang::Sema::getMoreSpecializedTemplate(), getTypedefType(), hasCvrSimilarType(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSameFunctionTypeIgnoringPtrSizes(), hasSimilarType(), implicitObjectParamIsLifetimeBound(), IsEquivalentForUsingDecl(), clang::Sema::isEquivalentInternalLinkageDeclaration(), IsOverloadOrOverrideImpl(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameDefaultTemplateArgument(), isSameEntity(), clang::ASTImporter::IsStructurallyEquivalent(), isValidInteropVariable(), loadToBegin(), clang::Sema::MergeVarDeclExceptionSpecs(), ObjCMethodsAreEqual(), clang::Sema::PerformImplicitConversion(), rewriteToNumberLiteral(), sameObjCTypeArgs(), and typesAreCompatible().
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 2632 of file ASTContext.h.
References getCanonicalType(), and clang::CanQual< T >::getTypePtr().
Referenced by allowAmbiguity(), areCompatibleVectorTypes(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CompareReferenceRelationship(), createObjCPropertyGetter(), clang::Sema::CreateOverloadedBinOp(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitAtomicCmpXchgForMSIntrin(), EmitBinaryAtomicPost(), FindBaseInitializer(), FunctionsCorrespond(), getCommonSugaredType(), getExistingLazyBinding(), clang::Sema::getMoreSpecializedTemplate(), getParamType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::Sema::handlerCanCatch(), hasCopyOrMoveCtorParam(), clang::Expr::IgnoreParenNoopCasts(), IsAcceptableNonMemberOperatorCandidate(), MakeBinaryAtomicValue(), clang::Sema::PerformImplicitConversion(), and UnwrapSimilarTypes().
Determine if two types are similar, according to the C++ rules.
That is, determine if they are the same other than qualifiers on the initial sequence of pointer / pointer-to-member / array (and in Clang, object pointer) types and their element types.
Clang offers a number of qualifiers in addition to the C++ qualifiers; those qualifiers are also ignored in the 'similarity' check.
Definition at line 6263 of file ASTContext.cpp.
References getUnqualifiedArrayType(), hasSameType(), and UnwrapSimilarTypes().
Referenced by clang::Sema::CompareReferenceRelationship().
bool ASTContext::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)
Definition at line 2780 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Type::getAs(), getBaseElementType(), getTypeSize(), clang::Type::isArrayType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::QualType::isTriviallyCopyableType(), structHasUniqueObjectRepresentations(), and unionHasUniqueObjectRepresentations().
void ASTContext::InitBuiltinTypes | ( | const TargetInfo & | Target, |
const TargetInfo * | AuxTarget = nullptr |
||
) |
Initialize built-in types.
This routine may only be invoked once for a given ASTContext object. It is normally invoked after ASTContext construction.
Target | The target |
Definition at line 1190 of file ASTContext.cpp.
References AccumTy, clang::DeclContext::addDecl(), ARCUnbridgedCastTy, ArraySectionTy, BFloat16Ty, BoolTy, BoundMemberTy, buildImplicitRecord(), BuiltinFnTy, Char16Ty, Char32Ty, Char8Ty, CharTy, DependentTy, DoubleTy, clang::RISCV::Float, Float128Ty, Float16Ty, FloatTy, FractTy, getCanonicalType(), getPointerType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), getTranslationUnitDecl(), clang::CanQual< T >::getUnqualifiedType(), HalfTy, Ibm128Ty, IncompleteMatrixIdxTy, Int128Ty, IntTy, isAddrSpaceMapManglingEnabled(), clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongAccumTy, LongDoubleTy, LongFractTy, LongLongTy, LongTy, MSGuidTagDecl, NullPtrTy, ObjCBuiltinBoolTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OCLClkEventTy, OCLEventTy, OCLQueueTy, OCLReserveIDTy, OCLSamplerTy, OMPArrayShapingTy, OMPIteratorTy, clang::opencl_generic, OverloadTy, PseudoObjectTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, SatUnsignedShortFractTy, clang::Qualifiers::setAddressSpace(), ShortAccumTy, ShortFractTy, ShortTy, SignedCharTy, UnknownAnyTy, UnresolvedTemplateTy, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, UnsignedShortTy, VaListTagDecl, VoidPtrTy, VoidTy, WCharTy, WideCharTy, and WIntTy.
Determine if the alignment the type has was required using an alignment attribute.
Definition at line 1833 of file ASTContext.cpp.
References clang::TypeInfo::AlignRequirement, getTypeInfo(), clang::None, and clang::T.
Referenced by isAlignmentRequired().
Definition at line 1837 of file ASTContext.cpp.
References isAlignmentRequired(), and clang::T.
|
inline |
Definition at line 784 of file ASTContext.h.
Returns true if this is an inline-initialized static data member which is treated as a definition for MSVC compatibility.
Definition at line 7749 of file ASTContext.cpp.
References clang::TargetInfo::getCXXABI(), clang::Redeclarable< decl_type >::getFirstDecl(), getTargetInfo(), clang::ValueDecl::getType(), clang::VarDecl::hasInit(), clang::Type::isIntegralOrEnumerationType(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isOutOfLine(), and clang::VarDecl::isStaticDataMember().
Referenced by DeclMustBeEmitted(), and clang::CodeGen::CodeGenModule::EmitGlobal().
bool ASTContext::isNearlyEmpty | ( | const CXXRecordDecl * | RD | ) | const |
Definition at line 12161 of file ASTContext.cpp.
Definition at line 2920 of file ASTContext.h.
References getObjCClassType(), and clang::T.
Definition at line 2914 of file ASTContext.h.
References getObjCIdType(), and clang::T.
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 2335 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying().
Definition at line 2926 of file ASTContext.h.
References getObjCSelType(), and clang::T.
Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
Definition at line 7221 of file ASTContext.cpp.
References clang::CPlusPlus, getLangOpts(), clang::Expr::getSourceBitField(), clang::Expr::getType(), getTypeSize(), IntTy, clang::Type::isEnumeralType(), clang::Type::isSignedIntegerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UnsignedIntTy.
More type predicates useful for type checking/promotion.
Definition at line 1795 of file ASTContext.cpp.
References clang::Type::getAs(), getLangOpts(), clang::HLSL, clang::Type::isDependentType(), and clang::T.
Referenced by clang::ento::SMTConv::doIntTypeConversion(), getPromotedIntegerType(), isOverflowingIntegerType(), and mergeFunctionTypes().
Determine whether two 'requires' expressions are similar enough that they may be used in re-declarations.
Use of 'requires' isn't mandatory, works with constraints expressed in other ways too.
Definition at line 6401 of file ASTContext.cpp.
References clang::Stmt::Profile().
Referenced by isSameEntity(), isSameTemplateParameter(), isSameTemplateParameterList(), and isSameTypeConstraint().
Determine whether two default template arguments are similar enough that they may be used in declarations of the same template.
Definition at line 6497 of file ASTContext.cpp.
References clang::TemplateArgument::getAsTemplate(), hasSameTemplateName(), hasSameType(), clang::Expr::IgnoreImpCasts(), isSameTemplateParameter(), clang::Stmt::Profile(), and X.
Determine whether the two declarations refer to the same entity.
Definition at line 6619 of file ASTContext.cpp.
References clang::Class, clang::declaresSameEntity(), clang::Type::getAs(), getAsArrayType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ArrayType::getElementType(), clang::FunctionProtoType::getExceptionSpecType(), clang::Decl::getKind(), getLangOpts(), clang::DeclContext::getRedeclContext(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSameOverloadableAttrs(), hasSameType(), clang::Interface, clang::Type::isIncompleteArrayType(), isSameConstraintExpr(), isSameQualifier(), isSameTemplateParameterList(), clang::isUnresolvedExceptionSpec(), clang::Struct, and X.
Referenced by isSameTypeConstraint().
Determine whether two template parameters are similar enough that they may be used in declarations of the same template.
Definition at line 6455 of file ASTContext.cpp.
References clang::Decl::getKind(), isSameConstraintExpr(), isSameTemplateParameterList(), isSameTypeConstraint(), and X.
Referenced by isSameDefaultTemplateArgument(), and isSameTemplateParameterList().
bool ASTContext::isSameTemplateParameterList | ( | const TemplateParameterList * | X, |
const TemplateParameterList * | Y | ||
) | const |
Determine whether two template parameter lists are similar enough that they may be used in declarations of the same template.
Definition at line 6485 of file ASTContext.cpp.
References clang::TemplateParameterList::getParam(), clang::TemplateParameterList::getRequiresClause(), isSameConstraintExpr(), isSameTemplateParameter(), clang::TemplateParameterList::size(), and X.
Referenced by FunctionsCorrespond(), isSameEntity(), and isSameTemplateParameter().
bool ASTContext::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.
Definition at line 6414 of file ASTContext.cpp.
References clang::TypeConstraint::getConceptReference(), clang::TypeConstraint::getImmediatelyDeclaredConstraint(), clang::TypeConstraint::getNamedConcept(), clang::ConceptReference::getTemplateArgsAsWritten(), clang::ConceptReference::hasExplicitTemplateArgs(), isSameConstraintExpr(), isSameEntity(), and clang::ASTTemplateArgumentListInfo::NumTemplateArgs.
Referenced by isSameTemplateParameter().
Definition at line 2869 of file ASTContext.cpp.
References clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Type::isAnyPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by getNSArrayObjects(), rewriteToArrayLiteral(), and rewriteToDictionaryLiteral().
|
inline |
Definition at line 1034 of file ASTContext.h.
uint64_t ASTContext::lookupFieldBitOffset | ( | const ObjCInterfaceDecl * | OID, |
const ObjCImplementationDecl * | ID, | ||
const ObjCIvarDecl * | Ivar | ||
) | const |
Get the offset of an ObjCIvarDecl in bits.
Definition at line 3501 of file RecordLayoutBuilder.cpp.
References clang::ObjCIvarDecl::getCanonicalDecl().
Referenced by clang::CodeGen::CGObjCRuntime::ComputeBitfieldBitOffset(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), and clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset().
|
inline |
Make an APSInt of the appropriate width and signedness for the given Value
and integer Type
.
Definition at line 3040 of file ASTContext.h.
References getIntWidth(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by clang::APValue::toIntegralConstant().
Whether a C++ static variable or CUDA/HIP kernel may be externalized.
Definition at line 13824 of file ASTContext.cpp.
References basicGVALinkageForFunction(), basicGVALinkageForVariable(), clang::Decl::getAttr(), clang::GVA_Internal, and clang::Decl::hasAttr().
Referenced by shouldExternalize().
void ASTContext::mergeDefinitionIntoModule | ( | NamedDecl * | ND, |
Module * | M, | ||
bool | NotifyListeners = true |
||
) |
Note that the definition ND
has been merged into module M
, and should be visible whenever M
is visible.
Definition at line 1012 of file ASTContext.cpp.
References getASTMutationListener(), clang::Decl::getCanonicalDecl(), Listener, and clang::ASTMutationListener::RedefinedHiddenDefinition().
FunctionProtoType::ExceptionSpecInfo ASTContext::mergeExceptionSpecs | ( | FunctionProtoType::ExceptionSpecInfo | ESI1, |
FunctionProtoType::ExceptionSpecInfo | ESI2, | ||
SmallVectorImpl< QualType > & | ExceptionTypeStorage, | ||
bool | AcceptDependent | ||
) |
Definition at line 12766 of file ASTContext.cpp.
References clang::EST_BasicNoexcept, clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::EST_None, clang::EST_NoThrow, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::EST_Unparsed, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, mergeTypeLists(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by clang::Sema::FindCompositePointerType(), and getCommonNonSugarTypeNode().
bool ASTContext::mergeExtParameterInfo | ( | const FunctionProtoType * | FirstFnType, |
const FunctionProtoType * | SecondFnType, | ||
bool & | CanUseFirst, | ||
bool & | CanUseSecond, | ||
SmallVectorImpl< FunctionProtoType::ExtParameterInfo > & | NewParamInfos | ||
) |
This function merges the ExtParameterInfo lists of two functions.
It returns true if the lists are compatible. The merged list is returned in NewParamInfos.
FirstFnType | The type of the first function. |
SecondFnType | The type of the second function. |
CanUseFirst | This flag is set to true if the first function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo. |
CanUseSecond | This flag is set to true if the second function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo. |
NewParamInfos | The composite list of ExtParameterInfo. The list is empty if none of the flags are set. |
Definition at line 11013 of file ASTContext.cpp.
References clang::FunctionProtoType::getExtParameterInfo(), clang::FunctionProtoType::getExtParameterInfos(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionType::ExtParameterInfo::isNoEscape(), and clang::FunctionType::ExtParameterInfo::withIsNoEscape().
Referenced by mergeFunctionTypes().
QualType ASTContext::mergeFunctionParameterTypes | ( | QualType | lhs, |
QualType | rhs, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeFunctionParameterTypes - merge two types which appear as function parameter types
Definition at line 10412 of file ASTContext.cpp.
References clang::QualType::isNull(), mergeTransparentUnionType(), mergeTypes(), and clang::Unqualified.
Referenced by mergeFunctionTypes().
QualType ASTContext::mergeFunctionTypes | ( | QualType | lhs, |
QualType | rhs, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false , |
||
bool | AllowCXX = false , |
||
bool | IsConditionalOperator = false |
||
) |
Definition at line 10431 of file ASTContext.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, FloatTy, clang::Type::getAs(), getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::FunctionType::ExtInfo::getNoCallerSavedRegs(), clang::FunctionType::ExtInfo::getNoCfCheck(), clang::FunctionType::ExtInfo::getNoReturn(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getReturnType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::FunctionProtoType::hasExceptionSpec(), clang::QualType::hasQualifiers(), clang::QualType::isNull(), isPromotableIntegerType(), clang::FunctionProtoType::isVariadic(), mergeExtParameterInfo(), mergeFunctionParameterTypes(), mergeTypes(), clang::Unqualified, and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by mergeTypes().
mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and returns the merged version; including for function return types.
Definition at line 11067 of file ASTContext.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::getAddressSpace(), getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::getFunctionExtInfo(), getFunctionType(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::QualType::getTypePtr(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
QualType ASTContext::mergeTransparentUnionType | ( | QualType | T, |
QualType | SubType, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType()
Definition at line 10392 of file ASTContext.cpp.
References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::Decl::hasAttr(), clang::QualType::isNull(), mergeTypes(), clang::T, and clang::Unqualified.
Referenced by mergeFunctionParameterTypes().
QualType ASTContext::mergeTypes | ( | QualType | LHS, |
QualType | RHS, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false , |
||
bool | BlockReturnType = false , |
||
bool | IsConditionalOperator = false |
||
) |
Definition at line 10650 of file ASTContext.cpp.
References areCompatMatrixTypes(), areCompatVectorTypes(), canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Type::castAs(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), clang::ReferenceType::getPointeeType(), getPointerType(), clang::QualType::getQualifiers(), clang::ConstantArrayType::getSize(), clang::ConstantArrayType::getSizeExpr(), clang::VariableArrayType::getSizeExpr(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::ConstantArrayType::getZExtSize(), clang::Qualifiers::hasUnaligned(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isBlockPointerType(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), isUnsigned(), mergeEnumWithInteger(), mergeFunctionTypes(), clang::OpenCL, clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::Strong, clang::Unqualified, and clang::Qualifiers::Weak.
Referenced by mergeFunctionParameterTypes(), mergeFunctionTypes(), mergeTransparentUnionType(), typesAreBlockPointerCompatible(), and typesAreCompatible().
bool ASTContext::ObjCMethodsAreEqual | ( | const ObjCMethodDecl * | MethodDecl, |
const ObjCMethodDecl * | MethodImp | ||
) |
Definition at line 12495 of file ASTContext.cpp.
References clang::ParmVarDecl::getObjCDeclQualifier(), clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ObjCMethodDecl::getReturnType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), hasSameType(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::ObjCMethodDecl::param_size().
Referenced by ClassImplementsAllMethodsAndProperties().
bool ASTContext::ObjCObjectAdoptsQTypeProtocols | ( | QualType | QT, |
ObjCInterfaceDecl * | Decl | ||
) |
ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list.
Definition at line 5567 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().
bool ASTContext::ObjCQualifiedClassTypesAreCompatible | ( | const ObjCObjectPointerType * | LHS, |
const ObjCObjectPointerType * | RHS | ||
) |
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
Definition at line 9786 of file ASTContext.cpp.
References clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces().
bool ASTContext::ObjCQualifiedIdTypesAreCompatible | ( | const ObjCObjectPointerType * | LHS, |
const ObjCObjectPointerType * | RHS, | ||
bool | ForCompare | ||
) |
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
Definition at line 9804 of file ASTContext.cpp.
References CollectInheritedProtocols(), compare(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::ObjCObjectPointerType::isObjCClassType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedClassType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), clang::ObjCObjectPointerType::qual_empty(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces(), and canAssignObjCInterfacesInBlockPointer().
|
delete |
ASTContext::overridden_method_range ASTContext::overridden_methods | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1560 of file ASTContext.cpp.
References clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::overridden_methods(), overridden_methods_begin(), overridden_methods_end(), and overridden_methods_size().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1544 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::begin_overridden_methods(), and getOverriddenMethods().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1549 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::end_overridden_methods(), and getOverriddenMethods().
unsigned ASTContext::overridden_methods_size | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1554 of file ASTContext.cpp.
References overridden_methods(), and Range.
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 951 of file ASTContext.cpp.
References clang::CPlusPlus, getLangOpts(), clang::Type::getTypeClass(), NumImplicitCopyAssignmentOperators, NumImplicitCopyAssignmentOperatorsDeclared, NumImplicitCopyConstructors, NumImplicitCopyConstructorsDeclared, NumImplicitDefaultConstructors, NumImplicitDefaultConstructorsDeclared, NumImplicitDestructors, NumImplicitDestructorsDeclared, NumImplicitMoveAssignmentOperators, NumImplicitMoveAssignmentOperatorsDeclared, NumImplicitMoveConstructors, NumImplicitMoveConstructorsDeclared, clang::ExternalASTSource::PrintStats(), and clang::T.
Definition at line 10381 of file ASTContext.cpp.
References typesAreCompatible().
bool ASTContext::ProtocolCompatibleWithProtocol | ( | ObjCProtocolDecl * | lProto, |
ObjCProtocolDecl * | rProto | ||
) | const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.
Definition at line 9774 of file ASTContext.cpp.
References clang::declaresSameEntity(), and clang::ObjCProtocolDecl::protocols().
Referenced by ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
bool ASTContext::QIdProtocolsAdoptObjCObjectProtocols | ( | QualType | QT, |
ObjCInterfaceDecl * | IDecl | ||
) |
QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.
Definition at line 5586 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), and ProtocolCompatibleWithProtocol().
Remove any existing address space on the type and returns the type with qualifiers intact (or that's the idea anyway)
The return type should be T with all prior qualifiers minus the address space.
Definition at line 3063 of file ASTContext.cpp.
References clang::Qualifiers::getFastQualifiers(), getUnqualifiedArrayType(), clang::Qualifiers::hasNonFastQualifiers(), clang::Type::isArrayType(), clang::Qualifiers::removeAddressSpace(), clang::QualifierCollector::strip(), and clang::T.
Referenced by clang::Sema::PerformImplicitConversion(), and removePtrSizeAddrSpace().
Remove the existing address space on the type if it is a pointer size address space and return the type with qualifiers intact.
Definition at line 3131 of file ASTContext.cpp.
References clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), getPointerType(), clang::isPtrSizeAddressSpace(), removeAddrSpaceQualType(), and clang::T.
Referenced by getFunctionTypeWithoutPtrSizes().
void ASTContext::ResetObjCLayout | ( | const ObjCContainerDecl * | CD | ) |
Definition at line 11060 of file ASTContext.cpp.
|
inline |
Attach an AST mutation listener to the AST context.
The AST mutation listener provides the ability to track modifications to the abstract syntax tree entities committed after they were initially created.
Definition at line 1212 of file ASTContext.h.
References Listener.
Referenced by clang::CompilerInstance::createASTReader().
Set the copy initialization expression of a block var decl.
CanThrow
indicates whether the copy expression can throw or not.
Definition at line 2957 of file ASTContext.cpp.
References CanThrow(), and clang::Decl::hasAttr().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 2114 of file ASTContext.h.
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 7504 of file ASTContext.cpp.
References clang::Type::castAs(), clang::TagType::getDecl(), and clang::T.
|
inline |
Definition at line 1435 of file ASTContext.h.
void ASTContext::setCurrentNamedModule | ( | Module * | M | ) |
Set the (C++20) module we are building.
Definition at line 1105 of file ASTContext.cpp.
References clang::Module::isNamedModule().
void ASTContext::setExternalSource | ( | IntrusiveRefCntPtr< ExternalASTSource > | Source | ) |
Attach an external AST source to the AST context.
The external AST source provides the ability to load parts of the abstract syntax tree as needed from some external storage, e.g., a precompiled header.
Definition at line 947 of file ASTContext.cpp.
Referenced by clang::CompilerInstance::createASTReader(), and clang::IncrementalSyntaxOnlyAction::ExecuteAction().
|
inline |
Set the type for the C FILE type.
Definition at line 1968 of file ASTContext.h.
void ASTContext::setInstantiatedFromStaticDataMember | ( | VarDecl * | Inst, |
VarDecl * | Tmpl, | ||
TemplateSpecializationKind | TSK, | ||
SourceLocation | PointOfInstantiation = SourceLocation() |
||
) |
Note that the static data member Inst
is an instantiation of the static data member template Tmpl
of a class template.
Definition at line 1470 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1533 of file ASTContext.cpp.
References clang::NamedDecl::getDeclName().
Remember that the using decl Inst
is an instantiation of the using decl Pattern
of a class template.
Definition at line 1493 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingEnumDecl | ( | UsingEnumDecl * | Inst, |
UsingEnumDecl * | Pattern | ||
) |
Remember that the using enum decl Inst
is an instantiation of the using enum decl Pattern
of a class template.
Definition at line 1511 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1523 of file ASTContext.cpp.
Referenced by clang::TemplateDeclInstantiator::VisitBaseUsingDecls().
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1978 of file ASTContext.h.
Definition at line 12289 of file ASTContext.cpp.
References clang::ASTMutationListener::AddedManglingNumber(), and Listener.
Referenced by clang::Sema::BuildVariableInstantiation(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::ASTDeclReader::UpdateDecl().
void ASTContext::setNonKeyFunction | ( | const CXXMethodDecl * | method | ) |
Observe that the given method cannot be a key function.
Checks the key-function cache for the method's class and clears it if matches the given declaration.
This is used in ABIs where out-of-line definitions marked inline are not considered to be key functions.
method | should be the declaration from the class definition |
Definition at line 3458 of file RecordLayoutBuilder.cpp.
References clang::LazyOffsetPtr< T, OffsT, Get >::get(), getExternalSource(), clang::Redeclarable< decl_type >::getFirstDecl(), and clang::CXXMethodDecl::getParent().
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1899 of file ASTContext.h.
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 9286 of file ASTContext.cpp.
References getObjCInterfaceType(), and clang::QualType::isNull().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1886 of file ASTContext.h.
void ASTContext::setObjCImplementation | ( | ObjCCategoryDecl * | CatD, |
ObjCCategoryImplDecl * | ImplD | ||
) |
Set the implementation of ObjCCategoryDecl.
Definition at line 2915 of file ASTContext.cpp.
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 2908 of file ASTContext.cpp.
Referenced by clang::ObjCImplDecl::setClassInterface(), clang::ObjCCategoryDecl::setImplementation(), and clang::ObjCInterfaceDecl::setImplementation().
void ASTContext::setObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD, |
const ObjCMethodDecl * | Redecl | ||
) |
Definition at line 2926 of file ASTContext.cpp.
References getObjCMethodRedeclaration().
Referenced by clang::ObjCMethodDecl::setAsRedeclaration().
|
inline |
Definition at line 1873 of file ASTContext.h.
References clang::T.
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1912 of file ASTContext.h.
|
inline |
Definition at line 1850 of file ASTContext.h.
void ASTContext::setParameterIndex | ( | const ParmVarDecl * | D, |
unsigned | index | ||
) |
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield.
Definition at line 12385 of file ASTContext.cpp.
Definition at line 1042 of file ASTContext.h.
|
inline |
Definition at line 704 of file ASTContext.h.
Referenced by clang::ExtractAPIAction::CreateASTConsumer(), clang::WrappingExtractAPIAction::CreateASTConsumer(), and clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1990 of file ASTContext.h.
Definition at line 12314 of file ASTContext.cpp.
References clang::ASTMutationListener::AddedStaticLocalNumbers(), and Listener.
Referenced by clang::Sema::BuildVariableInstantiation(), and clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1480 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
void ASTContext::setTraversalScope | ( | const std::vector< Decl * > & | TopLevelDecls | ) |
Definition at line 937 of file ASTContext.cpp.
References clang::ParentMapContext::clear(), and getParentMapContext().
|
inline |
Set the type for the C ucontext_t type.
Definition at line 2002 of file ASTContext.h.
Whether a C++ static variable or CUDA/HIP kernel should be externalized.
Definition at line 13842 of file ASTContext.cpp.
References CUDADeviceVarODRUsedByHost, clang::Decl::hasAttr(), and mayExternalize().
int64_t ASTContext::toBits | ( | CharUnits | CharSize | ) | const |
Convert a size in characters to a size in bits.
toBits - Convert a size in characters to a size in characters.
Definition at line 2433 of file ASTContext.cpp.
References getCharWidth(), and clang::CharUnits::getQuantity().
Referenced by AtomicUsesUnsupportedLibcall(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getDeclAlign(), getPreferredTypeAlign(), getTypeUnadjustedAlign(), and shuffleAndStore().
CharUnits ASTContext::toCharUnitsFromBits | ( | int64_t | BitSize | ) | const |
Convert a size in bits to a size in characters.
toCharUnitsFromBits - Convert a size in bits to a size in characters.
Definition at line 2428 of file ASTContext.cpp.
References clang::CharUnits::fromQuantity(), and getCharWidth().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), AlignOfType(), emitAddrOfZeroSizeField(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), EmitAtomicCmpXchg128ForMSIntrin(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getAlignOfGlobalVarInChars(), getDeclAlign(), getExnObjectAlignment(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), GetNumNonZeroBytesInInit(), getPreferredTypeAlignInChars(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), getTypeAlignInChars(), getTypeInfoInChars(), and getTypeUnadjustedAlignInChars().
Definition at line 10385 of file ASTContext.cpp.
References clang::QualType::isNull(), and mergeTypes().
Referenced by canAssignObjCObjectTypes().
Compatibility predicates used to check assignment expressions.
typesAreCompatible - C99 6.7.3p9: For two qualified types to be compatible, both shall have the identically qualified version of a compatible type.
C99 6.2.7p1: Two types have compatible types if their types are the same. See 6.7.[2,3,5] for additional rules.
Definition at line 10373 of file ASTContext.cpp.
References clang::CPlusPlus, getLangOpts(), hasSameType(), clang::QualType::isNull(), and mergeTypes().
Referenced by clang::Sema::IsStringLiteralToNonConstPointerConversion(), and propertyTypesAreCompatible().
void ASTContext::UnwrapSimilarArrayTypes | ( | QualType & | T1, |
QualType & | T2, | ||
bool | AllowPiMismatch = true |
||
) |
Attempt to unwrap two types that may both be array types with the same bound (or both be array types of unknown bound) for the purpose of comparing the cv-decomposition of two types per C++ [conv.qual].
AllowPiMismatch | Allow the Pi1 and Pi2 to differ as described in C++20 [conv.qual], if permitted by the current language mode. |
Definition at line 6175 of file ASTContext.cpp.
References clang::CPlusPlus20, getAsArrayType(), and getLangOpts().
Referenced by UnwrapSimilarTypes().
Attempt to unwrap two types that may be similar (C++ [conv.qual]).
If T1 and T2 are both pointer types of the same kind, or both array types with the same bound, unwraps layers from T1 and T2 until a pointer type is unwrapped. Top-level qualifiers on T1 and T2 are ignored.
This function will typically be called in a loop that successively "unwraps" pointer and pointer-to-member types to compare them at each level.
AllowPiMismatch | Allow the Pi1 and Pi2 to differ as described in C++20 [conv.qual], if permitted by the current language mode. |
true
if a pointer type was unwrapped, false
if we reached a pair of types that can't be unwrapped further. Definition at line 6226 of file ASTContext.cpp.
References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), hasSameUnqualifiedType(), and UnwrapSimilarArrayTypes().
Referenced by clang::Sema::CompareReferenceRelationship(), hasCvrSimilarType(), and hasSimilarType().
|
friend |
Definition at line 482 of file ASTContext.h.
|
friend |
Definition at line 483 of file ASTContext.h.
|
friend |
Definition at line 484 of file ASTContext.h.
|
friend |
Definition at line 486 of file ASTContext.h.
|
friend |
Definition at line 3362 of file ASTContext.h.
|
friend |
Definition at line 3363 of file ASTContext.h.
|
friend |
Definition at line 487 of file ASTContext.h.
|
friend |
Definition at line 186 of file ASTContext.h.
|
friend |
Definition at line 485 of file ASTContext.h.
CanQualType clang::ASTContext::AccumTy |
Definition at line 1107 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 1125 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ArraySectionTy |
Definition at line 1139 of file ASTContext.h.
Referenced by InitBuiltinTypes().
|
mutable |
Definition at line 1157 of file ASTContext.h.
Referenced by getAutoDeductType(), and MakeTypeID().
|
mutable |
Definition at line 1158 of file ASTContext.h.
Referenced by getAutoRRefDeductType(), and MakeTypeID().
CanQualType clang::ASTContext::BFloat16Ty |
Definition at line 1119 of file ASTContext.h.
Referenced by getBuiltinVectorTypeInfo(), and InitBuiltinTypes().
CanQualType clang::ASTContext::BoolTy |
Definition at line 1095 of file ASTContext.h.
Referenced by clang::Sema::ActOnNoexceptSpec(), clang::Sema::AddBuiltinCandidate(), clang::TemplateDeclInstantiator::adjustForRewrite(), areCompatibleRVVTypes(), clang::ento::SimpleConstraintManager::assumeInternal(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildExpressionTrait(), clang::Sema::checkExceptionSpecification(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::ento::SMTConv::fixAPSInt(), clang::ento::SMTConv::getBinExpr(), getBuiltinVectorTypeInfo(), clang::ento::SValBuilder::getConditionType(), getLogicalOperationType(), InitBuiltinTypes(), clang::Sema::PerformContextuallyConvertToBool(), clang::Sema::PerformImplicitConversion(), clang::Sema::PreferredConditionType(), clang::Sema::tryResolveExplicitSpecifier(), and clang::dataflow::UncheckedOptionalAccessModel::UncheckedOptionalAccessModel().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 1122 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), clang::Sema::FixOverloadedFunctionReference(), InitBuiltinTypes(), and clang::Sema::MaybeBindToTemporary().
CanQualType clang::ASTContext::BuiltinFnTy |
Definition at line 1124 of file ASTContext.h.
Referenced by clang::Sema::FixOverloadedFunctionReference(), and InitBuiltinTypes().
Builtin::Context& clang::ASTContext::BuiltinInfo |
Definition at line 649 of file ASTContext.h.
Referenced by canBuiltinBeRedeclared(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), EmitDirectCallee(), clang::Sema::FixOverloadedFunctionReference(), GetBuiltinType(), and clang::CallExpr::isUnevaluatedBuiltinCall().
CanQualType clang::ASTContext::Char16Ty |
Definition at line 1101 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Char32Ty |
Definition at line 1102 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Char8Ty |
Definition at line 1100 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), and InitBuiltinTypes().
CanQualType clang::ASTContext::CharTy |
Definition at line 1096 of file ASTContext.h.
Referenced by clang::ento::StoreManager::castRegion(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::SYCLUniqueStableIdExpr::Create(), clang::SYCLUniqueStableNameExpr::Create(), clang::SYCLUniqueStableNameExpr::CreateEmpty(), clang::SYCLUniqueStableIdExpr::CreateEmpty(), diagnoseStringPlusChar(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::Sema::EvaluateStaticAssertMessageAsString(), GetCFNumberSize(), getCharWidth(), getPredefinedStringLiteralFromCache(), InitBuiltinTypes(), and clang::ento::ExprEngine::VisitArraySubscriptExpr().
Keeps track of redeclaration chains that don't have any comment attached.
Mapping from canonical declaration to redeclaration chain that has no comments attached to any redeclaration. Specifically it's mapping to the last redeclaration we've checked.
Shall not contain declarations that have comments attached to any redeclaration in their chain.
Definition at line 833 of file ASTContext.h.
Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 808 of file ASTContext.h.
Referenced by addComment(), attachCommentsToJustParsedDecls(), getRawCommentForDeclNoCache(), and getRawCommentForDeclNoCacheImpl().
True if comments are already loaded from ExternalASTSource.
Definition at line 811 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
ComparisonCategories clang::ASTContext::CompCategories |
Types and expressions required to build C++2a three-way comparisons using operator<=>, including the values return by builtin <=> operators.
Definition at line 2286 of file ASTContext.h.
Referenced by clang::Sema::BuildSynthesizedThreeWayComparison(), and clang::Sema::CheckComparisonCategoryType().
struct clang::ASTContext::CUDAConstantEvalContext clang::ASTContext::CUDAConstantEvalCtx |
llvm::DenseSet<const VarDecl *> clang::ASTContext::CUDADeviceVarODRUsedByHost |
Keep track of CUDA/HIP device-side variables ODR-used by host code.
This does not include extern shared variables used by device host functions as addresses of shared variables are per warp, therefore cannot be accessed by host code.
Definition at line 1171 of file ASTContext.h.
Referenced by MarkVarDeclODRUsed(), and shouldExternalize().
llvm::DenseSet<const ValueDecl *> clang::ASTContext::CUDAExternalDeviceDeclODRUsedByHost |
Keep track of CUDA/HIP external kernels or device variables ODR-used by host code.
Definition at line 1175 of file ASTContext.h.
Referenced by clang::SemaCUDA::CheckCall(), MarkVarDeclODRUsed(), and clang::CodeGen::CodeGenModule::Release().
llvm::DenseSet<const FunctionDecl *> clang::ASTContext::CUDAImplicitHostDeviceFunUsedByDevice |
Keep track of CUDA/HIP implicit host device functions used on device side in device compilation.
Definition at line 1179 of file ASTContext.h.
Referenced by clang::SemaCUDA::RecordImplicitHostDeviceFuncUsedByDevice().
|
mutable |
Definition at line 651 of file ASTContext.h.
Referenced by clang::Sema::AddMemberOperatorCandidates(), clang::TemplateDeclInstantiator::adjustForRewrite(), checkMappableExpressionList(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseTwoPhaseOperatorLookup(), clang::Sema::FindAllocationFunctions(), findImplicitlyDeclaredEqualityComparisons(), clang::ASTImporter::Import(), clang::Sema::LookupOverloadedBinOp(), clang::Parser::parseMapperModifier(), parseOpenMPReductionId(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
|
mutable |
Mapping from declaration to directly attached comment.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 817 of file ASTContext.h.
Referenced by attachCommentsToJustParsedDecls(), cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
CanQualType clang::ASTContext::DependentTy |
Definition at line 1122 of file ASTContext.h.
Referenced by clang::Sema::BuildCXXFoldExpr(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckPackExpansion(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::Sema::getDecltypeForExpr(), getDecltypeType(), getDependentArraySubscriptType(), getInjectedTemplateArg(), InitBuiltinTypes(), clang::Sema::SubstAutoType(), and clang::Sema::SubstAutoTypeSourceInfo().
CanQualType clang::ASTContext::DoubleTy |
Definition at line 1106 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getBuiltinVectorTypeInfo(), GetCFNumberSize(), getRealTypeForBitwidth(), InitBuiltinTypes(), and clang::Sema::Initialize().
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource |
Definition at line 652 of file ASTContext.h.
CanQualType clang::ASTContext::Float128Ty |
Definition at line 1106 of file ASTContext.h.
Referenced by getRealTypeForBitwidth(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Float16Ty |
Definition at line 1120 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::FloatTy |
Definition at line 1106 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getBuiltinVectorTypeInfo(), GetCFNumberSize(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), mergeFunctionTypes(), and clang::Sema::PerformImplicitConversion().
CanQualType clang::ASTContext::FractTy |
Definition at line 1110 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::HalfTy |
Definition at line 1118 of file ASTContext.h.
Referenced by getBuiltinVectorTypeInfo(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), and needsConversionOfHalfVec().
CanQualType clang::ASTContext::Ibm128Ty |
Definition at line 1106 of file ASTContext.h.
Referenced by getRealTypeForBitwidth(), and InitBuiltinTypes().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 647 of file ASTContext.h.
Referenced by clang::Sema::ActOnCompoundRequirement(), clang::CodeGen::CGCXXABI::buildThisParam(), checkMappableExpressionList(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitOutlinedFunctionPrologue(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getBoolName(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::getKeywordSelector(), getMakeIntegerSeqName(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), getNSCopyingName(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), getNSObjectName(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), getObjCProtocolDecl(), getTypePackElementName(), clang::GetUnarySelector(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), clang::NSAPI::isMacroDefined(), isNSStringType(), isValidInteropVariable(), lookupStdNamespace(), and shouldRunOnFunctionOrMethod().
CanQualType clang::ASTContext::IncompleteMatrixIdxTy |
Definition at line 1138 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Int128Ty |
Definition at line 1103 of file ASTContext.h.
Referenced by getCorrespondingSignedType(), getInt128Decl(), getIntTypeForBitwidth(), and InitBuiltinTypes().
CanQualType clang::ASTContext::IntTy |
Definition at line 1103 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBoundDual(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::CodeGen::CodeGenFunction::createTLSAtExitStub(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), getCorrespondingSignedType(), GetDeclSpecTypeForDeclarator(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getLogicalOperationType(), getObjCEncodingTypeSize(), getPromotedIntegerType(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isOverflowingIntegerType(), isPromotableBitField(), mayBeSuccess(), clang::Sema::PreferredConditionType(), clang::TreeTransform< Derived >::RebuildBitIntType(), clang::TreeTransform< Derived >::RebuildExtVectorType(), and rewriteToNumericBoxedExpression().
llvm::DenseMap<const CXXMethodDecl *, CXXCastPath> clang::ASTContext::LambdaCastPaths |
For capturing lambdas with an explicit object parameter whose type is derived from the lambda type, we need to perform derived-to-base conversion so we can access the captures; the cast paths for that are stored here.
Definition at line 1185 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField().
ASTMutationListener* clang::ASTContext::Listener = nullptr |
Definition at line 653 of file ASTContext.h.
Referenced by getASTMutationListener(), mergeDefinitionIntoModule(), setASTMutationListener(), setManglingNumber(), and setStaticLocalNumber().
CanQualType clang::ASTContext::LongAccumTy |
Definition at line 1108 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleTy |
Definition at line 1106 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getRealTypeForBitwidth(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongFractTy |
Definition at line 1110 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 1103 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getCorrespondingSignedType(), getNSIntegerType(), getPromotedIntegerType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongTy |
Definition at line 1103 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getCorrespondingSignedType(), getNSIntegerType(), getPromotedIntegerType(), InitBuiltinTypes(), and clang::Sema::Initialize().
|
mutable |
Definition at line 1165 of file ASTContext.h.
Referenced by getMSGuidDecl(), getMSGuidTagDecl(), getMSGuidType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 1121 of file ASTContext.h.
Referenced by InitBuiltinTypes().
unsigned clang::ASTContext::NumImplicitCopyAssignmentOperators = 0 |
The number of implicitly-declared copy assignment operators.
Definition at line 3245 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared = 0 |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 3249 of file ASTContext.h.
Referenced by PrintStats().
unsigned clang::ASTContext::NumImplicitCopyConstructors = 0 |
The number of implicitly-declared copy constructors.
Definition at line 3231 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitCopyConstructorsDeclared = 0 |
The number of implicitly-declared copy constructors for which declarations were built.
Definition at line 3235 of file ASTContext.h.
Referenced by PrintStats().
unsigned clang::ASTContext::NumImplicitDefaultConstructors = 0 |
The number of implicitly-declared default constructors.
Definition at line 3224 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitDefaultConstructorsDeclared = 0 |
The number of implicitly-declared default constructors for which declarations were built.
Definition at line 3228 of file ASTContext.h.
Referenced by PrintStats().
unsigned clang::ASTContext::NumImplicitDestructors = 0 |
The number of implicitly-declared destructors.
Definition at line 3259 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitDestructorsDeclared = 0 |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 3263 of file ASTContext.h.
Referenced by PrintStats().
unsigned clang::ASTContext::NumImplicitMoveAssignmentOperators = 0 |
The number of implicitly-declared move assignment operators.
Definition at line 3252 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared = 0 |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 3256 of file ASTContext.h.
Referenced by PrintStats().
unsigned clang::ASTContext::NumImplicitMoveConstructors = 0 |
The number of implicitly-declared move constructors.
Definition at line 3238 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
unsigned clang::ASTContext::NumImplicitMoveConstructorsDeclared = 0 |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 3242 of file ASTContext.h.
Referenced by PrintStats().
CanQualType clang::ASTContext::ObjCBuiltinBoolTy |
Definition at line 1127 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinClassTy |
Definition at line 1126 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCClassDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinIdTy |
Definition at line 1126 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCIdDecl(), clang::Type::getObjCSubstitutions(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinSelTy |
Definition at line 1126 of file ASTContext.h.
Referenced by getObjCSelDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::OCLClkEventTy |
Definition at line 1136 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLEventTy |
Definition at line 1136 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLQueueTy |
Definition at line 1137 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLReserveIDTy |
Definition at line 1137 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLSamplerTy |
Definition at line 1136 of file ASTContext.h.
Referenced by clang::CodeGen::CGOpenCLRuntime::getSamplerType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OMPArrayShapingTy |
Definition at line 1140 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::OMPIteratorTy |
Definition at line 1140 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::OverloadTy |
Definition at line 1122 of file ASTContext.h.
Referenced by clang::Sema::BuildReferenceType(), clang::Sema::FindAssociatedClassesAndNamespaces(), InitBuiltinTypes(), clang::Sema::NoteAllOverloadCandidates(), clang::Sema::PerformImplicitConversion(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate(), and clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 837 of file ASTContext.h.
Referenced by attachCommentsToJustParsedDecls(), and getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 1125 of file ASTContext.h.
Referenced by InitBuiltinTypes().
Mapping from canonical declaration to the first redeclaration in chain that has a comment attached.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 824 of file ASTContext.h.
Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
CanQualType clang::ASTContext::SatAccumTy |
Definition at line 1112 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatFractTy |
Definition at line 1115 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongAccumTy |
Definition at line 1112 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongFractTy |
Definition at line 1115 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortAccumTy |
Definition at line 1112 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortFractTy |
Definition at line 1115 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedAccumTy |
Definition at line 1113 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedFractTy |
Definition at line 1116 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongAccumTy |
Definition at line 1114 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongFractTy |
Definition at line 1117 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortAccumTy |
Definition at line 1113 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortFractTy |
Definition at line 1116 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos |
Definition at line 3415 of file ASTContext.h.
Referenced by clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 648 of file ASTContext.h.
Referenced by cleanupDeallocOrFinalize(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), GCRewriteFinalize(), clang::getKeywordSelector(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), clang::GetUnarySelector(), and clang::ASTImporter::Import().
CanQualType clang::ASTContext::ShortAccumTy |
Definition at line 1107 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ShortFractTy |
Definition at line 1110 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), getCorrespondingSignedType(), getCorrespondingUnsaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ShortTy |
Definition at line 1103 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getCorrespondingSignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SignedCharTy |
Definition at line 1103 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingSignedType(), and InitBuiltinTypes().
const TranslationUnitKind clang::ASTContext::TUKind |
Definition at line 650 of file ASTContext.h.
Referenced by addTranslationUnitDecl().
CanQualType clang::ASTContext::UnknownAnyTy |
Definition at line 1123 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), ClassifyInternal(), ClassifyMemberExpr(), InitBuiltinTypes(), and clang::Sema::SelectBestMethod().
CanQualType clang::ASTContext::UnresolvedTemplateTy |
Definition at line 1122 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedAccumTy |
Definition at line 1109 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedCharTy |
Definition at line 1104 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), clang::Type::getSveEltType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedFractTy |
Definition at line 1111 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedInt128Ty |
Definition at line 1105 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), getIntTypeForBitwidth(), getUInt128Decl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedIntTy |
Definition at line 1104 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getPromotedIntegerType(), getUnsignedWCharType(), InitBuiltinTypes(), clang::Sema::Initialize(), and isPromotableBitField().
CanQualType clang::ASTContext::UnsignedLongAccumTy |
Definition at line 1109 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongFractTy |
Definition at line 1111 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongLongTy |
Definition at line 1105 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getNSUIntegerType(), getPromotedIntegerType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongTy |
Definition at line 1104 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCorrespondingUnsignedType(), getNSUIntegerType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getPromotedIntegerType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::UnsignedShortAccumTy |
Definition at line 1109 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortFractTy |
Definition at line 1111 of file ASTContext.h.
Referenced by getCorrespondingUnsaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortTy |
Definition at line 1104 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
|
mutable |
Definition at line 1162 of file ASTContext.h.
Referenced by getVaListTagDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::VoidPtrTy |
Definition at line 1121 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::ento::SimpleConstraintManager::assumeInternal(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), CheckAtomicAlignment(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::emitBuiltinOSLogFormat(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), getBlockDescriptorExtendedType(), getObjCEncodingTypeSize(), InitBuiltinTypes(), and clang::CodeGen::CodeGenFunction::StartThunk().
CanQualType clang::ASTContext::VoidTy |
Definition at line 1094 of file ASTContext.h.
Referenced by clang::Sema::AdjustDestructorExceptionSpec(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeUnprototypedMustTailThunk(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckOperatorDeleteDeclaration(), clang::ConvertQualTypeToKind(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::deduceClosureReturnType(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitOutlinedFunctionPrologue(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), GeneralizeType(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::ento::CallEvent::getResultType(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), and clang::CodeGen::CodeGenFunction::StartThunk().
CanQualType clang::ASTContext::WCharTy |
Definition at line 1097 of file ASTContext.h.
Referenced by getSignedWCharType(), getWCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WideCharTy |
Definition at line 1098 of file ASTContext.h.
Referenced by clang::Sema::CheckLiteralOperatorDeclaration(), getWideCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WIntTy |
Definition at line 1099 of file ASTContext.h.
Referenced by getWIntType(), and InitBuiltinTypes().