clang
6.0.0
|
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More...
#include "clang/AST/ASTContext.h"
Classes | |
class | DynTypedNodeList |
Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode. More... | |
class | RawCommentAndCacheFlags |
struct | SectionInfo |
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::PrintingPolicy & | getPrintingPolicy () const |
void | setPrintingPolicy (const clang::PrintingPolicy &Policy) |
SourceManager & | getSourceManager () |
const SourceManager & | getSourceManager () 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::StorageAllocator & | getDiagAllocator () |
const TargetInfo & | getTargetInfo () const |
const TargetInfo * | getAuxTargetInfo () const |
QualType | getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const |
getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned. More... | |
QualType | getRealTypeForBitwidth (unsigned DestWidth) const |
getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth. More... | |
bool | AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const |
const LangOptions & | getLangOpts () const |
const SanitizerBlacklist & | getSanitizerBlacklist () const |
const XRayFunctionFilter & | getXRayFilter () const |
DiagnosticsEngine & | getDiagnostics () const |
FullSourceLoc | getFullLoc (SourceLocation Loc) const |
RawComment * | getRawCommentForDeclNoCache (const Decl *D) const |
Return the documentation comment attached to a given declaration, without looking into cache. More... | |
RawCommentList & | getRawCommentList () |
void | addComment (const RawComment &RC) |
const RawComment * | getRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const |
Return the documentation comment attached to a given declaration. More... | |
comments::FullComment * | getCommentForDecl (const Decl *D, const Preprocessor *PP) const |
Return parsed documentation comment attached to a given declaration. More... | |
comments::FullComment * | getLocalCommentForDeclUncached (const Decl *D) const |
Return parsed documentation comment attached to a given declaration. More... | |
comments::FullComment * | cloneFullComment (comments::FullComment *FC, const Decl *D) const |
comments::CommandTraits & | getCommentCommandTraits () const |
AttrVec & | getDeclAttrs (const Decl *D) |
Retrieve the attributes for the given declaration. More... | |
void | eraseDeclAttrs (const Decl *D) |
Erase the attributes corresponding to the given declaration. More... | |
MemberSpecializationInfo * | getInstantiatedFromStaticDataMember (const VarDecl *Var) |
If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated. More... | |
TemplateOrSpecializationInfo | getTemplateOrSpecializationInfo (const VarDecl *Var) |
FunctionDecl * | getClassScopeSpecializationPattern (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) |
NamedDecl * | getInstantiatedFromUsingDecl (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) |
UsingShadowDecl * | getInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst) |
FieldDecl * | getInstantiatedFromUnnamedFieldDecl (FieldDecl *Field) |
void | setInstantiatedFromUnnamedFieldDecl (FieldDecl *Inst, FieldDecl *Tmpl) |
overridden_cxx_method_iterator | overridden_methods_begin (const CXXMethodDecl *Method) const |
overridden_cxx_method_iterator | overridden_methods_end (const CXXMethodDecl *Method) const |
unsigned | overridden_methods_size (const CXXMethodDecl *Method) const |
overridden_method_range | overridden_methods (const CXXMethodDecl *Method) const |
void | addOverriddenMethod (const CXXMethodDecl *Method, const CXXMethodDecl *Overridden) |
Note that the given C++ Method overrides the given Overridden method. More... | |
void | getOverriddenMethods (const NamedDecl *Method, SmallVectorImpl< const NamedDecl *> &Overridden) const |
Return C++ or ObjC overridden methods for the given Method . More... | |
void | addedLocalImportDecl (ImportDecl *Import) |
Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit. More... | |
import_range | local_imports () const |
Decl * | getPrimaryMergedDecl (Decl *D) |
void | setPrimaryMergedDecl (Decl *D, Decl *Primary) |
void | mergeDefinitionIntoModule (NamedDecl *ND, Module *M, bool NotifyListeners=true) |
Note that the definition ND has been merged into module M , and should be visible whenever M is visible. More... | |
void | deduplicateMergedDefinitonsFor (NamedDecl *ND) |
Clean up the merged definition list. More... | |
ArrayRef< Module * > | getModulesWithMergedDefinition (const NamedDecl *Def) |
Get the additional modules in which the definition Def has been merged. More... | |
void | addModuleInitializer (Module *M, Decl *Init) |
Add a declaration to the list of declarations that are initialized for a module. More... | |
void | addLazyModuleInitializers (Module *M, ArrayRef< uint32_t > IDs) |
ArrayRef< Decl * > | getModuleInitializers (Module *M) |
Get the initializations to perform when importing a module, if any. More... | |
TranslationUnitDecl * | getTranslationUnitDecl () const |
ExternCContextDecl * | getExternCContextDecl () const |
BuiltinTemplateDecl * | getMakeIntegerSeqDecl () const |
BuiltinTemplateDecl * | getTypePackElementDecl () const |
ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins) | |
ASTContext (const ASTContext &)=delete | |
ASTContext & | operator= (const ASTContext &)=delete |
~ASTContext () | |
void | setExternalSource (IntrusiveRefCntPtr< ExternalASTSource > Source) |
Attach an external AST source to the AST context. More... | |
ExternalASTSource * | getExternalSource () const |
Retrieve a pointer to the external AST source associated with this AST context, if any. More... | |
void | setASTMutationListener (ASTMutationListener *Listener) |
Attach an AST mutation listener to the AST context. More... | |
ASTMutationListener * | getASTMutationListener () const |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any. More... | |
void | PrintStats () const |
const SmallVectorImpl< Type * > & | getTypes () const |
BuiltinTemplateDecl * | buildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const |
RecordDecl * | buildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration. More... | |
TypedefDecl * | buildImplicitTypedef (QualType T, StringRef Name) const |
Create a new implicit TU-level typedef declaration. More... | |
TypedefDecl * | getInt128Decl () const |
Retrieve the declaration for the 128-bit signed integer type. More... | |
TypedefDecl * | getUInt128Decl () const |
Retrieve the declaration for the 128-bit unsigned integer type. More... | |
QualType | getAddrSpaceQualType (QualType T, LangAS AddressSpace) const |
Return the uniqued reference to the type for an address space qualified type with the specified type and address space. More... | |
QualType | removeAddrSpaceQualType (QualType T) const |
Remove any existing address space on the type and returns the type with qualifiers intact (or that's the idea anyway) More... | |
QualType | applyObjCProtocolQualifiers (QualType type, ArrayRef< ObjCProtocolDecl *> protocols, bool &hasError, bool allowOnPointerType=false) const |
Apply Objective-C protocol qualifiers to the given type. More... | |
QualType | getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const |
Return the uniqued reference to the type for an Objective-C gc-qualified type. More... | |
QualType | getRestrictType (QualType T) const |
Return the uniqued reference to the type for a restrict qualified type. More... | |
QualType | getVolatileType (QualType T) const |
Return the uniqued reference to the type for a volatile qualified type. More... | |
QualType | getConstType (QualType T) const |
Return the uniqued reference to the type for a const qualified type. More... | |
const FunctionType * | adjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo) |
Change the ExtInfo on a function type. More... | |
CanQualType | getCanonicalFunctionResultType (QualType ResultType) const |
Adjust the given function result type. More... | |
void | adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType) |
Change the result type of a function type once it is deduced. More... | |
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... | |
TargetInfo::OpenCLTypeKind | getOpenCLTypeKind (const Type *T) const |
Map an AST Type to an OpenCLTypeKind enum value. More... | |
LangAS | getOpenCLTypeAddrSpace (const Type *T) const |
Get address space for OpenCL type. More... | |
void | setcudaConfigureCallDecl (FunctionDecl *FD) |
FunctionDecl * | getcudaConfigureCallDecl () |
bool | BlockRequiresCopying (QualType Ty, const VarDecl *D) |
Returns true iff we need copy/dispose helpers for the given type. More... | |
bool | getByrefLifetime (QualType Ty, Qualifiers::ObjCLifetime &Lifetime, bool &HasByrefExtendedLayout) const |
Returns true, if given type has a known lifetime. More... | |
QualType | getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const |
Return the uniqued reference to the type for an lvalue reference to the specified type. More... | |
QualType | getRValueReferenceType (QualType T) const |
Return the uniqued reference to the type for an rvalue reference to the specified type. More... | |
QualType | getMemberPointerType (QualType T, const Type *Cls) const |
Return the uniqued reference to the type for a member pointer to the specified type in the specified class. More... | |
QualType | getVariableArrayType (QualType EltTy, Expr *NumElts, 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 | getDependentAddressSpaceType (QualType PointeeType, Expr *AddrSpaceExpr, SourceLocation AttrLoc) const |
QualType | getFunctionNoProtoType (QualType ResultTy, const FunctionType::ExtInfo &Info) const |
Return a K&R style C function type like 'int()'. More... | |
QualType | getFunctionNoProtoType (QualType ResultTy) const |
QualType | getFunctionType (QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const |
Return a normal function type with a typed argument list. More... | |
QualType | 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 |
TypeSourceInfo * | getTemplateSpecializationTypeInfo (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++17 deduced class template specialization type. More... | |
QualType | getTagDeclType (const TagDecl *Decl) const |
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl. More... | |
CanQualType | getSizeType () const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>. More... | |
CanQualType | getSignedSizeType () const |
Return the unique signed counterpart of the integer type corresponding to size_t. More... | |
CanQualType | getIntMaxType () const |
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
CanQualType | getUIntMaxType () const |
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
QualType | getWCharType () const |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension). More... | |
QualType | getWideCharType () const |
Return the type of wide characters. More... | |
QualType | getSignedWCharType () const |
Return the type of "signed wchar_t". More... | |
QualType | getUnsignedWCharType () const |
Return the type of "unsigned wchar_t". More... | |
QualType | getWIntType () const |
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target. More... | |
QualType | getIntPtrType () const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target. More... | |
QualType | getUIntPtrType () const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target. More... | |
QualType | getPointerDiffType () const |
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>. More... | |
QualType | getUnsignedPointerDiffType () const |
Return the unique unsigned counterpart of "ptrdiff_t" integer type. More... | |
QualType | getProcessIDType () const |
Return the unique type for "pid_t" defined in <sys/types.h>. More... | |
QualType | getCFConstantStringType () const |
Return the C structure type used to represent constant CFStrings. More... | |
QualType | getObjCSuperType () const |
Returns the C struct type for objc_super. More... | |
void | setObjCSuperType (QualType ST) |
QualType | getRawCFConstantStringType () const |
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built. More... | |
void | setCFConstantStringType (QualType T) |
TypedefDecl * | getCFConstantStringDecl () const |
RecordDecl * | getCFConstantStringTagDecl () const |
void | setObjCConstantStringInterface (ObjCInterfaceDecl *Decl) |
QualType | getObjCConstantStringInterface () const |
QualType | getObjCNSStringType () const |
void | setObjCNSStringType (QualType T) |
QualType | getObjCIdRedefinitionType () const |
Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd. More... | |
void | setObjCIdRedefinitionType (QualType RedefType) |
Set the user-written type that redefines id . More... | |
QualType | getObjCClassRedefinitionType () const |
Retrieve the type that Class has been defined to, which may be different from the built-in Class if Class has been typedef'd. More... | |
void | setObjCClassRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
QualType | getObjCSelRedefinitionType () const |
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd. More... | |
void | setObjCSelRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
IdentifierInfo * | getNSObjectName () |
Retrieve the identifier 'NSObject'. More... | |
IdentifierInfo * | getNSCopyingName () |
Retrieve the identifier 'NSCopying'. More... | |
CanQualType | getNSUIntegerType () const |
CanQualType | getNSIntegerType () const |
IdentifierInfo * | getBoolName () const |
Retrieve the identifier 'bool'. More... | |
IdentifierInfo * | getMakeIntegerSeqName () const |
IdentifierInfo * | getTypePackElementName () const |
QualType | getObjCInstanceType () |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. More... | |
TypedefDecl * | getObjCInstanceTypeDecl () |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type. More... | |
void | setFILEDecl (TypeDecl *FILEDecl) |
Set the type for the C FILE type. More... | |
QualType | getFILEType () const |
Retrieve the C FILE type. More... | |
void | setjmp_bufDecl (TypeDecl *jmp_bufDecl) |
Set the type for the C jmp_buf type. More... | |
QualType | getjmp_bufType () const |
Retrieve the C jmp_buf type. More... | |
void | setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl) |
Set the type for the C sigjmp_buf type. More... | |
QualType | getsigjmp_bufType () const |
Retrieve the C sigjmp_buf type. More... | |
void | setucontext_tDecl (TypeDecl *ucontext_tDecl) |
Set the type for the C ucontext_t type. More... | |
QualType | getucontext_tType () const |
Retrieve the C ucontext_t type. More... | |
QualType | getLogicalOperationType () const |
The result type of logical operations, '<', '>', '!=', etc. More... | |
void | getObjCEncodingForType (QualType T, std::string &S, const FieldDecl *Field=nullptr, QualType *NotEncodedT=nullptr) const |
Emit the Objective-CC type encoding for the given type T into S . More... | |
void | getObjCEncodingForPropertyType (QualType T, std::string &S) const |
Emit the Objective-C property type encoding for the given type T into S . More... | |
void | getLegacyIntegralTypeEncoding (QualType &t) const |
getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always. More... | |
void | getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const |
Put the string version of the type qualifiers QT into S . More... | |
std::string | getObjCEncodingForFunctionDecl (const FunctionDecl *Decl) const |
Emit the encoded type for the function Decl into S . More... | |
std::string | getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, bool Extended=false) const |
Emit the encoded type for the method declaration Decl into S . More... | |
std::string | getObjCEncodingForBlock (const BlockExpr *blockExpr) const |
Return the encoded type for this block declaration. More... | |
std::string | getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const |
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration. More... | |
bool | ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'. More... | |
ObjCPropertyImplDecl * | getObjCPropertyImplDeclForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const |
CharUnits | getObjCEncodingTypeSize (QualType T) const |
Return the size of type T for Objective-C encoding purpose, in characters. More... | |
TypedefDecl * | getObjCIdDecl () const |
Retrieve the typedef corresponding to the predefined id type in Objective-C. More... | |
QualType | getObjCIdType () const |
Represents the Objective-CC id type. More... | |
TypedefDecl * | getObjCSelDecl () const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C. More... | |
QualType | getObjCSelType () const |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type. More... | |
TypedefDecl * | getObjCClassDecl () const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. More... | |
QualType | getObjCClassType () const |
Represents the Objective-C Class type. More... | |
ObjCInterfaceDecl * | getObjCProtocolDecl () const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. More... | |
TypedefDecl * | getBOOLDecl () const |
Retrieve declaration of 'BOOL' typedef. More... | |
void | setBOOLDecl (TypedefDecl *TD) |
Save declaration of 'BOOL' typedef. More... | |
QualType | getBOOLType () const |
type of 'BOOL' type. More... | |
QualType | getObjCProtoType () const |
Retrieve the type of the Objective-C Protocol class. More... | |
TypedefDecl * | getBuiltinVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list type. More... | |
QualType | getBuiltinVaListType () const |
Retrieve the type of the __builtin_va_list type. More... | |
Decl * | getVaListTagDecl () const |
Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets. More... | |
TypedefDecl * | getBuiltinMSVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type. More... | |
QualType | getBuiltinMSVaListType () const |
Retrieve the type of the __builtin_ms_va_list type. More... | |
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, CharUnits > | getTypeInfoDataSizeInChars (QualType T) const |
std::pair< CharUnits, CharUnits > | getTypeInfoInChars (const Type *T) const |
std::pair< CharUnits, CharUnits > | getTypeInfoInChars (QualType T) const |
bool | isAlignmentRequired (const Type *T) const |
Determine if the alignment the type has was required using an alignment attribute. More... | |
bool | isAlignmentRequired (QualType T) const |
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 ASTRecordLayout & | getASTRecordLayout (const RecordDecl *D) const |
Get or compute information about the layout of the specified record (struct/union/class) D , which indicates its size and field position information. More... | |
const ASTRecordLayout & | getASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const |
Get or compute information about the layout of the specified Objective-C interface. More... | |
void | DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const |
const ASTRecordLayout & | getASTObjCImplementationLayout (const ObjCImplementationDecl *D) const |
Get or compute information about the layout of the specified Objective-C implementation. More... | |
const CXXMethodDecl * | getCurrentKeyFunction (const CXXRecordDecl *RD) |
Get our current best idea for the key function of the given record decl, or nullptr if there isn't one. More... | |
void | setNonKeyFunction (const CXXMethodDecl *method) |
Observe that the given method cannot be a key function. More... | |
CharUnits | getOffsetOfBaseWithVBPtr (const CXXRecordDecl *RD) const |
Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero. More... | |
uint64_t | getFieldOffset (const ValueDecl *FD) const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits. More... | |
uint64_t | lookupFieldBitOffset (const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) const |
Get the offset of an ObjCIvarDecl in bits. More... | |
bool | isNearlyEmpty (const CXXRecordDecl *RD) const |
VTableContextBase * | getVTableContext () |
MangleContext * | createMangleContext () |
void | DeepCollectObjCIvars (const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl< const ObjCIvarDecl *> &Ivars) const |
DeepCollectObjCIvars - This routine first collects all declared, but not synthesized, ivars in super class and then collects all ivars, including those synthesized for current class. More... | |
unsigned | CountNonClassIvars (const ObjCInterfaceDecl *OI) const |
void | CollectInheritedProtocols (const Decl *CDecl, llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &Protocols) |
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it. More... | |
bool | hasUniqueObjectRepresentations (QualType Ty) const |
Return true if the specified type has unique object representations according to (C++17 [meta.unary.prop]p9) More... | |
CanQualType | getCanonicalType (QualType T) const |
Return the canonical (structural) type corresponding to the specified potentially non-canonical type T . More... | |
const Type * | getCanonicalType (const Type *T) const |
CanQualType | getCanonicalParamType (QualType T) const |
Return the canonical parameter type corresponding to the specific potentially non-canonical one. More... | |
bool | hasSameType (QualType T1, QualType T2) const |
Determine whether the given types T1 and T2 are equivalent. More... | |
bool | hasSameType (const Type *T1, const Type *T2) const |
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... | |
NestedNameSpecifier * | getCanonicalNestedNameSpecifier (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 ArrayType * | getAsArrayType (QualType T) const |
Type Query functions. More... | |
const ConstantArrayType * | getAsConstantArrayType (QualType T) const |
const VariableArrayType * | getAsVariableArrayType (QualType T) const |
const IncompleteArrayType * | getAsIncompleteArrayType (QualType T) const |
const DependentSizedArrayType * | getAsDependentSizedArrayType (QualType T) const |
QualType | getBaseElementType (const ArrayType *VAT) const |
Return the innermost element type of an array type. More... | |
QualType | getBaseElementType (QualType QT) const |
Return the innermost element type of a type (which needn't actually be an array type). More... | |
uint64_t | getConstantArrayElementCount (const ConstantArrayType *CA) const |
Return number of constant array elements. More... | |
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/ . More... | |
unsigned | getTargetAddressSpace (QualType T) const |
unsigned | getTargetAddressSpace (Qualifiers Q) const |
unsigned | getTargetAddressSpace (LangAS AS) const |
uint64_t | getTargetNullPointerValue (QualType QT) const |
Get target-dependent integer value for null pointer which is used for constant folding. More... | |
bool | addressSpaceMapManglingFor (LangAS AS) const |
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 | mergeExtParameterInfo (const FunctionProtoType *FirstFnType, const FunctionProtoType *SecondFnType, bool &CanUseFirst, bool &CanUseSecond, SmallVectorImpl< FunctionProtoType::ExtParameterInfo > &NewParamInfos) |
This function merges the ExtParameterInfo lists of two functions. More... | |
void | ResetObjCLayout (const ObjCContainerDecl *CD) |
unsigned | getIntWidth (QualType T) const |
QualType | getCorrespondingUnsignedType (QualType T) const |
llvm::APSInt | MakeIntValue (uint64_t Value, QualType Type) const |
Make an APSInt of the appropriate width and signedness for the given Value and integer Type . More... | |
bool | isSentinelNullExpr (const Expr *E) |
ObjCImplementationDecl * | getObjCImplementation (ObjCInterfaceDecl *D) |
Get the implementation of the ObjCInterfaceDecl D , or nullptr if none exists. More... | |
ObjCCategoryImplDecl * | getObjCImplementation (ObjCCategoryDecl *D) |
Get the implementation of the ObjCCategoryDecl D , or nullptr if none exists. More... | |
bool | AnyObjCImplementation () |
Return true if there is at least one @implementation in the TU. More... | |
void | setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD) |
Set the implementation of ObjCInterfaceDecl. More... | |
void | setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD) |
Set the implementation of ObjCCategoryDecl. More... | |
const ObjCMethodDecl * | getObjCMethodRedeclaration (const ObjCMethodDecl *MD) const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists. More... | |
void | setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl) |
const ObjCInterfaceDecl * | getObjContainingInterface (const NamedDecl *ND) const |
Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc. More... | |
void | setBlockVarCopyInits (VarDecl *VD, Expr *Init) |
Set the copy inialization expression of a block var decl. More... | |
Expr * | getBlockVarCopyInits (const VarDecl *VD) |
Get the copy initialization expression of the VarDecl VD , or nullptr if none exists. More... | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. More... | |
TypeSourceInfo * | getTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location. More... | |
void | AddDeallocation (void(*Callback)(void *), void *Data) |
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 CXXConstructorDecl * | getCopyConstructorForExceptionObject (CXXRecordDecl *RD) |
void | addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD) |
void | addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND) |
TypedefNameDecl * | getTypedefNameForUnnamedTagDecl (const TagDecl *TD) |
void | addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD) |
DeclaratorDecl * | getDeclaratorForUnnamedTagDecl (const TagDecl *TD) |
void | setManglingNumber (const NamedDecl *ND, unsigned Number) |
unsigned | getManglingNumber (const NamedDecl *ND) const |
void | setStaticLocalNumber (const VarDecl *VD, unsigned Number) |
unsigned | getStaticLocalNumber (const VarDecl *VD) const |
MangleNumberingContext & | getManglingNumberContext (const DeclContext *DC) |
Retrieve the context for computing mangling numbers in the given DeclContext. More... | |
std::unique_ptr< MangleNumberingContext > | createMangleNumberingContext () const |
void | setParameterIndex (const ParmVarDecl *D, unsigned index) |
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
unsigned | getParameterIndex (const ParmVarDecl *D) const |
Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
APValue * | getMaterializedTemporaryValue (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 ImportDecl * | getNextLocalImport (ImportDecl *Import) |
static bool | isObjCNSObjectType (QualType Ty) |
Return true if this is an NSObject object with its NSObject attribute set. More... | |
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 | DeclarationNameTable |
class | DeclContext |
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file.
Definition at line 149 of file ASTContext.h.
using clang::ASTContext::import_range = llvm::iterator_range<import_iterator> |
Definition at line 946 of file ASTContext.h.
using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
Definition at line 908 of file ASTContext.h.
using clang::ASTContext::overridden_method_range = llvm::iterator_range<overridden_cxx_method_iterator> |
Definition at line 918 of file ASTContext.h.
using clang::ASTContext::ParentMapOtherNodes = llvm::DenseMap<ast_type_traits::DynTypedNode, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > |
Parent map for nodes without pointer identity.
We store a full DynTypedNode for all keys.
Definition at line 562 of file ASTContext.h.
using clang::ASTContext::ParentMapPointers = llvm::DenseMap<const void *, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > |
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 554 of file ASTContext.h.
Contains parents of a node.
Definition at line 545 of file ASTContext.h.
using clang::ASTContext::TemplateOrSpecializationInfo = llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 393 of file ASTContext.h.
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 1943 of file ASTContext.h.
|
strong |
Enumerator | |
---|---|
None | Not an inline variable. |
Weak | Weak definition of inline variable. |
WeakUnknown | Weak for now, might become strong later in this TU. |
Strong | Strong definition. |
Definition at line 2763 of file ASTContext.h.
enum clang::ASTContext::PragmaSectionFlag : unsigned |
Enumerator | |
---|---|
PSF_None | |
PSF_Read | |
PSF_Write | |
PSF_Execute | |
PSF_Implicit | |
PSF_Invalid |
Definition at line 2819 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins | ||
) |
Definition at line 783 of file ASTContext.cpp.
References clang::TranslationUnitDecl::Create().
|
delete |
ASTContext::~ASTContext | ( | ) |
Definition at line 798 of file ASTContext.cpp.
|
inline |
Definition at line 784 of file ASTContext.h.
References clang::RawCommentList::addComment(), clang::SourceRange::getBegin(), clang::RawComment::getSourceRange(), clang::SourceManager::isInSystemHeader(), clang::operator!=(), operator*(), clang::operator==(), and X.
Referenced by clang::Sema::ActOnComment().
void ASTContext::addCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD, |
CXXConstructorDecl * | CD | ||
) |
Definition at line 9644 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
void ASTContext::AddDeallocation | ( | void(*)(void *) | Callback, |
void * | Data | ||
) |
Add a deallocation callback that will be invoked when the ASTContext is destroyed.
Callback | A callback function that will be invoked on destruction. |
Data | Pointer data that will be provided to the callback function when it is called. |
Definition at line 856 of file ASTContext.cpp.
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 9661 of file ASTContext.cpp.
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 2618 of file ASTContext.h.
References clang::T.
Referenced by clang::VarDecl::evaluateValue(), clang::FunctionTemplateDecl::newCommon(), clang::ClassTemplateDecl::newCommon(), clang::TypeAliasTemplateDecl::newCommon(), and clang::VarTemplateDecl::newCommon().
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 1430 of file ASTContext.cpp.
References clang::Decl::isFromASTFile().
Referenced by clang::DeclContext::addHiddenDecl().
Definition at line 992 of file ASTContext.cpp.
References Inits.
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 966 of file ASTContext.cpp.
References Inits.
void ASTContext::addOverriddenMethod | ( | const CXXMethodDecl * | Method, |
const CXXMethodDecl * | Overridden | ||
) |
Note that the given C++ Method
overrides the given Overridden
method.
Definition at line 1404 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod().
Definition at line 2421 of file ASTContext.h.
References clang::isTargetAddressSpace().
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 9651 of file ASTContext.cpp.
void ASTContext::adjustDeducedFunctionResultType | ( | FunctionDecl * | FD, |
QualType | ResultType | ||
) |
Change the result type of a function type once it is deduced.
Definition at line 2565 of file ASTContext.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionProtoType::getParamTypes(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by clang::ASTDeclReader::UpdateDecl().
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 2617 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType(), getFunctionTypeWithExceptionSpec(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::ValueDecl::setType().
Referenced by clang::Sema::UpdateExceptionSpec().
const FunctionType * ASTContext::adjustFunctionType | ( | const FunctionType * | Fn, |
FunctionType::ExtInfo | EInfo | ||
) |
Change the ExtInfo on a function type.
Definition at line 2547 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::QualType::getTypePtr(), clang::Result, and clang::T.
Referenced by handleFunctionTypeAttr().
|
inline |
Definition at line 650 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::CompoundStmt::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::StringLiteral::Create(), clang::OMPParallelForDirective::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::OffsetOfExpr::Create(), clang::OMPTaskgroupDirective::Create(), clang::OMPFlushDirective::Create(), clang::OMPTaskReductionClause::Create(), clang::OMPOrderedDirective::Create(), clang::OMPTargetDirective::Create(), clang::OMPInReductionClause::Create(), clang::OMPTargetDataDirective::Create(), clang::TypeTraitExpr::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::OMPTargetExitDataDirective::Create(), clang::MemberExpr::Create(), clang::OMPTargetParallelDirective::Create(), clang::OMPTargetParallelForDirective::Create(), clang::OMPTeamsDirective::Create(), OMPAlignedClause::Create(), clang::OMPCancellationPointDirective::Create(), clang::OMPCancelDirective::Create(), clang::UnresolvedLookupExpr::Create(), OMPCopyinClause::Create(), clang::OMPTaskLoopDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::OMPTaskLoopSimdDirective::Create(), OMPCopyprivateClause::Create(), clang::OMPDistributeDirective::Create(), clang::OMPTargetUpdateDirective::Create(), clang::ExprWithCleanups::Create(), OMPFlushClause::Create(), clang::OMPDistributeParallelForDirective::Create(), clang::CXXUnresolvedConstructExpr::Create(), OMPDependClause::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::OMPDistributeSimdDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::OMPTargetParallelForSimdDirective::Create(), clang::OMPTargetSimdDirective::Create(), clang::OMPTeamsDistributeDirective::Create(), clang::UnresolvedMemberExpr::Create(), clang::OMPTeamsDistributeSimdDirective::Create(), clang::OMPTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDirective::Create(), clang::OMPTargetTeamsDistributeDirective::Create(), clang::OMPTargetTeamsDistributeParallelForDirective::Create(), OMPMapClause::Create(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTargetTeamsDistributeSimdDirective::Create(), clang::DesignatedInitExpr::Create(), OMPToClause::Create(), OMPFromClause::Create(), OMPUseDevicePtrClause::Create(), OMPIsDevicePtrClause::Create(), clang::PseudoObjectExpr::Create(), clang::LambdaExpr::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::ObjCArrayLiteral::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::CompoundStmt::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::OMPLastprivateClause::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPParallelForDirective::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::OffsetOfExpr::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPTaskReductionClause::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPInReductionClause::CreateEmpty(), clang::OMPTargetDataDirective::CreateEmpty(), clang::OMPTargetEnterDataDirective::CreateEmpty(), clang::OMPTargetExitDataDirective::CreateEmpty(), clang::OMPTargetParallelDirective::CreateEmpty(), clang::OMPTargetParallelForDirective::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), clang::OMPTargetSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeDirective::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), clang::OMPTeamsDistributeSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForDirective::CreateEmpty(), clang::OMPTargetTeamsDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForDirective::CreateEmpty(), OMPMapClause::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeSimdDirective::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), OMPToClause::CreateEmpty(), OMPFromClause::CreateEmpty(), OMPUseDevicePtrClause::CreateEmpty(), OMPIsDevicePtrClause::CreateEmpty(), getCanonicalTemplateSpecializationType(), getDeclAttrs(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getOverloadedTemplateName(), getTemplateSpecializationType(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::OverloadExpr::initializeResults(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::ObjCMethodDecl::setAsRedeclaration(), and clang::TemplateArgument::TemplateArgument().
Definition at line 653 of file ASTContext.h.
References clang::T.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2554 of file ASTContext.h.
QualType ASTContext::applyObjCProtocolQualifiers | ( | QualType | type, |
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
bool & | hasError, | ||
bool | allowOnPointerType = false |
||
) | const |
Apply Objective-C protocol qualifiers to the given type.
allowOnPointerType | specifies if we can apply protocol qualifiers on ObjCObjectPointerType. It can be set to true when contructing the canonical type of a Objective-C type parameter. |
If this is for the canonical type of a type parameter, we can apply protocol qualifiers on the ObjCObjectPointerType.
Definition at line 4329 of file ASTContext.cpp.
References clang::Type::castAs(), clang::ObjCObjectType::getBaseType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), clang::ObjCObjectType::getTypeArgsAsWritten(), clang::QualType::getTypePtr(), clang::ObjCObjectPointerType::isKindOfType(), clang::ObjCObjectType::isKindOfTypeAsWritten(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectType(), ObjCBuiltinClassTy, ObjCBuiltinIdTy, clang::ObjCProtocolQualifiers< T >::qual_begin(), clang::ObjCProtocolQualifiers< T >::qual_end(), and clang::ast_matchers::type.
Referenced by getObjCTypeParamType(), and clang::QualType::substObjCTypeArgs().
QualType ASTContext::areCommonBaseCompatible | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
Definition at line 7908 of file ASTContext.cpp.
References clang::Type::castAs(), clang::declaresSameEntity(), clang::ObjCInterfaceDecl::getCanonicalDecl(), clang::ObjCObjectType::getInterface(), getIntersectionOfProtocols(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCObjectType::getTypeArgsAsWritten(), clang::ObjCObjectType::isKindOfType(), clang::QualType::isNull(), clang::ObjCObjectType::isSpecialized(), clang::Result, and sameObjCTypeArgs().
Definition at line 8093 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and clang::Type::getAs().
Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type.
Definition at line 7489 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().
bool ASTContext::AtomicUsesUnsupportedLibcall | ( | const AtomicExpr * | E | ) | const |
Definition at line 9696 of file ASTContext.cpp.
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 5762 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.
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1018 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), and clang::BuiltinTemplateDecl::Create().
Referenced by getMakeIntegerSeqDecl(), and getTypePackElementDecl().
RecordDecl * ASTContext::buildImplicitRecord | ( | StringRef | Name, |
RecordDecl::TagKind | TK = TTK_Struct |
||
) | const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
Definition at line 1043 of file ASTContext.cpp.
Referenced by emitReduceFiniFunction(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), and clang::Sema::Initialize().
TypedefDecl * ASTContext::buildImplicitTypedef | ( | QualType | T, |
StringRef | Name | ||
) | const |
Create a new implicit TU-level typedef declaration.
Definition at line 1059 of file ASTContext.cpp.
Referenced by getCFConstantStringDecl(), getInt128Decl(), getObjCClassDecl(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCSelDecl(), and getUInt128Decl().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS.
This handles validation of any protocol qualifiers on the LHS or RHS.
Definition at line 7673 of file ASTContext.cpp.
References clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isObjCQualifiedClass(), clang::ObjCObjectType::isObjCQualifiedId(), clang::ObjCObjectType::isObjCUnqualifiedIdOrClass(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by areComparableObjCPointerTypes(), canAssignObjCObjectTypes(), canBindObjCObjectType(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::DiagnosePropertyAccessorMismatch(), findMethodDecl(), getReturnTypeForMethod(), hasDefinition(), isObjCTypeSubstitutable(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 8031 of file ASTContext.cpp.
References clang::Type::castAs(), CollectInheritedProtocols(), clang::declaresSameEntity(), clang::ObjCObjectType::getInterface(), clang::ObjCProtocolQualifiers< T >::getNumProtocols(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCObjectType::isSpecialized(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::ObjCProtocolQualifiers< T >::quals(), and sameObjCTypeArgs().
bool ASTContext::canAssignObjCInterfacesInBlockPointer | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT, | ||
bool | BlockReturnType | ||
) |
canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safety for objective-c pointers used to pass/return arguments in block literals.
When passed as arguments, passing 'A*' where 'id' is expected is not OK. Passing 'Sub *" where 'Super *" is expected is not OK. For the return type, the opposite is not OK.
Definition at line 7722 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().
Definition at line 8105 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and getObjCObjectPointerType().
comments::FullComment * ASTContext::cloneFullComment | ( | comments::FullComment * | FC, |
const Decl * | D | ||
) | const |
Definition at line 468 of file ASTContext.cpp.
References clang::comments::DeclInfo::CommentDecl, clang::comments::DeclInfo::fill(), clang::comments::FullComment::getBlocks(), clang::comments::FullComment::getDecl(), clang::comments::FullComment::getDeclInfo(), clang::comments::DeclInfo::IsFilled, and clang::comments::DeclInfo::TemplateParameters.
Referenced by getCommentForDecl().
void ASTContext::CollectInheritedProtocols | ( | const Decl * | CDecl, |
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > & | Protocols | ||
) |
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
Definition at line 2103 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
Referenced by canAssignObjCInterfaces(), QIdProtocolsAdoptObjCObjectProtocols(), and UseNSOptionsMacro().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 2301 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
MangleContext * ASTContext::createMangleContext | ( | ) |
Definition at line 9534 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, clang::TargetInfo::getCXXABI(), getDiagnostics(), clang::TargetCXXABI::getKind(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, clang::TargetCXXABI::Microsoft, clang::TargetCXXABI::WatchOS, clang::TargetCXXABI::WebAssembly, and clang::CXXABI::~CXXABI().
std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 9634 of file ASTContext.cpp.
Referenced by clang::Sema::ExpressionEvaluationContextRecord::getMangleNumberingContext(), and getManglingNumberContext().
TypeSourceInfo * ASTContext::CreateTypeSourceInfo | ( | QualType | T, |
unsigned | Size = 0 |
||
) | const |
Allocate an uninitialized TypeSourceInfo.
The caller should initialize the memory held by TypeSourceInfo using the TypeLoc wrappers.
T | the type that will be the basis for type source info. This type should refer to how the declarator was written in source code, not to what type semantic analysis resolved the declarator to. |
Size | the size of the type info to create, or 0 if the size should be calculated based on the type. |
Definition at line 2412 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType().
Referenced by getTrivialTypeSourceInfo().
|
inline |
Definition at line 656 of file ASTContext.h.
Referenced by clang::GCCAsmStmt::getInputConstraint(), clang::CXXRecordDecl::setBases(), clang::ShuffleVectorExpr::setExprs(), clang::APNumericStorage::setIntValue(), clang::CallExpr::setNumArgs(), clang::DeclaratorDecl::setQualifierInfo(), and clang::TagDecl::setQualifierInfo().
Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is only relevant for function or file scoped var definitions.
Definition at line 9377 of file ASTContext.cpp.
References clang::VarDecl::DeclarationOnly, clang::VarDecl::evaluateValue(), clang::CXXMethodDecl::getCanonicalDecl(), getCurrentKeyFunction(), clang::Decl::getDeclContext(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::VarDecl::getInit(), clang::DeclContext::getParent(), getTargetInfo(), clang::ValueDecl::getType(), clang::GVA_AvailableExternally, clang::Decl::hasAttr(), clang::Expr::HasSideEffects(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::isDiscardableGVALinkage(), clang::CXXRecordDecl::isDynamicClass(), clang::VarDecl::isFileVarDecl(), isMSStaticDataMemberInlineDefinition(), clang::VarDecl::isThisDeclarationADefinition(), clang::Expr::isValueDependent(), clang::SC_Register, and clang::FunctionDecl::TK_FunctionTemplate.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs(), isConsumerInterestedIn(), and clang::CodeGen::CodeGenFunction::tryEmitAsConstant().
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 936 of file ASTContext.cpp.
References getExternalSource().
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 2085 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3322 of file RecordLayoutBuilder.cpp.
References DumpRecordLayout(), clang::ASTRecordLayout::getAlignment(), clang::ASTRecordLayout::getDataSize(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getSize(), and isMsLayout().
void ASTContext::eraseDeclAttrs | ( | const Decl * | D | ) |
Erase the attributes corresponding to the given declaration.
Definition at line 1258 of file ASTContext.cpp.
Referenced by clang::Decl::dropAttrs().
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 2478 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by checkConditionalPointerCompatibility(), HandleAddressSpaceTypeAttribute(), and clang::CodeGen::CGOpenMPRuntimeNVPTX::translateParameter().
Perform adjustment on the parameter type of a function.
This routine adjusts the given parameter type T
to the actual parameter type used by semantic analysis (C99 6.7.5.3p[7,8], C++ [dcl.fct]p3). The adjusted parameter type is returned.
Definition at line 5220 of file ASTContext.cpp.
References getDecayedType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), and clang::T.
Referenced by DeduceNonTypeTemplateArgument(), and getSignatureParameterType().
Return the uniqued reference to a type adjusted from the original type to a new type.
Definition at line 2701 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 1192 of file ASTContext.h.
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 2060 of file ASTContext.cpp.
References getTargetInfo(), getTypeAlign(), and max().
Referenced by getAlignOfGlobalVarInChars().
Return the alignment in characters that should be given to a global variable with type T
.
getAlignOfGlobalVarInChars - Return the alignment in characters that should be given to a global variable of the specified type.
Definition at line 2066 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString().
|
inline |
Definition at line 646 of file ASTContext.h.
Referenced by clang::RawComment::parse().
Return the properly qualified result of decaying the specified array type to a pointer.
getArrayDecayedType - Return the properly qualified result of decaying the specified array type to a pointer.
This operation is non-trivial when handling typedefs etc. The canonical type of T
must be an array type, this returns a pointer to a properly qualified element of the array.
See C99 6.7.5.3p7 and C99 6.3.2.1p3.
This operation is non-trivial when handling typedefs etc. The canonical type of "T" must be an array type, this returns a pointer to a properly qualified element of the array.
See C99 6.7.5.3p7 and C99 6.3.2.1p3.
Definition at line 5251 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().
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 5162 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(), DeduceFromInitializerList(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::ReductionCodeGen::emitInitialization(), 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().
|
inline |
Definition at line 2321 of file ASTContext.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), CheckFormatString(), clang::StringLiteral::Create(), DeduceTemplateArgumentsByTypeMatch(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EvaluateArrayTypeTrait(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), getTypeExpansion(), isEmptyField(), mergeTypes(), and rewriteInputConstraintReferences().
|
inline |
Definition at line 2330 of file ASTContext.h.
Referenced by DeduceTemplateArgumentsByTypeMatch().
|
inline |
Definition at line 2327 of file ASTContext.h.
Referenced by DeduceTemplateArgumentsByTypeMatch(), and clang::InitializationSequence::Perform().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 660 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1063 of file ASTContext.h.
Referenced by checkDeclInTargetContext(), clang::ObjCCategoryDecl::Create(), clang::Decl::getASTMutationListener(), clang::Decl::markUsed(), and mergeDefinitionIntoModule().
const ASTRecordLayout & ASTContext::getASTObjCImplementationLayout | ( | const ObjCImplementationDecl * | D | ) | const |
Get or compute information about the layout of the specified Objective-C implementation.
This may differ from the interface if synthesized ivars are present.
Definition at line 2439 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Type::getCanonicalTypeInternal(), clang::ObjCImplDecl::getClassInterface(), clang::Qualifiers::getFastQualifiers(), clang::Type::isCanonicalUnqualified(), clang::ExtQuals::Profile(), clang::SplitQualType::Quals, clang::Qualifiers::removeFastQualifiers(), clang::QualType::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by hasMRCWeakIvars().
const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout | ( | const ObjCInterfaceDecl * | D | ) | const |
Get or compute information about the layout of the specified Objective-C interface.
Definition at line 2434 of file ASTContext.cpp.
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 2921 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::getTBAAStructInfo(), getTypeInfoDataSizeInChars(), getTypeInfoVTable(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), hasDefaultCXXMethodCC(), isDesignatorAtObjectEnd(), recordUsesEBO(), and RequiresVtordisp().
|
inline |
Definition at line 2324 of file ASTContext.h.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitArraySubscriptGEP(), emitPointerArithmetic(), getFixedSizeElementType(), clang::CodeGen::CodeGenFunction::getVLASize(), mergeTypes(), and tryEmitFMulAdd().
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 4719 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::AtomicType::Profile(), and clang::TypeAlignment.
Referenced by getVariableArrayDecayedType(), clang::Sema::Initialize(), and mergeTypes().
QualType ASTContext::getAttributedType | ( | AttributedType::Kind | attrKind, |
QualType | modifiedType, | ||
QualType | equivalentType | ||
) |
Definition at line 3746 of file ASTContext.cpp.
References getCanonicalType(), clang::ast_matchers::id(), clang::AttributedType::Profile(), and clang::TypeAlignment.
Referenced by computeConditionalNullability(), getArrayDecayedType(), handleFunctionTypeAttr(), handleMSPointerTypeQualifierAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), and clang::Sema::ProcessPropertyDecl().
QualType ASTContext::getAutoDeductType | ( | ) | const |
C++11 deduction pattern for 'auto' type.
getAutoDeductType - Get type pattern for deducing against 'auto'.
Definition at line 4746 of file ASTContext.cpp.
References clang::Auto, AutoDeductTy, clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by getAutoRRefDeductType(), and getAutoType().
QualType ASTContext::getAutoRRefDeductType | ( | ) | const |
C++11 deduction pattern for 'auto &&' type.
getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.
Definition at line 4756 of file ASTContext.cpp.
References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().
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 4674 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().
|
inline |
Definition at line 672 of file ASTContext.h.
Return the innermost element type of an array type.
For example, will return "int" for int[m][n]
Definition at line 5273 of file ASTContext.cpp.
References clang::ArrayType::getElementType().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::BuildCXXTypeConstructExpr(), BuildImplicitMemberInitializer(), CheckAggExprForMemSetUse(), clang::Sema::CheckAllocatedType(), checkTrivialClassMembers(), clang::Sema::CollectIvarsToConstructOrDestruct(), createImplicitFirstprivateForType(), defaultedSpecialMemberIsConstexpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getInnerObjCOwnership(), getTypeAlignIfKnown(), hasUniqueObjectRepresentations(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::QualType::isCXX98PODType(), isObjCReceiverType(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::ento::ExprEngine::ProcessDeleteDtor(), roundUpSizeToCharAlignment(), scanToNextArgument(), TryDefaultInitialization(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), and TryValueInitialization().
Return the innermost element type of a type (which needn't actually be an array type).
Definition at line 5277 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), getQualifiedType(), clang::QualType::getSplitDesugaredType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
QualType ASTContext::getBlockDescriptorExtendedType | ( | ) | const |
Gets the struct used to keep track of the extended descriptor for pointer to blocks.
Definition at line 5680 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getPointerType(), getTagDeclType(), clang::ICIS_NoInit, Idents, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), UnsignedLongTy, and VoidPtrTy.
QualType ASTContext::getBlockDescriptorType | ( | ) | const |
Gets the struct used to keep track of the descriptor for pointer to blocks.
Definition at line 5645 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getTagDeclType(), clang::ICIS_NoInit, Idents, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), and UnsignedLongTy.
Return the uniqued reference to the type for a block of the specified type.
getBlockPointerType - Return the uniqued reference to the type for a pointer to the specified block.
Definition at line 2763 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().
Get the copy initialization expression of the VarDecl VD
, or nullptr if none exists.
Get the copy initialization expression of VarDecl, or nullptr if none exists.
Definition at line 2395 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 1831 of file ASTContext.h.
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1661 of file ASTContext.h.
References clang::IdentifierTable::get().
|
inline |
type of 'BOOL' type.
Definition at line 1841 of file ASTContext.h.
TypedefDecl * ASTContext::getBuiltinMSVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list
type.
Definition at line 7246 of file ASTContext.cpp.
References CreateMSVaListDecl().
|
inline |
Retrieve the type of the __builtin_ms_va_list
type.
Definition at line 1869 of file ASTContext.h.
QualType ASTContext::GetBuiltinType | ( | unsigned | ID, |
GetBuiltinTypeError & | Error, | ||
unsigned * | IntegerConstantArgs = nullptr |
||
) | const |
Return the type for the specified builtin.
GetBuiltinType - Return the type for the specified builtin.
If IntegerConstantArgs
is non-null, it is filled in with a bitmask of arguments to the builtin that are required to be integer constant expressions.
Definition at line 9123 of file ASTContext.cpp.
References BuiltinInfo, clang::CC_C, DecodeTypeFromStr(), clang::EST_BasicNoexcept, clang::EST_DynamicNone, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, GE_None, getArrayDecayedType(), getFunctionNoProtoType(), getFunctionType(), getLangOpts(), clang::Builtin::Context::getTypeString(), clang::Type::isArrayType(), clang::Builtin::Context::isNoReturn(), clang::Builtin::Context::isNoThrow(), clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionType::ExtInfo::withNoReturn().
TypedefDecl * ASTContext::getBuiltinVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list
type.
Definition at line 7228 of file ASTContext.cpp.
References CreateVaListDecl(), clang::TargetInfo::getBuiltinVaListKind(), and clang::Decl::isImplicit().
Referenced by getVaListTagDecl().
|
inline |
Retrieve the type of the __builtin_va_list
type.
Definition at line 1855 of file ASTContext.h.
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 5798 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.
CanQualType ASTContext::getCanonicalFunctionResultType | ( | QualType | ResultType | ) | const |
Adjust the given function result type.
Definition at line 3393 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getCanonicalType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), clang::CanQual< T >::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), and clang::Qualifiers::removeObjCLifetime().
Referenced by getFunctionNoProtoType().
NestedNameSpecifier * ASTContext::getCanonicalNestedNameSpecifier | ( | NestedNameSpecifier * | NNS | ) | const |
Retrieves the "canonical" nested name specifier for a given nested name specifier.
The canonical nested name specifier is a nested name specifier that uniquely identifies a type or namespace within the type system. For example, given:
Here, the nested-name-specifier for N::S::X<T>:: will be S::X<template-param-0-0>, since 'S' and 'X' are uniquely defined by declarations in the type system and the canonical type for the template type parameter 'T' is template-param-0-0.
Definition at line 5107 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 getDependentTemplateName().
CanQualType ASTContext::getCanonicalParamType | ( | QualType | T | ) | const |
Return the canonical parameter type corresponding to the specific potentially non-canonical one.
Qualifiers are stripped off, functions are turned into function pointers, and arrays decay one level into pointers.
Definition at line 4840 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::QualType::getTypePtr(), getVariableArrayDecayedType(), and clang::Result.
Referenced by clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionCall(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), arrangeFreeFunctionLikeCall(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), getArgTypesForCall(), getArgTypesForDeclaration(), getCanonicalParamType(), and isCanonicalExceptionSpecification().
TemplateArgument ASTContext::getCanonicalTemplateArgument | ( | const TemplateArgument & | Arg | ) | const |
Retrieve the "canonical" template argument.
The canonical template argument is the simplest template argument (which may be a type, value, expression, or declaration) that expresses the value of the argument.
Definition at line 5055 of file ASTContext.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateName(), getCanonicalType(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getParamTypeForDecl(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_end(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by getCanonicalTemplateSpecializationType().
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 5006 of file ASTContext.cpp.
Referenced by DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), and hasSameTemplateName().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 3942 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), getCanonicalTemplateArgument(), getCanonicalTemplateName(), clang::Type::isDependentType(), clang::TemplateSpecializationType::Profile(), and clang::TypeAlignment.
Referenced by getTemplateSpecializationType().
|
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 2174 of file ASTContext.h.
References clang::QualType::getCanonicalType().
Referenced by clang::Sema::ActOnStartCXXMemberReference(), buildDeclareReductionRef(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckExceptionSpecSubset(), CheckImplicitConversion(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CompareStandardConversionSequences(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CXXCheckConditionalOperands(), 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(), clang::CodeGen::CodeGenTBAA::getBaseTypeInfo(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalParamType(), getCanonicalTemplateArgument(), GetCFNumberSize(), getComplexType(), getConstantArrayType(), getDecayedType(), getDecltypeType(), clang::getDeclUsageType(), getDependentAddressSpaceType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), getLValueReferenceType(), getMemberPointerType(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getOSLogArgType(), getPackExpansionType(), getParenType(), getPointerType(), getRValueReferenceType(), getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTemplateSpecializationType(), getTypedefType(), clang::CodeGen::CodeGenTBAA::getTypeInfo(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), clang::ento::MemRegionManager::getVarRegion(), getVectorType(), clang::ento::SValBuilder::haveSameType(), clang::ASTImporter::Import(), InitBuiltinTypes(), InitCatchParam(), isCanonicalExceptionSpecification(), IsImplicitBoolFloatConversion(), 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().
Definition at line 2178 of file ASTContext.h.
References getCanonicalParamType(), clang::Type::getCanonicalTypeInternal(), and clang::QualType::getTypePtr().
TypedefDecl * ASTContext::getCFConstantStringDecl | ( | ) | const |
Definition at line 5567 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), buildImplicitTypedef(), CharTy, clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), clang::IdentifierTable::get(), getPointerType(), getTagDeclType(), clang::ICIS_NoInit, Idents, IntTy, LongTy, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), clang::ast_matchers::tagType, and clang::CanQual< T >::withConst().
Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), and clang::Sema::Initialize().
RecordDecl * ASTContext::getCFConstantStringTagDecl | ( | ) | const |
Definition at line 5615 of file ASTContext.cpp.
References getCFConstantStringDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 5622 of file ASTContext.cpp.
References getCFConstantStringDecl(), and getTypedefType().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().
|
inline |
Return the size of the character type, in bits.
Definition at line 2011 of file ASTContext.h.
Referenced by clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::ento::MemRegion::getAsOffset(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
FunctionDecl * ASTContext::getClassScopeSpecializationPattern | ( | const FunctionDecl * | FD | ) |
Definition at line 1302 of file ASTContext.cpp.
Referenced by clang::FunctionDecl::getClassScopeSpecializationPattern().
|
inline |
Definition at line 856 of file ASTContext.h.
Referenced by clang::index::CommentToXMLConverter::convertCommentToHTML(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::index::CommentToXMLConverter::convertHTMLTagNodeToText(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpLookups(), and clang::RawComment::parse().
comments::FullComment * ASTContext::getCommentForDecl | ( | const Decl * | D, |
const Preprocessor * | PP | ||
) | const |
Return parsed documentation comment attached to a given declaration.
Returns nullptr if no comment is attached.
PP | the Preprocessor used with this TU. Could be nullptr if preprocessor is not available. |
Definition at line 488 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), cloneFullComment(), clang::ObjCMethodDecl::findPropertyDecl(), clang::Type::getAs(), clang::Decl::getCanonicalDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), clang::ObjCMethodDecl::isPropertyAccessor(), and ParsedComments.
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 2647 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by InitBuiltinTypes().
|
inline |
Definition at line 1178 of file ASTContext.h.
References getComplexType().
uint64_t ASTContext::getConstantArrayElementCount | ( | const ConstantArrayType * | CA | ) | const |
Return number of constant array elements.
getConstantArrayElementCount - Returns number of constant array elements.
Definition at line 5293 of file ASTContext.cpp.
References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().
Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable().
QualType ASTContext::getConstantArrayType | ( | QualType | EltTy, |
const llvm::APInt & | ArySizeIn, | ||
ArrayType::ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return the unique reference to the type for a constant array of the specified element type.
getConstantArrayType - Return the unique reference to the type for an array of the specified element type.
Definition at line 2902 of file ASTContext.cpp.
References getCanonicalType(), clang::TargetInfo::getMaxPointerWidth(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by emitReduceFiniFunction(), getAsArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), mergeTypes(), and warnBracedScalarInit().
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 1153 of file ASTContext.h.
References getComplexType(), and clang::QualType::withConst().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 9639 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by emitCXXDestructor().
Definition at line 8797 of file ASTContext.cpp.
References clang::Type::getAs(), clang::BuiltinType::getKind(), getVectorType(), clang::Type::hasSignedIntegerRepresentation(), UnsignedCharTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortTy, and clang::ASTMutationListener::~ASTMutationListener().
Referenced by checkPointerTypesForAssignment(), getUIntPtrType(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 1237 of file ASTContext.h.
const CXXMethodDecl * ASTContext::getCurrentKeyFunction | ( | const CXXRecordDecl * | RD | ) |
Get our current best idea for the key function of the given record decl, or nullptr if there isn't one.
The key function is, according to the Itanium C++ ABI section 5.2.3: ...the first non-pure virtual function that is not inline at the point of class definition.
Other ABIs use the same idea. However, the ARM C++ ABI ignores virtual functions that are defined 'inline', which means that the result of this computation can change.
Definition at line 3008 of file RecordLayoutBuilder.cpp.
References bool, computeKeyFunction(), clang::CXXRecordDecl::getDefinition(), and clang::Result.
Referenced by DeclMustBeEmitted(), and clang::CodeGen::CodeGenVTables::isVTableExternal().
Return a type with additional const
, volatile
, or restrict
qualifiers.
Definition at line 1875 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), and TryObjectArgumentInitialization().
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 2722 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().
|
inline |
Definition at line 1201 of file ASTContext.h.
Return a conservative estimate of the alignment of the specified decl D
.
D
must not be a bitfield type, as bitfields do not have a valid alignment.If ForAlignof
, references are treated like their underlying type and large arrays don't get any special treatment. If not ForAlignof
it computes the value expected by CodeGen: references are treated like pointers and large arrays get extra alignment.
Definition at line 1464 of file ASTContext.cpp.
References clang::ast_matchers::arrayType, clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::TargetInfo::getCharWidth(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getLargeArrayAlign(), clang::TargetInfo::getLargeArrayMinWidth(), clang::Decl::getMaxAlignment(), clang::TargetInfo::getMinGlobalAlign(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), getTargetInfo(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), max(), min(), Parent, toBits(), and toCharUnitsFromBits().
Referenced by computeBlockInfo(), emitAddrOfVarFromArray(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and clang::CodeGen::CodeGenModule::GetWeakRefReference().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 9666 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1247 of file ASTContext.cpp.
References Allocate(), and clang::Result.
Referenced by clang::Decl::getAttrs(), and clang::Decl::getIdentifierNamespaceForKind().
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 4605 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentDecltypeType::Profile(), and clang::TypeAlignment.
QualType ASTContext::getDeducedTemplateSpecializationType | ( | TemplateName | Template, |
QualType | DeducedType, | ||
bool | IsDependent | ||
) | const |
C++17 deduced class template specialization type.
Return the uniqued reference to the deduced template specialization type which has been deduced to the given type, or to the canonical undeduced such type, or the canonical deduced-but-dependent such type.
Definition at line 4698 of file ASTContext.cpp.
References clang::DeducedTemplateSpecializationType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::DeduceTemplateArguments(), and clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType().
CallingConv ASTContext::getDefaultCallingConvention | ( | bool | IsVariadic, |
bool | IsCXXMethod | ||
) | const |
Retrieves the default calling convention for the current target.
Definition at line 9486 of file ASTContext.cpp.
References clang::CC_C, clang::CC_X86FastCall, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86VectorCall, clang::TargetInfo::CCMT_Unknown, clang::LangOptions::DCC_CDecl, clang::LangOptions::DCC_FastCall, clang::LangOptions::DCC_None, clang::LangOptions::DCC_RegCall, clang::LangOptions::DCC_StdCall, clang::LangOptions::DCC_VectorCall, clang::TargetInfo::getDefaultCallingConv(), getTargetInfo(), and clang::TargetInfo::hasFeature().
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), DiagnoseCallingConvCast(), clang::index::CodegenNameGenerator::Implementation::getAllManglings(), getImplicitMethodEPI(), and hasDefaultCXXMethodCC().
QualType ASTContext::getDependentAddressSpaceType | ( | QualType | PointeeType, |
Expr * | AddrSpaceExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
Definition at line 3318 of file ASTContext.cpp.
References clang::DependentAddressSpaceType::getAddrSpaceExpr(), getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentAddressSpaceType::Profile(), and clang::TypeAlignment.
QualType ASTContext::getDependentNameType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 4036 of file ASTContext.cpp.
Referenced by clang::TreeTransform< Derived >::RebuildDependentNameType().
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 3110 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().
QualType ASTContext::getDependentSizedExtVectorType | ( | QualType | VectorType, |
Expr * | SizeExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
FIXME: We will need these to be uniqued, or at least comparable, at some point.
Definition at line 3277 of file ASTContext.cpp.
References getCanonicalType(), clang::DependentSizedExtVectorType::Profile(), and clang::TypeAlignment.
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 7311 of file ASTContext.cpp.
Referenced by getDependentTemplateName().
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 7347 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
const TemplateArgumentListInfo & | Args | ||
) | const |
Definition at line 4062 of file ASTContext.cpp.
Referenced by clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType().
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 4075 of file ASTContext.cpp.
|
inline |
Definition at line 667 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1243 of file ASTContext.cpp.
References clang::SourceManager::getDiagnostics().
Referenced by checkNullabilityConsistency(), computeKeyFunction(), createMangleContext(), clang::cross_tu::CrossTranslationUnitContext::emitCrossTUDiagnostics(), clang::ASTImporter::FromDiag(), clang::ASTImporter::Import(), clang::RawComment::parse(), rewriteToNumericBoxedExpression(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType | ||
) | const |
Definition at line 3987 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ElaboratedType::Profile(), and clang::TypeAlignment.
Referenced by clang::TypeName::getFullyQualifiedType(), clang::TreeTransform< Derived >::RebuildDependentNameType(), and clang::TreeTransform< Derived >::RebuildElaboratedType().
Definition at line 3733 of file ASTContext.cpp.
References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by getInjectedClassNameType().
Definition at line 5232 of file ASTContext.cpp.
References getDecayedType(), clang::QualType::getUnqualifiedType(), getVariableArrayDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by decomposeTypeForEH().
|
inline |
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition at line 1048 of file ASTContext.h.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::ExternalASTMerger::CompleteType(), clang::AccessSpecDecl::CreateDeserialized(), deduplicateMergedDefinitonsFor(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::CXXRecordDecl::getLambdaContextDecl(), clang::ExternalASTSource::incrementGeneration(), clang::Sema::Initialize(), isConsumerInterestedIn(), clang::RecordDecl::isMsStruct(), clang::DeclContext::lookups(), makeStandaloneDiagnostic(), clang::LazyGenerationalUpdatePtr< Owner, T, Update >::makeValue(), clang::Parser::ParseFirstTopLevelDecl(), shouldOmitDefinition(), and clang::Decl::updateOutOfDate().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 1010 of file ASTContext.cpp.
References clang::ExternCContextDecl::Create(), and getTranslationUnitDecl().
Return the unique reference to an extended vector type of the specified element type and size.
getExtVectorType - Return the unique reference to an extended vector type of the specified element type and size.
VectorType
must be a built-in type.VectorType must be a built-in type.
Definition at line 3248 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().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3059 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain(), and getFieldOffset().
|
inline |
Retrieve the C FILE type.
Definition at line 1693 of file ASTContext.h.
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).
typeDomain | a real floating point or complex type. |
typeSize | a 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 5325 of file ASTContext.cpp.
References DoubleComplexTy, DoubleRank, DoubleTy, Float128ComplexTy, Float128Rank, Float128Ty, Float16Rank, FloatComplexTy, FloatRank, FloatTy, getFloatingRank(), HalfRank, HalfTy, clang::Type::isComplexType(), clang::Type::isRealFloatingType(), LongDoubleComplexTy, LongDoubleRank, and LongDoubleTy.
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 5355 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().
const llvm::fltSemantics & ASTContext::getFloatTypeSemantics | ( | QualType | T | ) | const |
Return the APFloat 'semantics' for the specified scalar floating point type.
getFloatTypeSemantics - Return the APFloat 'semantics' for the specified scalar floating point type.
Definition at line 1449 of file ASTContext.cpp.
References clang::Type::getAs(), clang::TargetInfo::getDoubleFormat(), clang::TargetInfo::getFloat128Format(), clang::TargetInfo::getFloatFormat(), clang::TargetInfo::getHalfFormat(), clang::BuiltinType::getKind(), and clang::TargetInfo::getLongDoubleFormat().
Referenced by BuildFloatingLiteral(), canConvertIntTyToFloatTy(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::StandardConversionSequence::getNarrowingKind(), IsStandardConversion(), and tryGCCVectorConvertAndSplat().
|
inline |
Definition at line 700 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and Write_RethrowObject().
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 3362 of file ASTContext.cpp.
References getCanonicalFunctionResultType(), isCanonicalResultType(), clang::FunctionNoProtoType::Profile(), and clang::TypeAlignment.
Referenced by adjustFunctionType(), EmitFunctionDeclPointer(), GeneralizeFunctionType(), GetBuiltinType(), clang::ento::MemRegionManager::getVarRegion(), mergeFunctionTypes(), and clang::QualType::substObjCTypeArgs().
Definition at line 1328 of file ASTContext.h.
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1333 of file ASTContext.h.
Referenced by adjustDeducedFunctionResultType(), adjustFunctionType(), clang::Sema::CheckEquivalentExceptionSpec(), extractPBaseFlags(), clang::Sema::FindCompositePointerType(), GeneralizeFunctionType(), GetBuiltinType(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), mergeFunctionTypes(), mergeObjCGCQualifiers(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::QualType::substObjCTypeArgs(), and clang::ASTDeclReader::UpdateDecl().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 9288 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForFunction().
Referenced by clang::CodeGen::CodeGenModule::CreateFunctionTypeMetadata(), DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), IsKnownEmitted(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) |
Definition at line 9371 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForVariable().
Referenced by DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), and shouldBeInCOMDAT().
QualType ASTContext::getIncompleteArrayType | ( | QualType | EltTy, |
ArrayType::ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return a unique reference to the type for an incomplete array of the specified element type.
Definition at line 3178 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::IncompleteArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by getAsArrayType(), getUnqualifiedArrayType(), and mergeTypes().
QualType ASTContext::getInjectedClassNameType | ( | CXXRecordDecl * | Decl, |
QualType | TST | ||
) | const |
getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration.
Definition at line 3656 of file ASTContext.cpp.
References getEnumType(), clang::CXXRecordDecl::getPreviousDecl(), getRecordType(), getTypedefType(), NeedsInjectedClassNameType(), and clang::TypeAlignment.
Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().
TemplateArgument ASTContext::getInjectedTemplateArg | ( | NamedDecl * | ParamDecl | ) |
Definition at line 4127 of file ASTContext.cpp.
References getPackExpansionType(), getTypeDeclType(), and clang::TemplateTemplateParmDecl::isParameterPack().
Referenced by getInjectedTemplateArgs().
void ASTContext::getInjectedTemplateArgs | ( | const TemplateParameterList * | Params, |
SmallVectorImpl< TemplateArgument > & | Args | ||
) |
Get a template argument list with one argument per template parameter in a template parameter list, such as for the injected class name of a class template.
Definition at line 4160 of file ASTContext.cpp.
References getInjectedTemplateArg(), and clang::TemplateParameterList::size().
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 5862 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::isInline(), None, clang::Redeclarable< decl_type >::redecls(), Strong, Weak, and WeakUnknown.
Referenced by clang::CodeGen::CodeGenModule::EmitGlobal(), and clang::CodeGen::CodeGenModule::imbueXRayAttrs().
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 5494 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.
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 1268 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1360 of file ASTContext.cpp.
Referenced by isInstantiationOf().
If the given using decl Inst
is an instantiation of a (possibly unresolved) using decl from a template instantiation, return it.
Definition at line 1321 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and isInstantiationOfUnresolvedUsingDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1344 of file ASTContext.cpp.
Referenced by isInstantiationOf().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1069 of file ASTContext.cpp.
References buildImplicitTypedef(), and Int128Ty.
Referenced by clang::Sema::Initialize().
Return the highest ranked integer type, see C99 6.3.1.8p1.
getIntegerTypeOrder - Returns the highest ranked integer type: C99 6.3.1.8p1.
If LHS
> RHS
, returns 1. If LHS
== RHS
, returns 0. If LHS
< RHS
, return -1.
If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.
Definition at line 5522 of file ASTContext.cpp.
References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().
Referenced by canConvertIntToOtherIntTy(), handleIntegerConversion(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().
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 4786 of file ASTContext.cpp.
References clang::TargetInfo::getIntMaxType().
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getIntPtrType | ( | ) | const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4809 of file ASTContext.cpp.
References clang::TargetInfo::getIntPtrType().
Referenced by getUIntPtrType(), and clang::Sema::Initialize().
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 9574 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.
Referenced by AddDirectArgument(), CheckOpenMPLoop(), createKmpTaskTRecordDecl(), emitForStaticInitCall(), emitReduceFiniFunction(), clang::CodeGen::emitThreadIDAddress(), getOSLogArgType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), and clang::CodeGen::getTgtOffloadEntryQTy().
unsigned ASTContext::getIntWidth | ( | QualType | T | ) | const |
Definition at line 8788 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().
Referenced by AnalyzeComparison(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::ento::BasicValueFactory::getAPSIntType(), GetExprRange(), getFloatingTypeOrder(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), clang::IntegerLiteral::IntegerLiteral(), isOverflowingIntegerType(), and isShiftOverflow().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1705 of file ASTContext.h.
|
inline |
Definition at line 688 of file ASTContext.h.
Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), buildBlockDescriptor(), clang::arcmt::trans::canApplyWeak(), clang::Decl::canBeWeakImported(), CastsAwayConstness(), clang::VarDecl::checkInitIsICE(), ClassifyConditional(), ClassifyDecl(), ClassifyUnnamed(), computeBlockInfo(), computeDeclRefDependence(), computeKeyFunction(), clang::LinkageComputer::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(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), DiagnoseSwitchLabelsFallthrough(), clang::Stmt::dumpPretty(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), 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(), clang::diff::SyntaxTree::Impl::getDeclValue(), 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(), getTypeInfoDataSizeInChars(), clang::Decl::hasLocalOwningModuleStorage(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSuperInitCall(), clang::Sema::isAcceptableNestedNameSpecifier(), isARCNilInitializedLocal(), isCanonicalExceptionSpecification(), clang::Expr::isCXX11ConstantExpr(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), 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(), needsConversionOfHalfVec(), clang::ento::ConditionBRVisitor::patternMatch(), printExprAsWritten(), PrintStats(), clang::CodeGen::CodeGenModule::Release(), resolveAllocationOverload(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::edit::rewriteToObjCLiteralSyntax(), roundUpSizeToCharAlignment(), clang::tooling::ReplaceNodeWithTemplate::run(), clang::CXXRecordDecl::setBases(), clang::MangleContext::shouldMangleDeclName(), shouldNotRewriteImmediateMessageArgs(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarPointerTypes(), clang::ASTDeclReader::UpdateDecl(), useInlineVisibilityHidden(), Write_IvarOffsetVar(), Write_ProtocolExprReferencedMetadata(), and clang::ASTWriter::WriteAST().
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 6171 of file ASTContext.cpp.
References clang::Type::getAs(), getIntWidth(), clang::QualType::getTypePtr(), IntTy, and UnsignedIntTy.
|
inline |
Return a type with the given lifetime qualifier.
lifetime
may be OCL_None
. Definition at line 1903 of file ASTContext.h.
References clang::Qualifiers::addObjCLifetime(), and clang::QualType::getObjCLifetime().
comments::FullComment * ASTContext::getLocalCommentForDeclUncached | ( | const Decl * | D | ) | const |
Return parsed documentation comment attached to a given declaration.
Returns nullptr if no comment is attached. Does not look at any redeclarations of the declaration.
Definition at line 483 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1736 of file ASTContext.h.
Referenced by clang::Sema::BuildTypeTrait(), and clang::ento::BasicValueFactory::getTruthValue().
Return the uniqued reference to the type for an lvalue reference to the specified type.
getLValueReferenceType - Return the uniqued reference to the type for an lvalue reference to the specified type.
Definition at line 2796 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::ReferenceType::getPointeeType(), clang::QualType::isCanonical(), OverloadTy, clang::ReferenceType::Profile(), clang::T, and clang::TypeAlignment.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), DiagnoseForRangeConstVariableCopies(), clang::Expr::EvaluateAsLValue(), getCanonicalParamType(), clang::TypeName::getFullyQualifiedType(), getVariableArrayDecayedType(), clang::InitializationSequence::Perform(), and TryClassUnification().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1028 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1667 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getMakeIntegerSeqDecl(), and LookupBuiltin().
unsigned ASTContext::getManglingNumber | ( | const NamedDecl * | ND | ) | const |
Definition at line 9609 of file ASTContext.cpp.
Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | const DeclContext * | DC | ) |
Retrieve the context for computing mangling numbers in the given DeclContext.
Definition at line 9625 of file ASTContext.cpp.
References createMangleNumberingContext().
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 9682 of file ASTContext.cpp.
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 2871 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().
Get the initializations to perform when importing a module, if any.
Definition at line 1000 of file ASTContext.cpp.
References Inits.
Get the additional modules in which the definition Def
has been merged.
Definition at line 971 of file ASTContext.h.
Referenced by clang::Sema::diagnoseMissingImport(), hasVisibleDeclarationImpl(), and hasVisibleDefaultArgument().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 4957 of file ASTContext.cpp.
|
inlinestatic |
Definition at line 942 of file ASTContext.h.
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1634 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1651 of file ASTContext.h.
References clang::TargetInfo::getTriple().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1625 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1642 of file ASTContext.h.
References clang::TargetInfo::getTriple().
TypedefDecl * ASTContext::getObjCClassDecl | ( | ) | const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
Definition at line 6871 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinClassTy.
Referenced by clang::Sema::Initialize().
|
inline |
Retrieve the type that Class
has been defined to, which may be different from the built-in Class
if Class
has been typedef'd.
Definition at line 1600 of file ASTContext.h.
References clang::QualType::isNull().
Referenced by ShouldTryAgainWithRedefinitionType().
|
inline |
Represents the Objective-C Class
type.
This is set up lazily, by Sema. Class
is always a (typedef for a) pointer type, a pointer to a struct.
Definition at line 1822 of file ASTContext.h.
Referenced by LookupMemberExpr().
|
inline |
Definition at line 1573 of file ASTContext.h.
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 5889 of file ASTContext.cpp.
Referenced by buildBlockDescriptor().
std::string ASTContext::getObjCEncodingForFunctionDecl | ( | const FunctionDecl * | Decl | ) | const |
Emit the encoded type for the function Decl
into S
.
This is in the same format as Objective-C method encodings.
Definition at line 5945 of file ASTContext.cpp.
std::string ASTContext::getObjCEncodingForMethodDecl | ( | const ObjCMethodDecl * | Decl, |
bool | Extended = false |
||
) | const |
Emit the encoded type for the method declaration Decl
into S
.
getObjCEncodingForMethodDecl - Return the encoded type for this method declaration.
Definition at line 6002 of file ASTContext.cpp.
Referenced by SymbolNameForMethod(), Write__extendedMethodTypes_initializer(), and Write_method_list_t_initializer().
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 5986 of file ASTContext.cpp.
std::string ASTContext::getObjCEncodingForPropertyDecl | ( | const ObjCPropertyDecl * | PD, |
const Decl * | Container | ||
) | const |
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.
getObjCEncodingForPropertyDecl - Return the encoded type for this property declaration.
If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties.
If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties. Property attributes are stored as a comma-delimited C string. The simple attributes readonly and bycopy are encoded as single characters. The parametrized attributes, getter=name, setter=name, and ivar=name, are encoded as single characters, followed by an identifier. Property types are also encoded as a parametrized attribute. The characters used to encode these attributes are defined by the following enumeration:
Definition at line 6100 of file ASTContext.cpp.
void ASTContext::getObjCEncodingForPropertyType | ( | QualType | T, |
std::string & | S | ||
) | const |
Emit the Objective-C property type encoding for the given type T
into S
.
Definition at line 6195 of file ASTContext.cpp.
void ASTContext::getObjCEncodingForType | ( | QualType | T, |
std::string & | S, | ||
const FieldDecl * | Field = nullptr , |
||
QualType * | NotEncodedT = nullptr |
||
) | const |
Emit the Objective-CC type encoding for the given type T
into S
.
If Field
is specified then record field names are also encoded.
Definition at line 6183 of file ASTContext.cpp.
Referenced by Write__ivar_list_t_initializer().
void ASTContext::getObjCEncodingForTypeQualifier | ( | Decl::ObjCDeclQualifier | QT, |
std::string & | S | ||
) | const |
Put the string version of the type qualifiers QT
into S
.
Definition at line 6838 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.
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 5839 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().
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 7448 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().
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 2519 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().
TypedefDecl * ASTContext::getObjCIdDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined id
type in Objective-C.
Definition at line 6854 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinIdTy.
Referenced by clang::Sema::Initialize().
|
inline |
Retrieve the type that id
has been defined to, which may be different from the built-in id
if id
has been typedef'd.
Definition at line 1587 of file ASTContext.h.
References clang::QualType::isNull().
Referenced by ShouldTryAgainWithRedefinitionType().
|
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 1800 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), CheckKeyForObjCARCConversion(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCInstanceTypeDecl(), SymbolNameForMethod(), and TryContextuallyConvertToObjCPointer().
ObjCImplementationDecl * ASTContext::getObjCImplementation | ( | ObjCInterfaceDecl * | D | ) |
Get the implementation of the ObjCInterfaceDecl D
, or nullptr if none exists.
Get the implementation of ObjCInterfaceDecl, or nullptr if none exists.
Definition at line 2335 of file ASTContext.cpp.
Referenced by clang::ObjCMethodDecl::setMethodParams().
ObjCCategoryImplDecl * ASTContext::getObjCImplementation | ( | ObjCCategoryDecl * | D | ) |
Get the implementation of the ObjCCategoryDecl D
, or nullptr if none exists.
Get the implementation of ObjCCategoryDecl, or nullptr if none exists.
Definition at line 2345 of file ASTContext.cpp.
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1681 of file ASTContext.h.
Referenced by getReturnTypeForMethod(), and ReplaceWithInstancetype().
TypedefDecl * ASTContext::getObjCInstanceTypeDecl | ( | ) |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
Definition at line 5820 of file ASTContext.cpp.
References buildImplicitTypedef(), and getObjCIdType().
QualType ASTContext::getObjCInterfaceType | ( | const ObjCInterfaceDecl * | Decl, |
ObjCInterfaceDecl * | PrevDecl = nullptr |
||
) | const |
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl.
The list of protocols is optional.
Definition at line 4533 of file ASTContext.cpp.
References Allocate(), clang::ObjCInterfaceDecl::getDefinition(), clang::T, and clang::TypeAlignment.
Referenced by clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), areCommonBaseCompatible(), clang::Sema::CheckObjCMethodOverride(), clang::ObjCObjectType::computeSuperClassTypeSlow(), clang::ObjCInterfaceDecl::Create(), clang::getDeclUsageType(), clang::ObjCPropertyRefExpr::getReceiverType(), GetReturnType(), LookupMethodInReceiverType(), and setObjCConstantStringInterface().
const ObjCMethodDecl * ASTContext::getObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD | ) | const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
Definition at line 2368 of file ASTContext.cpp.
Referenced by clang::ObjCMethodDecl::setMethodParams(), and setObjCMethodRedeclaration().
|
inline |
Definition at line 1577 of file ASTContext.h.
Return a ObjCObjectPointerType type for the given ObjCObjectType.
getObjCObjectPointerType - Return a ObjCObjectPointerType type for the given object type.
Definition at line 4503 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), clang::QualType::isCanonical(), clang::ObjCObjectPointerType::Profile(), and clang::TypeAlignment.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), canBindObjCObjectType(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::ento::TypedValueRegion::getLocationType(), getMostInformativeDerivedClassImpl(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), getReturnTypeForMethod(), clang::ObjCObjectPointerType::getSuperClassType(), recordFixedType(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), and clang::QualType::substObjCTypeArgs().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ObjCProtocolDecl *const * | Protocols, | ||
unsigned | NumProtocols | ||
) | const |
Legacy interface: cannot provide type arguments or __kindof.
Definition at line 4237 of file ASTContext.cpp.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), getObjCClassDecl(), getObjCIdDecl(), getObjCObjectType(), clang::Type::getObjCSubstitutions(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), and clang::QualType::substObjCTypeArgs().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ArrayRef< QualType > | typeArgs, | ||
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
bool | isKindOf | ||
) | const |
Definition at line 4245 of file ASTContext.cpp.
References Allocate(), areSortedAndUniqued(), clang::Type::getAs(), getCanonicalType(), getObjCObjectType(), clang::QualType::isCanonical(), clang::ObjCObjectTypeImpl::Profile(), SortAndUniqueProtocols(), clang::ast_matchers::type, and clang::TypeAlignment.
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 2378 of file ASTContext.cpp.
References clang::Decl::getDeclContext().
Referenced by clang::edit::rewriteToObjCSubscriptSyntax().
ObjCPropertyImplDecl * ASTContext::getObjCPropertyImplDeclForPropertyDecl | ( | const ObjCPropertyDecl * | PD, |
const Decl * | Container | ||
) | const |
Definition at line 6055 of file ASTContext.cpp.
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 6880 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), and Idents.
Referenced by clang::Sema::Initialize().
|
inline |
Retrieve the type of the Objective-C Protocol
class.
Definition at line 1846 of file ASTContext.h.
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 6863 of file ASTContext.cpp.
References buildImplicitTypedef(), getPointerType(), and ObjCBuiltinSelTy.
Referenced by clang::Sema::Initialize().
|
inline |
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd.
Definition at line 1613 of file ASTContext.h.
References clang::QualType::isNull().
Referenced by LookupMemberExpr().
|
inline |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
Definition at line 1810 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), isWeakLinkedClass(), and SymbolNameForMethod().
QualType ASTContext::getObjCSuperType | ( | ) | const |
Returns the C struct type for objc_super.
Definition at line 5626 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), buildImplicitRecord(), getTagDeclType(), and clang::QualType::isNull().
QualType ASTContext::getObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl, |
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
QualType | Canonical = QualType() |
||
) | const |
Definition at line 4401 of file ASTContext.cpp.
References Allocate(), applyObjCProtocolQualifiers(), getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), clang::ObjCTypeParamType::Profile(), and clang::TypeAlignment.
Referenced by applyObjCProtocolQualifiers(), and clang::ObjCTypeParamDecl::Create().
CharUnits ASTContext::getOffsetOfBaseWithVBPtr | ( | const CXXRecordDecl * | RD | ) | const |
Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero.
This is usually OK because the first slot in the vbtable points backwards to the top of the MDC. However, the MDC might be reusing a vbptr from an nv-base. In this case, the first slot in the vbtable points to the start of the nv-base which introduced the vbptr and not the MDC. Modify the NonVirtualBaseAdjustment to account for this.
Definition at line 2070 of file ASTContext.cpp.
References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), and clang::CharUnits::Zero().
Get address space for OpenCL type.
Definition at line 5755 of file ASTContext.cpp.
References clang::TargetInfo::getOpenCLTypeAddrSpace(), and getOpenCLTypeKind().
Referenced by clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CGOpenCLRuntime::getPipeType(), and clang::CodeGen::CGOpenCLRuntime::getSamplerType().
TargetInfo::OpenCLTypeKind ASTContext::getOpenCLTypeKind | ( | const Type * | T | ) | const |
Map an AST Type to an OpenCLTypeKind enum value.
Definition at line 5719 of file ASTContext.cpp.
References clang::TargetInfo::OCLTK_ClkEvent, clang::TargetInfo::OCLTK_Default, clang::TargetInfo::OCLTK_Event, clang::TargetInfo::OCLTK_Pipe, clang::TargetInfo::OCLTK_Queue, clang::TargetInfo::OCLTK_ReserveID, clang::TargetInfo::OCLTK_Sampler, and clang::T.
Referenced by getOpenCLTypeAddrSpace().
unsigned ASTContext::getOpenMPDefaultSimdAlign | ( | QualType | T | ) | const |
Get default simd alignment of the specified complete type in bits.
Definition at line 1979 of file ASTContext.cpp.
References clang::TargetInfo::getSimdDefaultAlign(), getTargetInfo(), and clang::Type::isSpecificBuiltinType().
TemplateName ASTContext::getOverloadedTemplateName | ( | UnresolvedSetIterator | Begin, |
UnresolvedSetIterator | End | ||
) | const |
Retrieve the template name that corresponds to a non-empty lookup.
Definition at line 7263 of file ASTContext.cpp.
References Allocate(), and Begin.
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 1410 of file ASTContext.cpp.
References clang::ObjCMethodDecl::getOverriddenMethods(), overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
Definition at line 4168 of file ASTContext.cpp.
References clang::Type::containsUnexpandedParameterPack(), getCanonicalType(), clang::QualType::isCanonical(), clang::PackExpansionType::Profile(), and clang::TypeAlignment.
Referenced by getInjectedTemplateArg().
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 9674 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::isParameterPack().
|
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 629 of file ASTContext.h.
References clang::serialized_diags::create(), and Node.
ASTContext::DynTypedNodeList ASTContext::getParents | ( | const ast_type_traits::DynTypedNode & | Node | ) |
Definition at line 4013 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ParenType::Profile(), and clang::TypeAlignment.
QualType ASTContext::getPointerDiffType | ( | ) | const |
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
getPointerDiffType - Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
Pointer - pointer requires this (C99 6.5.6p9).
Definition at line 4819 of file ASTContext.cpp.
References clang::TargetInfo::getPtrDiffType().
Referenced by clang::ento::RangedConstraintManager::assumeSym(), CanUseSingleInheritance(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBadTypeidFn(), getItaniumDynamicCastFn(), getPreferredTypeAlign(), clang::Sema::Initialize(), performTypeAdjustment(), and SymbolNameForMethod().
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 2675 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::PointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnCXXDelete(), AddDirectArgument(), AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), buildMemcpyForAssignmentOp(), BuildUniqueMethodName(), captureThis(), clang::ento::StoreManager::CastRetrievedVal(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkOpenCLPipePacketType(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::CodeGen::createRuntimeFunction(), clang::Sema::DeclareGlobalNewDelete(), decomposeTypeForEH(), emitCXXDestructor(), EmitFunctionDeclPointer(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), GeneralizeType(), 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(), getFunctionSourceLocation(), 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(), clang::CodeGen::CGOpenMPRuntimeNVPTX::translateParameter(), TryConstCast(), tryObjCWritebackConversion(), and TryReinterpretCast().
|
inline |
Definition at line 1185 of file ASTContext.h.
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 2022 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().
Definition at line 952 of file ASTContext.h.
Referenced by clang::getPrimaryMergedDecl().
|
inline |
Definition at line 635 of file ASTContext.h.
Referenced by clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpDeclContext(), clang::DeclContext::dumpLookups(), clang::FormatASTNodeDiagnosticArgument(), clang::TypeName::getFullyQualifiedName(), getFunctionSourceLocation(), HasLocalVariableExternalStorage(), IsCommonTypo(), isTupleLike(), lookupStdTypeTraitMember(), mustSynthesizeSetterGetterMethod(), clang::Parser::ParseTopLevelDecl(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), and scanToNextArgument().
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 4832 of file ASTContext.cpp.
References clang::TargetInfo::getProcessIDType().
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 5451 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().
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 7287 of file ASTContext.cpp.
References clang::QualifiedTemplateName::Profile().
Referenced by clang::TypeName::getFullyQualifiedTemplateName().
|
inline |
Un-split a SplitQualType.
Definition at line 1880 of file ASTContext.h.
References clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by clang::Sema::ActOnCXXDelete(), clang::QualifierCollector::apply(), BuildImplicitBaseInitializer(), checkBlockPointerTypesForAssignment(), checkComplexDecomposition(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkMemberDecomposition(), clang::Sema::CheckPointerToMemberOperands(), checkVectorDecomposition(), CompareQualificationConversions(), CompareStandardConversionSequences(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArgumentsByTypeMatch(), getArrayDecayedType(), clang::Type::getArrayElementTypeNoTypeQual(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getConstantArrayType(), getDependentSizedArrayType(), clang::TypeName::getFullyQualifiedType(), getIncompleteArrayType(), getNonMemoryType(), clang::CXXMethodDecl::getThisType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCWriteback(), InitBuiltinTypes(), rewriteToObjCProperty(), SemaOpenCLBuiltinToAddr(), simpleTransform(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), transferARCOwnershipToDeclSpec(), TryReferenceInitializationCore(), and UnwrapTypeForDebugInfo().
|
inline |
Return a type with additional qualifiers.
Definition at line 1885 of file ASTContext.h.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasNonFastQualifiers(), clang::QualifierCollector::strip(), and clang::QualType::withFastQualifiers().
|
inline |
Return a type with additional qualifiers.
Definition at line 1894 of file ASTContext.h.
References clang::Qualifiers::getFastQualifiers(), and clang::Qualifiers::hasNonFastQualifiers().
|
inline |
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.
Definition at line 1562 of file ASTContext.h.
const RawComment * ASTContext::getRawCommentForAnyRedecl | ( | const Decl * | D, |
const Decl ** | OriginalDecl = nullptr |
||
) | const |
Return the documentation comment attached to a given declaration.
Returns nullptr if no comment is attached.
OriginalDecl | if not nullptr, is set to declaration AST node that had the comment, if the comment we found comes from a redeclaration. |
Definition at line 380 of file ASTContext.cpp.
References adjustDeclToTemplate(), 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().
RawComment * ASTContext::getRawCommentForDeclNoCache | ( | const Decl * | D | ) | const |
Return the documentation comment attached to a given declaration, without looking into cache.
Definition at line 113 of file ASTContext.cpp.
References clang::LangOptions::CommentOpts, Comments, CommentsLoaded, ExternalSource, clang::RawCommentList::getComments(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getExpansionLoc(), clang::SourceManager::getLineNumber(), clang::Decl::getLocation(), clang::Decl::getLocStart(), clang::SourceLocation::isFileID(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::SourceManager::isMacroArgExpansion(), clang::SourceLocation::isMacroID(), clang::CommentOptions::ParseAllComments, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by getLocalCommentForDeclUncached().
|
inline |
Definition at line 780 of file ASTContext.h.
Return a read_only pipe type for the specified type.
Definition at line 3633 of file ASTContext.cpp.
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 9586 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.
QualType ASTContext::getRecordType | ( | const RecordDecl * | Decl | ) | const |
Definition at line 3720 of file ASTContext.cpp.
References clang::RecordDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by checkMemberDecomposition(), CheckOperatorDeleteDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), emitReduceFiniFunction(), evaluateCDTSize(), findDirectBaseWithType(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), getInjectedClassNameType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), hasCopyOrMoveCtorParam(), recordFixedType(), and clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass().
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 1133 of file ASTContext.h.
References clang::QualType::withFastQualifiers().
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 2836 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::ReferenceType::getPointeeType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), clang::T, and clang::TypeAlignment.
Referenced by EvaluateBinaryTypeTrait(), getAutoRRefDeductType(), clang::TypeName::getFullyQualifiedType(), getVariableArrayDecayedType(), clang::InitializationSequence::Perform(), and TryClassUnification().
|
inline |
Definition at line 690 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), and clang::CodeGen::CodeGenFunction::ShouldEmitVTableTypeCheckedLoad().
size_t ASTContext::getSideTableAllocatedMemory | ( | ) | const |
Return the total memory used for various side tables.
Definition at line 9553 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1717 of file ASTContext.h.
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 5226 of file ASTContext.cpp.
References getAdjustedParameterType(), clang::QualType::getUnqualifiedType(), and getVariableArrayDecayedType().
CanQualType ASTContext::getSignedSizeType | ( | ) | const |
Return the unique signed counterpart of the integer type corresponding to size_t.
Definition at line 4781 of file ASTContext.cpp.
References clang::TargetInfo::getSignedSizeType().
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getSignedWCharType | ( | ) | const |
Return the type of "signed wchar_t".
getSignedWCharType - Return the type of "signed wchar_t".
Used when in C++, as a GCC extension.
Definition at line 4797 of file ASTContext.cpp.
References WCharTy.
CanQualType ASTContext::getSizeType | ( | ) | const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
getSizeType - Return the unique type for "size_t" (C99 7.17), the result of the sizeof operator (C99 6.5.3.4p4).
The sizeof operator requires this (C99 6.5.3.4p4).
The value is target dependent and needs to agree with the definition in <stddef.h>.
Definition at line 4775 of file ASTContext.cpp.
References clang::TargetInfo::getSizeType().
Referenced by clang::Sema::BuildArrayTypeTrait(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), buildMemcpyForAssignmentOp(), CheckOperatorNewDeclaration(), createTypePackElementParameterList(), clang::Sema::DeclareGlobalNewDelete(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBytesReturnedByAllocSizeCall(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), matchesStlAllocatorFn(), SymbolNameForMethod(), and warnBracedScalarInit().
|
inline |
Definition at line 643 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::StmtSequence::contains(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::CreateHTMLPrinter(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpLookups(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::tooling::findSelectedASTNodes(), clang::arcmt::trans::findSemiAfterLocation(), GenerateFixForUnusedDecl(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), getAsmSrcLocInfo(), clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(), clang::ASTWriter::getDeclID(), clang::diff::SyntaxTree::Impl::getDeclValue(), getLiteralInfo(), clang::getParameterABISpelling(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ento::AnalysisManager::getSourceManager(), getTargetEntryUniqueInfo(), clang::ento::MemRegionManager::getVarRegion(), clang::BackendConsumer::HandleInlineFunctionDefinition(), clang::tooling::RenamingASTConsumer::HandleOneRename(), clang::BackendConsumer::HandleTopLevelDecl(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), LocPropertyAttribute(), clang::Sema::makeUnavailableInSystemHeader(), mayInlineDecl(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), printExprAsWritten(), shouldReportOccurrenceForSystemDeclOnlyMode(), and clang::ento::ExprEngine::ViewGraph().
|
inline |
Definition at line 644 of file ASTContext.h.
unsigned ASTContext::getStaticLocalNumber | ( | const VarDecl * | VD | ) | const |
Definition at line 9619 of file ASTContext.cpp.
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateTemplateParmDecl * | param, |
TemplateName | replacement | ||
) | const |
Definition at line 7382 of file ASTContext.cpp.
References clang::SubstTemplateTemplateParmStorage::Profile().
TemplateName ASTContext::getSubstTemplateTemplateParmPack | ( | TemplateTemplateParmDecl * | Param, |
const TemplateArgument & | ArgPack | ||
) | const |
Definition at line 7400 of file ASTContext.cpp.
References IntTy, LongLongTy, LongTy, clang::TargetInfo::NoInt, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::SubstTemplateTemplateParmPackStorage::Profile(), ShortTy, clang::TargetInfo::SignedChar, SignedCharTy, clang::TargetInfo::SignedInt, clang::TargetInfo::SignedLong, clang::TargetInfo::SignedLongLong, clang::TargetInfo::SignedShort, clang::TargetInfo::UnsignedChar, UnsignedCharTy, clang::TargetInfo::UnsignedInt, UnsignedIntTy, clang::TargetInfo::UnsignedLong, clang::TargetInfo::UnsignedLongLong, UnsignedLongLongTy, UnsignedLongTy, clang::TargetInfo::UnsignedShort, and UnsignedShortTy.
QualType ASTContext::getSubstTemplateTypeParmPackType | ( | const TemplateTypeParmType * | Replaced, |
const TemplateArgument & | ArgPack | ||
) |
Retrieve a.
Definition at line 3790 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isCanonicalUnqualified(), P, clang::TemplateArgument::pack_elements(), clang::SubstTemplateTypeParmPackType::Profile(), clang::TemplateArgument::Type, and clang::TypeAlignment.
QualType ASTContext::getSubstTemplateTypeParmType | ( | const TemplateTypeParmType * | Replaced, |
QualType | Replacement | ||
) | const |
Retrieve a substitution-result type.
Definition at line 3768 of file ASTContext.cpp.
References clang::QualType::isCanonical(), clang::SubstTemplateTypeParmType::Profile(), and clang::TypeAlignment.
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
getTagDeclType - Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
Definition at line 4765 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by BuildImplicitMemberInitializer(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::InitializationSequence::Diagnose(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), GetThisType(), isSafeToConvert(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
|
inline |
Definition at line 2407 of file ASTContext.h.
References clang::QualType::getQualifiers().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), buildBlockDescriptor(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertType(), createReferenceTemporary(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), GenerateStringLiteral(), clang::CodeGen::ConstantEmitter::getCurrentAddrPrivate(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), clang::CodeGen::CGOpenCLRuntime::getPipeType(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), initializeForBlockHeader(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and roundUpSizeToCharAlignment().
|
inline |
Definition at line 2411 of file ASTContext.h.
References clang::Qualifiers::getAddressSpace().
unsigned ASTContext::getTargetAddressSpace | ( | LangAS | AS | ) | const |
Definition at line 9938 of file ASTContext.cpp.
References clang::ExternalASTSource::CompleteRedeclChain(), clang::isTargetAddressSpace(), and clang::toTargetAddressSpace().
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 2054 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 671 of file ASTContext.h.
Referenced by clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::trans::canApplyWeak(), CheckFormatString(), checkForMultipleExportedDefaultConstructors(), checkObjCMethodX86VectorTypes(), checkVAStartABI(), computeKeyFunction(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), diagnoseUnavailableAlignedAllocation(), EmitGlobalDeclMetadata(), clang::CodeGen::emitThreadPrivateVarInit(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), 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(), getTypeInfoLinkage(), 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(), needsConversionOfHalfVec(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), clang::StringLiteral::setString(), supportsNilWithFloatRet(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryReinterpretCast(), TryStaticMemberPointerUpcast(), warnBracedScalarInit(), Write__class_ro_t_initializer(), and WriteModernMetadataDeclarations().
uint64_t ASTContext::getTargetNullPointerValue | ( | QualType | QT | ) | const |
Get target-dependent integer value for null pointer which is used for constant folding.
Definition at line 9928 of file ASTContext.cpp.
References clang::Default, clang::QualType::getAddressSpace(), clang::TargetInfo::getNullPointerValue(), clang::Type::getPointeeType(), getTargetInfo(), clang::Type::getUnqualifiedDesugaredType(), and clang::Type::isNullPtrType().
Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable().
ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo | ( | const VarDecl * | Var | ) |
Definition at line 1275 of file ASTContext.cpp.
Referenced by clang::VarDecl::getDescribedVarTemplate(), getInstantiatedFromStaticDataMember(), and clang::VarDecl::getMemberSpecializationInfo().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3903 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateName::getAsTemplateDecl(), getCanonicalTemplateSpecializationType(), getCanonicalType(), hasAnyPackExpansions(), clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by getTemplateSpecializationType(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
const TemplateArgumentListInfo & | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3878 of file ASTContext.cpp.
References clang::TemplateArgumentListInfo::arguments(), clang::TemplateName::getAsDependentTemplateName(), getTemplateSpecializationType(), and clang::TemplateArgumentListInfo::size().
TypeSourceInfo * ASTContext::getTemplateSpecializationTypeInfo | ( | TemplateName | T, |
SourceLocation | TLoc, | ||
const TemplateArgumentListInfo & | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3857 of file ASTContext.cpp.
Referenced by clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
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 3826 of file ASTContext.cpp.
References clang::TemplateTypeParmType::Profile(), and clang::TypeAlignment.
Referenced by clang::TemplateTypeParmDecl::Create().
|
inline |
Definition at line 989 of file ASTContext.h.
Referenced by clang::Sema::ActOnPragmaMSComment(), clang::Sema::ActOnStartOfTranslationUnit(), clang::ASTImporter::ASTImporter(), clang::arcmt::trans::checkAPIUses(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), clang::CreateASTViewer(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::tooling::QualifiedRenameRule::describe(), EvaluateBinaryTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::tooling::findSelectedASTNodes(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(), GetDeclSpecTypeForDeclarator(), getExternCContextDecl(), getObjCProtocolDecl(), getParents(), LookupVisibleDecls(), clang::arcmt::trans::makeAssignARCSafe(), clang::ExternalASTMerger::MaybeRecordOrigin(), 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().
TypeSourceInfo * ASTContext::getTrivialTypeSourceInfo | ( | QualType | T, |
SourceLocation | Loc = SourceLocation() |
||
) | const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.
Definition at line 2426 of file ASTContext.cpp.
References CreateTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), and clang::TypeLoc::initialize().
Referenced by clang::Sema::ActOnArrayTypeTrait(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartClassImplementation(), addFieldToRecordDecl(), BuildImplicitBaseInitializer(), buildPostUpdate(), clang::Sema::BuildPseudoDestructorExpr(), buildVarDecl(), captureThis(), CastForMoving(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ObjCObjectTypeLoc::initializeLocal(), clang::TypeOfTypeLoc::initializeLocal(), clang::UnaryTransformTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), PerformConstructorInitialization(), and translateTemplateArgument().
|
inline |
Return the ABI-specified alignment of a (complete) type T
, in bits.
Definition at line 2028 of file ASTContext.h.
References clang::TypeInfo::Align.
Referenced by getAlignOfGlobalVar(), getTypeAlignIfKnown(), getTypeAlignInChars(), and Write__ivar_list_t_initializer().
|
inline |
Definition at line 2029 of file ASTContext.h.
References clang::TypeInfo::Align, DumpRecordLayout(), getDeclAlign(), and getFieldOffset().
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 1621 of file ASTContext.cpp.
References clang::Type::getAs(), getBaseElementType(), getTypeAlign(), and clang::Type::isIncompleteType().
Referenced by hasNewExtendedAlignment().
Return the ABI-specified alignment of a (complete) type T
, in characters.
getTypeAlignInChars - Return the ABI-specified alignment of a type, in characters.
This method does not work on incomplete types.
Definition at line 2011 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
Referenced by AddDirectArgument(), classifyType(), createReferenceTemporary(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), performTypeAdjustment(), and roundUpSizeToCharAlignment().
Definition at line 2014 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1347 of file ASTContext.h.
References Depth, getRecordType(), and Replacement.
Referenced by clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::CXXRecordDecl::CreateLambda(), 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().
TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 9657 of file ASTContext.cpp.
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 3707 of file ASTContext.cpp.
References getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by getCFConstantStringType(), and getInjectedClassNameType().
Get the size and alignment of the specified complete type in bits.
Definition at line 1645 of file ASTContext.cpp.
Referenced by EmitX86_64VAArgFromMemory(), getIntegerWidthAndSignedness(), getPreferredTypeAlign(), getTypeAlignIfRequired(), getTypeInfoInChars(), isAlignmentRequired(), matchTypes(), roundUpSizeToCharAlignment(), and tryMatchRecordTypes().
Definition at line 2001 of file ASTContext.h.
References getTypeInfo(), and clang::QualType::getTypePtr().
Referenced by getTypeInfo().
Definition at line 1563 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAs(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), getLangOpts(), and getTypeInfoInChars().
Definition at line 1600 of file ASTContext.cpp.
References clang::TypeInfo::Align, getConstantArrayInfoInChars(), getTypeInfo(), toCharUnitsFromBits(), and clang::TypeInfo::Width.
Referenced by computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), EmitX86_64VAArgFromMemory(), getMaxAtomicAccessSize(), getTypeInfoDataSizeInChars(), getTypeInfoInChars(), getTypeSizeInChars(), and roundUpSizeToCharAlignment().
Definition at line 1609 of file ASTContext.cpp.
References getTypeInfoInChars(), and clang::QualType::getTypePtr().
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 4560 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::getType(), clang::Expr::isTypeDependent(), clang::DependentTypeOfExprType::Profile(), and clang::TypeAlignment.
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 4594 of file ASTContext.cpp.
References getCanonicalType(), and clang::TypeAlignment.
BuiltinTemplateDecl * ASTContext::getTypePackElementDecl | ( | ) | const |
Definition at line 1036 of file ASTContext.cpp.
References clang::BTK__type_pack_element, buildBuiltinTemplateDecl(), and getTypePackElementName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1673 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getTypePackElementDecl(), and LookupBuiltin().
|
inline |
Definition at line 1066 of file ASTContext.h.
Referenced by clang::TypoCorrectionConsumer::addNamespaces().
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 2007 of file ASTContext.h.
References clang::TypeInfo::Width.
Referenced by addBaseAndFieldSizes(), BitsContainNoUserData(), buildMemcpyForAssignmentOp(), canConvertIntTyToFloatTy(), checkIntToPointerCast(), checkVectorResult(), checkVectorShift(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), DiagnoseBadShiftValues(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitX86_64VAArgFromMemory(), clang::ento::MemRegion::getAsOffset(), getBytesReturnedByAllocSizeCall(), GetCFNumberSize(), GetGCAttrTypeForType(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::ento::BasicValueFactory::getTruthValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), HandleNeonVectorTypeAttr(), HandleVectorSizeAttr(), hasUniqueObjectRepresentations(), 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().
|
inline |
Definition at line 2008 of file ASTContext.h.
References clang::TypeInfo::Width.
Return the size of the specified (complete) type T
, in characters.
getTypeSizeInChars - Return the size of the specified type, in characters.
This method does not work on incomplete types.
Definition at line 2002 of file ASTContext.cpp.
References getTypeInfoInChars().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), addValue(), buildMemcpyForAssignmentOp(), clang::ento::StoreManager::castRegion(), CheckAggExprForMemSetUse(), computeBlockInfo(), ContainsFloatAtOffset(), createRuntimeShuffleFunction(), emitArraySubscriptGEP(), EmitCXXNewAllocSize(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPointerArithmetic(), emitRTtypeidCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), evenFlexibleArraySize(), forConstantArrayExpansion(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ento::TypedValueRegion::getExtent(), GetGCAttrTypeForType(), getObjCEncodingTypeSize(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeExpansion(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), isOnePastTheEndOfCompleteObject(), isTrivialFiller(), isValidBaseType(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), tryEmitFMulAdd(), and Write__ivar_list_t_initializer().
Definition at line 2005 of file ASTContext.cpp.
References getTypeInfoInChars().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 1729 of file ASTContext.h.
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 1075 of file ASTContext.cpp.
References buildImplicitTypedef(), clang::CanQual< Type >::CreateUnsafe(), clang::TypeAlignment, and UnsignedInt128Ty.
Referenced by clang::Sema::Initialize().
CanQualType ASTContext::getUIntMaxType | ( | ) | const |
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5).
Definition at line 4791 of file ASTContext.cpp.
References clang::TargetInfo::getUIntMaxType().
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getUIntPtrType | ( | ) | const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4813 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by clang::Sema::Initialize().
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 4636 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isDependentType(), clang::DependentUnaryTransformType::Profile(), and clang::TypeAlignment.
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().
T | is the qualified type, which may be an ArrayType |
Quals | will receive the full set of qualifiers that were applied to the array. |
Definition at line 4858 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(), EvaluateBinaryTypeTrait(), shouldBeModeledWithNoOp(), TryConstCast(), TryReferenceInitialization(), and TryReferenceListInitialization().
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
Definition at line 1915 of file ASTContext.h.
References Begin, End, clang::QualType::getQualifiers(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::removeObjCLifetime().
QualType ASTContext::getUnsignedPointerDiffType | ( | ) | const |
Return the unique unsigned counterpart of "ptrdiff_t" integer type.
The standard (C11 7.21.6.1p7) refers to this type in the definition of tu format specifier.
Definition at line 4826 of file ASTContext.cpp.
References clang::TargetInfo::getUnsignedPtrDiffType().
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getUnsignedWCharType | ( | ) | const |
Return the type of "unsigned wchar_t".
getUnsignedWCharType - Return the type of "unsigned wchar_t".
Used when in C++, as a GCC extension.
Definition at line 4804 of file ASTContext.cpp.
References UnsignedIntTy.
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 7237 of file ASTContext.cpp.
References getBuiltinVaListDecl(), and VaListTagDecl.
Referenced by isImportedDeclContext().
Returns a vla type where known sizes are replaced with [*].
getVariableArrayDecayedType - Turns the given type, which may be variably-modified, into the corresponding type with all the known sizes replaced with [*].
Definition at line 2948 of file ASTContext.cpp.
References clang::Auto, getAtomicType(), clang::VariableArrayType::getBracketsRange(), clang::DependentSizedArrayType::getBracketsRange(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeCVRQualifiers(), getLValueReferenceType(), clang::ReferenceType::getPointeeType(), getPointerType(), getQualifiedType(), getRValueReferenceType(), clang::ConstantArrayType::getSize(), clang::DependentSizedArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), clang::Type::getTypeClass(), clang::AtomicType::getValueType(), getVariableArrayType(), clang::ReferenceType::isSpelledAsLValue(), clang::Type::isVariablyModifiedType(), clang::ArrayType::Normal, clang::SplitQualType::Quals, clang::ArrayType::Star, clang::SplitQualType::Ty, and clang::ast_matchers::type.
Referenced by getCanonicalParamType(), getExceptionObjectType(), and getSignatureParameterType().
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 3082 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().
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.
VectorType
must be a built-in type.VectorType must be a built-in type.
Definition at line 3216 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().
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 1142 of file ASTContext.h.
References clang::QualType::withFastQualifiers().
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 9524 of file ASTContext.cpp.
References clang::TargetInfo::getCXXABI(), and clang::TargetCXXABI::isMicrosoft().
|
inline |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
Definition at line 1511 of file ASTContext.h.
|
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 1516 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().
|
inline |
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
Definition at line 1530 of file ASTContext.h.
Referenced by clang::analyze_format_string::ArgType::getRepresentativeType(), and clang::analyze_format_string::ArgType::matchesType().
Return a write_only pipe type for the specified type.
Definition at line 3637 of file ASTContext.cpp.
Referenced by HandleOpenCLAccessAttr().
|
inline |
Definition at line 694 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().
Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.
Definition at line 2609 of file ASTContext.cpp.
References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), and hasSameType().
Referenced by isSameEntity().
|
inline |
Definition at line 2219 of file ASTContext.h.
References clang::Type::getNullability(), and X.
bool ASTContext::hasSameTemplateName | ( | TemplateName | X, |
TemplateName | Y | ||
) |
Determine whether the given template names refer to the same template.
Definition at line 5048 of file ASTContext.cpp.
References clang::TemplateName::getAsVoidPointer(), and getCanonicalTemplateName().
Referenced by DeduceTemplateArguments().
Determine whether the given types T1
and T2
are equivalent.
Definition at line 2190 of file ASTContext.h.
Referenced by areCompatibleVectorTypes(), BuildCounterInit(), BuildCounterUpdate(), buildDeclareReductionRef(), castToBase(), clang::Sema::CheckARCMethodDecl(), checkConditionalPointerCompatibility(), clang::Sema::CheckImplementationIvars(), checkLiteralOperatorTemplateParameterList(), checkOpenCLPipePacketType(), ClassImplementsAllMethodsAndProperties(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::computeDeclContext(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArguments(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnosePropertyAccessorMismatch(), EvaluateBinaryTypeTrait(), findDecomposableBaseClass(), findDirectBaseWithType(), clang::StructuralEquivalenceContext::findUntaggedStructOrUnionIndex(), hasCompatibleArrayTypes(), hasSameFunctionTypeIgnoringExceptionSpec(), isLayoutCompatible(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), IsStandardConversion(), clang::ASTImporter::IsStructurallyEquivalent(), loadToBegin(), MatchTemplateParameterKind(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), rewriteToNumberLiteral(), sameObjCTypeArgs(), TryConstructorInitialization(), typesAreCompatible(), and warnBracedScalarInit().
Definition at line 2193 of file ASTContext.h.
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 2214 of file ASTContext.h.
Referenced by AddSuperSendCompletion(), AnalyzeComparison(), areCompatibleVectorTypes(), clang::Sema::BuildPseudoDestructorExpr(), clang::ento::StoreManager::CastRetrievedVal(), checkEnumComparison(), CheckMoveOnConstruction(), clang::Sema::CheckPointerToMemberOperands(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseBadFunctionCast(), doRewriteToUTF8StringBoxedExpressionHelper(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::getDeclUsageType(), getExistingLazyBinding(), GetIntrinsic(), getParamType(), clang::CastExpr::getTargetFieldForToUnionCast(), hasCopyOrMoveCtorParam(), isBlockVarRef(), isNonPlacementDeallocationFunction(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), IsVectorConversion(), LookupMemberExpr(), clang::Sema::ProcessPropertyDecl(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), TryConstructorInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryStaticMemberPointerUpcast(), and UnwrapSimilarPointerTypes().
Return true if the specified type has unique object representations according to (C++17 [meta.unary.prop]p9)
Definition at line 2230 of file ASTContext.cpp.
References clang::Type::getAs(), getBaseElementType(), getTypeSize(), clang::Type::isArrayType(), clang::Type::isIntegralOrEnumerationType(), clang::Decl::isInvalidDecl(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::QualType::isTriviallyCopyableType(), clang::TagDecl::isUnion(), structHasUniqueObjectRepresentations(), and unionHasUniqueObjectRepresentations().
void ASTContext::InitBuiltinTypes | ( | const TargetInfo & | Target, |
const TargetInfo * | AuxTarget = nullptr |
||
) |
Initialize built-in types.
This routine may only be invoked once for a given ASTContext object. It is normally invoked after ASTContext construction.
Target | The target |
Definition at line 1087 of file ASTContext.cpp.
References ARCUnbridgedCastTy, BoolTy, BoundMemberTy, BuiltinFnTy, Char16Ty, Char32Ty, CharTy, DependentTy, DoubleComplexTy, DoubleTy, Float128ComplexTy, Float128Ty, Float16Ty, FloatComplexTy, FloatTy, getAddressSpaceMap(), getCanonicalType(), getComplexType(), getPointerType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), clang::CanQual< T >::getUnqualifiedType(), HalfTy, Int128Ty, IntTy, isAddrSpaceMapManglingEnabled(), clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongDoubleComplexTy, LongDoubleTy, LongLongTy, LongTy, NullPtrTy, ObjCBuiltinBoolTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OCLClkEventTy, OCLEventTy, OCLQueueTy, OCLReserveIDTy, OCLSamplerTy, OMPArraySectionTy, clang::opencl_generic, OverloadTy, PseudoObjectTy, clang::Qualifiers::setAddressSpace(), ShortTy, SignedCharTy, UnknownAnyTy, UnsignedCharTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortTy, VaListTagDecl, VoidPtrTy, VoidTy, WCharTy, WideCharTy, and WIntTy.
Determine if the alignment the type has was required using an alignment attribute.
Definition at line 1613 of file ASTContext.cpp.
References clang::TypeInfo::AlignIsRequired, and getTypeInfo().
Referenced by clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), isAlignmentRequired(), and isVarDeclStrongDefinition().
Definition at line 1617 of file ASTContext.cpp.
References clang::QualType::getTypePtr(), and isAlignmentRequired().
Returns true if this is an inline-initialized static data member which is treated as a definition for MSVC compatibility.
Definition at line 5854 of file ASTContext.cpp.
References clang::TargetInfo::getCXXABI(), clang::Redeclarable< decl_type >::getFirstDecl(), getTargetInfo(), clang::ValueDecl::getType(), clang::VarDecl::hasInit(), clang::Type::isIntegralOrEnumerationType(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isOutOfLine(), and clang::VarDecl::isStaticDataMember().
Referenced by DeclMustBeEmitted(), and clang::CodeGen::CodeGenModule::EmitGlobal().
bool ASTContext::isNearlyEmpty | ( | const CXXRecordDecl * | RD | ) | const |
Definition at line 9519 of file ASTContext.cpp.
Definition at line 2445 of file ASTContext.h.
Definition at line 2441 of file ASTContext.h.
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 1987 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
Definition at line 2449 of file ASTContext.h.
Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
Definition at line 5404 of file ASTContext.cpp.
Definition at line 2315 of file ASTContext.cpp.
Referenced by getNSArrayObjects(), rewriteToArrayLiteral(), and rewriteToDictionaryLiteral().
|
inline |
Definition at line 948 of file ASTContext.h.
uint64_t ASTContext::lookupFieldBitOffset | ( | const ObjCInterfaceDecl * | OID, |
const ObjCImplementationDecl * | ID, | ||
const ObjCIvarDecl * | Ivar | ||
) | const |
Get the offset of an ObjCIvarDecl in bits.
Definition at line 3074 of file RecordLayoutBuilder.cpp.
Referenced by clang::CodeGen::CGObjCRuntime::ComputeBitfieldBitOffset(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), and clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset().
|
inline |
Make an APSInt of the appropriate width and signedness for the given Value
and integer Type
.
Definition at line 2532 of file ASTContext.h.
References clang::Type::isSignedIntegerOrEnumerationType().
void ASTContext::mergeDefinitionIntoModule | ( | NamedDecl * | ND, |
Module * | M, | ||
bool | NotifyListeners = true |
||
) |
Note that the definition ND
has been merged into module M
, and should be visible whenever M
is visible.
Definition at line 924 of file ASTContext.cpp.
References getASTMutationListener(), getLangOpts(), Listener, clang::ASTMutationListener::RedefinedHiddenDefinition(), and clang::Decl::setVisibleDespiteOwningModule().
Referenced by clang::ASTDeclReader::UpdateDecl().
bool ASTContext::mergeExtParameterInfo | ( | const FunctionProtoType * | FirstFnType, |
const FunctionProtoType * | SecondFnType, | ||
bool & | CanUseFirst, | ||
bool & | CanUseSecond, | ||
SmallVectorImpl< FunctionProtoType::ExtParameterInfo > & | NewParamInfos | ||
) |
This function merges the ExtParameterInfo lists of two functions.
It returns true if the lists are compatible. The merged list is returned in NewParamInfos.
FirstFnType | The type of the first function. |
SecondFnType | The type of the second function. |
CanUseFirst | This flag is set to true if the first function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo. |
CanUseSecond | This flag is set to true if the second function's ExtParameterInfo list can be used as the composite list of ExtParameterInfo. |
NewParamInfos | The composite list of ExtParameterInfo. The list is empty if none of the flags are set. |
Definition at line 8658 of file ASTContext.cpp.
References clang::FunctionProtoType::hasExtParameterInfos().
Referenced by mergeFunctionTypes().
QualType ASTContext::mergeFunctionParameterTypes | ( | QualType | lhs, |
QualType | rhs, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeFunctionParameterTypes - merge two types which appear as function parameter types
Definition at line 8154 of file ASTContext.cpp.
References clang::QualType::isNull(), mergeTransparentUnionType(), and mergeTypes().
Referenced by mergeFunctionTypes().
QualType ASTContext::mergeFunctionTypes | ( | QualType | lhs, |
QualType | rhs, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
Definition at line 8173 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, FloatTy, clang::Type::getAs(), getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::FunctionType::ExtInfo::getNoCallerSavedRegs(), clang::FunctionType::ExtInfo::getNoReturn(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getReturnType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::FunctionProtoType::hasExceptionSpec(), clang::QualType::hasQualifiers(), clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), clang::FunctionProtoType::isVariadic(), mergeExtParameterInfo(), mergeFunctionParameterTypes(), mergeTypes(), and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by mergeTypes().
mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and returns the merged version; including for function return types.
Definition at line 8712 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::getFunctionExtInfo(), getFunctionType(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::QualType::getTypePtr(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
QualType ASTContext::mergeTransparentUnionType | ( | QualType | T, |
QualType | SubType, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType()
Definition at line 8134 of file ASTContext.cpp.
References clang::Type::getAsUnionType(), and clang::Decl::hasAttr().
Referenced by mergeFunctionParameterTypes().
QualType ASTContext::mergeTypes | ( | QualType | LHS, |
QualType | RHS, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false , |
||
bool | BlockReturnType = false |
||
) |
Definition at line 8367 of file ASTContext.cpp.
References areCompatVectorTypes(), clang::Auto, canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), getLangOpts(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), getPointerType(), clang::QualType::getQualifiers(), clang::ConstantArrayType::getSize(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasUnaligned(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isBlockPointerType(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), mergeEnumWithInteger(), mergeFunctionTypes(), clang::OpenCL, clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
Referenced by checkConditionalPointerCompatibility(), mergeFunctionParameterTypes(), mergeFunctionTypes(), typesAreBlockPointerCompatible(), and typesAreCompatible().
bool ASTContext::ObjCMethodsAreEqual | ( | const ObjCMethodDecl * | MethodDecl, |
const ObjCMethodDecl * | MethodImp | ||
) |
Definition at line 9898 of file ASTContext.cpp.
References clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ParmVarDecl::getObjCDeclQualifier(), clang::ObjCMethodDecl::getReturnType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), hasSameType(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), and clang::ObjCMethodDecl::param_size().
bool ASTContext::ObjCObjectAdoptsQTypeProtocols | ( | QualType | QT, |
ObjCInterfaceDecl * | IC | ||
) |
ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list.
Definition at line 4438 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().
Referenced by CheckObjCBridgeNSCast().
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
Definition at line 7531 of file ASTContext.cpp.
References clang::Type::getAs(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces().
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
Definition at line 7553 of file ASTContext.cpp.
References clang::Type::getAs(), clang::Type::getAsObjCQualifiedIdType(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isVoidPointerType(), and clang::ObjCObjectPointerType::qual_empty().
Referenced by canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), and isObjCTypeSubstitutable().
|
delete |
ASTContext::overridden_method_range ASTContext::overridden_methods | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1396 of file ASTContext.cpp.
References clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::overridden_methods(), overridden_methods_begin(), overridden_methods_end(), and overridden_methods_size().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1380 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::begin_overridden_methods(), and getOverriddenMethods().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1385 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::end_overridden_methods(), and getOverriddenMethods().
unsigned ASTContext::overridden_methods_size | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1390 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 865 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, ExternalSource, getLangOpts(), clang::Type::getTypeClass(), NumImplicitCopyAssignmentOperators, NumImplicitCopyAssignmentOperatorsDeclared, NumImplicitCopyConstructors, NumImplicitCopyConstructorsDeclared, NumImplicitDefaultConstructors, NumImplicitDefaultConstructorsDeclared, NumImplicitDestructors, NumImplicitDestructorsDeclared, NumImplicitMoveAssignmentOperators, NumImplicitMoveAssignmentOperatorsDeclared, NumImplicitMoveConstructors, and NumImplicitMoveConstructorsDeclared.
Definition at line 8123 of file ASTContext.cpp.
References typesAreCompatible().
Referenced by clang::Sema::DiagnosePropertyMismatch().
bool ASTContext::ProtocolCompatibleWithProtocol | ( | ObjCProtocolDecl * | lProto, |
ObjCProtocolDecl * | rProto | ||
) | const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.
Definition at line 7519 of file ASTContext.cpp.
References clang::declaresSameEntity(), and clang::ObjCProtocolDecl::protocols().
Referenced by clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), ObjCQualifiedClassTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
bool ASTContext::QIdProtocolsAdoptObjCObjectProtocols | ( | QualType | QT, |
ObjCInterfaceDecl * | IDecl | ||
) |
QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.
Definition at line 4457 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by CheckObjCBridgeCFCast().
Remove any existing address space on the type and returns the type with qualifiers intact (or that's the idea anyway)
The return type should be T with all prior qualifiers minus the address space.
Definition at line 2498 of file ASTContext.cpp.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasAddressSpace(), clang::Qualifiers::hasNonFastQualifiers(), clang::Qualifiers::removeAddressSpace(), and clang::QualifierCollector::strip().
void ASTContext::ResetObjCLayout | ( | const ObjCContainerDecl * | CD | ) |
Definition at line 8705 of file ASTContext.cpp.
|
inline |
Attach an AST mutation listener to the AST context.
The AST mutation listener provides the ability to track modifications to the abstract syntax tree entities committed after they were initially created.
Definition at line 1057 of file ASTContext.h.
Referenced by clang::CompilerInstance::createModuleManager().
Set the copy inialization expression of a block var decl.
Definition at line 2405 of file ASTContext.cpp.
References clang::Decl::hasAttr().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 1836 of file ASTContext.h.
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 5635 of file ASTContext.cpp.
References clang::Type::getAs(), clang::TypedefType::getDecl(), and clang::TypedefNameDecl::getUnderlyingType().
void ASTContext::setClassScopeSpecializationPattern | ( | FunctionDecl * | FD, |
FunctionDecl * | Pattern | ||
) |
Definition at line 1313 of file ASTContext.cpp.
|
inline |
Definition at line 1233 of file ASTContext.h.
void ASTContext::setExternalSource | ( | IntrusiveRefCntPtr< ExternalASTSource > | Source | ) |
Attach an external AST source to the AST context.
The external AST source provides the ability to load parts of the abstract syntax tree as needed from some external storage, e.g., a precompiled header.
Definition at line 861 of file ASTContext.cpp.
References ExternalSource.
Referenced by clang::CompilerInstance::createModuleManager(), and clang::CompilerInstance::createPCHExternalASTSource().
|
inline |
Set the type for the C FILE type.
Definition at line 1690 of file ASTContext.h.
void ASTContext::setInstantiatedFromStaticDataMember | ( | VarDecl * | Inst, |
VarDecl * | Tmpl, | ||
TemplateSpecializationKind | TSK, | ||
SourceLocation | PointOfInstantiation = SourceLocation() |
||
) |
Note that the static data member Inst
is an instantiation of the static data member template Tmpl
of a class template.
Definition at line 1285 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1369 of file ASTContext.cpp.
References clang::NamedDecl::getDeclName().
Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().
Remember that the using decl Inst
is an instantiation of the using decl Pattern
of a class template.
Definition at line 1330 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1354 of file ASTContext.cpp.
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1700 of file ASTContext.h.
void ASTContext::setManglingNumber | ( | const NamedDecl * | ND, |
unsigned | Number | ||
) |
Definition at line 9604 of file ASTContext.cpp.
Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::ASTDeclReader::UpdateDecl().
void ASTContext::setNonKeyFunction | ( | const CXXMethodDecl * | method | ) |
Observe that the given method cannot be a key function.
Checks the key-function cache for the method's class and clears it if matches the given declaration.
This is used in ABIs where out-of-line definitions marked inline are not considered to be key functions.
method | should be the declaration from the class definition |
Definition at line 3031 of file RecordLayoutBuilder.cpp.
References clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::Redeclarable< decl_type >::getFirstDecl(), and clang::CXXMethodDecl::getParent().
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1607 of file ASTContext.h.
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 7253 of file ASTContext.cpp.
References getObjCInterfaceType(), and clang::QualType::isNull().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1594 of file ASTContext.h.
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 2354 of file ASTContext.cpp.
Referenced by clang::ObjCImplDecl::setClassInterface().
void ASTContext::setObjCImplementation | ( | ObjCCategoryDecl * | CatD, |
ObjCCategoryImplDecl * | ImplD | ||
) |
Set the implementation of ObjCCategoryDecl.
Definition at line 2361 of file ASTContext.cpp.
void ASTContext::setObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD, |
const ObjCMethodDecl * | Redecl | ||
) |
Definition at line 2372 of file ASTContext.cpp.
References getObjCMethodRedeclaration().
|
inline |
Definition at line 1581 of file ASTContext.h.
References clang::T.
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1620 of file ASTContext.h.
|
inline |
Definition at line 1558 of file ASTContext.h.
void ASTContext::setParameterIndex | ( | const ParmVarDecl * | D, |
unsigned | index | ||
) |
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield.
Definition at line 9670 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::isParameterPack().
Definition at line 956 of file ASTContext.h.
|
inline |
Definition at line 639 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1712 of file ASTContext.h.
void ASTContext::setStaticLocalNumber | ( | const VarDecl * | VD, |
unsigned | Number | ||
) |
Definition at line 9614 of file ASTContext.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1295 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
|
inline |
Set the type for the C ucontext_t type.
Definition at line 1724 of file ASTContext.h.
int64_t ASTContext::toBits | ( | CharUnits | CharSize | ) | const |
Convert a size in characters to a size in bits.
toBits - Convert a size in characters to a size in characters.
Definition at line 1996 of file ASTContext.cpp.
References getCharWidth(), and clang::CharUnits::getQuantity().
Referenced by AddDirectArgument(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getDeclAlign(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), recordUsesEBO(), and roundUpSizeToCharAlignment().
CharUnits ASTContext::toCharUnitsFromBits | ( | int64_t | BitSize | ) | const |
Convert a size in bits to a size in characters.
toCharUnitsFromBits - Convert a size in bits to a size in characters.
Definition at line 1991 of file ASTContext.cpp.
References clang::CharUnits::fromQuantity(), and getCharWidth().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitX86_64VAArgFromMemory(), getAlignOfGlobalVarInChars(), getDeclAlign(), GetGCAttrTypeForType(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeAlignInChars(), getTypeInfoInChars(), isFullSizeType(), recordUsesEBO(), and roundUpSizeToCharAlignment().
Definition at line 8127 of file ASTContext.cpp.
References clang::QualType::isNull(), and mergeTypes().
Referenced by canAssignObjCObjectTypes(), and checkBlockPointerTypesForAssignment().
Compatibility predicates used to check assignment expressions.
typesAreCompatible - C99 6.7.3p9: For two qualified types to be compatible, both shall have the identically qualified version of a compatible type.
C99 6.2.7p1: Two types have compatible types if their types are the same. See 6.7.[2,3,5] for additional rules.
Definition at line 8115 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, getLangOpts(), hasSameType(), clang::QualType::isNull(), and mergeTypes().
Referenced by AreTypesCompatible(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), EvaluateBinaryTypeTrait(), IsStandardConversion(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), and propertyTypesAreCompatible().
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.
If T1 and T2 aren't pointer types or pointer-to-member types, or if they are not similar at this level, returns false and leaves T1 and T2 unchanged. Top-level qualifiers on T1 and T2 are ignored. This function will typically be called in a loop that successively "unwraps" pointer and pointer-to-member types to compare them at each level.
Definition at line 4922 of file ASTContext.cpp.
References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), and hasSameUnqualifiedType().
Referenced by CompareQualificationConversions(), shouldBeModeledWithNoOp(), and TryConstCast().
|
friend |
Definition at line 396 of file ASTContext.h.
|
friend |
Definition at line 397 of file ASTContext.h.
|
friend |
Definition at line 398 of file ASTContext.h.
|
friend |
Definition at line 399 of file ASTContext.h.
|
friend |
Definition at line 2786 of file ASTContext.h.
|
friend |
Definition at line 2787 of file ASTContext.h.
|
friend |
Definition at line 150 of file ASTContext.h.
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 1015 of file ASTContext.h.
Referenced by InitBuiltinTypes().
|
mutable |
Definition at line 1026 of file ASTContext.h.
Referenced by getAutoDeductType().
|
mutable |
Definition at line 1027 of file ASTContext.h.
Referenced by getAutoRRefDeductType().
CanQualType clang::ASTContext::BoolTy |
Definition at line 997 of file ASTContext.h.
Referenced by clang::ento::SimpleConstraintManager::assume(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildExpressionTrait(), CheckBoolLikeConversion(), clang::Sema::CheckCXXBooleanCondition(), clang::CodeGen::CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), emitForStaticInitCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::ento::SValBuilder::getConditionType(), getFloatingTypeOrder(), GetIntrinsic(), InitBuiltinTypes(), IsStandardConversion(), SymbolNameForMethod(), and TryContextuallyConvertToBool().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 1013 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), hasOnlyNonStaticMemberFunctions(), InitBuiltinTypes(), and clang::Sema::MaybeBindToTemporary().
CanQualType clang::ASTContext::BuiltinFnTy |
Definition at line 1014 of file ASTContext.h.
Referenced by buildMemcpyForAssignmentOp(), InitBuiltinTypes(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
Builtin::Context& clang::ASTContext::BuiltinInfo |
Definition at line 539 of file ASTContext.h.
Referenced by GetBuiltinType(), clang::CallExpr::isUnevaluatedBuiltinCall(), and LookupBuiltin().
CanQualType clang::ASTContext::Char16Ty |
Definition at line 1002 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Char32Ty |
Definition at line 1003 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::CharTy |
Definition at line 998 of file ASTContext.h.
Referenced by clang::ento::StoreManager::castRegion(), checkLiteralOperatorTemplateParameterList(), describeUninitializedArgumentInCall(), diagnoseStringPlusChar(), doRewriteToUTF8StringBoxedExpressionHelper(), getCFConstantStringDecl(), GetCFNumberSize(), getFloatingTypeOrder(), GetGCAttrTypeForType(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtOffloadEntryQTy(), and InitBuiltinTypes().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 705 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
True if comments are already loaded from ExternalASTSource.
Definition at line 708 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
|
mutable |
Definition at line 540 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), BuildCookedLiteralOperatorCall(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::ASTImporter::Import(), parseOpenMPReductionId(), and resolveAllocationOverload().
CanQualType clang::ASTContext::DependentTy |
Definition at line 1013 of file ASTContext.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), clang::DependentScopeDeclRefExpr::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), GetDeclSpecTypeForDeclarator(), clang::CXXUnresolvedConstructExpr::getLocStart(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleComplexTy |
Definition at line 1010 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleTy |
Definition at line 1007 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), and supportsNilWithFloatRet().
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource |
Definition at line 541 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache(), PrintStats(), and setExternalSource().
CanQualType clang::ASTContext::Float128ComplexTy |
Definition at line 1011 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Float128Ty |
Definition at line 1007 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), and IsStandardConversion().
CanQualType clang::ASTContext::Float16Ty |
Definition at line 1009 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::FloatComplexTy |
Definition at line 1010 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::FloatTy |
Definition at line 1007 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), mergeFunctionTypes(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::HalfTy |
Definition at line 1008 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), InitBuiltinTypes(), and needsConversionOfHalfVec().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 537 of file ASTContext.h.
Referenced by buildCapture(), buildMemcpyForAssignmentOp(), clang::CodeGen::CGCXXABI::buildThisParam(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitReplacement(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), GetCFNumberSize(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::Sema::getFloat128Identifier(), getFunctionSourceLocation(), GetGCAttrTypeForType(), clang::ento::getKeywordSelector(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), getObjCProtocolDecl(), clang::Sema::getSuperIdentifier(), clang::GetUnarySelector(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), clang::NSAPI::isMacroDefined(), isNSStringType(), clang::NSAPI::isSubclassOfNSClass(), LookupMethodInReceiverType(), clang::ObjCNoReturn::ObjCNoReturn(), PropertyMemoryAttribute(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), ReplaceWithClasstype(), shouldRunOnFunctionOrMethod(), SymbolNameForMethod(), and transferARCOwnershipToDeclaratorChunk().
CanQualType clang::ASTContext::Int128Ty |
Definition at line 1004 of file ASTContext.h.
Referenced by getFloatingTypeOrder(), getInt128Decl(), getIntTypeForBitwidth(), InitBuiltinTypes(), and isValidBaseType().
CanQualType clang::ASTContext::IntTy |
Definition at line 1004 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBound(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), emitRTtypeidCall(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringDecl(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), GetDeclSpecTypeForDeclarator(), getFloatingTypeOrder(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getObjCEncodingTypeSize(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isOverflowingIntegerType(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), rewriteToNumericBoxedExpression(), and SymbolNameForMethod().
ASTMutationListener* clang::ASTContext::Listener = nullptr |
Definition at line 542 of file ASTContext.h.
Referenced by mergeDefinitionIntoModule().
CanQualType clang::ASTContext::LongDoubleComplexTy |
Definition at line 1010 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleTy |
Definition at line 1007 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), IsStandardConversion(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 1004 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::LongTy |
Definition at line 1004 of file ASTContext.h.
Referenced by create_dispatch_once(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringDecl(), GetCFNumberSize(), getFloatingTypeOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and SymbolNameForMethod().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 1012 of file ASTContext.h.
Referenced by DeduceNullPtrTemplateArgument(), and InitBuiltinTypes().
|
static |
The number of implicitly-declared copy assignment operators.
Definition at line 2701 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 2705 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared copy constructors.
Definition at line 2687 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared copy constructors for which declarations were built.
Definition at line 2691 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared default constructors.
Definition at line 2680 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared default constructors for which declarations were built.
Definition at line 2684 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared destructors.
Definition at line 2715 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 2719 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move assignment operators.
Definition at line 2708 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 2712 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move constructors.
Definition at line 2694 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 2698 of file ASTContext.h.
Referenced by PrintStats().
CanQualType clang::ASTContext::ObjCBuiltinBoolTy |
Definition at line 1017 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinClassTy |
Definition at line 1016 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCClassDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinIdTy |
Definition at line 1016 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCIdDecl(), clang::Type::getObjCSubstitutions(), clang::analyze_format_string::ArgType::getRepresentativeType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinSelTy |
Definition at line 1016 of file ASTContext.h.
Referenced by getObjCSelDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::OCLClkEventTy |
Definition at line 1021 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLEventTy |
Definition at line 1021 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLQueueTy |
Definition at line 1022 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLReserveIDTy |
Definition at line 1022 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), SemaBuiltinCommitRWPipe(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
CanQualType clang::ASTContext::OCLSamplerTy |
Definition at line 1021 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OMPArraySectionTy |
Definition at line 1023 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::OverloadTy |
Definition at line 1013 of file ASTContext.h.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadFunctionCast(), getLValueReferenceType(), InitBuiltinTypes(), IsStandardConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), and TryStaticMemberPointerUpcast().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 773 of file ASTContext.h.
Referenced by getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 1015 of file ASTContext.h.
Referenced by BuildMSPropertyRefExpr(), InitBuiltinTypes(), and LookupMemberExpr().
|
mutable |
Mapping from declarations to comments attached to any redeclaration.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 769 of file ASTContext.h.
Referenced by getRawCommentForAnyRedecl().
llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos |
Definition at line 2841 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 538 of file ASTContext.h.
Referenced by CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), GCRewriteFinalize(), clang::ento::getKeywordSelector(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), clang::GetUnarySelector(), and clang::ObjCNoReturn::ObjCNoReturn().
CanQualType clang::ASTContext::ShortTy |
Definition at line 1004 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOrder(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::SignedCharTy |
Definition at line 1004 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::UnknownAnyTy |
Definition at line 1013 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedCharTy |
Definition at line 1005 of file ASTContext.h.
Referenced by checkPointerTypesForAssignment(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), and roundUpSizeToCharAlignment().
CanQualType clang::ASTContext::UnsignedInt128Ty |
Definition at line 1006 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), getIntTypeForBitwidth(), getUInt128Decl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedIntTy |
Definition at line 1005 of file ASTContext.h.
Referenced by extractPBaseFlags(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), getUnsignedWCharType(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::analyze_format_string::ArgType::matchesType(), roundUpSizeToCharAlignment(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
CanQualType clang::ASTContext::UnsignedLongLongTy |
Definition at line 1006 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), roundUpSizeToCharAlignment(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::UnsignedLongTy |
Definition at line 1005 of file ASTContext.h.
Referenced by buildBlockDescriptor(), CheckKeyForObjCARCConversion(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCorrespondingUnsignedType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::analyze_format_string::ArgType::matchesType(), and roundUpSizeToCharAlignment().
CanQualType clang::ASTContext::UnsignedShortTy |
Definition at line 1005 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), and roundUpSizeToCharAlignment().
|
mutable |
Definition at line 1031 of file ASTContext.h.
Referenced by getVaListTagDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::VoidPtrTy |
Definition at line 1012 of file ASTContext.h.
Referenced by AddDirectArgument(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::ento::SimpleConstraintManager::assume(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceFiniFunction(), emitReduceInitFunction(), emitStructSetterCall(), clang::CodeGen::emitThreadPrivateVarInit(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), getBlockDescriptorExtendedType(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getObjCEncodingTypeSize(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), InitBuiltinTypes(), clang::CodeGen::CodeGenFunction::StartThunk(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::VoidTy |
Definition at line 996 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), buildPostUpdate(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckARCMethodDecl(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckKeyForObjCARCConversion(), CheckOperatorDeleteDeclaration(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), create_dispatch_once(), create_dispatch_sync(), clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::deduceClosureReturnType(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructSetterCall(), clang::CodeGen::emitThreadPrivateVarInit(), clang::Sema::FindAllocationFunctions(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::ento::MemRegionManager::getVarRegion(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::WCharTy |
Definition at line 999 of file ASTContext.h.
Referenced by getSignedWCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WideCharTy |
Definition at line 1000 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WIntTy |
Definition at line 1001 of file ASTContext.h.
Referenced by InitBuiltinTypes().