clang
7.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... | |
QualType | getFunctionTypeWithExceptionSpec (QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI) |
Get a function type and produce the equivalent function type with the specified exception specification. 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 | getDependentVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc, VectorType::VectorKind VecKind) const |
Return the unique reference to the type for a dependently sized vector of the specified element type. 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 | adjustStringLiteralBaseType (QualType StrLTy) const |
QualType | getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const |
Return the unique reference to the type for the specified type declaration. More... | |
QualType | 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, TagDecl *OwnedTagDecl=nullptr) const |
QualType | getDependentNameType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const |
QualType | getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, 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... | |
bool | canBuiltinBeRedeclared (const FunctionDecl *) const |
Return whether a declaration to a builtin is allowed to be overloaded/redeclared. More... | |
QualType | getCVRQualifiedType (QualType T, unsigned CVR) const |
Return a type with additional const , volatile , or restrict qualifiers. More... | |
QualType | getQualifiedType (SplitQualType split) const |
Un-split a SplitQualType. More... | |
QualType | getQualifiedType (QualType T, Qualifiers Qs) const |
Return a type with additional qualifiers. More... | |
QualType | getQualifiedType (const Type *T, Qualifiers Qs) const |
Return a type with additional qualifiers. More... | |
QualType | getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime) |
Return a type with the given lifetime qualifier. More... | |
QualType | getUnqualifiedObjCPointerType (QualType type) const |
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed. More... | |
unsigned char | getFixedPointScale (QualType Ty) const |
unsigned char | getFixedPointIBits (QualType Ty) const |
DeclarationNameInfo | getNameForTemplate (TemplateName Name, SourceLocation NameLoc) const |
TemplateName | getOverloadedTemplateName (UnresolvedSetIterator Begin, UnresolvedSetIterator End) const |
Retrieve the template name that corresponds to a non-empty lookup. More... | |
TemplateName | 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 | getTypeUnadjustedAlign (QualType T) const |
Return the ABI-specified natural alignment of a (complete) type T , before alignment adjustments, in bits. More... | |
unsigned | getTypeUnadjustedAlign (const Type *T) const |
unsigned | getTypeAlignIfKnown (QualType T) 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 |
CharUnits | getTypeUnadjustedAlignInChars (QualType T) const |
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments. More... | |
CharUnits | getTypeUnadjustedAlignInChars (const Type *T) const |
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 | UnwrapSimilarTypes (QualType &T1, QualType &T2) |
Attempt to unwrap two types that may be similar (C++ [conv.qual]). More... | |
bool | UnwrapSimilarArrayTypes (QualType &T1, QualType &T2) |
Attempt to unwrap two types that may both be array types with the same bound (or both be array types of unknown bound) for the purpose of comparing the cv-decomposition of two types per C++ [conv.qual]. More... | |
bool | hasSimilarType (QualType T1, QualType T2) |
Determine if two types are similar, according to the C++ rules. More... | |
bool | hasCvrSimilarType (QualType T1, QualType T2) |
Determine if two types are similar, ignoring only CVR qualifiers. More... | |
NestedNameSpecifier * | getCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const |
Retrieves the "canonical" nested name specifier for a given nested name specifier. More... | |
CallingConv | getDefaultCallingConvention (bool IsVariadic, bool IsCXXMethod) 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 |
QualType | getCorrespondingSaturatedType (QualType Ty) const |
llvm::APSInt | MakeIntValue (uint64_t Value, QualType Type) const |
Make an APSInt of the appropriate width and signedness for the given Value and integer Type . More... | |
bool | isSentinelNullExpr (const Expr *E) |
ObjCImplementationDecl * | getObjCImplementation (ObjCInterfaceDecl *D) |
Get the implementation of the ObjCInterfaceDecl D , or nullptr if none exists. More... | |
ObjCCategoryImplDecl * | getObjCImplementation (ObjCCategoryDecl *D) |
Get the implementation of the ObjCCategoryDecl D , or nullptr if none exists. More... | |
bool | AnyObjCImplementation () |
Return true if there is at least one @implementation in the TU. More... | |
void | setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD) |
Set the implementation of ObjCInterfaceDecl. More... | |
void | setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD) |
Set the implementation of ObjCCategoryDecl. More... | |
const ObjCMethodDecl * | getObjCMethodRedeclaration (const ObjCMethodDecl *MD) const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists. More... | |
void | setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl) |
const ObjCInterfaceDecl * | getObjContainingInterface (const NamedDecl *ND) const |
Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc. More... | |
void | 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... | |
void | forEachMultiversionedFunctionVersion (const FunctionDecl *FD, llvm::function_ref< void(FunctionDecl *)> Pred) const |
Visits all versions of a multiversioned function with the passed predicate. More... | |
const CXXConstructorDecl * | getCopyConstructorForExceptionObject (CXXRecordDecl *RD) |
void | addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD) |
void | addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND) |
TypedefNameDecl * | getTypedefNameForUnnamedTagDecl (const TagDecl *TD) |
void | addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD) |
DeclaratorDecl * | getDeclaratorForUnnamedTagDecl (const TagDecl *TD) |
void | setManglingNumber (const NamedDecl *ND, unsigned Number) |
unsigned | getManglingNumber (const NamedDecl *ND) 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 150 of file ASTContext.h.
using clang::ASTContext::import_range = llvm::iterator_range<import_iterator> |
Definition at line 954 of file ASTContext.h.
using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
Definition at line 916 of file ASTContext.h.
using clang::ASTContext::overridden_method_range = llvm::iterator_range<overridden_cxx_method_iterator> |
Definition at line 926 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 570 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 562 of file ASTContext.h.
Contains parents of a node.
Definition at line 553 of file ASTContext.h.
using clang::ASTContext::TemplateOrSpecializationInfo = llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 401 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 1984 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 2850 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 2906 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 800 of file ASTContext.cpp.
|
inline |
Definition at line 792 of file ASTContext.h.
References clang::RawCommentList::addComment(), clang::LangOptions::CommentOpts, 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 9983 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 858 of file ASTContext.cpp.
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 10000 of file ASTContext.cpp.
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 2699 of file ASTContext.h.
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 1461 of file ASTContext.cpp.
References clang::Decl::isFromASTFile().
Referenced by clang::DeclContext::addHiddenDecl().
Definition at line 994 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 968 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 1435 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod().
Definition at line 2495 of file ASTContext.h.
References clang::isTargetAddressSpace().
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 9990 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 2673 of file ASTContext.cpp.
References clang::Type::castAs(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), 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 2723 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 2655 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), getFunctionNoProtoType(), getFunctionType(), clang::QualType::getTypePtr(), and clang::Result.
Referenced by handleFunctionTypeAttr().
Definition at line 3755 of file ASTContext.cpp.
References getAddrSpaceQualType(), and clang::opencl_constant.
Referenced by clang::StringLiteral::CreateEmpty().
|
inline |
Definition at line 658 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::OMPOrderedClause::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::OMPParallelForDirective::Create(), clang::OMPLastprivateClause::Create(), clang::StringLiteral::Create(), clang::OMPParallelForSimdDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPParallelSectionsDirective::Create(), clang::OMPTaskDirective::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPBarrierDirective::Create(), clang::OMPTaskwaitDirective::Create(), clang::OMPTaskgroupDirective::Create(), clang::OMPFlushDirective::Create(), clang::OffsetOfExpr::Create(), clang::OMPTaskReductionClause::Create(), clang::OMPOrderedDirective::Create(), clang::OMPTargetDirective::Create(), clang::OMPInReductionClause::Create(), clang::OMPTargetDataDirective::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::TypeTraitExpr::Create(), clang::OMPTargetExitDataDirective::Create(), clang::OMPTargetParallelDirective::Create(), clang::MemberExpr::Create(), clang::OMPTargetParallelForDirective::Create(), clang::OMPTeamsDirective::Create(), OMPAlignedClause::Create(), clang::OMPCancellationPointDirective::Create(), clang::OMPCancelDirective::Create(), OMPCopyinClause::Create(), clang::OMPTaskLoopDirective::Create(), clang::UnresolvedLookupExpr::Create(), clang::OMPTaskLoopSimdDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::OMPDistributeDirective::Create(), OMPCopyprivateClause::Create(), clang::OMPTargetUpdateDirective::Create(), OMPFlushClause::Create(), clang::OMPDistributeParallelForDirective::Create(), clang::ExprWithCleanups::Create(), OMPDependClause::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::OMPDistributeSimdDirective::Create(), clang::OMPTargetParallelForSimdDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::OMPTargetSimdDirective::Create(), clang::OMPTeamsDistributeDirective::Create(), clang::OMPTeamsDistributeSimdDirective::Create(), clang::UnresolvedMemberExpr::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::OMPOrderedClause::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OffsetOfExpr::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(), OMPCopyinClause::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), clang::OMPTargetSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeDirective::CreateEmpty(), clang::OMPTeamsDistributeSimdDirective::CreateEmpty(), clang::UnresolvedMemberExpr::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(), isCanonicalExceptionSpecification(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::ObjCMethodDecl::setAsRedeclaration(), and clang::TemplateArgument::TemplateArgument().
|
inline |
Definition at line 661 of file ASTContext.h.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2635 of file ASTContext.h.
QualType ASTContext::applyObjCProtocolQualifiers | ( | QualType | type, |
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
bool & | hasError, | ||
bool | allowOnPointerType = false |
||
) | const |
Apply Objective-C protocol qualifiers to the given type.
allowOnPointerType | specifies if we can apply protocol qualifiers on ObjCObjectPointerType. It can be set to true when constructing the canonical type of a Objective-C type parameter. |
If this is for the canonical type of a type parameter, we can apply protocol qualifiers on the ObjCObjectPointerType.
Definition at line 4457 of file ASTContext.cpp.
References clang::Type::castAs(), clang::ObjCObjectType::getBaseType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), clang::ObjCObjectType::getTypeArgsAsWritten(), clang::QualType::getTypePtr(), 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 8136 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 8321 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 7717 of file ASTContext.cpp.
References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::First, 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 10035 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 5959 of file ASTContext.cpp.
References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInits(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), clang::QualType::isDestructedType(), clang::QualType::isNonTrivialToPrimitiveDestructiveMove(), isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1020 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 1045 of file ASTContext.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), createPrivatesRecordDecl(), 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 1061 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 7901 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(), and isObjCTypeSubstitutable().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 8259 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 7950 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().
Definition at line 8333 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and getObjCObjectPointerType().
bool ASTContext::canBuiltinBeRedeclared | ( | const FunctionDecl * | FD | ) | const |
Return whether a declaration to a builtin is allowed to be overloaded/redeclared.
Definition at line 7476 of file ASTContext.cpp.
References BuiltinInfo, clang::Builtin::Context::canBeRedeclared(), and clang::FunctionDecl::getBuiltinID().
comments::FullComment * ASTContext::cloneFullComment | ( | comments::FullComment * | FC, |
const Decl * | D | ||
) | const |
Definition at line 469 of file ASTContext.cpp.
References clang::comments::DeclInfo::CommentDecl, clang::comments::FullComment::getBlocks(), clang::comments::FullComment::getDecl(), clang::comments::FullComment::getDeclInfo(), and clang::comments::DeclInfo::TemplateParameters.
Referenced by getCommentForDecl().
void ASTContext::CollectInheritedProtocols | ( | const Decl * | CDecl, |
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > & | Protocols | ||
) |
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
Definition at line 2214 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
Referenced by canAssignObjCInterfaces(), QIdProtocolsAdoptObjCObjectProtocols(), and UseNSOptionsMacro().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 2412 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
MangleContext * ASTContext::createMangleContext | ( | ) |
Definition at line 9873 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 9973 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 2520 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType().
Referenced by clang::CodeGen::CodeGenFunction::EmitAndRegisterVariableArrayDimensions(), and getTrivialTypeSourceInfo().
|
inline |
Definition at line 664 of file ASTContext.h.
Referenced by clang::GCCAsmStmt::getInputConstraint(), clang::CXXRecordDecl::setBases(), clang::ShuffleVectorExpr::setExprs(), clang::APNumericStorage::setIntValue(), clang::CallExpr::setNumArgs(), clang::TagDecl::setQualifierInfo(), and clang::QualifierInfo::setTemplateParameterListsInfo().
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 9672 of file ASTContext.cpp.
References clang::VarDecl::DeclarationOnly, clang::CXXMethodDecl::getCanonicalDecl(), getCurrentKeyFunction(), clang::Decl::getDeclContext(), getExternalSource(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::DeclContext::getParent(), getTargetInfo(), clang::GVA_AvailableExternally, clang::Decl::hasAttr(), clang::DeclContext::isDependentContext(), clang::isDiscardableGVALinkage(), clang::CXXRecordDecl::isDynamicClass(), clang::Decl::isFromASTFile(), isMSStaticDataMemberInlineDefinition(), clang::SC_Register, clang::FunctionDecl::TK_FunctionTemplate, and clang::TSK_ExplicitInstantiationDefinition.
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 938 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 2196 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3371 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 1289 of file ASTContext.cpp.
Referenced by clang::Decl::dropAttrs().
void ASTContext::forEachMultiversionedFunctionVersion | ( | const FunctionDecl * | FD, |
llvm::function_ref< void(FunctionDecl *)> | Pred | ||
) | const |
Visits all versions of a multiversioned function with the passed predicate.
Definition at line 9808 of file ASTContext.cpp.
References clang::Decl::getAsFunction(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclContext::getRedeclContext(), clang::ValueDecl::getType(), hasSameType(), clang::FunctionDecl::isMultiVersion(), and clang::DeclContext::lookup().
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 2586 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by adjustStringLiteralBaseType(), 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 5408 of file ASTContext.cpp.
References getDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by DeduceNonTypeTemplateArgument(), and getSignatureParameterType().
Return the uniqued reference to a type adjusted from the original type to a new type.
Definition at line 2807 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 1219 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 2171 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 2177 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString().
|
inline |
Definition at line 654 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 5439 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(), IsStandardConversion(), and clang::Sema::PerformImplicitConversion().
Type Query functions.
If the type is an instance of the specified class, return the Type pointer for the underlying maximally pretty type. This is a member of ASTContext because this may need to do some amount of canonicalization, e.g. to move type qualifiers into the element type.
Definition at line 5351 of file ASTContext.cpp.
References clang::Qualifiers::empty(), clang::QualType::getCanonicalType(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), getQualifiedType(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by clang::Sema::CheckAllocatedType(), DeduceFromInitializerList(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), getArrayDecayedType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), GetGCAttrTypeForType(), isSafeToConvert(), isSameEntity(), isTrivialFiller(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::QualType::mayBeNotDynamicClass(), mergeTypes(), print_elem(), clang::ento::ExprEngine::ProcessDeleteDtor(), roundUpSizeToCharAlignment(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), and UnwrapSimilarArrayTypes().
|
inline |
Definition at line 2395 of file ASTContext.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), CheckFormatString(), clang::StringLiteral::Create(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EvaluateArrayTypeTrait(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), getTypeExpansion(), isEmptyField(), mergeTypes(), and rewriteInputConstraintReferences().
|
inline |
Definition at line 2404 of file ASTContext.h.
|
inline |
Definition at line 2401 of file ASTContext.h.
Referenced by clang::InitializationSequence::Perform().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 668 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1083 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 2547 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 2542 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 2967 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::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffset(), getFieldSize(), 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 2398 of file ASTContext.h.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitArraySubscriptGEP(), emitPointerArithmetic(), getFixedSizeElementType(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::CodeGen::CodeGenFunction::getVLAElements1D(), 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 4844 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 3873 of file ASTContext.cpp.
References getCanonicalType(), clang::ast_matchers::id(), clang::AttributedType::Profile(), and clang::TypeAlignment.
Referenced by computeConditionalNullability(), getArrayDecayedType(), getFunctionTypeWithExceptionSpec(), handleFunctionTypeAttr(), HandleLifetimeBoundAttr(), 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 4871 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 4881 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 4800 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 680 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 5461 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::CXXRecordDecl::isTriviallyCopyable(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), print_elem(), 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 5465 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 5877 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 5842 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 2869 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 2503 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 1865 of file ASTContext.h.
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1695 of file ASTContext.h.
References clang::IdentifierTable::get().
|
inline |
type of 'BOOL' type.
Definition at line 1875 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 7469 of file ASTContext.cpp.
References CreateMSVaListDecl().
|
inline |
Retrieve the type of the __builtin_ms_va_list
type.
Definition at line 1903 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 9418 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 7451 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 1889 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 5999 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 3535 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(), and isCanonicalExceptionSpecification().
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 5296 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 clang::NamedDecl::declarationReplaces(), and getDependentTemplateName().
CanQualType ASTContext::getCanonicalParamType | ( | QualType | T | ) | const |
Return the canonical parameter type corresponding to the specific potentially non-canonical one.
Qualifiers are stripped off, functions are turned into function pointers, and arrays decay one level into pointers.
Definition at line 4965 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 5245 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 5197 of file ASTContext.cpp.
Referenced by DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), and hasSameTemplateName().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 4069 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 2235 of file ASTContext.h.
References clang::QualType::getCanonicalType().
Referenced by clang::Sema::ActOnStartCXXMemberReference(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckFloatComparison(), 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(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), clang::CodeGen::CodeGenTBAA::getBaseTypeInfo(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalParamType(), getCanonicalTemplateArgument(), getCastAwayConstnessCastKind(), GetCFNumberSize(), getComplexType(), getConstantArrayType(), getDecayedType(), getDecltypeType(), clang::getDeclUsageType(), getDependentAddressSpaceType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), getDependentVectorType(), 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(), LookupMemberExpr(), 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(), TryConstCast(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TryUserDefinedConversion(), clang::CodeGen::CodeGenFunction::TypeOfSelfObject(), clang::ento::ExprEngine::VisitBlockExpr(), and clang::ento::ExprEngine::VisitInitListExpr().
Definition at line 2239 of file ASTContext.h.
References getCanonicalParamType(), clang::Type::getCanonicalTypeInternal(), and clang::QualType::getTypePtr().
TypedefDecl * ASTContext::getCFConstantStringDecl | ( | ) | const |
Definition at line 5764 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 5812 of file ASTContext.cpp.
References getCFConstantStringDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 5819 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 2056 of file ASTContext.h.
Referenced by collectSubRegionBindings(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), recordUsesEBO(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
FunctionDecl * ASTContext::getClassScopeSpecializationPattern | ( | const FunctionDecl * | FD | ) |
Definition at line 1333 of file ASTContext.cpp.
Referenced by clang::FunctionDecl::getClassScopeSpecializationPattern().
|
inline |
Definition at line 864 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 489 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), cloneFullComment(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::Type::getAs(), clang::Decl::getCanonicalDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), 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 2753 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by InitBuiltinTypes().
|
inline |
Definition at line 1205 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 5481 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 3004 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(), and getVariableArrayDecayedType().
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 1173 of file ASTContext.h.
References getComplexType(), and clang::QualType::withConst().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 9978 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by emitCXXDestructor().
Definition at line 10285 of file ASTContext.cpp.
References clang::ExternalASTSource::CompleteRedeclChain(), clang::Type::getAs(), clang::Type::isFixedPointType(), clang::Type::isSaturatedFixedPointType(), SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, and SatUnsignedShortFractTy.
Definition at line 9064 of file ASTContext.cpp.
References clang::Type::getAs(), getVectorType(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::isSignedFixedPointType(), SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, SatUnsignedShortFractTy, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, UnsignedShortTy, and clang::ASTMutationListener::~ASTMutationListener().
Referenced by checkPointerTypesForAssignment(), clang::ento::SMTSolver::doIntTypeConversion(), getUIntPtrType(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 1264 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 3056 of file RecordLayoutBuilder.cpp.
References bool, computeKeyFunction(), clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::CXXRecordDecl::getDefinition(), clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), clang::LazyOffsetPtr< T, OffsT, Get >::isValid(), and clang::Result.
Referenced by DeclMustBeEmitted(), and clang::CodeGen::CodeGenVTables::isVTableExternal().
Return a type with additional const
, volatile
, or restrict
qualifiers.
Definition at line 1913 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 2828 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 1228 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 1495 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(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), emitPrivatesInit(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::getAddrOfDeclareTargetLink(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::Sema::isOpenMPCapturedByRef().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 10005 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1278 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 4731 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 4823 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 9825 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 3460 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 4164 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 3213 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 3419 of file ASTContext.cpp.
References getCanonicalType(), clang::DependentSizedExtVectorType::Profile(), and clang::TypeAlignment.
Referenced by getDependentVectorType().
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 7539 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 7575 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 4190 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 4203 of file ASTContext.cpp.
QualType ASTContext::getDependentVectorType | ( | QualType | VectorType, |
Expr * | SizeExpr, | ||
SourceLocation | AttrLoc, | ||
VectorType::VectorKind | VecKind | ||
) | const |
Return the unique reference to the type for a dependently sized vector of the specified element type.
Definition at line 3349 of file ASTContext.cpp.
References getCanonicalType(), getDependentSizedExtVectorType(), clang::DependentVectorType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 675 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1274 of file ASTContext.cpp.
References clang::SourceManager::getDiagnostics().
Referenced by checkNullabilityConsistency(), computeKeyFunction(), createMangleContext(), clang::StructuralEquivalenceContext::Diag1(), clang::StructuralEquivalenceContext::Diag2(), clang::cross_tu::CrossTranslationUnitContext::emitCrossTUDiagnostics(), clang::ASTImporter::FromDiag(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::RawComment::parse(), rewriteToNumericBoxedExpression(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType, | ||
TagDecl * | OwnedTagDecl = nullptr |
||
) | const |
Definition at line 4113 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 3860 of file ASTContext.cpp.
References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by getInjectedClassNameType().
Definition at line 5420 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 1068 of file ASTContext.h.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::ExternalASTMerger::CompleteType(), clang::AccessSpecDecl::CreateDeserialized(), DeclMustBeEmitted(), 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(), clang::Decl::updateOutOfDate(), and clang::Sema::~Sema().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 1012 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 3390 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(), and OpenCLConvertScalarsToVectors().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3107 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain(), and getFieldOffset().
|
inline |
Retrieve the C FILE type.
Definition at line 1727 of file ASTContext.h.
unsigned char ASTContext::getFixedPointIBits | ( | QualType | Ty | ) | const |
Definition at line 10377 of file ASTContext.cpp.
References clang::Type::getAs(), getTargetInfo(), clang::Type::isFixedPointType(), and MultiVersioning::Target.
unsigned char ASTContext::getFixedPointScale | ( | QualType | Ty | ) | const |
Definition at line 10330 of file ASTContext.cpp.
References clang::Type::getAs(), getTargetInfo(), clang::Type::isFixedPointType(), and MultiVersioning::Target.
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 5513 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 5543 of file ASTContext.cpp.
References BoolTy, CharTy, getFloatingRank(), getIntWidth(), Int128Ty, IntTy, clang::Type::isCanonicalUnqualified(), LongLongTy, LongTy, and ShortTy.
Referenced by clang::ento::SMTSolver::doFloatTypeConversion(), 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 1480 of file ASTContext.cpp.
References clang::Type::getAs(), clang::TargetInfo::getDoubleFormat(), clang::TargetInfo::getFloat128Format(), clang::TargetInfo::getFloatFormat(), clang::TargetInfo::getHalfFormat(), and clang::TargetInfo::getLongDoubleFormat().
Referenced by BuildFloatingLiteral(), canConvertIntTyToFloatTy(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTSolver::getZeroExpr(), IsStandardConversion(), and tryGCCVectorConvertAndSplat().
|
inline |
Definition at line 708 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 3504 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 1360 of file ASTContext.h.
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1365 of file ASTContext.h.
Referenced by adjustDeducedFunctionResultType(), adjustFunctionType(), clang::Sema::CheckEquivalentExceptionSpec(), clang::CodeGen::emitKmpRoutineEntryT(), clang::Sema::FindCompositePointerType(), GeneralizeFunctionType(), GetBuiltinType(), getFunctionTypeWithExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), mergeFunctionTypes(), mergeObjCGCQualifiers(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::QualType::substObjCTypeArgs(), and clang::ASTDeclReader::UpdateDecl().
QualType ASTContext::getFunctionTypeWithExceptionSpec | ( | QualType | Orig, |
const FunctionProtoType::ExceptionSpecInfo & | ESI | ||
) |
Get a function type and produce the equivalent function type with the specified exception specification.
Type sugar that can be present on a declaration of a function with an exception specification is permitted and preserved. Other type sugar (for instance, typedefs) is not.
Definition at line 2693 of file ASTContext.cpp.
References getAttributedType(), getFunctionType(), and getParenType().
Referenced by adjustExceptionSpec(), extractPBaseFlags(), hasSameFunctionTypeIgnoringExceptionSpec(), and clang::CodeGen::CodeGenFunction::StartFunction().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 9583 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForFunction().
Referenced by clang::CodeGen::CodeGenModule::CreateFunctionTypeMetadataForIcall(), DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), IsKnownEmitted(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) |
Definition at line 9666 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 3281 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(), and getUnqualifiedArrayType().
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 3784 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 4255 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 4288 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 6063 of file ASTContext.cpp.
References clang::First, clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::isInline(), None, clang::Redeclarable< decl_type >::redecls(), Strong, Weak, and WeakUnknown.
Referenced by clang::CodeGen::CodeGenModule::EmitGlobal(), 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 5691 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 1299 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1391 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 1352 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and isInstantiationOfUnresolvedUsingDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1375 of file ASTContext.cpp.
Referenced by isInstantiationOf().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1071 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 5719 of file ASTContext.cpp.
References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().
Referenced by canConvertIntToOtherIntTy(), clang::ento::SMTSolver::doIntTypeConversion(), 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 4911 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 4934 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 9913 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.
Referenced by AddDirectArgument(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), checkOpenMPLoop(), createKmpTaskTRecordDecl(), createRuntimeShuffleFunction(), clang::CodeGen::CodeGenFunction::EmitAndRegisterVariableArrayDimensions(), emitCopyToScratchpad(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), emitForStaticInitCall(), emitInterWarpCopyFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceFiniFunction(), emitReduceScratchpadFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::ento::SMTSolver::getAPSIntType(), getOSLogArgType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), shuffleAndStore(), and widenIterationCount().
unsigned ASTContext::getIntWidth | ( | QualType | T | ) | const |
Definition at line 9055 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().
Referenced by AnalyzeComparison(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckFloatComparison(), clang::ento::BasicValueFactory::getAPSIntType(), GetExprRange(), getFloatingTypeOrder(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), clang::IntegerLiteral::IntegerLiteral(), isOverflowingIntegerType(), and isShiftOverflow().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1739 of file ASTContext.h.
|
inline |
Definition at line 696 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::Sema::CheckFloatComparison(), clang::arcmt::checkForManualIssues(), 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(), clang::NamedDecl::getExplicitVisibility(), GetGCAttrTypeForType(), clang::index::IndexingContext::getLangOpts(), clang::ento::CheckerContext::getLangOpts(), clang::ASTWriter::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), clang::LinkageComputer::getLVForDecl(), getMacroName(), 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::VarDecl::isKnownToBeDefined(), 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(), isTypeSubstitutable(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), LocPropertyAttribute(), mayInlineDecl(), mergeDefinitionIntoModule(), mergeTypes(), needsConversionOfHalfVec(), 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(), UnwrapSimilarTypes(), 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 6370 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 1941 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 484 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1770 of file ASTContext.h.
Referenced by clang::Sema::BuildTypeTrait(), checkArithmeticOrEnumeralCompare(), 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 2901 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), OverloadTy, clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), DiagnoseForRangeConstVariableCopies(), clang::Expr::EvaluateAsLValue(), getCanonicalParamType(), clang::TypeName::getFullyQualifiedType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1030 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1701 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getMakeIntegerSeqDecl(), and LookupBuiltin().
unsigned ASTContext::getManglingNumber | ( | const NamedDecl * | ND | ) | const |
Definition at line 9948 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 9964 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 10021 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 2974 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(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), and TryStaticMemberPointerUpcast().
Get the initializations to perform when importing a module, if any.
Definition at line 1002 of file ASTContext.cpp.
References Inits.
Get the additional modules in which the definition Def
has been merged.
Definition at line 979 of file ASTContext.h.
Referenced by clang::Sema::diagnoseMissingImport(), hasVisibleDeclarationImpl(), and hasVisibleDefaultArgument().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 5148 of file ASTContext.cpp.
|
inlinestatic |
Definition at line 950 of file ASTContext.h.
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1668 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1685 of file ASTContext.h.
References clang::TargetInfo::getTriple().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1659 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1676 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 7094 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 1634 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 1856 of file ASTContext.h.
Referenced by LookupMemberExpr().
|
inline |
Definition at line 1607 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 6089 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 6145 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 6202 of file ASTContext.cpp.
Referenced by 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 6186 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 6299 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 6394 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 6382 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 7061 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 6040 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 7676 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 resulting type has a union of the qualifiers from T and the gc attribute.
Definition at line 2627 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 7077 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 1621 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 1834 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), CheckKeyForObjCARCConversion(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCInstanceTypeDecl(), 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 2446 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 2456 of file ASTContext.cpp.
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1715 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 6021 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 4659 of file ASTContext.cpp.
References Allocate(), clang::ObjCInterfaceDecl::getDefinition(), 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 2479 of file ASTContext.cpp.
Referenced by clang::ObjCMethodDecl::setMethodParams(), and setObjCMethodRedeclaration().
|
inline |
Definition at line 1611 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 4629 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 4365 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 4373 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 2489 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 6255 of file ASTContext.cpp.
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 7103 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 1880 of file ASTContext.h.
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 7086 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 1647 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 1844 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), and isWeakLinkedClass().
QualType ASTContext::getObjCSuperType | ( | ) | const |
Returns the C struct type for objc_super.
Definition at line 5823 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 4528 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 2181 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 5952 of file ASTContext.cpp.
References clang::TargetInfo::getOpenCLTypeAddrSpace(), and getOpenCLTypeKind().
Referenced by clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), 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 5916 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, and clang::TargetInfo::OCLTK_Sampler.
Referenced by getOpenCLTypeAddrSpace().
unsigned ASTContext::getOpenMPDefaultSimdAlign | ( | QualType | T | ) | const |
Get default simd alignment of the specified complete type in bits.
Definition at line 2080 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 7490 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 1441 of file ASTContext.cpp.
References overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
Definition at line 4296 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 10013 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 637 of file ASTContext.h.
References clang::serialized_diags::create(), and Node.
ASTContext::DynTypedNodeList ASTContext::getParents | ( | const ast_type_traits::DynTypedNode & | Node | ) |
Definition at line 4141 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ParenType::Profile(), and clang::TypeAlignment.
Referenced by getFunctionTypeWithExceptionSpec().
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 4944 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(), clang::ento::SMTSolver::getBinExpr(), getItaniumDynamicCastFn(), getPreferredTypeAlign(), clang::Sema::Initialize(), and performTypeAdjustment().
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 2781 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(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkOpenCLPipePacketType(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::SValBuilder::conjureSymbolVal(), clang::CodeGen::createRuntimeFunction(), clang::Sema::DeclareGlobalNewDelete(), decomposeTypeForEH(), emitCombinerOrInitializer(), emitCXXDestructor(), emitDeclTargetLinkVarDeclLValue(), EmitFunctionDeclPointer(), clang::CodeGen::emitKmpRoutineEntryT(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionListCopy(), emitTaskPrivateMappingFunction(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::getAddrOfDeclareTargetLink(), 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::Sema::PerformImplicitConversion(), clang::ento::ExprEngine::processCallExit(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), recordFixedType(), RemoveAddressSpaceFromPtr(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), clang::CodeGen::CGOpenMPRuntimeNVPTX::translateParameter(), TryConstCast(), tryObjCWritebackConversion(), and TryReinterpretCast().
|
inline |
Definition at line 1212 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 2133 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 960 of file ASTContext.h.
Referenced by clang::getPrimaryMergedDecl().
|
inline |
Definition at line 643 of file ASTContext.h.
Referenced by clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpDeclContext(), clang::DeclContext::dumpLookups(), clang::FormatASTNodeDiagnosticArgument(), getFunctionSourceLocation(), HasLocalVariableExternalStorage(), IsCommonTypo(), isTupleLike(), lookupStdTypeTraitMember(), mustSynthesizeSetterGetterMethod(), clang::Parser::ParseTopLevelDecl(), clang::PrettyDeclStackTraceEntry::print(), printObjectsUnderConstructionForContext(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), scanToNextArgument(), and wasRegionOfInterestModifiedAt().
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 4957 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 5647 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 checkArithmeticOrEnumeralThreeWayCompare(), clang::ento::SMTSolver::doIntTypeConversion(), and 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 7515 of file ASTContext.cpp.
References clang::QualifiedTemplateName::Profile().
Referenced by clang::TypeName::getFullyQualifiedTemplateName().
|
inline |
Un-split a SplitQualType.
Definition at line 1918 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(), LookupMemberExpr(), 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 1923 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 1932 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 1596 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 381 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 getCommentForDecl(), clang::getCompletionComment(), clang::getParameterComment(), and clang::getPatternCompletionComment().
RawComment * ASTContext::getRawCommentForDeclNoCache | ( | const Decl * | D | ) | const |
Return the documentation comment attached to a given declaration, without looking into cache.
Definition at line 114 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 788 of file ASTContext.h.
Return a read_only pipe type for the specified type.
Definition at line 3761 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 9925 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 3847 of file ASTContext.cpp.
References clang::RecordDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by buildFakeCtorCall(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), checkMemberDecomposition(), CheckOperatorDeleteDeclaration(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), emitReduceFiniFunction(), evaluateCDTSize(), findDirectBaseWithType(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), getInjectedClassNameType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), hasCopyOrMoveCtorParam(), recordFixedType(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
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 1153 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 2940 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by EvaluateBinaryTypeTrait(), getAutoRRefDeductType(), clang::TypeName::getFullyQualifiedType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
|
inline |
Definition at line 698 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 9892 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1751 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 5414 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 4906 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 4922 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 4900 of file ASTContext.cpp.
References clang::TargetInfo::getSizeType().
Referenced by clang::Sema::BuildArrayTypeTrait(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), buildMemcpyForAssignmentOp(), CheckOperatorNewDeclaration(), createTypePackElementParameterList(), clang::Sema::DeclareGlobalNewDelete(), 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(), and matchesStlAllocatorFn().
|
inline |
Definition at line 651 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(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), isBisonFile(), clang::ento::AnalysisManager::isInCodeFile(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), LocPropertyAttribute(), clang::Sema::makeUnavailableInSystemHeader(), mayInlineDecl(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), clang::PrettyDeclStackTraceEntry::print(), printExprAsWritten(), shouldReportOccurrenceForSystemDeclOnlyMode(), clang::ento::ExprEngine::ViewGraph(), and wasRegionOfInterestModifiedAt().
|
inline |
Definition at line 652 of file ASTContext.h.
unsigned ASTContext::getStaticLocalNumber | ( | const VarDecl * | VD | ) | const |
Definition at line 9958 of file ASTContext.cpp.
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateTemplateParmDecl * | param, |
TemplateName | replacement | ||
) | const |
Definition at line 7610 of file ASTContext.cpp.
References clang::SubstTemplateTemplateParmStorage::Profile().
TemplateName ASTContext::getSubstTemplateTemplateParmPack | ( | TemplateTemplateParmDecl * | Param, |
const TemplateArgument & | ArgPack | ||
) | const |
Definition at line 7628 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 3917 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 3895 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 4890 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by BuildImplicitMemberInitializer(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), GetThisType(), isSafeToConvert(), clang::Sema::PerformImplicitConversion(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
|
inline |
Definition at line 2481 of file ASTContext.h.
References clang::QualType::getQualifiers().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), buildBlockDescriptor(), castStringLiteralToDefaultAddressSpace(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), emitInterWarpCopyFunction(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), GenerateStringLiteral(), clang::CodeGen::ConstantEmitter::getCurrentAddrPrivate(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), clang::CodeGen::CGOpenCLRuntime::getSamplerType(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), isTrivialFiller(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and roundUpSizeToCharAlignment().
|
inline |
Definition at line 2485 of file ASTContext.h.
References clang::Qualifiers::getAddressSpace().
unsigned ASTContext::getTargetAddressSpace | ( | LangAS | AS | ) | const |
Definition at line 10278 of file ASTContext.cpp.
References 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 2165 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 679 of file ASTContext.h.
References MultiVersioning::Target.
Referenced by clang::Sema::ActOnPragmaOptionsAlign(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::trans::canApplyWeak(), CheckBuiltinTargetSupport(), CheckFormatString(), checkForMultipleExportedDefaultConstructors(), checkObjCMethodX86VectorTypes(), checkVAStartABI(), computeKeyFunction(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), diagnoseUnavailableAlignedAllocation(), 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(), getFixedPointIBits(), getFixedPointScale(), 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::Sema::PerformImplicitConversion(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), clang::StringLiteral::setString(), supportsNilWithFloatRet(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryReinterpretCast(), TryStaticMemberPointerUpcast(), 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 10268 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 1306 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 4030 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 4005 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 3984 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 3953 of file ASTContext.cpp.
Referenced by clang::TemplateTypeParmDecl::Create().
|
inline |
Definition at line 997 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(), hasSuperInitCall(), lookupStdNamespace(), 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(), resolveBuiltinNewDeleteOverload(), clang::arcmt::trans::rewriteAutoreleasePool(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), 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 2534 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(), clang::OMPCapturedExprDecl::Create(), 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 2073 of file ASTContext.h.
References clang::TypeInfo::Align.
Referenced by getAlignOfGlobalVar(), getTypeAlignIfKnown(), getTypeAlignInChars(), getTypeString(), and Write__ivar_list_t_initializer().
|
inline |
Definition at line 2074 of file ASTContext.h.
References clang::TypeInfo::Align.
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 1652 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 2112 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
Referenced by AddDirectArgument(), classifyType(), createConstantGlobalStructAndAddToParent(), emitInterWarpCopyFunction(), emitReductionListCopy(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::Sema::isOpenMPCapturedByRef(), isTrivialFiller(), performTypeAdjustment(), and roundUpSizeToCharAlignment().
Definition at line 2115 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1381 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(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), clang::Sema::FindAllocationFunctions(), 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 9996 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 3834 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 1676 of file ASTContext.cpp.
Referenced by EmitX86_64VAArgFromMemory(), clang::FixedPointLiteral::FixedPointLiteral(), getIntegerWidthAndSignedness(), getPreferredTypeAlign(), getTypeAlignIfRequired(), getTypeInfoInChars(), isAlignmentRequired(), matchTypes(), roundUpSizeToCharAlignment(), and tryMatchRecordTypes().
Definition at line 2046 of file ASTContext.h.
References getTypeInfo(), and clang::QualType::getTypePtr().
Referenced by getTypeInfo().
Definition at line 1594 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAs(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), getLangOpts(), and getTypeInfoInChars().
Referenced by clang::CodeGen::CodeGenFunction::EmitConstructorBody(), and clang::CodeGen::AggValueSlot::getPreferredSize().
Definition at line 1631 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(), getTypeString(), and roundUpSizeToCharAlignment().
Definition at line 1640 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 4686 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 4720 of file ASTContext.cpp.
References getCanonicalType(), and clang::TypeAlignment.
BuiltinTemplateDecl * ASTContext::getTypePackElementDecl | ( | ) | const |
Definition at line 1038 of file ASTContext.cpp.
References clang::BTK__type_pack_element, buildBuiltinTemplateDecl(), and getTypePackElementName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1707 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getTypePackElementDecl(), and LookupBuiltin().
|
inline |
Definition at line 1086 of file ASTContext.h.
Referenced by clang::TypoCorrectionConsumer::addNamespaces().
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 2052 of file ASTContext.h.
References clang::TypeInfo::Width.
Referenced by addBaseAndFieldSizes(), BitsContainNoUserData(), buildMemcpyForAssignmentOp(), canConvertIntTyToFloatTy(), canPassInRegisters(), checkIntToPointerCast(), checkOpenMPLoop(), checkVectorResult(), checkVectorShift(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), DiagnoseBadShiftValues(), clang::ento::SMTSolver::doFloatTypeConversion(), clang::ento::SMTSolver::doIntTypeConversion(), clang::ento::SMTSolver::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), clang::ento::SMTSolver::fixAPSInt(), getBytesReturnedByAllocSizeCall(), clang::ento::SMTSolver::getCastExpr(), GetCFNumberSize(), getFieldSize(), GetGCAttrTypeForType(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::ento::SMTSolver::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), getTypeString(), clang::ento::SMTSolver::getZeroExpr(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), HandleNeonVectorTypeAttr(), 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 widenIterationCount().
|
inline |
Definition at line 2053 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 2103 of file ASTContext.cpp.
References getTypeInfoInChars().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), addValue(), buildMemcpyForAssignmentOp(), clang::ento::StoreManager::castRegion(), castValueToType(), 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::CodeGen::CodeGenTBAA::getAccessInfo(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ento::TypedValueRegion::getExtent(), GetGCAttrTypeForType(), getObjCEncodingTypeSize(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::CodeGen::AggValueSlot::getPreferredSize(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeExpansion(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), isOnePastTheEndOfCompleteObject(), clang::Sema::isOpenMPCapturedByRef(), isTrivialFiller(), isValidBaseType(), clang::CodeGen::registerTargetGlobalVariable(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), shuffleAndStore(), tryEmitFMulAdd(), and Write__ivar_list_t_initializer().
Definition at line 2106 of file ASTContext.cpp.
References getTypeInfoInChars().
|
inline |
Return the ABI-specified natural alignment of a (complete) type T
, before alignment adjustments, in bits.
This alignment is curently used only by ARM and AArch64 when passing arguments of a composite type.
Definition at line 2081 of file ASTContext.h.
References DumpRecordLayout(), getDeclAlign(), getFieldOffset(), and clang::QualType::getTypePtr().
Referenced by getTypeUnadjustedAlignInChars().
unsigned ASTContext::getTypeUnadjustedAlign | ( | const Type * | T | ) | const |
Definition at line 2059 of file ASTContext.cpp.
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adjustments.
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters, before alignment adustments.
This method does not work on incomplete types.
Definition at line 2122 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
Definition at line 2125 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 1763 of file ASTContext.h.
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 1077 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 4916 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 4938 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by clang::Sema::Initialize(), and clang::Sema::isOpenMPCapturedByRef().
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 4762 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 4983 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), getIncompleteArrayType(), clang::QualType::getSplitUnqualifiedType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by CastsAwayConstness(), CompareQualificationConversions(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), EvaluateBinaryTypeTrait(), clang::Sema::handlerCanCatch(), hasCvrSimilarType(), hasSimilarType(), shouldBeModeledWithNoOp(), TryReferenceInitialization(), and TryReferenceListInitialization().
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
Definition at line 1953 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 4951 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 4929 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 7460 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 3050 of file ASTContext.cpp.
References clang::Auto, getAtomicType(), getConstantArrayType(), getDependentSizedArrayType(), getLValueReferenceType(), getPointerType(), getQualifiedType(), getRValueReferenceType(), clang::QualType::getSplitDesugaredType(), clang::Type::getTypeClass(), getVariableArrayType(), 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 3185 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 3319 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.
Referenced by getCorrespondingUnsignedType(), and HandleNeonVectorTypeAttr().
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 1162 of file ASTContext.h.
References clang::QualType::withFastQualifiers().
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 9863 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 1545 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 1550 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 1564 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 3765 of file ASTContext.cpp.
Referenced by HandleOpenCLAccessAttr().
|
inline |
Definition at line 702 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().
Determine if two types are similar, ignoring only CVR qualifiers.
Definition at line 5128 of file ASTContext.cpp.
References getUnqualifiedArrayType(), hasSameType(), clang::Qualifiers::removeCVRQualifiers(), and UnwrapSimilarTypes().
Referenced by TryConstCast().
Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.
Definition at line 2715 of file ASTContext.cpp.
References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), and hasSameType().
Referenced by isSameEntity().
|
inline |
Definition at line 2280 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 5238 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 2251 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(), findDirectBaseWithType(), forEachMultiversionedFunctionVersion(), hasCompatibleArrayTypes(), hasCvrSimilarType(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSimilarType(), isLayoutCompatible(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), IsStandardConversion(), clang::ASTImporter::IsStructurallyEquivalent(), loadToBegin(), MatchTemplateParameterKind(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), rewriteToNumberLiteral(), sameObjCTypeArgs(), TryConstructorInitialization(), and typesAreCompatible().
Definition at line 2254 of file ASTContext.h.
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 2275 of file ASTContext.h.
Referenced by AddSuperSendCompletion(), AnalyzeComparison(), areCompatibleVectorTypes(), clang::Sema::BuildPseudoDestructorExpr(), checkArithmeticOrEnumeralThreeWayCompare(), 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(), clang::Sema::handlerCanCatch(), hasCopyOrMoveCtorParam(), isBlockVarRef(), isNonPlacementDeallocationFunction(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), IsVectorConversion(), LookupMemberExpr(), clang::Sema::PerformImplicitConversion(), clang::Sema::ProcessPropertyDecl(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), TryConstructorInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryStaticMemberPointerUpcast(), and UnwrapSimilarTypes().
Determine if two types are similar, according to the C++ rules.
That is, determine if they are the same other than qualifiers on the initial sequence of pointer / pointer-to-member / array (and in Clang, object pointer) types and their element types.
Clang offers a number of qualifiers in addition to the C++ qualifiers; those qualifiers are also ignored in the 'similarity' check.
Definition at line 5116 of file ASTContext.cpp.
References getUnqualifiedArrayType(), hasSameType(), and UnwrapSimilarTypes().
Return true if the specified type has unique object representations according to (C++17 [meta.unary.prop]p9)
Definition at line 2341 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 1089 of file ASTContext.cpp.
References AccumTy, ARCUnbridgedCastTy, BoolTy, BoundMemberTy, BuiltinFnTy, Char16Ty, Char32Ty, Char8Ty, CharTy, DependentTy, DoubleComplexTy, DoubleTy, Float128ComplexTy, Float128Ty, Float16Ty, FloatComplexTy, FloatTy, FractTy, getAddressSpaceMap(), getCanonicalType(), getComplexType(), getPointerType(), getQualifiedType(), clang::CanQual< T >::getQualifiers(), clang::CanQual< T >::getUnqualifiedType(), HalfTy, Int128Ty, IntTy, isAddrSpaceMapManglingEnabled(), clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongAccumTy, LongDoubleComplexTy, LongDoubleTy, LongFractTy, LongLongTy, LongTy, NullPtrTy, ObjCBuiltinBoolTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OCLClkEventTy, OCLEventTy, OCLQueueTy, OCLReserveIDTy, OCLSamplerTy, OMPArraySectionTy, clang::opencl_generic, OverloadTy, PseudoObjectTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, SatUnsignedShortFractTy, clang::Qualifiers::setAddressSpace(), ShortAccumTy, ShortFractTy, ShortTy, SignedCharTy, UnknownAnyTy, UnsignedAccumTy, UnsignedCharTy, UnsignedFractTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongAccumTy, UnsignedLongFractTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortAccumTy, UnsignedShortFractTy, UnsignedShortTy, VaListTagDecl, VoidPtrTy, VoidTy, WCharTy, WideCharTy, and WIntTy.
Determine if the alignment the type has was required using an alignment attribute.
Definition at line 1644 of file ASTContext.cpp.
References clang::TypeInfo::AlignIsRequired, and getTypeInfo().
Referenced by clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), isAlignmentRequired(), and isVarDeclStrongDefinition().
Definition at line 1648 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 6055 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 9858 of file ASTContext.cpp.
Definition at line 2519 of file ASTContext.h.
Definition at line 2515 of file ASTContext.h.
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 2032 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
Definition at line 2523 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 5592 of file ASTContext.cpp.
Definition at line 2426 of file ASTContext.cpp.
Referenced by getNSArrayObjects(), rewriteToArrayLiteral(), and rewriteToDictionaryLiteral().
|
inline |
Definition at line 956 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 3122 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 2613 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 926 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 8925 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 8382 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 8401 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::getNoCfCheck(), clang::FunctionType::ExtInfo::getNoReturn(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getReturnType(), clang::FunctionType::getTypeQuals(), 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().
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 8979 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 8362 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 8600 of file ASTContext.cpp.
References clang::Auto, clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), 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(), 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 10238 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 4564 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 7759 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 7781 of file ASTContext.cpp.
References clang::Type::getAs(), clang::Type::getAsObjCQualifiedIdType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), and clang::Type::isVoidPointerType().
Referenced by canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), and isObjCTypeSubstitutable().
|
delete |
ASTContext::overridden_method_range ASTContext::overridden_methods | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1427 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 1411 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 1416 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 1421 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 867 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 8351 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 7747 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 4583 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), and ProtocolCompatibleWithProtocol().
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 2606 of file ASTContext.cpp.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasAddressSpace(), clang::Qualifiers::hasNonFastQualifiers(), clang::Qualifiers::removeAddressSpace(), and clang::QualifierCollector::strip().
Referenced by RemoveAddressSpaceFromPtr().
void ASTContext::ResetObjCLayout | ( | const ObjCContainerDecl * | CD | ) |
Definition at line 8972 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 1077 of file ASTContext.h.
Referenced by clang::CompilerInstance::createModuleManager().
Set the copy inialization expression of a block var decl.
Definition at line 2513 of file ASTContext.cpp.
References clang::Decl::hasAttr().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 1870 of file ASTContext.h.
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 5832 of file ASTContext.cpp.
References clang::Type::getAs(), and clang::TypedefNameDecl::getUnderlyingType().
void ASTContext::setClassScopeSpecializationPattern | ( | FunctionDecl * | FD, |
FunctionDecl * | Pattern | ||
) |
Definition at line 1344 of file ASTContext.cpp.
|
inline |
Definition at line 1260 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 863 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 1724 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 1316 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1400 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 1361 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1385 of file ASTContext.cpp.
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1734 of file ASTContext.h.
void ASTContext::setManglingNumber | ( | const NamedDecl * | ND, |
unsigned | Number | ||
) |
Definition at line 9943 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 3079 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 1641 of file ASTContext.h.
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 7480 of file ASTContext.cpp.
References getObjCInterfaceType(), and clang::QualType::isNull().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1628 of file ASTContext.h.
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 2465 of file ASTContext.cpp.
Referenced by clang::ObjCImplDecl::setClassInterface().
void ASTContext::setObjCImplementation | ( | ObjCCategoryDecl * | CatD, |
ObjCCategoryImplDecl * | ImplD | ||
) |
Set the implementation of ObjCCategoryDecl.
Definition at line 2472 of file ASTContext.cpp.
void ASTContext::setObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD, |
const ObjCMethodDecl * | Redecl | ||
) |
Definition at line 2483 of file ASTContext.cpp.
References getObjCMethodRedeclaration().
|
inline |
Definition at line 1615 of file ASTContext.h.
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1654 of file ASTContext.h.
|
inline |
Definition at line 1592 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 10009 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::isParameterPack().
Definition at line 964 of file ASTContext.h.
|
inline |
Definition at line 647 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1746 of file ASTContext.h.
void ASTContext::setStaticLocalNumber | ( | const VarDecl * | VD, |
unsigned | Number | ||
) |
Definition at line 9953 of file ASTContext.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1326 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
|
inline |
Set the type for the C ucontext_t type.
Definition at line 1758 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 2097 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(), roundUpSizeToCharAlignment(), and shuffleAndStore().
CharUnits ASTContext::toCharUnitsFromBits | ( | int64_t | BitSize | ) | const |
Convert a size in bits to a size in characters.
toCharUnitsFromBits - Convert a size in bits to a size in characters.
Definition at line 2092 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(), getFieldSize(), GetGCAttrTypeForType(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeAlignInChars(), getTypeInfoInChars(), getTypeUnadjustedAlignInChars(), isFullSizeType(), recordUsesEBO(), and roundUpSizeToCharAlignment().
Definition at line 8355 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 8343 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().
Attempt to unwrap two types that may both be array types with the same bound (or both be array types of unknown bound) for the purpose of comparing the cv-decomposition of two types per C++ [conv.qual].
Definition at line 5042 of file ASTContext.cpp.
References getAsArrayType().
Referenced by UnwrapSimilarTypes().
Attempt to unwrap two types that may be similar (C++ [conv.qual]).
If T1 and T2 are both pointer types of the same kind, or both array types with the same bound, unwraps layers from T1 and T2 until a pointer type is unwrapped. Top-level qualifiers on T1 and T2 are ignored.
This function will typically be called in a loop that successively "unwraps" pointer and pointer-to-member types to compare them at each level.
true
if a pointer type was unwrapped, false
if we reached a pair of types that can't be unwrapped further. Definition at line 5080 of file ASTContext.cpp.
References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), hasSameUnqualifiedType(), and UnwrapSimilarArrayTypes().
Referenced by CompareQualificationConversions(), hasCvrSimilarType(), hasSimilarType(), and shouldBeModeledWithNoOp().
|
friend |
Definition at line 404 of file ASTContext.h.
|
friend |
Definition at line 405 of file ASTContext.h.
|
friend |
Definition at line 406 of file ASTContext.h.
|
friend |
Definition at line 407 of file ASTContext.h.
|
friend |
Definition at line 2873 of file ASTContext.h.
|
friend |
Definition at line 2874 of file ASTContext.h.
|
friend |
Definition at line 151 of file ASTContext.h.
CanQualType clang::ASTContext::AccumTy |
Definition at line 1017 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 1035 of file ASTContext.h.
Referenced by InitBuiltinTypes().
|
mutable |
Definition at line 1046 of file ASTContext.h.
Referenced by getAutoDeductType().
|
mutable |
Definition at line 1047 of file ASTContext.h.
Referenced by getAutoRRefDeductType().
CanQualType clang::ASTContext::BoolTy |
Definition at line 1005 of file ASTContext.h.
Referenced by clang::ento::SimpleConstraintManager::assume(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildExpressionTrait(), CheckBoolLikeConversion(), clang::Sema::CheckCXXBooleanCondition(), clang::CodeGen::CGOpenMPRuntimeNVPTX::createNVPTXRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), emitForStaticInitCall(), emitStructSetterCall(), clang::ento::SMTSolver::fixAPSInt(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::ento::SMTSolver::getBinExpr(), clang::ento::SValBuilder::getConditionType(), getFloatingTypeOrder(), GetIntrinsic(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and TryContextuallyConvertToBool().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 1033 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), hasOnlyNonStaticMemberFunctions(), InitBuiltinTypes(), and clang::Sema::MaybeBindToTemporary().
CanQualType clang::ASTContext::BuiltinFnTy |
Definition at line 1034 of file ASTContext.h.
Referenced by buildMemcpyForAssignmentOp(), InitBuiltinTypes(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
Builtin::Context& clang::ASTContext::BuiltinInfo |
Definition at line 547 of file ASTContext.h.
Referenced by canBuiltinBeRedeclared(), GetBuiltinType(), clang::CallExpr::isUnevaluatedBuiltinCall(), and LookupBuiltin().
CanQualType clang::ASTContext::Char16Ty |
Definition at line 1011 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Char32Ty |
Definition at line 1012 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Char8Ty |
Definition at line 1010 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::CharTy |
Definition at line 1006 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(), InitBuiltinTypes(), and clang::ento::ExprEngine::VisitArraySubscriptExpr().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 713 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
True if comments are already loaded from ExternalASTSource.
Definition at line 716 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
ComparisonCategories clang::ASTContext::CompCategories |
Types and expressions required to build C++2a three-way comparisons using operator<=>, including the values return by builtin <=> operators.
Definition at line 2008 of file ASTContext.h.
|
mutable |
Definition at line 548 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(), resolveAllocationOverload(), and resolveBuiltinNewDeleteOverload().
CanQualType clang::ASTContext::DependentTy |
Definition at line 1033 of file ASTContext.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), clang::DependentScopeDeclRefExpr::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::CXXUnresolvedConstructExpr::getBeginLoc(), GetDeclSpecTypeForDeclarator(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleComplexTy |
Definition at line 1030 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleTy |
Definition at line 1016 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 549 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache(), PrintStats(), and setExternalSource().
CanQualType clang::ASTContext::Float128ComplexTy |
Definition at line 1031 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Float128Ty |
Definition at line 1016 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), and IsStandardConversion().
CanQualType clang::ASTContext::Float16Ty |
Definition at line 1029 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::FloatComplexTy |
Definition at line 1030 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::FloatTy |
Definition at line 1016 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), mergeFunctionTypes(), clang::Sema::PerformImplicitConversion(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::FractTy |
Definition at line 1020 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::HalfTy |
Definition at line 1028 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), InitBuiltinTypes(), and needsConversionOfHalfVec().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 545 of file ASTContext.h.
Referenced by buildCapture(), buildMemcpyForAssignmentOp(), clang::CodeGen::CGCXXABI::buildThisParam(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), clang::CodeGen::CodeGenFunction::EmitAndRegisterVariableArrayDimensions(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitReplacement(), clang::CodeGen::emitUserDefinedReduction(), 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(), hasMRCWeakIvars(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), clang::NSAPI::isMacroDefined(), isNSStringType(), clang::NSAPI::isSubclassOfNSClass(), LookupMethodInReceiverType(), lookupStdNamespace(), clang::ObjCNoReturn::ObjCNoReturn(), PropertyMemoryAttribute(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), ReplaceWithClasstype(), shouldRunOnFunctionOrMethod(), and transferARCOwnershipToDeclaratorChunk().
CanQualType clang::ASTContext::Int128Ty |
Definition at line 1013 of file ASTContext.h.
Referenced by getFloatingTypeOrder(), getInt128Decl(), getIntTypeForBitwidth(), InitBuiltinTypes(), and isValidBaseType().
CanQualType clang::ASTContext::IntTy |
Definition at line 1013 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBound(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), emitInterWarpCopyFunction(), emitRTtypeidCall(), emitTaskDupFunction(), 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(), and rewriteToNumericBoxedExpression().
ASTMutationListener* clang::ASTContext::Listener = nullptr |
Definition at line 550 of file ASTContext.h.
Referenced by mergeDefinitionIntoModule().
CanQualType clang::ASTContext::LongAccumTy |
Definition at line 1017 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleComplexTy |
Definition at line 1030 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleTy |
Definition at line 1016 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::LongFractTy |
Definition at line 1020 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 1013 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 1013 of file ASTContext.h.
Referenced by assumeNoOverflow(), create_dispatch_once(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringDecl(), GetCFNumberSize(), getFloatingTypeOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), isValidBaseType(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 1032 of file ASTContext.h.
Referenced by DeduceNullPtrTemplateArgument(), and InitBuiltinTypes().
|
static |
The number of implicitly-declared copy assignment operators.
Definition at line 2788 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 2792 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared copy constructors.
Definition at line 2774 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 2778 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared default constructors.
Definition at line 2767 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 2771 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared destructors.
Definition at line 2802 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 2806 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move assignment operators.
Definition at line 2795 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 2799 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move constructors.
Definition at line 2781 of file ASTContext.h.
Referenced by PrintStats().
|
static |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 2785 of file ASTContext.h.
Referenced by PrintStats().
CanQualType clang::ASTContext::ObjCBuiltinBoolTy |
Definition at line 1037 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinClassTy |
Definition at line 1036 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCClassDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinIdTy |
Definition at line 1036 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 1036 of file ASTContext.h.
Referenced by getObjCSelDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::OCLClkEventTy |
Definition at line 1041 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLEventTy |
Definition at line 1041 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLQueueTy |
Definition at line 1042 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLReserveIDTy |
Definition at line 1042 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), SemaBuiltinCommitRWPipe(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
CanQualType clang::ASTContext::OCLSamplerTy |
Definition at line 1041 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OMPArraySectionTy |
Definition at line 1043 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::OverloadTy |
Definition at line 1033 of file ASTContext.h.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), DiagnoseBadFunctionCast(), getLValueReferenceType(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), and TryStaticMemberPointerUpcast().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 781 of file ASTContext.h.
Referenced by getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 1035 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 777 of file ASTContext.h.
Referenced by getRawCommentForAnyRedecl().
CanQualType clang::ASTContext::SatAccumTy |
Definition at line 1022 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatFractTy |
Definition at line 1025 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongAccumTy |
Definition at line 1022 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongFractTy |
Definition at line 1025 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortAccumTy |
Definition at line 1022 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortFractTy |
Definition at line 1025 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedAccumTy |
Definition at line 1023 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedFractTy |
Definition at line 1026 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongAccumTy |
Definition at line 1023 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongFractTy |
Definition at line 1026 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortAccumTy |
Definition at line 1023 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortFractTy |
Definition at line 1026 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos |
Definition at line 2928 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 546 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::ShortAccumTy |
Definition at line 1017 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ShortFractTy |
Definition at line 1020 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ShortTy |
Definition at line 1013 of file ASTContext.h.
Referenced by emitShuffleAndReduceFunction(), 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 1013 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 1033 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedAccumTy |
Definition at line 1019 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedCharTy |
Definition at line 1014 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::UnsignedFractTy |
Definition at line 1021 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedInt128Ty |
Definition at line 1015 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), getIntTypeForBitwidth(), getUInt128Decl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedIntTy |
Definition at line 1014 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::UnsignedLongAccumTy |
Definition at line 1019 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongFractTy |
Definition at line 1021 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongLongTy |
Definition at line 1015 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 1014 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::UnsignedShortAccumTy |
Definition at line 1019 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortFractTy |
Definition at line 1021 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortTy |
Definition at line 1014 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 1051 of file ASTContext.h.
Referenced by getVaListTagDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::VoidPtrTy |
Definition at line 1032 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(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), createKmpTaskTRecordDecl(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitInterWarpCopyFunction(), clang::CodeGen::emitKmpRoutineEntryT(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitReductionCombiner(), emitReductionListCopy(), emitShuffleAndReduceFunction(), 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 1004 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeUnprototypedMustTailThunk(), buildPostUpdate(), clang::ento::StoreManager::castRegion(), 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(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitCopyToScratchpad(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitInterWarpCopyFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitReductionCombiner(), emitShuffleAndReduceFunction(), emitStructSetterCall(), emitTaskDupFunction(), 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(), clang::CodeGen::CodeGenFunction::StartThunk(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::WCharTy |
Definition at line 1007 of file ASTContext.h.
Referenced by getSignedWCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WideCharTy |
Definition at line 1008 of file ASTContext.h.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WIntTy |
Definition at line 1009 of file ASTContext.h.
Referenced by InitBuiltinTypes().