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

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

#include "clang/AST/ASTContext.h"

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

Classes

class  DynTypedNodeList
 Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode. More...
 
class  RawCommentAndCacheFlags
 
struct  SectionInfo
 

Public Types

enum  GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext }
 
enum  InlineVariableDefinitionKind { InlineVariableDefinitionKind::None, InlineVariableDefinitionKind::Weak, InlineVariableDefinitionKind::WeakUnknown, InlineVariableDefinitionKind::Strong }
 
enum  PragmaSectionFlag : unsigned {
  PSF_None = 0, PSF_Read = 0x1, PSF_Write = 0x2, PSF_Execute = 0x4,
  PSF_Implicit = 0x8, PSF_Invalid = 0x80000000U
}
 
typedef llvm::PointerUnion< VarTemplateDecl *, MemberSpecializationInfo * > TemplateOrSpecializationInfo
 A type synonym for the TemplateOrInstantiation mapping. More...
 
typedef llvm::SmallVector< ast_type_traits::DynTypedNode, 2 > ParentVector
 Contains parents of a node. More...
 
typedef llvm::DenseMap< const void *, llvm::PointerUnion4< const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector * > > ParentMapPointers
 Maps from a node to its parents. More...
 
typedef llvm::DenseMap< ast_type_traits::DynTypedNode, llvm::PointerUnion4< const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector * > > ParentMapOtherNodes
 Parent map for nodes without pointer identity. More...
 
typedef CXXMethodVector::const_iterator overridden_cxx_method_iterator
 
typedef llvm::iterator_range< overridden_cxx_method_iteratoroverridden_method_range
 
typedef llvm::iterator_range< import_iterator > import_range
 

Public Member Functions

template<typename NodeT >
DynTypedNodeList getParents (const NodeT &Node)
 Returns the parents of the given node. More...
 
DynTypedNodeList getParents (const ast_type_traits::DynTypedNode &Node)
 
const clang::PrintingPolicygetPrintingPolicy () const
 
void setPrintingPolicy (const clang::PrintingPolicy &Policy)
 
SourceManagergetSourceManager ()
 
const SourceManagergetSourceManager () const
 
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
 
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::StorageAllocatorgetDiagAllocator ()
 
const TargetInfogetTargetInfo () const
 
const TargetInfogetAuxTargetInfo () const
 
QualType getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const
 getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned. More...
 
QualType getRealTypeForBitwidth (unsigned DestWidth) const
 getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth. More...
 
bool AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const
 
const LangOptionsgetLangOpts () const
 
const SanitizerBlacklistgetSanitizerBlacklist () const
 
const XRayFunctionFiltergetXRayFilter () const
 
DiagnosticsEnginegetDiagnostics () const
 
FullSourceLoc getFullLoc (SourceLocation Loc) const
 
RawCommentgetRawCommentForDeclNoCache (const Decl *D) const
 Return the documentation comment attached to a given declaration, without looking into cache. More...
 
RawCommentListgetRawCommentList ()
 
void addComment (const RawComment &RC)
 
const RawCommentgetRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const
 Return the documentation comment attached to a given declaration. More...
 
comments::FullCommentgetCommentForDecl (const Decl *D, const Preprocessor *PP) const
 Return parsed documentation comment attached to a given declaration. More...
 
comments::FullCommentgetLocalCommentForDeclUncached (const Decl *D) const
 Return parsed documentation comment attached to a given declaration. More...
 
comments::FullCommentcloneFullComment (comments::FullComment *FC, const Decl *D) const
 
comments::CommandTraitsgetCommentCommandTraits () const
 
AttrVecgetDeclAttrs (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...
 
MemberSpecializationInfogetInstantiatedFromStaticDataMember (const VarDecl *Var)
 If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated. More...
 
TemplateOrSpecializationInfo getTemplateOrSpecializationInfo (const VarDecl *Var)
 
FunctionDeclgetClassScopeSpecializationPattern (const FunctionDecl *FD)
 
void setClassScopeSpecializationPattern (FunctionDecl *FD, FunctionDecl *Pattern)
 
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...
 
void setTemplateOrSpecializationInfo (VarDecl *Inst, TemplateOrSpecializationInfo TSI)
 
NamedDeclgetInstantiatedFromUsingDecl (NamedDecl *Inst)
 If the given using decl Inst is an instantiation of a (possibly unresolved) using decl from a template instantiation, 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...
 
void setInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst, UsingShadowDecl *Pattern)
 
UsingShadowDeclgetInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst)
 
FieldDeclgetInstantiatedFromUnnamedFieldDecl (FieldDecl *Field)
 
void setInstantiatedFromUnnamedFieldDecl (FieldDecl *Inst, FieldDecl *Tmpl)
 
overridden_cxx_method_iterator overridden_methods_begin (const CXXMethodDecl *Method) const
 
overridden_cxx_method_iterator overridden_methods_end (const CXXMethodDecl *Method) const
 
unsigned overridden_methods_size (const CXXMethodDecl *Method) const
 
overridden_method_range overridden_methods (const CXXMethodDecl *Method) const
 
void addOverriddenMethod (const CXXMethodDecl *Method, const CXXMethodDecl *Overridden)
 Note that the given C++ Method overrides the given Overridden method. 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
 
DeclgetPrimaryMergedDecl (Decl *D)
 
void setPrimaryMergedDecl (Decl *D, Decl *Primary)
 
void mergeDefinitionIntoModule (NamedDecl *ND, Module *M, bool NotifyListeners=true)
 Note that the definition ND has been merged into module M, and should be visible whenever M is visible. 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< uint32_t > IDs)
 
ArrayRef< Decl * > getModuleInitializers (Module *M)
 Get the initializations to perform when importing a module, if any. More...
 
TranslationUnitDeclgetTranslationUnitDecl () const
 
ExternCContextDeclgetExternCContextDecl () const
 
BuiltinTemplateDeclgetMakeIntegerSeqDecl () const
 
BuiltinTemplateDeclgetTypePackElementDecl () const
 
 ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins)
 
 ASTContext (const ASTContext &)=delete
 
ASTContextoperator= (const ASTContext &)=delete
 
 ~ASTContext ()
 
void setExternalSource (IntrusiveRefCntPtr< ExternalASTSource > Source)
 Attach an external AST source to the AST context. More...
 
ExternalASTSourcegetExternalSource () 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...
 
ASTMutationListenergetASTMutationListener () 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
 
BuiltinTemplateDeclbuildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const
 
RecordDeclbuildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const
 Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration. More...
 
TypedefDeclbuildImplicitTypedef (QualType T, StringRef Name) const
 Create a new implicit TU-level typedef declaration. More...
 
TypedefDeclgetInt128Decl () const
 Retrieve the declaration for the 128-bit signed integer type. More...
 
TypedefDeclgetUInt128Decl () const
 Retrieve the declaration for the 128-bit unsigned integer type. More...
 
QualType getAddrSpaceQualType (QualType T, unsigned AddressSpace) const
 Return the uniqued reference to the type for an address space qualified type with the specified type and address space. 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 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 FunctionTypeadjustFunctionType (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...
 
bool hasSameFunctionTypeIgnoringExceptionSpec (QualType T, QualType U)
 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 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 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 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 getBlockDescriptorExtendedType () const
 Gets the struct used to keep track of the extended descriptor for pointer to blocks. More...
 
void setcudaConfigureCallDecl (FunctionDecl *FD)
 
FunctionDeclgetcudaConfigureCallDecl ()
 
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, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a variable array of the specified element type. More...
 
QualType getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a dependently-sized array of the specified element type. More...
 
QualType getIncompleteArrayType (QualType EltTy, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return a unique reference to the type for an incomplete array of the specified element type. More...
 
QualType getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return the unique reference to the type for a constant array of the specified element type. More...
 
QualType getVariableArrayDecayedType (QualType Ty) const
 Returns a vla type where known sizes are replaced with [*]. More...
 
QualType getVectorType (QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const
 Return the unique reference to a vector type of the specified element type and size. 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 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 getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
 Return the unique reference to the type for the specified type declaration. More...
 
QualType getTypedefType (const TypedefNameDecl *Decl, QualType Canon=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 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 (AttributedType::Kind attrKind, QualType modifiedType, QualType equivalentType)
 
QualType getSubstTemplateTypeParmType (const TemplateTypeParmType *Replaced, QualType Replacement) const
 Retrieve a substitution-result type. More...
 
QualType getSubstTemplateTypeParmPackType (const TemplateTypeParmType *Replaced, 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, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const
 
TypeSourceInfogetTemplateSpecializationTypeInfo (TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const
 
QualType getParenType (QualType NamedType) const
 
QualType getElaboratedType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType) const
 
QualType getDependentNameType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const
 
QualType getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, const TemplateArgumentListInfo &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, Optional< unsigned > NumExpansions)
 
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, QualType Canonical=QualType()) 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) const
 GCC extension. More...
 
QualType getTypeOfType (QualType t) const
 getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes. More...
 
QualType getDecltypeType (Expr *e, QualType UnderlyingType) const
 C++11 decltype. More...
 
QualType getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
 Unary type transforms. More...
 
QualType getAutoType (QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent) 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 getDeducedTemplateSpecializationType (TemplateName Template, QualType DeducedType, bool IsDependent) const
 C++1z 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 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 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)
 
TypedefDeclgetCFConstantStringDecl () const
 
RecordDeclgetCFConstantStringTagDecl () const
 
void setObjCConstantStringInterface (ObjCInterfaceDecl *Decl)
 
QualType getObjCConstantStringInterface () const
 
QualType getObjCNSStringType () const
 
void setObjCNSStringType (QualType T)
 
QualType getObjCIdRedefinitionType () const
 Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd. 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...
 
IdentifierInfogetNSObjectName ()
 Retrieve the identifier 'NSObject'. More...
 
IdentifierInfogetNSCopyingName ()
 Retrieve the identifier 'NSCopying'. More...
 
IdentifierInfogetBoolName () const
 Retrieve the identifier 'bool'. More...
 
IdentifierInfogetMakeIntegerSeqName () const
 
IdentifierInfogetTypePackElementName () const
 
QualType getObjCInstanceType ()
 Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. More...
 
TypedefDeclgetObjCInstanceTypeDecl ()
 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...
 
ObjCPropertyImplDeclgetObjCPropertyImplDeclForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const
 
CharUnits getObjCEncodingTypeSize (QualType T) const
 Return the size of type T for Objective-C encoding purpose, in characters. More...
 
TypedefDeclgetObjCIdDecl () const
 Retrieve the typedef corresponding to the predefined id type in Objective-C. More...
 
QualType getObjCIdType () const
 Represents the Objective-CC id type. More...
 
TypedefDeclgetObjCSelDecl () 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...
 
TypedefDeclgetObjCClassDecl () const
 Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. More...
 
QualType getObjCClassType () const
 Represents the Objective-C Class type. More...
 
ObjCInterfaceDeclgetObjCProtocolDecl () const
 Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. More...
 
TypedefDeclgetBOOLDecl () 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...
 
TypedefDeclgetBuiltinVaListDecl () 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...
 
DeclgetVaListTagDecl () const
 Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets. More...
 
TypedefDeclgetBuiltinMSVaListDecl () 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...
 
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...
 
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 getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *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 (TemplateTemplateParmDecl *param, TemplateName replacement) const
 
TemplateName getSubstTemplateTemplateParmPack (TemplateTemplateParmDecl *Param, const TemplateArgument &ArgPack) 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...
 
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
 
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 getTypeAlignIfKnown (QualType T) const
 Return the ABI-specified 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
 
std::pair< CharUnits, CharUnitsgetTypeInfoDataSizeInChars (QualType T) const
 
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (const Type *T) const
 
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (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
 
unsigned getPreferredTypeAlign (const Type *T) const
 Return the "preferred" alignment of the specified type T 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
 Return the alignment in bits that should be given to a global variable with type T. More...
 
CharUnits getAlignOfGlobalVarInChars (QualType T) const
 Return the alignment in characters that should be given to a global variable with type T. More...
 
CharUnits getDeclAlign (const Decl *D, bool ForAlignof=false) const
 Return a conservative estimate of the alignment of the specified decl D. More...
 
const ASTRecordLayoutgetASTRecordLayout (const RecordDecl *D) const
 Get or compute information about the layout of the specified record (struct/union/class) D, which indicates its size and field position information. More...
 
const ASTRecordLayoutgetASTObjCInterfaceLayout (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 ASTRecordLayoutgetASTObjCImplementationLayout (const ObjCImplementationDecl *D) const
 Get or compute information about the layout of the specified Objective-C implementation. More...
 
const CXXMethodDeclgetCurrentKeyFunction (const CXXRecordDecl *RD)
 Get our current best idea for the key function of the given record decl, or NULL 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...
 
bool isNearlyEmpty (const CXXRecordDecl *RD) const
 
VTableContextBasegetVTableContext ()
 
MangleContextcreateMangleContext ()
 
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...
 
CanQualType getCanonicalType (QualType T) const
 Return the canonical (structural) type corresponding to the specified potentially non-canonical type T. More...
 
const TypegetCanonicalType (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
 
QualType getUnqualifiedArrayType (QualType T, Qualifiers &Quals)
 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 UnwrapSimilarPointerTypes (QualType &T1, QualType &T2)
 UnwrapSimilarPointerTypes - If T1 and T2 are pointer types that may be similar (C++ 4.4), replaces T1 and T2 with the type that they point to and return true. More...
 
NestedNameSpecifiergetCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const
 Retrieves the "canonical" nested name specifier for a given nested name specifier. More...
 
CallingConv getDefaultCallingConvention (bool isVariadic, bool IsCXXMethod) const
 Retrieves the default calling convention for the current target. More...
 
TemplateName getCanonicalTemplateName (TemplateName Name) const
 Retrieves the "canonical" template name that refers to a given template. More...
 
bool hasSameTemplateName (TemplateName X, TemplateName Y)
 Determine whether the given template names refer to the same template. More...
 
TemplateArgument getCanonicalTemplateArgument (const TemplateArgument &Arg) const
 Retrieve the "canonical" template argument. More...
 
const ArrayTypegetAsArrayType (QualType T) const
 Type Query functions. More...
 
const ConstantArrayTypegetAsConstantArrayType (QualType T) const
 
const VariableArrayTypegetAsVariableArrayType (QualType T) const
 
const IncompleteArrayTypegetAsIncompleteArrayType (QualType T) const
 
const DependentSizedArrayTypegetAsDependentSizedArrayType (QualType T) const
 
QualType getBaseElementType (const ArrayType *VAT) const
 Return the innermost element type of an array type. 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...
 
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...
 
QualType getFloatingTypeOfSizeWithinDomain (QualType typeSize, QualType typeDomain) const
 Return a real floating point or a complex type (based on typeDomain/typeSize). More...
 
unsigned getTargetAddressSpace (QualType T) const
 
unsigned getTargetAddressSpace (Qualifiers Q) const
 
unsigned getTargetAddressSpace (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 (unsigned AS) const
 
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 (QualType LHS, QualType RHS, bool ForCompare)
 ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType. More...
 
bool ObjCQualifiedClassTypesAreCompatible (QualType LHS, QualType 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)
 
QualType mergeFunctionTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=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 doFunctionTypesMatchOnExtParameterInfos (const FunctionProtoType *FromFunctionType, const FunctionProtoType *ToFunctionType)
 
void ResetObjCLayout (const ObjCContainerDecl *CD)
 
unsigned getIntWidth (QualType T) const
 
QualType getCorrespondingUnsignedType (QualType T) 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)
 
ObjCImplementationDeclgetObjCImplementation (ObjCInterfaceDecl *D)
 Get the implementation of the ObjCInterfaceDecl D, or NULL if none exists. More...
 
ObjCCategoryImplDeclgetObjCImplementation (ObjCCategoryDecl *D)
 Get the implementation of the ObjCCategoryDecl D, or NULL 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 ObjCMethodDeclgetObjCMethodRedeclaration (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 ObjCInterfaceDeclgetObjContainingInterface (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 setBlockVarCopyInits (VarDecl *VD, Expr *Init)
 Set the copy inialization expression of a block var decl. More...
 
ExprgetBlockVarCopyInits (const VarDecl *VD)
 Get the copy initialization expression of the VarDecl VD, or NULL if none exists. More...
 
TypeSourceInfoCreateTypeSourceInfo (QualType T, unsigned Size=0) const
 Allocate an uninitialized TypeSourceInfo. More...
 
TypeSourceInfogetTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const
 Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location. More...
 
void AddDeallocation (void(*Callback)(void *), void *Data)
 Add a deallocation callback that will be invoked when the ASTContext is destroyed. More...
 
template<typename T >
void addDestruction (T *Ptr)
 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)
 
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...
 
const CXXConstructorDeclgetCopyConstructorForExceptionObject (CXXRecordDecl *RD)
 
void addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD)
 
void addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND)
 
TypedefNameDeclgetTypedefNameForUnnamedTagDecl (const TagDecl *TD)
 
void addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD)
 
DeclaratorDeclgetDeclaratorForUnnamedTagDecl (const TagDecl *TD)
 
void setManglingNumber (const NamedDecl *ND, unsigned Number)
 
unsigned getManglingNumber (const NamedDecl *ND) const
 
void setStaticLocalNumber (const VarDecl *VD, unsigned Number)
 
unsigned getStaticLocalNumber (const VarDecl *VD) const
 
MangleNumberingContextgetManglingNumberContext (const DeclContext *DC)
 Retrieve the context for computing mangling numbers in the given DeclContext. More...
 
std::unique_ptr< MangleNumberingContextcreateMangleNumberingContext () const
 
void setParameterIndex (const ParmVarDecl *D, unsigned index)
 Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield. 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...
 
APValuegetMaterializedTemporaryValue (const MaterializeTemporaryExpr *E, bool MayCreate)
 Get the storage for the constant value of a materialized temporary of static storage duration. More...
 
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...
 

Static Public Member Functions

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

Public Attributes

IdentifierTableIdents
 
SelectorTableSelectors
 
Builtin::ContextBuiltinInfo
 
DeclarationNameTable DeclarationNames
 
IntrusiveRefCntPtr< ExternalASTSourceExternalSource
 
ASTMutationListenerListener
 
RawCommentList Comments
 All comments in this translation unit. More...
 
bool CommentsLoaded
 True if comments are already loaded from ExternalASTSource. More...
 
llvm::DenseMap< const Decl *, RawCommentAndCacheFlagsRedeclComments
 Mapping from declarations to comments attached to any redeclaration. More...
 
llvm::DenseMap< const Decl *, comments::FullComment * > ParsedComments
 Mapping from declarations to parsed comments attached to any redeclaration. More...
 
CanQualType VoidTy
 
CanQualType BoolTy
 
CanQualType CharTy
 
CanQualType WCharTy
 
CanQualType WideCharTy
 
CanQualType WIntTy
 
CanQualType Char16Ty
 
CanQualType Char32Ty
 
CanQualType SignedCharTy
 
CanQualType ShortTy
 
CanQualType IntTy
 
CanQualType LongTy
 
CanQualType LongLongTy
 
CanQualType Int128Ty
 
CanQualType UnsignedCharTy
 
CanQualType UnsignedShortTy
 
CanQualType UnsignedIntTy
 
CanQualType UnsignedLongTy
 
CanQualType UnsignedLongLongTy
 
CanQualType UnsignedInt128Ty
 
CanQualType FloatTy
 
CanQualType DoubleTy
 
CanQualType LongDoubleTy
 
CanQualType Float128Ty
 
CanQualType HalfTy
 
CanQualType FloatComplexTy
 
CanQualType DoubleComplexTy
 
CanQualType LongDoubleComplexTy
 
CanQualType Float128ComplexTy
 
CanQualType VoidPtrTy
 
CanQualType NullPtrTy
 
CanQualType DependentTy
 
CanQualType OverloadTy
 
CanQualType BoundMemberTy
 
CanQualType UnknownAnyTy
 
CanQualType BuiltinFnTy
 
CanQualType PseudoObjectTy
 
CanQualType ARCUnbridgedCastTy
 
CanQualType ObjCBuiltinIdTy
 
CanQualType ObjCBuiltinClassTy
 
CanQualType ObjCBuiltinSelTy
 
CanQualType ObjCBuiltinBoolTy
 
CanQualType OCLSamplerTy
 
CanQualType OCLEventTy
 
CanQualType OCLClkEventTy
 
CanQualType OCLQueueTy
 
CanQualType OCLReserveIDTy
 
CanQualType OMPArraySectionTy
 
QualType AutoDeductTy
 
QualType AutoRRefDeductTy
 
DeclVaListTagDecl
 
llvm::StringMap< SectionInfoSectionInfos
 

Static Public Attributes

static unsigned NumImplicitDefaultConstructors
 The number of implicitly-declared default constructors. More...
 
static unsigned NumImplicitDefaultConstructorsDeclared
 The number of implicitly-declared default constructors for which declarations were built. More...
 
static unsigned NumImplicitCopyConstructors
 The number of implicitly-declared copy constructors. More...
 
static unsigned NumImplicitCopyConstructorsDeclared
 The number of implicitly-declared copy constructors for which declarations were built. More...
 
static unsigned NumImplicitMoveConstructors
 The number of implicitly-declared move constructors. More...
 
static unsigned NumImplicitMoveConstructorsDeclared
 The number of implicitly-declared move constructors for which declarations were built. More...
 
static unsigned NumImplicitCopyAssignmentOperators
 The number of implicitly-declared copy assignment operators. More...
 
static unsigned NumImplicitCopyAssignmentOperatorsDeclared
 The number of implicitly-declared copy assignment operators for which declarations were built. More...
 
static unsigned NumImplicitMoveAssignmentOperators
 The number of implicitly-declared move assignment operators. More...
 
static unsigned NumImplicitMoveAssignmentOperatorsDeclared
 The number of implicitly-declared move assignment operators for which declarations were built. More...
 
static unsigned NumImplicitDestructors
 The number of implicitly-declared destructors. More...
 
static unsigned NumImplicitDestructorsDeclared
 The number of implicitly-declared destructors for which declarations were built. More...
 

Friends

class NestedNameSpecifier
 
class ASTDeclReader
 
class ASTReader
 
class ASTWriter
 
class CXXRecordDecl
 
class DeclContext
 
class DeclarationNameTable
 

Detailed Description

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 128 of file ASTContext.h.

Member Typedef Documentation

◆ import_range

typedef llvm::iterator_range<import_iterator> clang::ASTContext::import_range

Definition at line 915 of file ASTContext.h.

◆ overridden_cxx_method_iterator

typedef CXXMethodVector::const_iterator clang::ASTContext::overridden_cxx_method_iterator

Definition at line 879 of file ASTContext.h.

◆ overridden_method_range

Definition at line 888 of file ASTContext.h.

◆ ParentMapOtherNodes

typedef llvm::DenseMap< ast_type_traits::DynTypedNode, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > clang::ASTContext::ParentMapOtherNodes

Parent map for nodes without pointer identity.

We store a full DynTypedNode for all keys.

Definition at line 537 of file ASTContext.h.

◆ ParentMapPointers

typedef llvm::DenseMap<const void *, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > clang::ASTContext::ParentMapPointers

Maps from a node to its parents.

This is used for nodes that have pointer identity only, which are more common and we can save space by only storing a unique pointer to them.

Definition at line 529 of file ASTContext.h.

◆ ParentVector

Contains parents of a node.

Definition at line 521 of file ASTContext.h.

◆ TemplateOrSpecializationInfo

A type synonym for the TemplateOrInstantiation mapping.

Definition at line 369 of file ASTContext.h.

Member Enumeration Documentation

◆ GetBuiltinTypeError

Enumerator
GE_None 

No error.

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 1863 of file ASTContext.h.

◆ InlineVariableDefinitionKind

Enumerator
None 

Not an inline variable.

Weak 

Weak definition of inline variable.

WeakUnknown 

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

Strong 

Strong definition.

Definition at line 2640 of file ASTContext.h.

◆ PragmaSectionFlag

Enumerator
PSF_None 
PSF_Read 
PSF_Write 
PSF_Execute 
PSF_Implicit 
PSF_Invalid 

Definition at line 2688 of file ASTContext.h.

Constructor & Destructor Documentation

◆ ASTContext() [1/2]

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

Definition at line 734 of file ASTContext.cpp.

References clang::TranslationUnitDecl::Create().

◆ ASTContext() [2/2]

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

◆ ~ASTContext()

ASTContext::~ASTContext ( )

Definition at line 762 of file ASTContext.cpp.

Member Function Documentation

◆ addComment()

void clang::ASTContext::addComment ( const RawComment RC)
inline

◆ addCopyConstructorForExceptionObject()

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

Definition at line 9255 of file ASTContext.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl().

◆ AddDeallocation()

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

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

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

Definition at line 820 of file ASTContext.cpp.

◆ addDeclaratorForUnnamedTagDecl()

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

Definition at line 9272 of file ASTContext.cpp.

◆ addDestruction()

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

If T isn't trivially destructible, calls AddDeallocation to register it for destruction.

Definition at line 2496 of file ASTContext.h.

Referenced by clang::VarDecl::evaluateValue(), clang::FunctionTemplateDecl::newCommon(), clang::ClassTemplateDecl::newCommon(), clang::TypeAliasTemplateDecl::newCommon(), and clang::VarTemplateDecl::newCommon().

◆ addedLocalImportDecl()

void ASTContext::addedLocalImportDecl ( ImportDecl Import)

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

Definition at line 1392 of file ASTContext.cpp.

References clang::Decl::isFromASTFile().

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

◆ addLazyModuleInitializers()

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

Definition at line 956 of file ASTContext.cpp.

References Inits.

◆ addModuleInitializer()

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

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

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

Definition at line 930 of file ASTContext.cpp.

References Inits.

◆ addOverriddenMethod()

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

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

Definition at line 1366 of file ASTContext.cpp.

References clang::Decl::isCanonicalDecl().

Referenced by clang::CXXMethodDecl::addOverriddenMethod().

◆ addressSpaceMapManglingFor()

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

Definition at line 2326 of file ASTContext.h.

References clang::LangAS::FirstTargetAddressSpace.

◆ addTypedefNameForUnnamedTagDecl()

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

Definition at line 9262 of file ASTContext.cpp.

◆ adjustDeducedFunctionResultType()

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

◆ adjustExceptionSpec()

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

References clang::TypeLoc::getFullDataSizeForType(), getFunctionTypeWithExceptionSpec(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::ValueDecl::setType().

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

◆ adjustFunctionType()

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

◆ Allocate() [1/2]

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

Definition at line 623 of file ASTContext.h.

Referenced by clang::DeclGroup::Create(), clang::CXXTryStmt::Create(), clang::TemplateParameterList::Create(), clang::ObjCArrayLiteral::Create(), clang::OMPParallelDirective::Create(), clang::ObjCDictionaryLiteral::Create(), clang::CoroutineBodyStmt::Create(), clang::ASTTemplateArgumentListInfo::Create(), clang::ObjCTypeParamList::create(), clang::AttributedStmt::Create(), clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPSectionsDirective::Create(), clang::OMPPrivateClause::Create(), clang::OMPSectionDirective::Create(), clang::OMPSingleDirective::Create(), clang::OMPFirstprivateClause::Create(), clang::OMPMasterDirective::Create(), clang::OMPCriticalDirective::Create(), clang::OMPParallelForDirective::Create(), clang::StringLiteral::Create(), clang::OMPLastprivateClause::Create(), clang::OMPParallelForSimdDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPParallelSectionsDirective::Create(), clang::OMPTaskDirective::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPBarrierDirective::Create(), clang::OMPTaskwaitDirective::Create(), clang::OMPTaskgroupDirective::Create(), clang::OffsetOfExpr::Create(), clang::OMPFlushDirective::Create(), clang::OMPOrderedDirective::Create(), OMPAlignedClause::Create(), clang::OMPTargetDirective::Create(), clang::TypeTraitExpr::Create(), clang::OMPTargetDataDirective::Create(), OMPCopyinClause::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::OMPTargetExitDataDirective::Create(), clang::MemberExpr::Create(), clang::OMPTargetParallelDirective::Create(), OMPCopyprivateClause::Create(), clang::OMPTargetParallelForDirective::Create(), OMPFlushClause::Create(), clang::OMPTeamsDirective::Create(), OMPDependClause::Create(), clang::OMPCancellationPointDirective::Create(), clang::OMPCancelDirective::Create(), clang::OMPTaskLoopDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::OMPTaskLoopSimdDirective::Create(), clang::OMPDistributeDirective::Create(), clang::ExprWithCleanups::Create(), clang::OMPTargetUpdateDirective::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::OMPDistributeParallelForDirective::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::OMPDistributeSimdDirective::Create(), clang::OMPTargetParallelForSimdDirective::Create(), clang::OMPTargetSimdDirective::Create(), clang::OMPTeamsDistributeDirective::Create(), clang::UnresolvedMemberExpr::Create(), OMPMapClause::Create(), clang::OMPTeamsDistributeSimdDirective::Create(), clang::OMPTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDirective::Create(), clang::OMPTargetTeamsDistributeDirective::Create(), clang::OMPTargetTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTargetTeamsDistributeSimdDirective::Create(), OMPToClause::Create(), OMPFromClause::Create(), clang::DesignatedInitExpr::Create(), OMPUseDevicePtrClause::Create(), OMPIsDevicePtrClause::Create(), clang::PseudoObjectExpr::Create(), clang::LambdaExpr::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::ObjCArrayLiteral::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPTargetDataDirective::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPTargetEnterDataDirective::CreateEmpty(), clang::OMPTargetExitDataDirective::CreateEmpty(), clang::OMPTargetParallelDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::OMPTargetParallelForDirective::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), clang::OMPTargetSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeDirective::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), OMPMapClause::CreateEmpty(), clang::OMPTeamsDistributeSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForDirective::CreateEmpty(), clang::OMPTargetTeamsDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeSimdDirective::CreateEmpty(), OMPToClause::CreateEmpty(), OMPFromClause::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), OMPUseDevicePtrClause::CreateEmpty(), OMPIsDevicePtrClause::CreateEmpty(), getCanonicalTemplateSpecializationType(), getDeclAttrs(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getTemplateSpecializationType(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::ObjCMethodDecl::setAsRedeclaration(), and clang::TemplateArgument::TemplateArgument().

◆ Allocate() [2/2]

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

Definition at line 626 of file ASTContext.h.

◆ AnyObjCImplementation()

bool clang::ASTContext::AnyObjCImplementation ( )
inline

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

Definition at line 2434 of file ASTContext.h.

◆ applyObjCProtocolQualifiers()

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

◆ areCommonBaseCompatible()

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

◆ areComparableObjCPointerTypes()

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

Definition at line 7782 of file ASTContext.cpp.

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

◆ areCompatibleVectorTypes()

bool ASTContext::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.

Note
This ignores whether they are target-specific (AltiVec or Neon) types.

Definition at line 7176 of file ASTContext.cpp.

References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::Type::getAs(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), hasSameType(), hasSameUnqualifiedType(), and clang::Type::isVectorType().

Referenced by IsVectorConversion().

◆ AtomicUsesUnsupportedLibcall()

bool ASTContext::AtomicUsesUnsupportedLibcall ( const AtomicExpr E) const

Definition at line 9307 of file ASTContext.cpp.

◆ BlockRequiresCopying()

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

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

References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInits(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), 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.

◆ buildBuiltinTemplateDecl()

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

◆ buildImplicitRecord()

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

◆ buildImplicitTypedef()

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

◆ canAssignObjCInterfaces() [1/2]

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

◆ canAssignObjCInterfaces() [2/2]

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

◆ canAssignObjCInterfacesInBlockPointer()

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

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

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

Definition at line 7410 of file ASTContext.cpp.

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

Referenced by mergeTypes().

◆ canBindObjCObjectType()

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

Definition at line 7794 of file ASTContext.cpp.

References canAssignObjCInterfaces(), and getObjCObjectPointerType().

◆ cloneFullComment()

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

◆ CollectInheritedProtocols()

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

References clang::ObjCInterfaceDecl::getSuperClass().

Referenced by canAssignObjCInterfaces(), QIdProtocolsAdoptObjCObjectProtocols(), and UseNSOptionsMacro().

◆ CountNonClassIvars()

unsigned ASTContext::CountNonClassIvars ( const ObjCInterfaceDecl OI) const

◆ createMangleContext()

MangleContext * ASTContext::createMangleContext ( )

◆ createMangleNumberingContext()

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

◆ CreateTypeSourceInfo()

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

Allocate an uninitialized TypeSourceInfo.

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

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

Definition at line 2218 of file ASTContext.cpp.

References clang::TypeLoc::getFullDataSizeForType().

Referenced by getTemplateSpecializationTypeInfo(), and getTrivialTypeSourceInfo().

◆ Deallocate()

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

◆ DeclMustBeEmitted()

bool ASTContext::DeclMustBeEmitted ( const Decl D)

◆ deduplicateMergedDefinitonsFor()

void ASTContext::deduplicateMergedDefinitonsFor ( NamedDecl ND)

Clean up the merged definition list.

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

Definition at line 900 of file ASTContext.cpp.

References getExternalSource().

◆ DeepCollectObjCIvars()

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

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

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

Definition at line 2060 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::getSuperClass().

◆ doFunctionTypesMatchOnExtParameterInfos()

bool ASTContext::doFunctionTypesMatchOnExtParameterInfos ( const FunctionProtoType FromFunctionType,
const FunctionProtoType ToFunctionType 
)

◆ DumpRecordLayout()

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

◆ eraseDeclAttrs()

void ASTContext::eraseDeclAttrs ( const Decl D)

Erase the attributes corresponding to the given declaration.

Definition at line 1212 of file ASTContext.cpp.

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

◆ getAddrSpaceQualType()

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

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

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

Definition at line 2285 of file ASTContext.cpp.

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

Referenced by checkConditionalPointerCompatibility(), and HandleAddressSpaceTypeAttribute().

◆ getAdjustedParameterType()

QualType ASTContext::getAdjustedParameterType ( QualType  T) const

Perform adjustment on the parameter type of a function.

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

Definition at line 4957 of file ASTContext.cpp.

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

Referenced by getSignatureParameterType().

◆ getAdjustedType() [1/2]

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

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

Definition at line 2486 of file ASTContext.cpp.

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

◆ getAdjustedType() [2/2]

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

Definition at line 1151 of file ASTContext.h.

◆ getAlignOfGlobalVar()

unsigned ASTContext::getAlignOfGlobalVar ( QualType  T) const

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

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

Definition at line 2034 of file ASTContext.cpp.

References getTargetInfo(), getTypeAlign(), and max().

Referenced by getAlignOfGlobalVarInChars().

◆ getAlignOfGlobalVarInChars()

CharUnits ASTContext::getAlignOfGlobalVarInChars ( QualType  T) const

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

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

Definition at line 2040 of file ASTContext.cpp.

References getAlignOfGlobalVar(), and toCharUnitsFromBits().

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

◆ getAllocator()

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

Definition at line 619 of file ASTContext.h.

Referenced by clang::RawComment::parse().

◆ getArrayDecayedType()

QualType ASTContext::getArrayDecayedType ( QualType  Ty) const

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

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

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

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

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

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

Definition at line 4988 of file ASTContext.cpp.

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

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), BuildCookedLiteralOperatorCall(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), doRewriteToUTF8StringBoxedExpressionHelper(), GetBuiltinType(), getCanonicalParamType(), getDecayedType(), and IsStandardConversion().

◆ getAsArrayType()

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

Type Query functions.

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

Definition at line 4899 of file ASTContext.cpp.

References clang::Qualifiers::empty(), clang::VariableArrayType::getBracketsRange(), clang::QualType::getCanonicalType(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::ArrayType::getIndexTypeCVRQualifiers(), getQualifiedType(), clang::VariableArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::CheckAllocatedType(), CheckUnaryTypeTraitTypeCompleteness(), DeduceFromInitializerList(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::emitDestroy(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), getArrayDecayedType(), clang::QualType::getBaseTypeIdentifier(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), GetGCAttrTypeForType(), isSafeToConvert(), isSameEntity(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), makeZeroElementRegion(), mergeTypes(), roundUpSizeToCharAlignment(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), and warnBracedScalarInit().

◆ getAsConstantArrayType()

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

◆ getAsDependentSizedArrayType()

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

Definition at line 2235 of file ASTContext.h.

Referenced by DeduceTemplateArgumentsByTypeMatch().

◆ getAsIncompleteArrayType()

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

◆ getASTAllocatedMemory()

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

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

Definition at line 633 of file ASTContext.h.

◆ getASTMutationListener()

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

Retrieve a pointer to the AST mutation listener associated with this AST context, if any.

Definition at line 1029 of file ASTContext.h.

Referenced by checkDeclInTargetContext(), clang::ObjCCategoryDecl::Create(), clang::Decl::getASTMutationListener(), clang::Decl::markUsed(), and mergeDefinitionIntoModule().

◆ getASTObjCImplementationLayout()

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

◆ getASTObjCInterfaceLayout()

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

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

Definition at line 2240 of file ASTContext.cpp.

Referenced by LookupFieldBitOffset().

◆ getASTRecordLayout()

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

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

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

Definition at line 2923 of file RecordLayoutBuilder.cpp.

References clang::RecordDecl::getDefinition(), clang::DeclContext::hasExternalLexicalStorage(), clang::TagDecl::isCompleteDefinition(), clang::Decl::isInvalidDecl(), and isMsLayout().

Referenced by AddIndirectPrimaryBases(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::CodeGen::CGCXXABI::buildThisParam(), classifyType(), detectAmbiguousBases(), DumpRecordLayout(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EmitNullBaseClassInitialization(), emitRTtypeidCall(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffset(), GetGCAttrTypeForType(), getOffsetOfBaseWithVBPtr(), clang::CodeGen::CodeGenTBAA::getTBAAInfoForVTablePtr(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), getTypeInfoDataSizeInChars(), getTypeInfoVTable(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), hasDefaultCXXMethodCC(), isDesignatorAtObjectEnd(), recordUsesEBO(), and RequiresVtordisp().

◆ getAsVariableArrayType()

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

◆ getAtomicType()

QualType ASTContext::getAtomicType ( QualType  T) const

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

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

Definition at line 4469 of file ASTContext.cpp.

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

Referenced by getVariableArrayDecayedType(), clang::Sema::Initialize(), and mergeTypes().

◆ getAttributedType()

QualType ASTContext::getAttributedType ( AttributedType::Kind  attrKind,
QualType  modifiedType,
QualType  equivalentType 
)

◆ getAutoDeductType()

QualType ASTContext::getAutoDeductType ( ) const

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

getAutoDeductType - Get type pattern for deducing against 'auto'.

Definition at line 4496 of file ASTContext.cpp.

References clang::Auto, AutoDeductTy, clang::QualType::isNull(), and clang::TypeAlignment.

Referenced by getAutoRRefDeductType(), and getAutoType().

◆ getAutoRRefDeductType()

QualType ASTContext::getAutoRRefDeductType ( ) const

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

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

Definition at line 4506 of file ASTContext.cpp.

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

◆ getAutoType()

QualType ASTContext::getAutoType ( QualType  DeducedType,
AutoTypeKeyword  Keyword,
bool  IsDependent 
) 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 4424 of file ASTContext.cpp.

References clang::Auto, getAutoDeductType(), clang::QualType::isNull(), clang::AutoType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::DeduceTemplateArguments(), and clang::TreeTransform< Derived >::RebuildAutoType().

◆ getAuxTargetInfo()

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

Definition at line 644 of file ASTContext.h.

◆ getBaseElementType() [1/2]

QualType ASTContext::getBaseElementType ( const ArrayType VAT) const

◆ getBaseElementType() [2/2]

QualType ASTContext::getBaseElementType ( QualType  QT) const

◆ getBlockDescriptorExtendedType()

QualType ASTContext::getBlockDescriptorExtendedType ( ) const

◆ getBlockDescriptorType()

QualType ASTContext::getBlockDescriptorType ( ) const

◆ getBlockPointerType()

QualType ASTContext::getBlockPointerType ( QualType  T) const

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

References getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isFunctionType(), clang::BlockPointerType::Profile(), and clang::TypeAlignment.

Referenced by checkConditionalPointerCompatibility(), clang::ento::MemRegionManager::getVarRegion(), and mergeTypes().

◆ getBlockVarCopyInits()

Expr * ASTContext::getBlockVarCopyInits ( const VarDecl VD)

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

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

Definition at line 2201 of file ASTContext.cpp.

References clang::Decl::hasAttr().

Referenced by BlockRequiresCopying(), and buildByrefHelpers().

◆ getBOOLDecl()

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

Retrieve declaration of 'BOOL' typedef.

Definition at line 1751 of file ASTContext.h.

◆ getBoolName()

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

Retrieve the identifier 'bool'.

Definition at line 1581 of file ASTContext.h.

References clang::IdentifierTable::get().

◆ getBOOLType()

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

type of 'BOOL' type.

Definition at line 1761 of file ASTContext.h.

◆ getBuiltinMSVaListDecl()

TypedefDecl * ASTContext::getBuiltinMSVaListDecl ( ) const

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

Definition at line 6933 of file ASTContext.cpp.

References CreateMSVaListDecl().

◆ getBuiltinMSVaListType()

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

Retrieve the type of the __builtin_ms_va_list type.

Definition at line 1789 of file ASTContext.h.

◆ GetBuiltinType()

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

◆ getBuiltinVaListDecl()

TypedefDecl * ASTContext::getBuiltinVaListDecl ( ) const

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

Definition at line 6915 of file ASTContext.cpp.

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

Referenced by getVaListTagDecl().

◆ getBuiltinVaListType()

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

Retrieve the type of the __builtin_va_list type.

Definition at line 1775 of file ASTContext.h.

◆ getByrefLifetime()

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

Returns true, if given type has a known lifetime.

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

Definition at line 5492 of file ASTContext.cpp.

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

◆ getCanonicalFunctionResultType()

CanQualType ASTContext::getCanonicalFunctionResultType ( QualType  ResultType) const

◆ getCanonicalNestedNameSpecifier()

NestedNameSpecifier * ASTContext::getCanonicalNestedNameSpecifier ( NestedNameSpecifier NNS) const

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

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

namespace N {
struct S {
template<typename T> struct X { typename T* type; };
};
}
template<typename T> struct Y {
typename N::S::X<T>::type member;
};

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 4844 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::QualType::getTypePtr(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by getDependentNameType(), getDependentTemplateName(), and getDependentTemplateSpecializationType().

◆ getCanonicalParamType()

CanQualType ASTContext::getCanonicalParamType ( QualType  T) const

◆ getCanonicalTemplateArgument()

TemplateArgument ASTContext::getCanonicalTemplateArgument ( const TemplateArgument Arg) const

◆ getCanonicalTemplateName()

TemplateName ASTContext::getCanonicalTemplateName ( 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 4743 of file ASTContext.cpp.

References clang::TemplateName::DependentTemplate, clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateArgument(), clang::TemplateName::getKind(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::SubstTemplateTemplateParmStorage::getReplacement(), getSubstTemplateTemplateParmPack(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.

Referenced by DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), and hasSameTemplateName().

◆ getCanonicalTemplateSpecializationType()

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

◆ getCanonicalType() [1/2]

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

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

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

Definition at line 2078 of file ASTContext.h.

References clang::QualType::getCanonicalType().

Referenced by clang::Sema::ActOnStartCXXMemberReference(), buildDeclareReductionRef(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckExceptionSpecSubset(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CompareStandardConversionSequences(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalAllocationFunction(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), EmitX86_64VAArgFromMemory(), clang::ento::SValBuilder::evalCast(), findDecomposableBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), GetCFNumberSize(), getComplexType(), getConstantArrayType(), getDecayedType(), getDecltypeType(), clang::getDeclUsageType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), getLValueReferenceType(), getMemberPointerType(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getPackExpansionType(), getParenType(), getPointerType(), getRValueReferenceType(), getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTagInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), getTemplateSpecializationType(), getTypedefType(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), clang::ento::MemRegionManager::getVarRegion(), getVectorType(), clang::ento::SValBuilder::haveSameType(), clang::ASTImporter::Import(), InitCatchParam(), isCanonicalExceptionSpecification(), isObjCReceiverType(), IsStandardConversion(), clang::Expr::isUnusedResultAWarning(), isWeakLinkedClass(), MarkUsedTemplateParameters(), clang::analyze_format_string::ArgType::matchesType(), matchTypes(), mergeExceptionSpecs(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypes(), OpenCLArithmeticConversions(), clang::Sema::ProcessPropertyDecl(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), ResolveOverloadedFunctionForReferenceBinding(), rewriteToObjCProperty(), clang::CXXRecordDecl::setBases(), supportsNilWithFloatRet(), SymbolNameForMethod(), TryConstCast(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TryUserDefinedConversion(), clang::CodeGen::CodeGenFunction::TypeOfSelfObject(), clang::ento::ExprEngine::VisitBlockExpr(), and clang::ento::ExprEngine::VisitInitListExpr().

◆ getCanonicalType() [2/2]

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

◆ getCFConstantStringDecl()

TypedefDecl * ASTContext::getCFConstantStringDecl ( ) const

◆ getCFConstantStringTagDecl()

RecordDecl * ASTContext::getCFConstantStringTagDecl ( ) const

Definition at line 5349 of file ASTContext.cpp.

References getCFConstantStringDecl().

◆ getCFConstantStringType()

QualType ASTContext::getCFConstantStringType ( ) const

Return the C structure type used to represent constant CFStrings.

Definition at line 5356 of file ASTContext.cpp.

References getCFConstantStringDecl(), and getTypedefType().

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

◆ getCharWidth()

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

◆ getClassScopeSpecializationPattern()

FunctionDecl * ASTContext::getClassScopeSpecializationPattern ( const FunctionDecl FD)

◆ getCommentCommandTraits()

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

◆ getCommentForDecl()

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

Return parsed documentation comment attached to a given declaration.

Returns NULL if no comment is attached.

Parameters
PPthe Preprocessor used with this TU. Could be NULL if preprocessor is not available.

Definition at line 440 of file ASTContext.cpp.

References addRedeclaredMethods(), cloneFullComment(), clang::ObjCMethodDecl::findPropertyDecl(), clang::Type::getAs(), clang::Decl::getCanonicalDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), clang::ObjCMethodDecl::isPropertyAccessor(), and ParsedComments.

◆ getComplexType() [1/2]

QualType ASTContext::getComplexType ( QualType  T) const

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

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

Definition at line 2432 of file ASTContext.cpp.

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

Referenced by InitBuiltinTypes().

◆ getComplexType() [2/2]

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

Definition at line 1137 of file ASTContext.h.

References getComplexType().

◆ getConstantArrayElementCount()

uint64_t ASTContext::getConstantArrayElementCount ( const ConstantArrayType CA) const

Return number of constant array elements.

getConstantArrayElementCount - Returns number of constant array elements.

Definition at line 5030 of file ASTContext.cpp.

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

Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable().

◆ getConstantArrayType()

QualType ASTContext::getConstantArrayType ( QualType  EltTy,
const llvm::APInt &  ArySizeIn,
ArrayType::ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const

◆ getConstType()

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

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

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

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

Definition at line 1112 of file ASTContext.h.

References getComplexType(), and clang::QualType::withConst().

◆ getCopyConstructorForExceptionObject()

const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject ( CXXRecordDecl RD)

Definition at line 9250 of file ASTContext.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl().

Referenced by emitCXXDestructor().

◆ getCorrespondingUnsignedType()

QualType ASTContext::getCorrespondingUnsignedType ( QualType  T) const

◆ getcudaConfigureCallDecl()

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

Definition at line 1188 of file ASTContext.h.

◆ getCurrentKeyFunction()

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

Get our current best idea for the key function of the given record decl, or NULL 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 3010 of file RecordLayoutBuilder.cpp.

References bool, computeKeyFunction(), clang::CXXRecordDecl::getDefinition(), and clang::Result.

Referenced by DeclMustBeEmitted(), and clang::CodeGen::CodeGenVTables::isVTableExternal().

◆ getCVRQualifiedType()

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

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

Definition at line 1795 of file ASTContext.h.

Referenced by clang::Sema::CheckPointerToMemberOperands(), and TryObjectArgumentInitialization().

◆ getDecayedType() [1/2]

QualType ASTContext::getDecayedType ( QualType  T) const

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

References getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.

Referenced by getAdjustedParameterType(), and getExceptionObjectType().

◆ getDecayedType() [2/2]

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

Definition at line 1160 of file ASTContext.h.

◆ getDeclAlign()

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

◆ getDeclaratorForUnnamedTagDecl()

DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl ( const TagDecl TD)

Definition at line 9277 of file ASTContext.cpp.

◆ getDeclAttrs()

AttrVec & ASTContext::getDeclAttrs ( const Decl D)

Retrieve the attributes for the given declaration.

Definition at line 1201 of file ASTContext.cpp.

References Allocate(), and clang::Result.

Referenced by clang::Decl::getAttrs(), and clang::Decl::getIdentifierNamespaceForKind().

◆ getDecltypeType()

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

C++11 decltype.

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

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

Definition at line 4355 of file ASTContext.cpp.

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

◆ getDeducedTemplateSpecializationType()

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

C++1z 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 4448 of file ASTContext.cpp.

References clang::DeducedTemplateSpecializationType::Profile(), and clang::TypeAlignment.

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

◆ getDefaultCallingConvention()

CallingConv ASTContext::getDefaultCallingConvention ( bool  isVariadic,
bool  IsCXXMethod 
) const

◆ getDependentNameType()

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

◆ getDependentSizedArrayType()

QualType ASTContext::getDependentSizedArrayType ( QualType  elementType,
Expr numElements,
ArrayType::ArraySizeModifier  ASM,
unsigned  elementTypeQuals,
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 2894 of file ASTContext.cpp.

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

Referenced by getAsArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and clang::InitializationSequence::Perform().

◆ getDependentSizedExtVectorType()

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

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

Definition at line 3061 of file ASTContext.cpp.

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

◆ getDependentTemplateName() [1/2]

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

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

Referenced by getDependentTemplateName().

◆ getDependentTemplateName() [2/2]

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

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

Definition at line 7034 of file ASTContext.cpp.

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

◆ getDependentTemplateSpecializationType() [1/2]

QualType ASTContext::getDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
const TemplateArgumentListInfo Args 
) const

◆ getDependentTemplateSpecializationType() [2/2]

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

◆ getDiagAllocator()

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

Definition at line 639 of file ASTContext.h.

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

◆ getDiagnostics()

DiagnosticsEngine & ASTContext::getDiagnostics ( ) const

◆ getElaboratedType()

QualType ASTContext::getElaboratedType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
QualType  NamedType 
) const

◆ getEnumType()

QualType ASTContext::getEnumType ( const EnumDecl Decl) const

Definition at line 3483 of file ASTContext.cpp.

References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.

Referenced by getInjectedClassNameType().

◆ getExceptionObjectType()

QualType ASTContext::getExceptionObjectType ( QualType  T) const

◆ getExternalSource()

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

◆ getExternCContextDecl()

ExternCContextDecl * ASTContext::getExternCContextDecl ( ) const

◆ getExtVectorType()

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

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.

Precondition
VectorType must be a built-in type.

VectorType must be a built-in type.

Definition at line 3032 of file ASTContext.cpp.

References clang::VectorType::GenericVector, getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::Type::isDependentType(), clang::VectorType::Profile(), and clang::TypeAlignment.

Referenced by checkVectorShift(), OpenCLConvertScalarsToVectors(), and warnBracedScalarInit().

◆ getFieldOffset()

uint64_t ASTContext::getFieldOffset ( const ValueDecl FD) const

◆ getFILEType()

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

Retrieve the C FILE type.

Definition at line 1613 of file ASTContext.h.

◆ getFloatingTypeOfSizeWithinDomain()

QualType ASTContext::getFloatingTypeOfSizeWithinDomain ( QualType  Size,
QualType  Domain 
) const

Return a real floating point or a complex type (based on typeDomain/typeSize).

getFloatingTypeOfSizeWithinDomain - Returns a real floating point or a complex type (based on typeDomain/typeSize).

Parameters
typeDomaina real floating point or complex type.
typeSizea real floating point or complex type.

'typeDomain' is a real floating point or complex type. 'typeSize' is a real floating point or complex type.

Definition at line 5061 of file ASTContext.cpp.

References DoubleComplexTy, DoubleRank, DoubleTy, Float128ComplexTy, Float128Rank, Float128Ty, FloatComplexTy, FloatRank, FloatTy, getFloatingRank(), HalfRank, HalfTy, clang::Type::isComplexType(), clang::Type::isRealFloatingType(), LongDoubleComplexTy, LongDoubleRank, and LongDoubleTy.

◆ getFloatingTypeOrder()

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

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

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

'double' == '_Complex double').

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

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

Definition at line 5089 of file ASTContext.cpp.

References BoolTy, CharTy, getFloatingRank(), getIntWidth(), Int128Ty, IntTy, clang::Type::isCanonicalUnqualified(), LongLongTy, LongTy, and ShortTy.

Referenced by clang::StandardConversionSequence::getNarrowingKind(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().

◆ getFloatTypeSemantics()

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

◆ getFullLoc()

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

◆ getFunctionNoProtoType() [1/2]

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

References getCanonicalFunctionResultType(), isCanonicalResultType(), clang::FunctionNoProtoType::Profile(), and clang::TypeAlignment.

Referenced by adjustFunctionType(), EmitFunctionDeclPointer(), GetBuiltinType(), clang::ento::MemRegionManager::getVarRegion(), mergeFunctionTypes(), and clang::QualType::substObjCTypeArgs().

◆ getFunctionNoProtoType() [2/2]

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

Definition at line 1276 of file ASTContext.h.

◆ getFunctionType()

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

◆ GetGVALinkageForFunction()

GVALinkage ASTContext::GetGVALinkageForFunction ( const FunctionDecl FD) const

◆ GetGVALinkageForVariable()

GVALinkage ASTContext::GetGVALinkageForVariable ( const VarDecl VD)

◆ getIncompleteArrayType()

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

◆ getInjectedClassNameType()

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

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

Definition at line 3406 of file ASTContext.cpp.

References getEnumType(), clang::CXXRecordDecl::getPreviousDecl(), getRecordType(), getTypedefType(), NeedsInjectedClassNameType(), and clang::TypeAlignment.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().

◆ getInjectedTemplateArg()

TemplateArgument ASTContext::getInjectedTemplateArg ( NamedDecl ParamDecl)

◆ getInjectedTemplateArgs()

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

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

Definition at line 3910 of file ASTContext.cpp.

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

◆ getInlineVariableDefinitionKind()

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

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

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

Definition at line 5557 of file ASTContext.cpp.

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

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

◆ getInnerObjCOwnership()

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

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

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

Definition at line 5228 of file ASTContext.cpp.

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

◆ getInstantiatedFromStaticDataMember()

MemberSpecializationInfo * ASTContext::getInstantiatedFromStaticDataMember ( const VarDecl Var)

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

Definition at line 1222 of file ASTContext.cpp.

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

◆ getInstantiatedFromUnnamedFieldDecl()

FieldDecl * ASTContext::getInstantiatedFromUnnamedFieldDecl ( FieldDecl Field)

Definition at line 1314 of file ASTContext.cpp.

Referenced by isInstantiationOf().

◆ getInstantiatedFromUsingDecl()

NamedDecl * ASTContext::getInstantiatedFromUsingDecl ( NamedDecl Inst)

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

Definition at line 1275 of file ASTContext.cpp.

Referenced by isInstantiationOf(), and isInstantiationOfUnresolvedUsingDecl().

◆ getInstantiatedFromUsingShadowDecl()

UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst)

Definition at line 1298 of file ASTContext.cpp.

Referenced by isInstantiationOf().

◆ getInt128Decl()

TypedefDecl * ASTContext::getInt128Decl ( ) const

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

Definition at line 1033 of file ASTContext.cpp.

References buildImplicitTypedef(), and Int128Ty.

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

◆ getIntegerTypeOrder()

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

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

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

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

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

Definition at line 5256 of file ASTContext.cpp.

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

Referenced by canConvertIntToOtherIntTy(), handleIntegerConversion(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().

◆ getIntMaxType()

CanQualType ASTContext::getIntMaxType ( ) const

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

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

Definition at line 4530 of file ASTContext.cpp.

References clang::TargetInfo::getIntMaxType().

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getIntPtrType()

QualType ASTContext::getIntPtrType ( ) const

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

Definition at line 4553 of file ASTContext.cpp.

References clang::TargetInfo::getIntPtrType().

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

◆ getIntTypeForBitwidth()

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

getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned.

Returns empty type if there is no appropriate target types.

Definition at line 9185 of file ASTContext.cpp.

References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.

Referenced by AddDirectArgument(), CheckOpenMPLoop(), createKmpTaskTRecordDecl(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::emitDoacrossOrdered(), clang::CodeGen::emitForNext(), clang::CodeGen::emitThreadIDAddress(), clang::CodeGen::getTgtBinaryDescriptorQTy(), and clang::CodeGen::getTgtOffloadEntryQTy().

◆ getIntWidth()

unsigned ASTContext::getIntWidth ( QualType  T) const

◆ getjmp_bufType()

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

Retrieve the C jmp_buf type.

Definition at line 1625 of file ASTContext.h.

◆ getLangOpts()

const LangOptions& clang::ASTContext::getLangOpts ( ) const
inline

Definition at line 659 of file ASTContext.h.

Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), buildBlockDescriptor(), buildGlobalBlock(), buildImplicitRecord(), clang::arcmt::trans::canApplyWeak(), clang::Decl::canBeWeakImported(), CastsAwayConstness(), clang::VarDecl::checkInitIsICE(), ClassifyConditional(), ClassifyDecl(), ClassifyUnnamed(), computeBlockInfo(), computeDeclRefDependence(), computeKeyFunction(), computeLVForDecl(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXRecordDecl::Create(), clang::ObjCInterfaceDecl::Create(), clang::ObjCProtocolDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::ObjCInterfaceDecl::CreateDeserialized(), clang::ObjCProtocolDecl::CreateDeserialized(), clang::EnumConstantDecl::CreateDeserialized(), clang::EnumDecl::CreateDeserialized(), clang::RecordDecl::CreateDeserialized(), clang::CreateHTMLPrinter(), DiagnoseSwitchLabelsFallthrough(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), findDirectBaseWithType(), clang::Sema::FindProtocolDeclaration(), clang::arcmt::trans::findSemiAfterLocation(), clang::FormatASTNodeDiagnosticArgument(), GenerateFixForUnusedDecl(), GetAllocationSite(), GetBuiltinType(), getByrefLifetime(), getCallingConvMangling(), clang::ento::SValBuilder::getConditionType(), getDeclForMerging(), GetGCAttrTypeForType(), clang::index::IndexingContext::getLangOpts(), clang::ento::CheckerContext::getLangOpts(), clang::ASTWriter::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), clang::LinkageComputer::getLVForDecl(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCGCAttrKind(), GetRuntimeFunctionDecl(), getTypeInfoDataSizeInChars(), clang::Decl::hasLocalOwningModuleStorage(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSuperInitCall(), clang::Sema::isAcceptableNestedNameSpecifier(), isARCNilInitializedLocal(), isCanonicalExceptionSpecification(), clang::Expr::isCXX11ConstantExpr(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), isInterestingIdentifier(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), clang::RecordDecl::isMsStruct(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::Expr::isNullPointerConstant(), isObjCReceiverType(), clang::QualType::isPODType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), clang::NSAPI::isSubclassOfNSClass(), clang::VarDecl::isThisDeclarationADefinition(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), LocPropertyAttribute(), mayInlineDecl(), mergeDefinitionIntoModule(), mergeTypes(), clang::ento::ConditionBRVisitor::patternMatch(), PrintStats(), clang::CodeGen::CodeGenModule::Release(), resolveAllocationOverload(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::edit::rewriteToObjCLiteralSyntax(), roundUpSizeToCharAlignment(), clang::tooling::ReplaceNodeWithTemplate::run(), clang::CXXRecordDecl::setBases(), shouldNotRewriteImmediateMessageArgs(), typesAreCompatible(), UnwrapSimilarPointerTypes(), clang::ASTDeclReader::UpdateDecl(), useInlineVisibilityHidden(), and clang::ASTWriter::WriteAST().

◆ getLegacyIntegralTypeEncoding()

void ASTContext::getLegacyIntegralTypeEncoding ( QualType PointeeTy) const

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

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

Definition at line 5869 of file ASTContext.cpp.

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

◆ getLifetimeQualifiedType()

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

Return a type with the given lifetime qualifier.

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

Definition at line 1823 of file ASTContext.h.

References clang::Qualifiers::addObjCLifetime(), and clang::QualType::getObjCLifetime().

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

◆ getLocalCommentForDeclUncached()

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

Return parsed documentation comment attached to a given declaration.

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

Definition at line 435 of file ASTContext.cpp.

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

◆ getLogicalOperationType()

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

The result type of logical operations, '<', '>', '!=', etc.

Definition at line 1656 of file ASTContext.h.

Referenced by clang::Sema::BuildTypeTrait(), and clang::ento::BasicValueFactory::getTruthValue().

◆ getLValueReferenceType()

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

◆ getMakeIntegerSeqDecl()

BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl ( ) const

◆ getMakeIntegerSeqName()

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

Definition at line 1587 of file ASTContext.h.

References clang::IdentifierTable::get().

Referenced by getMakeIntegerSeqDecl(), and LookupBuiltin().

◆ getManglingNumber()

unsigned ASTContext::getManglingNumber ( const NamedDecl ND) const

◆ getManglingNumberContext()

MangleNumberingContext & ASTContext::getManglingNumberContext ( const DeclContext DC)

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

Definition at line 9236 of file ASTContext.cpp.

References createMangleNumberingContext().

◆ getMaterializedTemporaryValue()

APValue * ASTContext::getMaterializedTemporaryValue ( const MaterializeTemporaryExpr E,
bool  MayCreate 
)

Get the storage for the constant value of a materialized temporary of static storage duration.

Definition at line 9293 of file ASTContext.cpp.

◆ getMemberPointerType()

QualType ASTContext::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.

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

References getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isCanonicalUnqualified(), clang::MemberPointerType::Profile(), and clang::TypeAlignment.

Referenced by decomposeTypeForEH(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), GetTypeOfFunction(), IsStandardConversion(), and TryStaticMemberPointerUpcast().

◆ getModuleInitializers()

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

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

Definition at line 964 of file ASTContext.cpp.

References Inits, and clang::None.

◆ getModulesWithMergedDefinition()

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

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

Definition at line 938 of file ASTContext.h.

References clang::None.

Referenced by clang::Sema::diagnoseMissingImport(), hasVisibleDeclarationImpl(), and hasVisibleDefaultArgument().

◆ getNameForTemplate()

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

◆ getNextLocalImport()

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

Definition at line 911 of file ASTContext.h.

◆ getNSCopyingName()

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

Retrieve the identifier 'NSCopying'.

Definition at line 1572 of file ASTContext.h.

References clang::IdentifierTable::get().

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

◆ getNSObjectName()

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

Retrieve the identifier 'NSObject'.

Definition at line 1563 of file ASTContext.h.

References clang::IdentifierTable::get().

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

◆ getObjCClassDecl()

TypedefDecl * ASTContext::getObjCClassDecl ( ) const

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

Definition at line 6558 of file ASTContext.cpp.

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

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

◆ getObjCClassRedefinitionType()

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

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

Definition at line 1538 of file ASTContext.h.

References clang::QualType::isNull().

Referenced by ShouldTryAgainWithRedefinitionType().

◆ getObjCClassType()

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

Represents the Objective-C Class type.

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

Definition at line 1742 of file ASTContext.h.

Referenced by LookupMemberExpr().

◆ getObjCConstantStringInterface()

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

Definition at line 1511 of file ASTContext.h.

◆ getObjCEncodingForBlock()

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

Return the encoded type for this block declaration.

getObjCEncodingForBlock - Return the encoded type for this block declaration.

Definition at line 5584 of file ASTContext.cpp.

Referenced by buildBlockDescriptor().

◆ getObjCEncodingForFunctionDecl()

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

Emit the encoded type for the function Decl into S.

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

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

Definition at line 5641 of file ASTContext.cpp.

◆ getObjCEncodingForMethodDecl()

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

Referenced by SymbolNameForMethod().

◆ getObjCEncodingForMethodParameter()

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

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

If Extended, include class names and block object types.

Definition at line 5682 of file ASTContext.cpp.

◆ getObjCEncodingForPropertyDecl()

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

getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.

getObjCEncodingForPropertyDecl - Return the encoded type for this property declaration.

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

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

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

Definition at line 5797 of file ASTContext.cpp.

References clang::ObjCPropertyImplDecl::Dynamic, and getObjCPropertyImplDeclForPropertyDecl().

◆ getObjCEncodingForPropertyType()

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

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

Definition at line 5893 of file ASTContext.cpp.

◆ getObjCEncodingForType()

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

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

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

Definition at line 5881 of file ASTContext.cpp.

◆ getObjCEncodingForTypeQualifier()

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

Put the string version of the type qualifiers QT into S.

Definition at line 6525 of file ASTContext.cpp.

References clang::Decl::OBJC_TQ_Bycopy, clang::Decl::OBJC_TQ_Byref, clang::Decl::OBJC_TQ_In, clang::Decl::OBJC_TQ_Inout, clang::Decl::OBJC_TQ_Oneway, and clang::Decl::OBJC_TQ_Out.

◆ getObjCEncodingTypeSize()

CharUnits ASTContext::getObjCEncodingTypeSize ( QualType  type) const

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

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

Definition at line 5534 of file ASTContext.cpp.

References getTypeSizeInChars(), IntTy, clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::CharUnits::isPositive(), max(), VoidPtrTy, and clang::CharUnits::Zero().

◆ getObjCGCAttrKind()

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

References clang::Qualifiers::GCNone, clang::Type::getAs(), clang::Type::getCanonicalTypeInternal(), getLangOpts(), clang::QualType::getObjCGCAttr(), clang::PointerType::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::LangOptions::NonGC, and clang::Qualifiers::Strong.

Referenced by getMaxAtomicAccessSize().

◆ getObjCGCQualType()

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

Return the uniqued reference to the type for an Objective-C gc-qualified type.

The retulting type has a union of the qualifiers from T and the gc attribute.

Definition at line 2304 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(), and clang::QualifierCollector::strip().

Referenced by handleObjCGCTypeAttr(), and mergeTypes().

◆ getObjCIdDecl()

TypedefDecl * ASTContext::getObjCIdDecl ( ) const

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

Definition at line 6541 of file ASTContext.cpp.

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

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

◆ getObjCIdRedefinitionType()

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

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

Definition at line 1525 of file ASTContext.h.

References clang::QualType::isNull().

Referenced by ShouldTryAgainWithRedefinitionType().

◆ getObjCIdType()

QualType clang::ASTContext::getObjCIdType ( ) const
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 1720 of file ASTContext.h.

Referenced by clang::Sema::ActOnFinishFullExpr(), CheckKeyForObjCARCConversion(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCInstanceTypeDecl(), SymbolNameForMethod(), and TryContextuallyConvertToObjCPointer().

◆ getObjCImplementation() [1/2]

ObjCImplementationDecl * ASTContext::getObjCImplementation ( ObjCInterfaceDecl D)

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

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

Definition at line 2144 of file ASTContext.cpp.

Referenced by clang::ObjCMethodDecl::setMethodParams().

◆ getObjCImplementation() [2/2]

ObjCCategoryImplDecl * ASTContext::getObjCImplementation ( ObjCCategoryDecl D)

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

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

Definition at line 2152 of file ASTContext.cpp.

◆ getObjCInstanceType()

QualType clang::ASTContext::getObjCInstanceType ( )
inline

Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.

Definition at line 1601 of file ASTContext.h.

Referenced by getReturnTypeForMethod(), IsValidIdentifier(), and ReplaceWithInstancetype().

◆ getObjCInstanceTypeDecl()

TypedefDecl * ASTContext::getObjCInstanceTypeDecl ( )

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

Definition at line 5515 of file ASTContext.cpp.

References buildImplicitTypedef(), and getObjCIdType().

◆ getObjCInterfaceType()

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

◆ getObjCMethodRedeclaration()

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

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

Definition at line 2174 of file ASTContext.cpp.

Referenced by clang::ObjCMethodDecl::setMethodParams(), and setObjCMethodRedeclaration().

◆ getObjCNSStringType()

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

Definition at line 1515 of file ASTContext.h.

◆ getObjCObjectPointerType()

QualType ASTContext::getObjCObjectPointerType ( QualType  ObjectT) const

◆ getObjCObjectType() [1/2]

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

◆ getObjCObjectType() [2/2]

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

◆ getObjContainingInterface()

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

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

that is part of an interface, otherwise returns null.

Definition at line 2184 of file ASTContext.cpp.

References clang::Decl::getDeclContext().

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

◆ getObjCPropertyImplDeclForPropertyDecl()

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

Definition at line 5752 of file ASTContext.cpp.

References clang::ObjCImplDecl::property_impls().

Referenced by getObjCEncodingForPropertyDecl().

◆ getObjCProtocolDecl()

ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl ( ) const

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

Definition at line 6567 of file ASTContext.cpp.

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

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

◆ getObjCProtoType()

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

Retrieve the type of the Objective-C Protocol class.

Definition at line 1766 of file ASTContext.h.

◆ getObjCSelDecl()

TypedefDecl * ASTContext::getObjCSelDecl ( ) const

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

Definition at line 6550 of file ASTContext.cpp.

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

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

◆ getObjCSelRedefinitionType()

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

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

Definition at line 1551 of file ASTContext.h.

References clang::QualType::isNull().

Referenced by LookupMemberExpr().

◆ getObjCSelType()

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

Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.

Definition at line 1730 of file ASTContext.h.

Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), isWeakLinkedClass(), and SymbolNameForMethod().

◆ getObjCSuperType()

QualType ASTContext::getObjCSuperType ( ) const

Returns the C struct type for objc_super.

Definition at line 5360 of file ASTContext.cpp.

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

◆ getObjCTypeParamType()

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

◆ getOffsetOfBaseWithVBPtr()

CharUnits ASTContext::getOffsetOfBaseWithVBPtr ( const CXXRecordDecl RD) const

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

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

Definition at line 2044 of file ASTContext.cpp.

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

◆ getOpenMPDefaultSimdAlign()

unsigned ASTContext::getOpenMPDefaultSimdAlign ( QualType  T) const

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

Definition at line 1953 of file ASTContext.cpp.

References clang::TargetInfo::getSimdDefaultAlign(), getTargetInfo(), and clang::Type::isSpecificBuiltinType().

◆ getOverloadedTemplateName()

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

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

Definition at line 6950 of file ASTContext.cpp.

◆ getOverriddenMethods()

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

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

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

Definition at line 1372 of file ASTContext.cpp.

References clang::ObjCMethodDecl::getOverriddenMethods(), overridden_methods_begin(), and overridden_methods_end().

Referenced by getCommentForDecl().

◆ getPackExpansionType()

QualType ASTContext::getPackExpansionType ( QualType  Pattern,
Optional< unsigned NumExpansions 
)

◆ getParameterIndex()

unsigned ASTContext::getParameterIndex ( const ParmVarDecl D) const

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

Definition at line 9285 of file ASTContext.cpp.

Referenced by clang::ParmVarDecl::isParameterPack().

◆ getParents() [1/2]

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

Returns the parents of the given node.

Note that this will lazily compute the parents of all nodes and store them for later retrieval. Thus, the first call is O(n) in the number of AST nodes.

Caveats and FIXMEs: Calculating the parent map over all AST nodes will need to load the full AST. This can be undesirable in the case where the full AST is expensive to create (for example, when using precompiled header preambles). Thus, there are good opportunities for optimization here. One idea is to walk the given node downwards, looking for references to declaration contexts - once a declaration context is found, compute the parent map for the declaration context; if that can satisfy the request, loading the whole AST can be avoided. Note that this is made more complex by statements in templates having multiple parents - those problems can be solved by building closure over the templated parts of the AST, which also avoids touching large parts of the AST. Additionally, we will want to add an interface to already give a hint where to search for the parents, for example when looking at a statement inside a certain function.

'NodeT' can be one of Decl, Stmt, Type, TypeLoc, NestedNameSpecifier or NestedNameSpecifierLoc.

Definition at line 602 of file ASTContext.h.

References clang::serialized_diags::create(), and Node.

◆ getParents() [2/2]

ASTContext::DynTypedNodeList ASTContext::getParents ( const ast_type_traits::DynTypedNode Node)

◆ getParenType()

QualType ASTContext::getParenType ( QualType  NamedType) const

◆ getPointerDiffType()

QualType ASTContext::getPointerDiffType ( ) const

◆ getPointerType() [1/2]

QualType ASTContext::getPointerType ( QualType  T) const

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

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

Definition at line 2460 of file ASTContext.cpp.

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

Referenced by AddDirectArgument(), AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), captureThis(), clang::ento::StoreManager::CastRetrievedVal(), castValueFromUintptr(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkOpenCLPipePacketType(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::CodeGen::createRuntimeFunction(), clang::Sema::DeclareGlobalNewDelete(), decomposeTypeForEH(), emitCXXDestructor(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), EmitFunctionDeclPointer(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::analyze_printf::PrintfSpecifier::getArgType(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCanonicalParamType(), getCFConstantStringDecl(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), clang::TypeName::getFullyQualifiedType(), GetGCAttrTypeForType(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionCodeRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), GetThisType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLVectorSplat(), InitBuiltinTypes(), IsStandardConversion(), mergeTypes(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), recordFixedType(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), TryConstCast(), tryObjCWritebackConversion(), and TryReinterpretCast().

◆ getPointerType() [2/2]

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

Definition at line 1144 of file ASTContext.h.

◆ getPreferredTypeAlign()

unsigned ASTContext::getPreferredTypeAlign ( const Type T) const

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

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 to overalign a data type.

Definition at line 1996 of file ASTContext.cpp.

References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::TargetInfo::allowsLargerPreferedTypeAlignment(), clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), getTypeInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Type::isMemberPointerType(), clang::Type::isSpecificBuiltinType(), and max().

Referenced by getDeclAlign().

◆ getPrimaryMergedDecl()

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

Definition at line 920 of file ASTContext.h.

References clang::Result.

Referenced by clang::getPrimaryMergedDecl().

◆ getPrintingPolicy()

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

◆ getProcessIDType()

QualType ASTContext::getProcessIDType ( ) const

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

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

Definition at line 4569 of file ASTContext.cpp.

References clang::TargetInfo::getProcessIDType().

◆ getPromotedIntegerType()

QualType ASTContext::getPromotedIntegerType ( QualType  Promotable) const

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

References clang::Type::getAs(), getIntWidth(), getTypeSize(), IntTy, clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), LongLongTy, LongTy, UnsignedIntTy, UnsignedLongLongTy, and UnsignedLongTy.

Referenced by clang::analyze_format_string::ArgType::matchesType().

◆ getQualifiedTemplateName()

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

Retrieve the template name that represents a qualified template name such as std::vector.

Definition at line 6974 of file ASTContext.cpp.

References clang::QualifiedTemplateName::Profile().

Referenced by clang::TypeName::getFullyQualifiedTemplateName().

◆ getQualifiedType() [1/3]

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

◆ getQualifiedType() [2/3]

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

◆ getQualifiedType() [3/3]

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

Return a type with additional qualifiers.

Definition at line 1814 of file ASTContext.h.

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

◆ getRawCFConstantStringType()

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

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

Definition at line 1500 of file ASTContext.h.

◆ getRawCommentForAnyRedecl()

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

Return the documentation comment attached to a given declaration.

Returns NULL if no comment is attached.

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

Definition at line 332 of file ASTContext.cpp.

References clang::ASTContext::RawCommentAndCacheFlags::getKind(), clang::ASTContext::RawCommentAndCacheFlags::getOriginalDecl(), clang::ASTContext::RawCommentAndCacheFlags::getRaw(), clang::ASTContext::RawCommentAndCacheFlags::NoCommentInDecl, and RedeclComments.

Referenced by clang::CodeCompletionResult::CreateCodeCompletionString(), and getCommentForDecl().

◆ getRawCommentForDeclNoCache()

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

◆ getRawCommentList()

RawCommentList& clang::ASTContext::getRawCommentList ( )
inline

Definition at line 751 of file ASTContext.h.

◆ getReadPipeType()

QualType ASTContext::getReadPipeType ( QualType  T) const

Return a read_only pipe type for the specified type.

Definition at line 3383 of file ASTContext.cpp.

◆ getRealTypeForBitwidth()

QualType ASTContext::getRealTypeForBitwidth ( unsigned  DestWidth) const

getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.

Returns empty type if there is no appropriate target types.

Definition at line 9197 of file ASTContext.cpp.

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

◆ getRecordType()

QualType ASTContext::getRecordType ( const RecordDecl Decl) const

◆ getRestrictType()

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

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

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

Definition at line 1092 of file ASTContext.h.

References clang::QualType::withFastQualifiers().

◆ getRValueReferenceType()

QualType ASTContext::getRValueReferenceType ( QualType  T) const

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

References clang::Type::getAs(), getCanonicalType(), clang::ReferenceType::getPointeeType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), and clang::TypeAlignment.

Referenced by EvaluateBinaryTypeTrait(), getAutoRRefDeductType(), clang::TypeName::getFullyQualifiedType(), getVariableArrayDecayedType(), clang::InitializationSequence::Perform(), and TryClassUnification().

◆ getSanitizerBlacklist()

const SanitizerBlacklist& clang::ASTContext::getSanitizerBlacklist ( ) const
inline

◆ getSideTableAllocatedMemory()

size_t ASTContext::getSideTableAllocatedMemory ( ) const

Return the total memory used for various side tables.

Definition at line 9164 of file ASTContext.cpp.

◆ getsigjmp_bufType()

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

Retrieve the C sigjmp_buf type.

Definition at line 1637 of file ASTContext.h.

◆ getSignatureParameterType()

QualType ASTContext::getSignatureParameterType ( QualType  T) const

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

Definition at line 4963 of file ASTContext.cpp.

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

◆ getSignedWCharType()

QualType ASTContext::getSignedWCharType ( ) const

Return the type of "signed wchar_t".

getSignedWCharType - Return the type of "signed wchar_t".

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

Definition at line 4541 of file ASTContext.cpp.

References WCharTy.

◆ getSizeType()

CanQualType ASTContext::getSizeType ( ) const

◆ getSourceManager() [1/2]

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

◆ getSourceManager() [2/2]

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

Definition at line 617 of file ASTContext.h.

◆ getStaticLocalNumber()

unsigned ASTContext::getStaticLocalNumber ( const VarDecl VD) const

Definition at line 9230 of file ASTContext.cpp.

◆ getSubstTemplateTemplateParm()

TemplateName ASTContext::getSubstTemplateTemplateParm ( TemplateTemplateParmDecl param,
TemplateName  replacement 
) const

◆ getSubstTemplateTemplateParmPack()

TemplateName ASTContext::getSubstTemplateTemplateParmPack ( TemplateTemplateParmDecl Param,
const TemplateArgument ArgPack 
) const

◆ getSubstTemplateTypeParmPackType()

QualType ASTContext::getSubstTemplateTypeParmPackType ( const TemplateTypeParmType Replaced,
const TemplateArgument ArgPack 
)

◆ getSubstTemplateTypeParmType()

QualType ASTContext::getSubstTemplateTypeParmType ( const TemplateTypeParmType Replaced,
QualType  Replacement 
) const

Retrieve a substitution-result type.

Definition at line 3518 of file ASTContext.cpp.

References clang::QualType::isCanonical(), clang::SubstTemplateTypeParmType::Profile(), and clang::TypeAlignment.

◆ getTagDeclType()

QualType ASTContext::getTagDeclType ( const TagDecl Decl) const

◆ getTargetAddressSpace() [1/3]

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

◆ getTargetAddressSpace() [2/3]

unsigned clang::ASTContext::getTargetAddressSpace ( Qualifiers  Q) const
inline

Definition at line 2316 of file ASTContext.h.

References clang::Qualifiers::getAddressSpace().

◆ getTargetAddressSpace() [3/3]

unsigned ASTContext::getTargetAddressSpace ( unsigned  AS) const

◆ getTargetDefaultAlignForAttributeAligned()

unsigned ASTContext::getTargetDefaultAlignForAttributeAligned ( ) const

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

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

Definition at line 2028 of file ASTContext.cpp.

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

◆ getTargetInfo()

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

Definition at line 643 of file ASTContext.h.

Referenced by clang::GCCAsmStmt::AnalyzeAsmString(), clang::Sema::BuildCXXNew(), clang::arcmt::trans::canApplyWeak(), CheckFormatString(), checkForMultipleExportedDefaultConstructors(), checkObjCMethodX86VectorTypes(), checkVAStartABI(), computeKeyFunction(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), EmitGlobalDeclMetadata(), clang::CodeGen::emitThreadPrivateVarDefinition(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::getAddrOfThreadPrivate(), getAlignOfGlobalVar(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCallingConvMangling(), getDeclAlign(), getDefaultCallingConvention(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), getIntTypeForBitwidth(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMSMemberPointerSlots(), getObjCEncodingForPrimitiveKind(), getOpenMPDefaultSimdAlign(), clang::CodeGen::getOrCreateThreadPrivateCache(), getPaddingDiagFromTagKind(), getRealTypeForBitwidth(), getTargetDefaultAlignForAttributeAligned(), getTargetNullPointerValue(), getVisibilityOf(), HandleNeonVectorTypeAttr(), clang::BackendConsumer::HandleTranslationUnit(), hasNewExtendedAlignment(), clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), isArc4RandomAvailable(), clang::Type::isIncompleteType(), clang::CodeGen::swiftcall::isLegalIntegerType(), isMsLayout(), isMSStaticDataMemberInlineDefinition(), clang::FunctionDecl::isMSVCRTEntryPoint(), isPermittedNeonBaseType(), isVarDeclStrongDefinition(), clang::MangleContext::mangleName(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuSupports(), clang::StringLiteral::setString(), supportsNilWithFloatRet(), TryReinterpretCast(), TryStaticMemberPointerUpcast(), and warnBracedScalarInit().

◆ getTargetNullPointerValue()

uint64_t ASTContext::getTargetNullPointerValue ( QualType  QT) const

◆ getTemplateOrSpecializationInfo()

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

◆ getTemplateSpecializationType() [1/2]

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

◆ getTemplateSpecializationType() [2/2]

QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
const TemplateArgumentListInfo Args,
QualType  Canon = QualType() 
) const

◆ getTemplateSpecializationTypeInfo()

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

◆ getTemplateTypeParmType()

QualType ASTContext::getTemplateTypeParmType ( unsigned  Depth,
unsigned  Index,
bool  ParameterPack,
TemplateTypeParmDecl TTPDecl = 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 3576 of file ASTContext.cpp.

Referenced by clang::TemplateTypeParmDecl::Create().

◆ getTranslationUnitDecl()

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

Definition at line 956 of file ASTContext.h.

Referenced by clang::Sema::ActOnPragmaDetectMismatch(), clang::Sema::ActOnPragmaMSComment(), clang::ASTImporter::ASTImporter(), buildImplicitRecord(), buildImplicitTypedef(), clang::arcmt::trans::checkAPIUses(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), clang::CreateASTViewer(), clang::Sema::DeclareGlobalAllocationFunction(), EvaluateBinaryTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindUsualDeallocationFunction(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), GetDeclSpecTypeForDeclarator(), getExternCContextDecl(), getObjCProtocolDecl(), getParents(), GetRuntimeFunctionDecl(), LookupVisibleDecls(), clang::arcmt::trans::makeAssignARCSafe(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), resolveAllocationOverload(), clang::arcmt::trans::rewriteAutoreleasePool(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), SymbolNameForMethod(), traverseAST(), and clang::arcmt::trans::GCAttrsTraverser::traverseTU().

◆ getTrivialTypeSourceInfo()

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

◆ getTypeAlign() [1/2]

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

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

Definition at line 1941 of file ASTContext.h.

References clang::TypeInfo::Align.

Referenced by clang::Sema::BuildCXXNew(), getAlignOfGlobalVar(), getTypeAlignIfKnown(), and getTypeAlignInChars().

◆ getTypeAlign() [2/2]

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

◆ getTypeAlignIfKnown()

unsigned ASTContext::getTypeAlignIfKnown ( QualType  T) const

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

Definition at line 1582 of file ASTContext.cpp.

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

Referenced by hasNewExtendedAlignment().

◆ getTypeAlignInChars() [1/2]

CharUnits ASTContext::getTypeAlignInChars ( QualType  T) const

◆ getTypeAlignInChars() [2/2]

CharUnits ASTContext::getTypeAlignInChars ( const Type T) const

Definition at line 1988 of file ASTContext.cpp.

References getTypeAlign(), and toCharUnitsFromBits().

◆ getTypeDeclType()

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

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

Definition at line 1295 of file ASTContext.h.

References getRecordType(), and Replacement.

Referenced by clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::CXXRecordDecl::CreateLambda(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareGlobalNewDelete(), detectAmbiguousBases(), clang::InitializationSequence::Diagnose(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), clang::Sema::FindAllocationFunctions(), FindBaseInitializer(), clang::Sema::FindProtocolDeclaration(), clang::FormatASTNodeDiagnosticArgument(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), getInjectedTemplateArg(), getPaddingDiagFromTagKind(), getTagDeclType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), isNonPlacementDeallocationFunction(), IsStandardConversion(), clang::Expr::isTemporaryObject(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildEnumType(), clang::TreeTransform< Derived >::RebuildRecordType(), clang::TreeTransform< Derived >::RebuildTypedefType(), clang::Sema::RequireCompleteDeclContext(), roundUpSizeToCharAlignment(), TryObjectArgumentInitialization(), and TryStaticMemberPointerUpcast().

◆ getTypedefNameForUnnamedTagDecl()

TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl ( const TagDecl TD)

Definition at line 9268 of file ASTContext.cpp.

◆ getTypedefType()

QualType ASTContext::getTypedefType ( const TypedefNameDecl Decl,
QualType  Canonical = 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 3457 of file ASTContext.cpp.

References getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), and clang::TypeAlignment.

Referenced by getCFConstantStringType(), and getInjectedClassNameType().

◆ getTypeInfo() [1/2]

TypeInfo ASTContext::getTypeInfo ( const Type T) const

◆ getTypeInfo() [2/2]

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

Definition at line 1914 of file ASTContext.h.

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

Referenced by getTypeInfo().

◆ getTypeInfoDataSizeInChars()

std::pair< CharUnits, CharUnits > ASTContext::getTypeInfoDataSizeInChars ( QualType  T) const

◆ getTypeInfoInChars() [1/2]

std::pair< CharUnits, CharUnits > ASTContext::getTypeInfoInChars ( const Type T) const

◆ getTypeInfoInChars() [2/2]

std::pair< CharUnits, CharUnits > ASTContext::getTypeInfoInChars ( QualType  T) const

Definition at line 1570 of file ASTContext.cpp.

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

◆ getTypeOfExprType()

QualType ASTContext::getTypeOfExprType ( Expr tofExpr) const

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

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

◆ getTypeOfType()

QualType ASTContext::getTypeOfType ( QualType  tofType) 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 4344 of file ASTContext.cpp.

References getCanonicalType(), and clang::TypeAlignment.

◆ getTypePackElementDecl()

BuiltinTemplateDecl * ASTContext::getTypePackElementDecl ( ) const

◆ getTypePackElementName()

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

Definition at line 1593 of file ASTContext.h.

References clang::IdentifierTable::get().

Referenced by getTypePackElementDecl(), and LookupBuiltin().

◆ getTypes()

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

◆ getTypeSize() [1/2]

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

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

Definition at line 1920 of file ASTContext.h.

References clang::TypeInfo::Width.

Referenced by addBaseAndFieldSizes(), BitsContainNoUserData(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), canConvertIntTyToFloatTy(), checkIntToPointerCast(), checkVectorResult(), checkVectorShift(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), create_dispatch_once(), DiagnoseBadShiftValues(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), EmitX86_64VAArgFromMemory(), clang::ento::BasicValueFactory::getAPSIntType(), clang::ento::MemRegion::getAsOffset(), getBytesReturnedByAllocSizeCall(), GetCFNumberSize(), GetGCAttrTypeForType(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), HandleNeonVectorTypeAttr(), HandleVectorSizeAttr(), clang::Sema::Initialize(), is32Or64BitBasicType(), isIntegerLikeType(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isSSEVectorType(), isZeroSized(), clang::MangleContext::mangleName(), OpenCLConvertScalarsToVectors(), RecoverCastedSymbol(), rewriteInputConstraintReferences(), rewriteToNumericBoxedExpression(), roundUpSizeToCharAlignment(), supportsNilWithFloatRet(), TryReinterpretCast(), clang::ento::ExprEngine::VisitOffsetOfExpr(), and warnBracedScalarInit().

◆ getTypeSize() [2/2]

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

Definition at line 1921 of file ASTContext.h.

References clang::TypeInfo::Width.

◆ getTypeSizeInChars() [1/2]

CharUnits ASTContext::getTypeSizeInChars ( QualType  T) const

◆ getTypeSizeInChars() [2/2]

CharUnits ASTContext::getTypeSizeInChars ( const Type T) const

Definition at line 1979 of file ASTContext.cpp.

References getTypeInfoInChars().

◆ getucontext_tType()

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

Retrieve the C ucontext_t type.

Definition at line 1649 of file ASTContext.h.

◆ getUInt128Decl()

TypedefDecl * ASTContext::getUInt128Decl ( ) const

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

Definition at line 1039 of file ASTContext.cpp.

References buildImplicitTypedef(), clang::CanQual< Type >::CreateUnsafe(), clang::TypeAlignment, and UnsignedInt128Ty.

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

◆ getUIntMaxType()

CanQualType ASTContext::getUIntMaxType ( ) const

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

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

Definition at line 4535 of file ASTContext.cpp.

References clang::TargetInfo::getUIntMaxType().

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

◆ getUIntPtrType()

QualType ASTContext::getUIntPtrType ( ) const

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

Definition at line 4557 of file ASTContext.cpp.

References getCorrespondingUnsignedType(), and getIntPtrType().

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

◆ getUnaryTransformType()

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

Unary type transforms.

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

Definition at line 4386 of file ASTContext.cpp.

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

◆ getUnqualifiedArrayType()

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

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

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

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

Definition at line 4595 of file ASTContext.cpp.

References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::QualType::getSplitUnqualifiedType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by CastsAwayConstness(), CompareQualificationConversions(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), shouldBeModeledWithNoOp(), TryConstCast(), TryReferenceInitialization(), and TryReferenceListInitialization().

◆ getUnqualifiedObjCPointerType()

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

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

Definition at line 1835 of file ASTContext.h.

References clang::QualType::getQualifiers(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::removeObjCLifetime().

◆ getUnsignedWCharType()

QualType ASTContext::getUnsignedWCharType ( ) const

Return the type of "unsigned wchar_t".

getUnsignedWCharType - Return the type of "unsigned wchar_t".

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

Definition at line 4548 of file ASTContext.cpp.

References UnsignedIntTy.

◆ getVaListTagDecl()

Decl * ASTContext::getVaListTagDecl ( ) const

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

Definition at line 6924 of file ASTContext.cpp.

References getBuiltinVaListDecl(), and VaListTagDecl.

Referenced by isImportedDeclContext().

◆ getVariableArrayDecayedType()

QualType ASTContext::getVariableArrayDecayedType ( QualType  type) const

◆ getVariableArrayType()

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

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

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

Definition at line 2866 of file ASTContext.cpp.

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

Referenced by getAsArrayType(), getUnqualifiedArrayType(), and getVariableArrayDecayedType().

◆ getVectorType()

QualType ASTContext::getVectorType ( QualType  vecType,
unsigned  NumElts,
VectorType::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.

Precondition
VectorType must be a built-in type.

VectorType must be a built-in type.

Definition at line 3000 of file ASTContext.cpp.

References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.

Referenced by getCorrespondingUnsignedType(), HandleNeonVectorTypeAttr(), HandleVectorSizeAttr(), and warnBracedScalarInit().

◆ getVolatileType()

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

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

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

Definition at line 1101 of file ASTContext.h.

References clang::QualType::withFastQualifiers().

◆ getVTableContext()

VTableContextBase * ASTContext::getVTableContext ( )

◆ getWCharType()

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

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

Definition at line 1454 of file ASTContext.h.

◆ getWideCharType()

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

Return the type of wide characters.

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

Definition at line 1459 of file ASTContext.h.

Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), clang::analyze_format_string::ArgType::matchesType(), and clang::CodeGen::CodeGenModule::Release().

◆ getWIntType()

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

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

Definition at line 1473 of file ASTContext.h.

Referenced by clang::analyze_format_string::ArgType::getRepresentativeType(), and clang::analyze_format_string::ArgType::matchesType().

◆ getWritePipeType()

QualType ASTContext::getWritePipeType ( QualType  T) const

Return a write_only pipe type for the specified type.

Definition at line 3387 of file ASTContext.cpp.

Referenced by HandleOpenCLAccessAttr().

◆ getXRayFilter()

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

Definition at line 665 of file ASTContext.h.

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

◆ hasSameFunctionTypeIgnoringExceptionSpec()

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

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

Definition at line 2394 of file ASTContext.cpp.

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

Referenced by isSameEntity().

◆ hasSameNullabilityTypeQualifier()

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

Definition at line 2124 of file ASTContext.h.

References clang::Type::getNullability(), and X.

◆ hasSameTemplateName()

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

Determine whether the given template names refer to the same template.

Definition at line 4785 of file ASTContext.cpp.

References clang::TemplateName::getAsVoidPointer(), and getCanonicalTemplateName().

Referenced by DeduceTemplateArguments().

◆ hasSameType() [1/2]

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

◆ hasSameType() [2/2]

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

Definition at line 2098 of file ASTContext.h.

◆ hasSameUnqualifiedType()

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

◆ InitBuiltinTypes()

void ASTContext::InitBuiltinTypes ( const TargetInfo Target,
const TargetInfo AuxTarget = nullptr 
)

◆ isAlignmentRequired() [1/2]

bool ASTContext::isAlignmentRequired ( const Type T) const

Determine if the alignment the type has was required using an alignment attribute.

Definition at line 1574 of file ASTContext.cpp.

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

Referenced by clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), isAlignmentRequired(), and isVarDeclStrongDefinition().

◆ isAlignmentRequired() [2/2]

bool ASTContext::isAlignmentRequired ( QualType  T) const

Definition at line 1578 of file ASTContext.cpp.

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

◆ isMSStaticDataMemberInlineDefinition()

bool ASTContext::isMSStaticDataMemberInlineDefinition ( const VarDecl VD) const

◆ isNearlyEmpty()

bool ASTContext::isNearlyEmpty ( const CXXRecordDecl RD) const

Definition at line 9130 of file ASTContext.cpp.

◆ isObjCClassType()

bool clang::ASTContext::isObjCClassType ( QualType  T) const
inline

Definition at line 2349 of file ASTContext.h.

◆ isObjCIdType()

bool clang::ASTContext::isObjCIdType ( QualType  T) const
inline

Definition at line 2346 of file ASTContext.h.

Referenced by maybeAdjustInterfaceForSubscriptingCheck().

◆ isObjCNSObjectType()

static bool clang::ASTContext::isObjCNSObjectType ( QualType  Ty)
inlinestatic

Return true if this is an NSObject object with its NSObject attribute set.

Definition at line 1900 of file ASTContext.h.

References clang::Type::isObjCNSObjectType().

Referenced by BlockRequiresCopying(), and buildByrefHelpers().

◆ isObjCSelType()

bool clang::ASTContext::isObjCSelType ( QualType  T) const
inline

Definition at line 2352 of file ASTContext.h.

◆ isPromotableBitField()

QualType ASTContext::isPromotableBitField ( Expr E) const

Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).

Returns
the type this bit-field will promote to, or NULL if no promotion occurs.

Definition at line 5138 of file ASTContext.cpp.

◆ isSentinelNullExpr()

bool ASTContext::isSentinelNullExpr ( const Expr E)

◆ local_imports()

import_range clang::ASTContext::local_imports ( ) const
inline

Definition at line 916 of file ASTContext.h.

◆ MakeIntValue()

llvm::APSInt clang::ASTContext::MakeIntValue ( uint64_t  Value,
QualType  Type 
) const
inline

Make an APSInt of the appropriate width and signedness for the given Value and integer Type.

Definition at line 2413 of file ASTContext.h.

References clang::Type::isSignedIntegerOrEnumerationType().

◆ mergeDefinitionIntoModule()

void ASTContext::mergeDefinitionIntoModule ( NamedDecl ND,
Module M,
bool  NotifyListeners =