clang
8.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 | |
struct | BlockVarCopyInit |
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expression can throw. More... | |
class | DynTypedNodeList |
Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode. More... | |
class | ParentMap |
class | RawCommentAndCacheFlags |
struct | SectionInfo |
Public Types | |
enum | GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext } |
enum | InlineVariableDefinitionKind { InlineVariableDefinitionKind::None, InlineVariableDefinitionKind::Weak, InlineVariableDefinitionKind::WeakUnknown, InlineVariableDefinitionKind::Strong } |
enum | PragmaSectionFlag : unsigned { PSF_None = 0, PSF_Read = 0x1, PSF_Write = 0x2, PSF_Execute = 0x4, PSF_Implicit = 0x8, PSF_Invalid = 0x80000000U } |
using | TemplateOrSpecializationInfo = llvm::PointerUnion< VarTemplateDecl *, MemberSpecializationInfo * > |
A type synonym for the TemplateOrInstantiation mapping. More... | |
using | overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
using | overridden_method_range = llvm::iterator_range< overridden_cxx_method_iterator > |
using | import_range = llvm::iterator_range< import_iterator > |
Public Member Functions | |
std::vector< Decl * > | getTraversalScope () const |
void | setTraversalScope (const std::vector< Decl *> &) |
template<typename NodeT > | |
DynTypedNodeList | getParents (const NodeT &Node) |
Returns the parents of the given node (within the traversal scope). 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 (attr::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 () const |
Retrieve the identifier 'NSObject'. More... | |
IdentifierInfo * | getNSCopyingName () |
Retrieve the identifier 'NSCopying'. More... | |
CanQualType | getNSUIntegerType () const |
CanQualType | getNSIntegerType () const |
IdentifierInfo * | getBoolName () const |
Retrieve the identifier 'bool'. More... | |
IdentifierInfo * | getMakeIntegerSeqName () const |
IdentifierInfo * | getTypePackElementName () const |
QualType | getObjCInstanceType () |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. More... | |
TypedefDecl * | getObjCInstanceTypeDecl () |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type. More... | |
void | setFILEDecl (TypeDecl *FILEDecl) |
Set the type for the C FILE type. More... | |
QualType | getFILEType () const |
Retrieve the C FILE type. More... | |
void | setjmp_bufDecl (TypeDecl *jmp_bufDecl) |
Set the type for the C jmp_buf type. More... | |
QualType | getjmp_bufType () const |
Retrieve the C jmp_buf type. More... | |
void | setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl) |
Set the type for the C sigjmp_buf type. More... | |
QualType | getsigjmp_bufType () const |
Retrieve the C sigjmp_buf type. More... | |
void | setucontext_tDecl (TypeDecl *ucontext_tDecl) |
Set the type for the C ucontext_t type. More... | |
QualType | getucontext_tType () const |
Retrieve the C ucontext_t type. More... | |
QualType | getLogicalOperationType () const |
The result type of logical operations, '<', '>', '!=', etc. More... | |
void | getObjCEncodingForType (QualType T, std::string &S, const FieldDecl *Field=nullptr, QualType *NotEncodedT=nullptr) const |
Emit the Objective-CC type encoding for the given type T into S . More... | |
void | getObjCEncodingForPropertyType (QualType T, std::string &S) const |
Emit the Objective-C property type encoding for the given type T into S . More... | |
void | getLegacyIntegralTypeEncoding (QualType &t) const |
getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always. More... | |
void | getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const |
Put the string version of the type qualifiers QT into S . More... | |
std::string | getObjCEncodingForFunctionDecl (const FunctionDecl *Decl) const |
Emit the encoded type for the function Decl into S . More... | |
std::string | getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, bool Extended=false) const |
Emit the encoded type for the method declaration Decl into S . More... | |
std::string | getObjCEncodingForBlock (const BlockExpr *blockExpr) const |
Return the encoded type for this block declaration. More... | |
std::string | getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const |
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration. More... | |
bool | ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'. More... | |
ObjCPropertyImplDecl * | getObjCPropertyImplDeclForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const |
CharUnits | getObjCEncodingTypeSize (QualType T) const |
Return the size of type T for Objective-C encoding purpose, in characters. More... | |
TypedefDecl * | getObjCIdDecl () const |
Retrieve the typedef corresponding to the predefined id type in Objective-C. More... | |
QualType | getObjCIdType () const |
Represents the Objective-CC id type. More... | |
TypedefDecl * | getObjCSelDecl () const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C. More... | |
QualType | getObjCSelType () const |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type. More... | |
TypedefDecl * | getObjCClassDecl () const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. More... | |
QualType | getObjCClassType () const |
Represents the Objective-C Class type. More... | |
ObjCInterfaceDecl * | getObjCProtocolDecl () const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. More... | |
TypedefDecl * | getBOOLDecl () const |
Retrieve declaration of 'BOOL' typedef. More... | |
void | setBOOLDecl (TypedefDecl *TD) |
Save declaration of 'BOOL' typedef. More... | |
QualType | getBOOLType () const |
type of 'BOOL' type. More... | |
QualType | getObjCProtoType () const |
Retrieve the type of the Objective-C Protocol class. More... | |
TypedefDecl * | getBuiltinVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list type. More... | |
QualType | getBuiltinVaListType () const |
Retrieve the type of the __builtin_va_list type. More... | |
Decl * | getVaListTagDecl () const |
Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets. More... | |
TypedefDecl * | getBuiltinMSVaListDecl () const |
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type. More... | |
QualType | getBuiltinMSVaListType () const |
Retrieve the type of the __builtin_ms_va_list type. More... | |
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 |
FixedPointSemantics | getFixedPointSemantics (QualType Ty) const |
APFixedPoint | getFixedPointMax (QualType Ty) const |
APFixedPoint | getFixedPointMin (QualType Ty) const |
DeclarationNameInfo | getNameForTemplate (TemplateName Name, SourceLocation NameLoc) const |
TemplateName | getOverloadedTemplateName (UnresolvedSetIterator Begin, UnresolvedSetIterator End) const |
Retrieve the template name that corresponds to a non-empty lookup. More... | |
TemplateName | 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 |
LangAS | getLangASForBuiltinAddressSpace (unsigned AS) const |
uint64_t | getTargetNullPointerValue (QualType QT) const |
Get target-dependent integer value for null pointer which is used for constant folding. More... | |
bool | addressSpaceMapManglingFor (LangAS AS) const |
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 | setBlockVarCopyInit (const VarDecl *VD, Expr *CopyExpr, bool CanThrow) |
Set the copy inialization expression of a block var decl. More... | |
BlockVarCopyInit | getBlockVarCopyInit (const VarDecl *VD) const |
Get the copy initialization expression of the VarDecl VD , or nullptr if none exists. More... | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. More... | |
TypeSourceInfo * | getTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location. More... | |
void | AddDeallocation (void(*Callback)(void *), void *Data) |
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 155 of file ASTContext.h.
using clang::ASTContext::import_range = llvm::iterator_range<import_iterator> |
Definition at line 965 of file ASTContext.h.
using clang::ASTContext::overridden_cxx_method_iterator = CXXMethodVector::const_iterator |
Definition at line 927 of file ASTContext.h.
using clang::ASTContext::overridden_method_range = llvm::iterator_range<overridden_cxx_method_iterator> |
Definition at line 937 of file ASTContext.h.
using clang::ASTContext::TemplateOrSpecializationInfo = llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 422 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 2002 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 2871 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 2927 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins | ||
) |
Definition at line 784 of file ASTContext.cpp.
References clang::TranslationUnitDecl::Create().
|
delete |
ASTContext::~ASTContext | ( | ) |
Definition at line 802 of file ASTContext.cpp.
|
inline |
Definition at line 803 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 10091 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 916 of file ASTContext.cpp.
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 10108 of file ASTContext.cpp.
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 2720 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 1522 of file ASTContext.cpp.
References clang::Decl::isFromASTFile().
Referenced by clang::DeclContext::addHiddenDecl().
Definition at line 1051 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 1025 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 1496 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod().
Definition at line 2515 of file ASTContext.h.
References clang::isTargetAddressSpace().
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 10098 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 2739 of file ASTContext.cpp.
References clang::Type::castAs(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
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 2789 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 2721 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 3811 of file ASTContext.cpp.
References getAddrSpaceQualType(), and clang::opencl_constant.
|
inline |
Definition at line 669 of file ASTContext.h.
Referenced by clang::DeclGroup::Create(), clang::CXXTryStmt::Create(), clang::CXXOperatorCallExpr::Create(), clang::TemplateParameterList::Create(), clang::CXXMemberCallExpr::Create(), clang::ObjCArrayLiteral::Create(), clang::CUDAKernelCallExpr::Create(), clang::OMPParallelDirective::Create(), clang::ObjCDictionaryLiteral::Create(), clang::CXXStaticCastExpr::Create(), clang::CoroutineBodyStmt::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::UserDefinedLiteral::Create(), clang::ObjCTypeParamList::create(), clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPOrderedClause::Create(), clang::OMPForSimdDirective::Create(), clang::CompoundStmt::Create(), clang::OMPSectionsDirective::Create(), clang::CXXConstructExpr::Create(), clang::OMPSectionDirective::Create(), clang::OMPSingleDirective::Create(), clang::CaseStmt::Create(), clang::OMPMasterDirective::Create(), clang::OMPPrivateClause::Create(), clang::CXXFunctionalCastExpr::Create(), clang::OMPParallelForDirective::Create(), clang::CXXTemporaryObjectExpr::Create(), clang::OMPFirstprivateClause::Create(), clang::StringLiteral::Create(), clang::AttributedStmt::Create(), clang::OMPParallelForSimdDirective::Create(), clang::LambdaExpr::Create(), clang::OMPParallelSectionsDirective::Create(), clang::IfStmt::Create(), clang::OMPLastprivateClause::Create(), clang::PredefinedExpr::Create(), clang::OMPTaskDirective::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPBarrierDirective::Create(), clang::SwitchStmt::Create(), clang::OMPTaskwaitDirective::Create(), clang::CXXNewExpr::Create(), clang::OMPTaskgroupDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPFlushDirective::Create(), clang::WhileStmt::Create(), clang::OMPOrderedDirective::Create(), clang::OffsetOfExpr::Create(), clang::OMPAtomicDirective::Create(), clang::OMPTaskReductionClause::Create(), clang::OMPTargetDirective::Create(), clang::OMPTargetDataDirective::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::TypeTraitExpr::Create(), clang::ReturnStmt::Create(), clang::CallExpr::Create(), clang::OMPTargetExitDataDirective::Create(), clang::OMPInReductionClause::Create(), clang::OMPTargetParallelDirective::Create(), clang::OMPTargetParallelForDirective::Create(), clang::OMPTeamsDirective::Create(), clang::OMPCancellationPointDirective::Create(), clang::MemberExpr::Create(), clang::OMPCancelDirective::Create(), clang::UnresolvedLookupExpr::Create(), clang::OMPTaskLoopDirective::Create(), OMPAlignedClause::Create(), clang::OMPTaskLoopSimdDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::OMPDistributeDirective::Create(), OMPCopyinClause::Create(), clang::OMPTargetUpdateDirective::Create(), clang::ExprWithCleanups::Create(), clang::ImplicitCastExpr::Create(), clang::OMPDistributeParallelForDirective::Create(), OMPCopyprivateClause::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::CStyleCastExpr::Create(), OMPFlushClause::Create(), clang::OMPDistributeSimdDirective::Create(), clang::OMPTargetParallelForSimdDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), OMPDependClause::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::SizeOfPackExpr::Create(), clang::OMPTargetTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTargetTeamsDistributeSimdDirective::Create(), clang::FunctionParmPackExpr::Create(), OMPMapClause::Create(), clang::DesignatedInitExpr::Create(), OMPToClause::Create(), clang::ParenListExpr::Create(), OMPFromClause::Create(), OMPUseDevicePtrClause::Create(), OMPIsDevicePtrClause::Create(), clang::PseudoObjectExpr::Create(), clang::LambdaExpr::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::SizeOfPackExpr::CreateDeserialized(), clang::CXXOperatorCallExpr::CreateEmpty(), clang::CXXMemberCallExpr::CreateEmpty(), clang::ObjCArrayLiteral::CreateEmpty(), clang::CUDAKernelCallExpr::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::UserDefinedLiteral::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPOrderedClause::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::CompoundStmt::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::CXXConstructExpr::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::CaseStmt::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::CXXTemporaryObjectExpr::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::IfStmt::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::PredefinedExpr::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::SwitchStmt::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::CXXNewExpr::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::WhileStmt::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPTaskReductionClause::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPTargetDataDirective::CreateEmpty(), clang::OMPTargetEnterDataDirective::CreateEmpty(), clang::ReturnStmt::CreateEmpty(), clang::OMPTargetExitDataDirective::CreateEmpty(), clang::CallExpr::CreateEmpty(), clang::OMPInReductionClause::CreateEmpty(), clang::OMPTargetParallelDirective::CreateEmpty(), clang::OMPTargetParallelForDirective::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), clang::ImplicitCastExpr::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::CStyleCastExpr::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), OMPDependClause::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(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeSimdDirective::CreateEmpty(), clang::FunctionParmPackExpr::CreateEmpty(), OMPMapClause::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), OMPToClause::CreateEmpty(), clang::ParenListExpr::CreateEmpty(), OMPFromClause::CreateEmpty(), OMPUseDevicePtrClause::CreateEmpty(), OMPIsDevicePtrClause::CreateEmpty(), getCanonicalTemplateSpecializationType(), clang::LambdaCapture::getCaptureKind(), getDeclAttrs(), getElaboratedType(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getObjCTypeParamType(), getOverloadedTemplateName(), getTemplateSpecializationType(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), isCanonicalExceptionSpecification(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::ObjCMethodDecl::setAsRedeclaration(), and clang::TemplateArgument::TemplateArgument().
|
inline |
Definition at line 672 of file ASTContext.h.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2655 of file ASTContext.h.
References CanThrow().
Referenced by clang::Sema::DiagnoseUseOfUnimplementedSelectors().
QualType ASTContext::applyObjCProtocolQualifiers | ( | QualType | type, |
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
bool & | hasError, | ||
bool | allowOnPointerType = false |
||
) | const |
Apply Objective-C protocol qualifiers to the given type.
allowOnPointerType | specifies if we can apply protocol qualifiers on ObjCObjectPointerType. It can be set to true when constructing the canonical type of a Objective-C type parameter. |
If this is for the canonical type of a type parameter, we can apply protocol qualifiers on the ObjCObjectPointerType.
Definition at line 4515 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 8233 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 8418 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 7814 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 CompareStandardConversionSequences(), and IsVectorConversion().
bool ASTContext::AtomicUsesUnsupportedLibcall | ( | const AtomicExpr * | E | ) | const |
Definition at line 10143 of file ASTContext.cpp.
References clang::TargetInfo::getMaxAtomicInlineWidth(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), getTypeAlignInChars(), getTypeSizeInChars(), and toBits().
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 6053 of file ASTContext.cpp.
References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInit(), clang::ASTContext::BlockVarCopyInit::getCopyExpr(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), clang::QualType::isDestructedType(), clang::QualType::isNonTrivialToPrimitiveDestructiveMove(), isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1077 of file ASTContext.cpp.
References 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 1102 of file ASTContext.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), createPrivatesRecordDecl(), clang::CodeGen::emitDeclareSimdFunction(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), 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 1118 of file ASTContext.cpp.
Referenced by 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 7998 of file ASTContext.cpp.
References clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isObjCQualifiedClass(), clang::ObjCObjectType::isObjCQualifiedId(), clang::ObjCObjectType::isObjCUnqualifiedIdOrClass(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by areComparableObjCPointerTypes(), canAssignObjCObjectTypes(), canBindObjCObjectType(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::DiagnosePropertyAccessorMismatch(), findMethodDecl(), getReturnTypeForMethod(), hasDefinition(), isObjCTypeSubstitutable(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 8356 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 8047 of file ASTContext.cpp.
References clang::ObjCInterfaceType::getDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::ObjCObjectPointerType::isKindOfType(), clang::Type::isObjCBuiltinType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ObjCInterfaceDecl::isSuperClassOf(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by mergeTypes().
Definition at line 8430 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 7573 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 470 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 2278 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
Referenced by canAssignObjCInterfaces(), ObjCQualifiedIdTypesAreCompatible(), QIdProtocolsAdoptObjCObjectProtocols(), and UseNSOptionsMacro().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 2475 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
MangleContext * ASTContext::createMangleContext | ( | ) |
Definition at line 9981 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, getDiagnostics(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, clang::TargetCXXABI::Microsoft, clang::Target, clang::TargetCXXABI::WatchOS, clang::TargetCXXABI::WebAssembly, and clang::CXXABI::~CXXABI().
std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 10081 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 2586 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType().
Referenced by getTrivialTypeSourceInfo(), and GetTypeSourceInfoForDeclarator().
|
inline |
Definition at line 675 of file ASTContext.h.
Referenced by clang::GCCAsmStmt::getInputConstraint(), clang::CXXRecordDecl::setBases(), clang::ShuffleVectorExpr::setExprs(), clang::VarDecl::setInit(), clang::APNumericStorage::setIntValue(), 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 9771 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 995 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl(), and 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 2260 of file ASTContext.cpp.
References clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), and clang::ObjCInterfaceDecl::ivars().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3370 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 1350 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 9916 of file ASTContext.cpp.
References clang::Decl::getAsFunction(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::DeclContext::getRedeclContext(), clang::ValueDecl::getType(), hasSameType(), clang::FunctionDecl::isMultiVersion(), and clang::DeclContext::lookup().
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 2652 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by adjustStringLiteralBaseType(), checkConditionalPointerCompatibility(), GetThisType(), 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 5466 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 2873 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Referenced by getTypeInfo().
|
inline |
Definition at line 1234 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 2235 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 2241 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString().
|
inline |
Definition at line 665 of file ASTContext.h.
Referenced by clang::Decl::getID(), and clang::RawComment::parse().
Return the properly qualified result of decaying the specified array type to a pointer.
getArrayDecayedType - Return the properly qualified result of decaying the specified array type to a pointer.
This operation is non-trivial when handling typedefs etc. The canonical type of T
must be an array type, this returns a pointer to a properly qualified element of the array.
See C99 6.7.5.3p7 and C99 6.3.2.1p3.
This operation is non-trivial when handling typedefs etc. The canonical type of "T" must be an array type, this returns a pointer to a properly qualified element of the array.
See C99 6.7.5.3p7 and C99 6.3.2.1p3.
Definition at line 5497 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 5409 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(), checkFormatStringExpr(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), DeduceFromInitializerList(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), getArrayDecayedType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), GetGCAttrTypeForType(), clang::InitializationSequence::InitializeFrom(), isDesignatorAtObjectEnd(), isSafeToConvert(), isSameEntity(), isSimpleZero(), isTrivialFiller(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::QualType::mayBeNotDynamicClass(), mergeTypes(), clang::InitializationSequence::Perform(), print_elem(), clang::ento::ExprEngine::ProcessDeleteDtor(), roundUpSizeToCharAlignment(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TypeRequiresBuiltinLaunderImp(), and UnwrapSimilarArrayTypes().
|
inline |
Definition at line 2413 of file ASTContext.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), CheckFormatString(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EvaluateArrayTypeTrait(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), getTypeExpansion(), clang::FloatingLiteral::getValueAsApproximateDouble(), isEmptyField(), mergeTypes(), rewriteInputConstraintReferences(), and clang::CodeGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 2422 of file ASTContext.h.
|
inline |
Definition at line 2419 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 679 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1098 of file ASTContext.h.
Referenced by 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 2613 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 2608 of file ASTContext.cpp.
Referenced by getTypeInfo(), and getTypeUnadjustedAlign().
const ASTRecordLayout & ASTContext::getASTRecordLayout | ( | const RecordDecl * | D | ) | const |
Get or compute information about the layout of the specified record (struct/union/class) D
, which indicates its size and field position information.
getASTRecordLayout - Get or compute information about the layout of the specified record (struct/union/class), which indicates its size and field position information.
Definition at line 2966 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(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), ComputeVMIClassTypeInfoFlags(), detectAmbiguousBases(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::emitImplicitAssignmentOperatorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EmitNullBaseClassInitialization(), EmitNullConstant(), emitRTtypeidCall(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffset(), getFieldSize(), GetGCAttrTypeForType(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getOffsetOfBaseWithVBPtr(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeInfo(), getTypeInfoDataSizeInChars(), getTypeInfoVTable(), getTypeUnadjustedAlign(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), hasDefaultCXXMethodCC(), isDesignatorAtObjectEnd(), recordUsesEBO(), RequiresVtordisp(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), and clang::VTTBuilder::VTTBuilder().
|
inline |
Definition at line 2416 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 4902 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 | ( | attr::Kind | attrKind, |
QualType | modifiedType, | ||
QualType | equivalentType | ||
) |
Definition at line 3929 of file ASTContext.cpp.
References getCanonicalType(), clang::ast_matchers::id(), clang::AttributedType::Profile(), and clang::TypeAlignment.
Referenced by computeConditionalNullability(), getArrayDecayedType(), getFunctionTypeWithExceptionSpec(), 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 4929 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 4939 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 4858 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 691 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 5519 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(), TryValueInitialization(), and TypeRequiresBuiltinLaunderImp().
Return the innermost element type of a type (which needn't actually be an array type).
Definition at line 5523 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 5971 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.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable().
QualType ASTContext::getBlockDescriptorType | ( | ) | const |
Gets the struct used to keep track of the descriptor for pointer to blocks.
Definition at line 5936 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.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable().
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 2935 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().
ASTContext::BlockVarCopyInit ASTContext::getBlockVarCopyInit | ( | const VarDecl * | VD | ) | const |
Get the copy initialization expression of the VarDecl VD
, or nullptr if none exists.
Get the copy initialization expression of VarDecl, or nullptr if none exists.
Definition at line 2567 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), buildByrefHelpers(), and getBlockCaptureStr().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 1880 of file ASTContext.h.
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1710 of file ASTContext.h.
References clang::IdentifierTable::get().
|
inline |
type of 'BOOL' type.
Definition at line 1890 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 7566 of file ASTContext.cpp.
References CreateMSVaListDecl().
Referenced by clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_ms_va_list
type.
Definition at line 1918 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 9517 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 7548 of file ASTContext.cpp.
References CreateVaListDecl(), and clang::Target.
Referenced by getVaListTagDecl(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_va_list
type.
Definition at line 1904 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 6093 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 3601 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 5354 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 5023 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 5303 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 5255 of file ASTContext.cpp.
Referenced by DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), and hasSameTemplateName().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 4125 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), getCanonicalTemplateArgument(), getCanonicalTemplateName(), 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 2253 of file ASTContext.h.
References clang::QualType::getCanonicalType().
Referenced by clang::Sema::ActOnStartCXXMemberReference(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::CheckEquivalentExceptionSpecImpl(), 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(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), EmitX86_64VAArgFromMemory(), clang::ento::SValBuilder::evalCast(), evenFlexibleArraySize(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), clang::CodeGen::CodeGenTBAA::getBaseTypeInfo(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalParamType(), getCanonicalTemplateArgument(), getCastAwayConstnessCastKind(), GetCFNumberSize(), getCommentForDecl(), getComplexType(), getConstantArrayType(), getDecayedType(), getDecltypeType(), clang::getDeclUsageType(), getDependentAddressSpaceType(), 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(), GetX86_64ByValArgumentPair(), clang::ento::SValBuilder::haveSameType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitBuiltinTypes(), InitCatchParam(), isCanonicalExceptionSpecification(), IsImplicitBoolFloatConversion(), IsModifiable(), isObjCReceiverType(), IsStandardConversion(), clang::Expr::isUnusedResultAWarning(), isWeakLinkedClass(), LookupMemberExpr(), MarkUsedTemplateParameters(), clang::analyze_format_string::ArgType::matchesType(), matchTypes(), clang::Sema::MaybeBindToTemporary(), 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 2257 of file ASTContext.h.
References getCanonicalParamType(), clang::Type::getCanonicalTypeInternal(), and clang::QualType::getTypePtr().
TypedefDecl * ASTContext::getCFConstantStringDecl | ( | ) | const |
Objective-C ABI
typedef struct __NSConstantString_tag { const int *isa; int flags; const char *str; long length; } __NSConstantString;
Swift ABI (4.1, 4.2)
typedef struct __NSConstantString_tag { uintptr_t _cfisa; uintptr_t _swift_rc; _Atomic(uint64_t) _cfinfoa; const char *_ptr; uint32_t _length; } __NSConstantString;
Swift ABI (5.0)
typedef struct __NSConstantString_tag { uintptr_t _cfisa; uintptr_t _swift_rc; _Atomic(uint64_t) _cfinfoa; const char *_ptr; uintptr_t _length; } __NSConstantString;
Definition at line 5822 of file ASTContext.cpp.
References buildImplicitRecord().
Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), and clang::Sema::Initialize().
RecordDecl * ASTContext::getCFConstantStringTagDecl | ( | ) | const |
Definition at line 5906 of file ASTContext.cpp.
References getCFConstantStringDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 5913 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 2074 of file ASTContext.h.
Referenced by clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), isArithmeticArgumentPromotion(), recordUsesEBO(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
FunctionDecl * ASTContext::getClassScopeSpecializationPattern | ( | const FunctionDecl * | FD | ) |
Definition at line 1394 of file ASTContext.cpp.
Referenced by clang::FunctionDecl::getClassScopeSpecializationPattern().
|
inline |
Definition at line 875 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 490 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), clang::AS_public, clang::TemplateParameterList::begin(), cloneFullComment(), clang::TemplateParameterList::Create(), clang::TemplateTypeParmDecl::Create(), clang::NonTypeTemplateParmDecl::Create(), clang::TemplateTemplateParmDecl::Create(), clang::CreateItaniumCXXABI(), clang::CreateMicrosoftCXXABI(), clang::TemplateParameterList::end(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::QualType::getAsOpaquePtr(), clang::Decl::getCanonicalDecl(), clang::QualType::getCanonicalType(), getCanonicalType(), clang::TargetInfo::getCXXABI(), clang::TemplateParmPosition::getDepth(), clang::TemplateParmPosition::getIndex(), clang::TargetCXXABI::getKind(), getOverriddenMethods(), clang::TemplateParmPosition::getPosition(), getRawCommentForAnyRedecl(), clang::TemplateDecl::getRequiresClause(), clang::TemplateDecl::getTemplateParameters(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TargetCXXABI::Microsoft, P, clang::RawComment::parse(), ParsedComments, clang::TemplateParameterList::size(), clang::TargetCXXABI::WatchOS, and clang::TargetCXXABI::WebAssembly.
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 2819 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by InitBuiltinTypes().
|
inline |
Definition at line 1220 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 5539 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 3070 of file ASTContext.cpp.
References getCanonicalType(), 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::Target, clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), diagnoseListInit(), clang::CodeGen::emitDeclareSimdFunction(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), getAsArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and mergeTypes().
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 1188 of file ASTContext.h.
References getComplexType(), and clang::QualType::withConst().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 10086 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by emitCXXDestructor().
Definition at line 10343 of file ASTContext.cpp.
References 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 9161 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::SMTConv::doIntTypeConversion(), getUIntPtrType(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 1279 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
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 3055 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 1928 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands().
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 2894 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 1243 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 1556 of file ASTContext.cpp.
References clang::ast_matchers::arrayType, clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::ASTRecordLayout::getFieldOffset(), 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(), Offset, Parent, clang::Target, toBits(), and toCharUnitsFromBits().
Referenced by computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::emitDeclareTargetVarDefinition(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), emitOutlinedFunctionPrologue(), emitPrivatesInit(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::getAddrOfDeclareTargetLink(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::Sema::isOpenMPCapturedByRef().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 10113 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1339 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 4789 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 4881 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 9933 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, getTargetInfo(), clang::TargetInfo::hasFeature(), and clang::Target.
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), DiagnoseCallingConvCast(), clang::index::CodegenNameGenerator::Implementation::getAllManglings(), getCCForDeclaratorChunk(), getImplicitMethodEPI(), and hasDefaultCXXMethodCC().
QualType ASTContext::getDependentAddressSpaceType | ( | QualType | PointeeType, |
Expr * | AddrSpaceExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
Definition at line 3526 of file ASTContext.cpp.
References 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 4222 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 3279 of file ASTContext.cpp.
References clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), 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 3485 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 7636 of file ASTContext.cpp.
Referenced by getDependentTemplateName(), and clang::ASTImporter::Import().
TemplateName ASTContext::getDependentTemplateName | ( | NestedNameSpecifier * | NNS, |
OverloadedOperatorKind | Operator | ||
) | const |
Retrieve the template name that represents a dependent template name such as MetaFun::template
operator+.
Definition at line 7672 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 4248 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 4261 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 3415 of file ASTContext.cpp.
References getCanonicalType(), getDependentSizedExtVectorType(), clang::DependentVectorType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 686 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1335 of file ASTContext.cpp.
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 4169 of file ASTContext.cpp.
References Allocate(), 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 3916 of file ASTContext.cpp.
References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.
Definition at line 5478 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 1083 of file ASTContext.h.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::FrontendAction::BeginSourceFile(), clang::ExternalASTMerger::CompleteType(), clang::AccessSpecDecl::CreateDeserialized(), clang::ObjCInterfaceDecl::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::Decl::operator new(), clang::Parser::ParseFirstTopLevelDecl(), shouldOmitDefinition(), clang::Decl::updateOutOfDate(), and clang::Sema::~Sema().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 1069 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 3456 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(), clang::analyze_format_string::ArgType::makeVectorType(), and OpenCLConvertScalarsToVectors().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3106 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain(), and getFieldOffset().
|
inline |
Retrieve the C FILE type.
Definition at line 1742 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
unsigned char ASTContext::getFixedPointIBits | ( | QualType | Ty | ) | const |
Definition at line 10445 of file ASTContext.cpp.
References clang::Type::getAs(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
APFixedPoint ASTContext::getFixedPointMax | ( | QualType | Ty | ) | const |
Definition at line 10496 of file ASTContext.cpp.
References getFixedPointSemantics(), clang::APFixedPoint::getMax(), and clang::Type::isFixedPointType().
APFixedPoint ASTContext::getFixedPointMin | ( | QualType | Ty | ) | const |
Definition at line 10501 of file ASTContext.cpp.
References getFixedPointSemantics(), clang::APFixedPoint::getMin(), and clang::Type::isFixedPointType().
unsigned char ASTContext::getFixedPointScale | ( | QualType | Ty | ) | const |
Definition at line 10398 of file ASTContext.cpp.
References clang::Type::getAs(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
Referenced by getFixedPointSemantics().
FixedPointSemantics ASTContext::getFixedPointSemantics | ( | QualType | Ty | ) | const |
Definition at line 10487 of file ASTContext.cpp.
References clang::TargetInfo::doUnsignedFixedPointTypesHavePadding(), getFixedPointScale(), getTargetInfo(), getTypeSize(), clang::Type::isFixedPointType(), clang::Type::isSaturatedFixedPointType(), and clang::Type::isSignedFixedPointType().
Referenced by getFixedPointMax(), and getFixedPointMin().
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 5571 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 5601 of file ASTContext.cpp.
References BoolTy, CharTy, getFloatingRank(), getIntWidth(), Int128Ty, IntTy, clang::Type::isCanonicalUnqualified(), LongLongTy, LongTy, and ShortTy.
Referenced by clang::ento::SMTConv::doFloatTypeConversion(), clang::StandardConversionSequence::getNarrowingKind(), isArithmeticArgumentPromotion(), 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 1541 of file ASTContext.cpp.
References clang::Type::getAs(), and clang::Target.
Referenced by BuildFloatingLiteral(), canConvertIntTyToFloatTy(), CheckImplicitConversion(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getZeroExpr(), IsStandardConversion(), and tryGCCVectorConvertAndSplat().
|
inline |
Definition at line 719 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 3570 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 1375 of file ASTContext.h.
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1380 of file ASTContext.h.
Referenced by adjustDeducedFunctionResultType(), adjustFunctionType(), clang::Sema::CheckEquivalentExceptionSpec(), emitGlobalDtorWithCXAAtExit(), clang::CodeGen::emitKmpRoutineEntryT(), emitOutlinedFunctionPrologue(), clang::Sema::FindCompositePointerType(), GeneralizeFunctionType(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), 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 2759 of file ASTContext.cpp.
References getAttributedType(), getFunctionType(), and getParenType().
Referenced by adjustExceptionSpec(), clang::CodeGen::CodeGenFunction::EmitCall(), extractPBaseFlags(), hasSameFunctionTypeIgnoringExceptionSpec(), and clang::CodeGen::CodeGenFunction::StartFunction().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 9682 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 9765 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 3347 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::IncompleteArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by getAsArrayType(), getUnqualifiedArrayType(), and mergeTypes().
QualType ASTContext::getInjectedClassNameType | ( | CXXRecordDecl * | Decl, |
QualType | TST | ||
) | const |
getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration.
Definition at line 3840 of file ASTContext.cpp.
References clang::CXXRecordDecl::getPreviousDecl(), NeedsInjectedClassNameType(), and clang::TypeAlignment.
Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().
TemplateArgument ASTContext::getInjectedTemplateArg | ( | NamedDecl * | ParamDecl | ) |
Definition at line 4313 of file ASTContext.cpp.
References clang::TemplateArgument::CreatePackCopy(), DependentTy, getPackExpansionType(), getTypeDeclType(), clang::Expr::getValueKindForType(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::Decl::isTemplateParameterPack(), and None.
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 4346 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 6157 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 5749 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 1360 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1452 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 1413 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and isInstantiationOfUnresolvedUsingDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1436 of file ASTContext.cpp.
Referenced by isInstantiationOf().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1128 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 5777 of file ASTContext.cpp.
References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().
Referenced by canConvertIntToOtherIntTy(), clang::ento::SMTConv::doIntTypeConversion(), handleIntegerConversion(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().
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 4969 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
QualType ASTContext::getIntPtrType | ( | ) | const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4992 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::CodeGen::emitTaskInit(), 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 10021 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.
Referenced by AddDirectArgument(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), checkOpenMPLoop(), createKmpTaskTRecordDecl(), createRuntimeShuffleFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), clang::CodeGen::emitDeclareSimdFunction(), emitForStaticInitCall(), emitInterWarpCopyFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::ento::SMTConv::getAPSIntType(), getOSLogArgType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), shuffleAndStore(), and widenIterationCount().
unsigned ASTContext::getIntWidth | ( | QualType | T | ) | const |
Definition at line 9152 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().
Referenced by AnalyzeComparison(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckFloatComparison(), CheckICE(), CheckImplicitConversion(), DeduceFromInitializerList(), DiagnoseFloatingImpCast(), clang::ento::BasicValueFactory::getAPSIntType(), GetExprRange(), getFloatingTypeOrder(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), clang::IntegerLiteral::IntegerLiteral(), isOverflowingIntegerType(), and clang::ento::ExprEngine::processSwitch().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1754 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
LangAS ASTContext::getLangASForBuiltinAddressSpace | ( | unsigned | AS | ) | const |
Definition at line 10379 of file ASTContext.cpp.
References clang::ExternalASTSource::CompleteRedeclChain(), clang::TargetInfo::getCUDABuiltinAddressSpace(), clang::getLangASFromTargetAS(), clang::TargetInfo::getOpenCLBuiltinAddressSpace(), and getTargetInfo().
|
inline |
Definition at line 707 of file ASTContext.h.
Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), buildBlockDescriptor(), buildGlobalBlock(), clang::arcmt::trans::canApplyWeak(), clang::Decl::canBeWeakImported(), CastsAwayConstness(), clang::Sema::CheckFloatComparison(), clang::arcmt::checkForManualIssues(), CheckICE(), clang::VarDecl::checkInitIsICE(), clang::ento::retaincountchecker::RetainCountChecker::checkReturnWithRetEffect(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), computeBlockInfo(), computeDeclRefDependence(), computeKeyFunction(), clang::LinkageComputer::computeLVForDecl(), clang::analyze_os_log::computeOSLogBufferLayout(), 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::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), EmitDeclInit(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), findDirectBaseWithType(), clang::Sema::FindProtocolDeclaration(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getBlockDescriptorName(), GetBuiltinType(), getByrefLifetime(), getCallingConvMangling(), clang::ento::SValBuilder::getConditionType(), clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(), 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(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCGCAttrKind(), clang::DeclContext::getRedeclContext(), clang::ento::retaincountchecker::RetainCountChecker::getSummaryManager(), getTypeInfoDataSizeInChars(), clang::ento::retaincountchecker::RetainCountChecker::handleAutoreleaseCounts(), clang::Decl::hasLocalOwningModuleStorage(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSuperInitCall(), clang::Sema::isAcceptableNestedNameSpecifier(), isCanonicalExceptionSpecification(), clang::Expr::isCXX11ConstantExpr(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::VarDecl::isKnownToBeDefined(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::RecordDecl::isMsStruct(), clang::VarDecl::isNoDestroy(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::Expr::isNullPointerConstant(), isObjCReceiverType(), clang::QualType::isPODType(), isPromotableBitField(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), clang::NSAPI::isSubclassOfNSClass(), clang::VarDecl::isThisDeclarationADefinition(), clang::CodeGen::CodeGenModule::isTypeConstant(), isTypeSubstitutable(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), LocPropertyAttribute(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), mayInlineDecl(), mergeTypes(), needsConversionOfHalfVec(), printExprAsWritten(), clang::APValue::printPretty(), clang::ento::retaincountchecker::RetainCountChecker::processLeaks(), clang::ento::retaincountchecker::RetainCountChecker::processNonLeakError(), clang::CodeGen::CodeGenModule::Release(), resolveAllocationOverload(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::edit::rewriteToObjCLiteralSyntax(), roundUpSizeToCharAlignment(), clang::tooling::ReplaceNodeWithTemplate::run(), clang::CXXRecordDecl::setBases(), setObjCGCLValueClass(), clang::MangleContext::shouldMangleDeclName(), shouldNotRewriteImmediateMessageArgs(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarTypes(), clang::ento::retaincountchecker::RetainCountChecker::updateSymbol(), 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 6464 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 1956 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 485 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1785 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 2967 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), OverloadTy, clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), getCanonicalParamType(), getCaptureFieldType(), getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1087 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1716 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getMakeIntegerSeqDecl(), and LookupBuiltin().
unsigned ASTContext::getManglingNumber | ( | const NamedDecl * | ND | ) | const |
Definition at line 10056 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 10072 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 10129 of file ASTContext.cpp.
References clang::MaterializeTemporaryExpr::getStorageDuration(), and clang::SD_Static.
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 3040 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(), clang::Sema::FindCompositePointerType(), GetTypeOfFunction(), IsStandardConversion(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), and TryStaticMemberPointerUpcast().
Get the initializations to perform when importing a module, if any.
Definition at line 1059 of file ASTContext.cpp.
Referenced by getNumberOfModules().
Get the additional modules in which the definition Def
has been merged.
Definition at line 990 of file ASTContext.h.
References clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::diagnoseMissingImport(), and clang::TextNodeDumper::Visit().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 5206 of file ASTContext.cpp.
|
inlinestatic |
Definition at line 961 of file ASTContext.h.
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1683 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1700 of file ASTContext.h.
References clang::TargetInfo::getTriple().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1674 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::ObjCMethodDecl::definedInNSObject(), and clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1691 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 7191 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 1649 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 1871 of file ASTContext.h.
Referenced by LookupMemberExpr(), and RewriteOneForwardClassDecl().
|
inline |
Definition at line 1622 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 6183 of file ASTContext.cpp.
Referenced by buildBlockDescriptor(), and getBlockDescriptorName().
std::string ASTContext::getObjCEncodingForFunctionDecl | ( | const FunctionDecl * | Decl | ) | const |
Emit the encoded type for the function Decl
into S
.
This is in the same format as Objective-C method encodings.
Definition at line 6239 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 6296 of file ASTContext.cpp.
Referenced by hasObjCExceptionAttribute(), 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 6280 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 6393 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 6488 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 6476 of file ASTContext.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), Write__ivar_list_t_initializer(), and Write_RethrowObject().
void ASTContext::getObjCEncodingForTypeQualifier | ( | Decl::ObjCDeclQualifier | QT, |
std::string & | S | ||
) | const |
Put the string version of the type qualifiers QT
into S
.
Definition at line 7158 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 6134 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 7773 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(), and clang::Expr::isOBJCGCCandidate().
QualType ASTContext::getObjCGCQualType | ( | QualType | T, |
Qualifiers::GC | gcAttr | ||
) | const |
Return the uniqued reference to the type for an Objective-C gc-qualified type.
The resulting type has a union of the qualifiers from T and the gc attribute.
Definition at line 2693 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 7174 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 1636 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 1849 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), AllTrivialInitializers(), CheckKeyForObjCARCConversion(), 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 2509 of file ASTContext.cpp.
Referenced by clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCCategoryDecl::getImplementation(), and 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 2519 of file ASTContext.cpp.
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1730 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 6115 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 4717 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(), RewriteOneForwardClassDecl(), 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 2542 of file ASTContext.cpp.
References clang::DeclContext::lookup().
Referenced by clang::ObjCMethodDecl::setMethodParams(), and setObjCMethodRedeclaration().
|
inline |
Definition at line 1626 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 4687 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), clang::QualType::isCanonical(), clang::ObjCObjectPointerType::Profile(), and clang::TypeAlignment.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), canBindObjCObjectType(), checkObjCKindOfType(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::ento::TypedValueRegion::getLocationType(), getMostInformativeDerivedClassImpl(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), clang::ObjCObjectPointerType::getSuperClassType(), 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 4423 of file ASTContext.cpp.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), checkObjCKindOfType(), 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 4431 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 2552 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 6349 of file ASTContext.cpp.
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 7200 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 1895 of file ASTContext.h.
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 7183 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 1662 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 1859 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), isWeakLinkedClass(), and RewriteOneForwardClassDecl().
QualType ASTContext::getObjCSuperType | ( | ) | const |
Returns the C struct type for objc_super.
Definition at line 5917 of file ASTContext.cpp.
References buildImplicitRecord(), and getTagDeclType().
QualType ASTContext::getObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl, |
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
QualType | Canonical = QualType() |
||
) | const |
Definition at line 4586 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 2245 of file ASTContext.cpp.
References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), Offset, and clang::CharUnits::Zero().
Get address space for OpenCL type.
Definition at line 6046 of file ASTContext.cpp.
References getOpenCLTypeKind(), and clang::Target.
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 6010 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(), and getTypeInfo().
unsigned ASTContext::getOpenMPDefaultSimdAlign | ( | QualType | T | ) | const |
Get default simd alignment of the specified complete type in bits.
Definition at line 2144 of file ASTContext.cpp.
References clang::TargetInfo::getSimdDefaultAlign(), getTargetInfo(), and clang::Type::isSpecificBuiltinType().
Referenced by emitAlignedClause(), and clang::CodeGen::emitDeclareSimdFunction().
TemplateName ASTContext::getOverloadedTemplateName | ( | UnresolvedSetIterator | Begin, |
UnresolvedSetIterator | End | ||
) | const |
Retrieve the template name that corresponds to a non-empty lookup.
Definition at line 7587 of file ASTContext.cpp.
References Allocate(), Begin, End, and clang::NamedDecl::getUnderlyingDecl().
Referenced by clang::ASTImporter::Import().
void ASTContext::getOverriddenMethods | ( | const NamedDecl * | Method, |
SmallVectorImpl< const NamedDecl *> & | Overridden | ||
) | const |
Return C++ or ObjC overridden methods for the given Method
.
An ObjC method is considered to override any method in the class's base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.
Definition at line 1502 of file ASTContext.cpp.
References overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
Definition at line 4354 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 10121 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::isParameterPack().
|
inline |
Returns the parents of the given node (within the traversal scope).
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 648 of file ASTContext.h.
References clang::serialized_diags::create(), and Node.
ASTContext::DynTypedNodeList ASTContext::getParents | ( | const ast_type_traits::DynTypedNode & | Node | ) |
Definition at line 10287 of file ASTContext.cpp.
Definition at line 4199 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 5002 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::ento::RangedConstraintManager::assumeSym(), CanUseSingleInheritance(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBadTypeidFn(), clang::ento::SMTConv::getBinExpr(), getItaniumDynamicCastFn(), getPreferredTypeAlign(), getPreferredTypeOfBinaryRHS(), clang::Sema::Initialize(), clang::analyze_format_string::ParseFormatStringHasSArg(), 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 2847 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::PointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnCXXDelete(), AddDirectArgument(), adjustCVQualifiersForCXXThisWithinLambda(), AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), buildMemcpyForAssignmentOp(), BuildUniqueMethodName(), captureThis(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkOpenCLPipePacketType(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::CodeGen::createRuntimeFunction(), clang::Sema::DeclareGlobalNewDelete(), decomposeTypeForEH(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), emitCombinerOrInitializer(), emitCXXDestructor(), clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable(), emitDeclTargetLinkVarDeclLValue(), EmitFunctionDeclPointer(), clang::CodeGen::emitKmpRoutineEntryT(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionListCopy(), clang::CodeGen::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), clang::Sema::FindCompositePointerType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CodeGen::getAddrOfDeclareTargetLink(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getBlockLayoutInfoString(), getCanonicalParamType(), getCanonicalParamType(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), clang::TypeName::getFullyQualifiedType(), getFunctionSourceLocation(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionCodeRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), clang::ento::SValBuilder::getRegionValueSymbolVal(), 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(), isArgInAlloca(), IsStandardConversion(), mergeTypes(), clang::analyze_format_string::ParseFormatStringHasSArg(), clang::Sema::PerformImplicitConversion(), clang::ento::ExprEngine::processCallExit(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), recordFixedType(), RemoveAddressSpaceFromPtr(), ResolveOverloadForDeduction(), RewriteOneForwardClassDecl(), SemaBuiltinLaunder(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), clang::CodeGen::CGOpenMPRuntimeNVPTX::translateParameter(), TryConstCast(), tryObjCWritebackConversion(), TryReinterpretCast(), clang::ento::ExprEngine::VisitCast(), and clang::ento::ExprEngine::VisitDeclStmt().
|
inline |
Definition at line 1227 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 2197 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), getTypeInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Type::isMemberPointerType(), clang::Type::isSpecificBuiltinType(), max(), and clang::Target.
Referenced by getDeclAlign().
Definition at line 971 of file ASTContext.h.
Referenced by clang::getPrimaryMergedDecl().
|
inline |
Definition at line 654 of file ASTContext.h.
Referenced by clang::ento::CallEvent::dump(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpDeclContext(), clang::DeclContext::dumpLookups(), getFunctionSourceLocation(), getTupleLikeElementType(), HasLocalVariableExternalStorage(), isArithmeticArgumentPromotion(), IsCommonTypo(), isTupleLike(), lookupStdTypeTraitMember(), mustSynthesizeSetterGetterMethod(), clang::Parser::ParseTopLevelDecl(), clang::PrettyDeclStackTraceEntry::print(), printObjectsUnderConstructionForContext(), clang::APValue::printPretty(), RewriteOneForwardClassDecl(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), and scanToNextArgument().
QualType ASTContext::getProcessIDType | ( | ) | const |
Return the unique type for "pid_t" defined in <sys/types.h>.
We need this to compute the correct type for vfork().
Definition at line 5015 of file ASTContext.cpp.
References clang::Target.
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 5705 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::SMTConv::doIntTypeConversion(), isArithmeticArgumentPromotion(), 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 7612 of file ASTContext.cpp.
References clang::QualifiedTemplateName::Profile().
Referenced by clang::TypeName::getFullyQualifiedTemplateName(), and clang::ASTImporter::Import().
|
inline |
Un-split a SplitQualType.
Definition at line 1933 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(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), clang::Type::getArrayElementTypeNoTypeQual(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getConstantArrayType(), 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(), TryObjectArgumentInitialization(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and UnwrapTypeForDebugInfo().
|
inline |
Return a type with additional qualifiers.
Definition at line 1938 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 1947 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 1611 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
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 382 of file ASTContext.cpp.
References adjustDeclToTemplate(), clang::LangOptions::CommentOpts, clang::ASTContext::RawCommentAndCacheFlags::FromDecl, clang::ASTContext::RawCommentAndCacheFlags::FromRedecl, clang::ASTContext::RawCommentAndCacheFlags::getKind(), clang::ASTContext::RawCommentAndCacheFlags::getOriginalDecl(), clang::ASTContext::RawCommentAndCacheFlags::getRaw(), getRawCommentForDeclNoCache(), clang::RawComment::isDocumentation(), clang::ASTContext::RawCommentAndCacheFlags::NoCommentInDecl, clang::CommentOptions::ParseAllComments, RedeclComments, clang::Decl::redecls(), clang::ASTContext::RawCommentAndCacheFlags::setKind(), clang::ASTContext::RawCommentAndCacheFlags::setOriginalDecl(), and clang::ASTContext::RawCommentAndCacheFlags::setRaw().
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 115 of file ASTContext.cpp.
References clang::LangOptions::CommentOpts, Comments, CommentsLoaded, ExternalSource, clang::Decl::getBeginLoc(), clang::SourceManager::getBufferData(), clang::RawCommentList::getComments(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getExpansionLoc(), clang::SourceManager::getLineNumber(), clang::Decl::getLocation(), clang::SourceLocation::isFileID(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::SourceManager::isMacroArgExpansion(), clang::SourceLocation::isMacroID(), clang::CommentOptions::ParseAllComments, Text, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by getLocalCommentForDeclUncached(), and getRawCommentForAnyRedecl().
|
inline |
Definition at line 799 of file ASTContext.h.
Return a read_only pipe type for the specified type.
Definition at line 3817 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 10033 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 3903 of file ASTContext.cpp.
References clang::RecordDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by buildFakeCtorCall(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), checkMemberDecomposition(), CheckOperatorDeleteDeclaration(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), ComputeDefaultedSpecialMemberExceptionSpec(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::emitDeclareSimdFunction(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), evaluateCDTSize(), findDirectBaseWithType(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), 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 1168 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 3006 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by EvaluateBinaryTypeTrait(), evaluateTypeTrait(), getAutoRRefDeductType(), getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
|
inline |
Definition at line 709 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 10000 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1766 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
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 5472 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 4964 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
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 4980 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 4958 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::Sema::ActOnCXXNew(), appendParameterTypes(), clang::Sema::BuildArrayTypeTrait(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), buildMemcpyForAssignmentOp(), checkOpenCLEnqueueLocalSizeArgs(), CheckOperatorNewDeclaration(), checkTupleLikeDecomposition(), clang::SizeOfPackExpr::Create(), createTypePackElementParameterList(), clang::Sema::DeclareGlobalNewDelete(), DeduceFromInitializerList(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitStructSetterCall(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::Sema::FindAllocationFunctions(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBytesReturnedByAllocSizeCall(), clang::CodeGen::getTgtOffloadEntryQTy(), getTupleLikeElementType(), getUsualDeleteParams(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), matchesStlAllocatorFn(), and clang::analyze_format_string::ParseFormatStringHasSArg().
|
inline |
Definition at line 662 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::AddDeferredUnusedCoverageMapping(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::arcmt::checkForManualIssues(), clang::StmtSequence::contains(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::CreateHTMLPrinter(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpLookups(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::tooling::findSelectedASTNodes(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), 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::cross_tu::CrossTranslationUnitContext::importDefinition(), 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(), and clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody().
|
inline |
Definition at line 663 of file ASTContext.h.
unsigned ASTContext::getStaticLocalNumber | ( | const VarDecl * | VD | ) | const |
Definition at line 10066 of file ASTContext.cpp.
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateTemplateParmDecl * | param, |
TemplateName | replacement | ||
) | const |
Definition at line 7707 of file ASTContext.cpp.
References clang::SubstTemplateTemplateParmStorage::Profile().
Referenced by clang::ASTImporter::Import().
TemplateName ASTContext::getSubstTemplateTemplateParmPack | ( | TemplateTemplateParmDecl * | Param, |
const TemplateArgument & | ArgPack | ||
) | const |
Definition at line 7725 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.
Referenced by clang::ASTImporter::Import().
QualType ASTContext::getSubstTemplateTypeParmPackType | ( | const TemplateTypeParmType * | Replaced, |
const TemplateArgument & | ArgPack | ||
) |
Retrieve a.
Definition at line 3973 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 3951 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 4948 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by BuildImplicitMemberInitializer(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenFunction::emitImplicitAssignmentOperatorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), GetThisType(), isSafeToConvert(), clang::Sema::PerformImplicitConversion(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
|
inline |
Definition at line 2499 of file ASTContext.h.
References clang::QualType::getQualifiers().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), buildBlockDescriptor(), buildGlobalBlock(), castStringLiteralToDefaultAddressSpace(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertType(), createUnnamedGlobalFrom(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), 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(), getTypeInfo(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), initializeForBlockHeader(), isTrivialFiller(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), roundUpSizeToCharAlignment(), and supportsLightweightRuntime().
|
inline |
Definition at line 2503 of file ASTContext.h.
References clang::Qualifiers::getAddressSpace().
unsigned ASTContext::getTargetAddressSpace | ( | LangAS | AS | ) | const |
Definition at line 10336 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 2229 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 690 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnPragmaOptionsAlign(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), clang::arcmt::trans::canApplyWeak(), clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::canReasonAbout(), CheckBuiltinTargetSupport(), CheckFormatString(), checkForMultipleExportedDefaultConstructors(), checkObjCMethodX86VectorTypes(), checkVAStartABI(), computeKeyFunction(), clang::analyze_os_log::computeOSLogBufferLayout(), ComputeVMIClassTypeInfoFlags(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), clang::Sema::diagnoseUnavailableAlignedAllocation(), clang::CodeGen::emitThreadPrivateVarInit(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), getAlignOfGlobalVar(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCallingConvMangling(), clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(), getDeclAlign(), getDefaultCallingConvention(), getFixedPointIBits(), getFixedPointScale(), getFixedPointSemantics(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), getIntTypeForBitwidth(), getLangASForBuiltinAddressSpace(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMSMemberPointerSlots(), getObjCEncodingForPrimitiveKind(), getOpenMPDefaultSimdAlign(), clang::CodeGen::getOrCreateThreadPrivateCache(), getPaddingDiagFromTagKind(), getRealTypeForBitwidth(), getTargetDefaultAlignForAttributeAligned(), getTargetNullPointerValue(), getTypeInfo(), getTypeInfoLinkage(), clang::FloatingLiteral::getValueAsApproximateDouble(), HandleNeonVectorTypeAttr(), clang::BackendConsumer::HandleTranslationUnit(), hasNewExtendedAlignment(), clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), isArc4RandomAvailable(), isArithmeticArgumentPromotion(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), clang::Type::isIncompleteType(), clang::CodeGen::swiftcall::isLegalIntegerType(), isMsLayout(), isMSStaticDataMemberInlineDefinition(), clang::FunctionDecl::isMSVCRTEntryPoint(), isPermittedNeonBaseType(), isVarDeclStrongDefinition(), clang::MangleContext::mangleName(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), needsConversionOfHalfVec(), clang::analyze_format_string::ParseFormatStringHasSArg(), patternFor(), clang::Sema::PerformImplicitConversion(), ReferenceDllExportedMembers(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), 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 10326 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 1367 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 4086 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 clang::TypeName::getFullyQualifiedTemplateType(), getTemplateSpecializationType(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
const TemplateArgumentListInfo & | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 4061 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 4040 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 4009 of file ASTContext.cpp.
Referenced by clang::TemplateTypeParmDecl::Create().
|
inline |
Definition at line 1009 of file ASTContext.h.
Referenced by clang::Sema::ActOnPragmaMSComment(), clang::Sema::ActOnStartOfTranslationUnit(), AddLazyVectorDecls(), clang::ASTImporter::ASTImporter(), clang::arcmt::trans::checkAPIUses(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), clang::CreateModernObjCRewriter(), clang::CreateObjCRewriter(), clang::tooling::QualifiedRenameRule::describe(), emitGlobalDtorWithCXAAtExit(), emitOutlinedFunctionPrologue(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), clang::ASTMergeAction::ExecuteAction(), 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(), getCommentForDecl(), clang::cross_tu::CrossTranslationUnitContext::getCrossTUDefinition(), GetDeclSpecTypeForDeclarator(), getExternCContextDecl(), getObjCProtocolDecl(), clang::tooling::USRSymbolRenamer::HandleTranslationUnit(), hasSuperInitCall(), clang::cross_tu::CrossTranslationUnitContext::importDefinition(), isBisonFile(), 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().
|
inline |
Definition at line 621 of file ASTContext.h.
Referenced by clang::RecursiveASTVisitor< CallGraph >::TraverseAST().
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 2600 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(), clang::Sema::ActOnTypeTrait(), addFieldToRecordDecl(), BuildImplicitBaseInitializer(), buildPostUpdate(), clang::Sema::BuildPseudoDestructorExpr(), buildVarDecl(), captureThis(), castForMoving(), CastForMoving(), checkTupleLikeDecomposition(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), ConstructTransparentUnion(), clang::OMPCapturedExprDecl::Create(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), emitOutlinedFunctionPrologue(), getCommentForDecl(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ObjCObjectTypeLoc::initializeLocal(), clang::TypeOfTypeLoc::initializeLocal(), clang::UnaryTransformTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), noteMemberDeclaredHere(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and translateTemplateArgument().
|
inline |
Return the ABI-specified alignment of a (complete) type T
, in bits.
Definition at line 2091 of file ASTContext.h.
References clang::TypeInfo::Align.
Referenced by getAlignOfGlobalVar(), getTypeAlignIfKnown(), getTypeAlignInChars(), getTypeInfo(), getTypeString(), getTypeUnadjustedAlign(), isRecordWithSSEVectorType(), and Write__ivar_list_t_initializer().
|
inline |
Definition at line 2092 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 1713 of file ASTContext.cpp.
References clang::Type::getAs(), getBaseElementType(), getTypeAlign(), and clang::Type::isIncompleteType().
Referenced by hasNewExtendedAlignment(), and isVarDeclStrongDefinition().
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 2176 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
Referenced by AddDirectArgument(), AtomicUsesUnsupportedLibcall(), classifyType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), createConstantGlobalStructAndAddToParent(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), emitInterWarpCopyFunction(), emitReductionListCopy(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), clang::Sema::isOpenMPCapturedByRef(), isTrivialFiller(), performTypeAdjustment(), and roundUpSizeToCharAlignment().
Definition at line 2179 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1396 of file ASTContext.h.
References Depth.
Referenced by CheckImplicitConversion(), clang::CXXRecordDecl::Create(), clang::LambdaExpr::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::CXXRecordDecl::CreateLambda(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), detectAmbiguousBases(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindProtocolDeclaration(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), getInjectedTemplateArg(), getPaddingDiagFromTagKind(), getTagDeclType(), clang::CXXMethodDecl::getThisType(), getTupleLikeElementType(), 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(), setInBaseClass(), TryObjectArgumentInitialization(), and TryStaticMemberPointerUpcast().
TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 10104 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 3890 of file ASTContext.cpp.
References getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by getCFConstantStringType(), and isArithmeticArgumentPromotion().
Get the size and alignment of the specified complete type in bits.
Definition at line 1737 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::Auto, getAdjustedType(), clang::ASTRecordLayout::getAlignment(), getASTObjCInterfaceLayout(), getASTRecordLayout(), clang::EnumDecl::getIntegerType(), getKind(), clang::Decl::getMaxAlignment(), getOpenCLTypeKind(), clang::ASTRecordLayout::getSize(), getTargetAddressSpace(), getTargetInfo(), getTypeAlign(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::getUnqualifiedDesugaredType(), clang::opencl_global, Paren, clang::Target, toBits(), clang::CXXABI::MemberPointerInfo::Width, and clang::TypeInfo::Width.
Referenced by EmitX86_64VAArgFromMemory(), clang::FixedPointLiteral::FixedPointLiteral(), getIntegerWidthAndSignedness(), getPreferredTypeAlign(), getTypeAlignIfRequired(), getTypeInfoInChars(), isAlignmentRequired(), matchTypes(), roundUpSizeToCharAlignment(), and tryMatchRecordTypes().
Definition at line 2064 of file ASTContext.h.
References getTypeInfo(), and clang::QualType::getTypePtr().
Referenced by getTypeInfo().
Definition at line 1655 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 1692 of file ASTContext.cpp.
References clang::TypeInfo::Align, getConstantArrayInfoInChars(), getTypeInfo(), toCharUnitsFromBits(), and clang::TypeInfo::Width.
Referenced by computeBlockInfo(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), EmitX86_64VAArgFromMemory(), getMaxAtomicAccessSize(), getTypeInfoDataSizeInChars(), getTypeInfoInChars(), getTypeSizeInChars(), getTypeString(), isArgInAlloca(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), and roundUpSizeToCharAlignment().
Definition at line 1701 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 4744 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 4778 of file ASTContext.cpp.
References getCanonicalType(), and clang::TypeAlignment.
BuiltinTemplateDecl * ASTContext::getTypePackElementDecl | ( | ) | const |
Definition at line 1095 of file ASTContext.cpp.
References clang::BTK__type_pack_element, buildBuiltinTemplateDecl(), and getTypePackElementName().
Referenced by LookupBuiltin().
|
inline |
Definition at line 1722 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getTypePackElementDecl(), and LookupBuiltin().
|
inline |
Definition at line 1101 of file ASTContext.h.
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 2070 of file ASTContext.h.
References clang::TypeInfo::Width.
Referenced by addBaseAndFieldSizes(), BitsContainNoUserData(), buildMemcpyForAssignmentOp(), canConvertIntTyToFloatTy(), canPassInRegisters(), CheckImplicitConversion(), checkIntToPointerCast(), checkOpenMPLoop(), checkVectorResult(), checkVectorShift(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), DiagnoseBadShiftValues(), diagnoseListInit(), clang::ento::SMTConv::doFloatTypeConversion(), clang::ento::SMTConv::doIntTypeConversion(), clang::ento::SMTConv::doTypeConversion(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::ConstantEmitter::emitForMemory(), emitReplacement(), clang::CodeGen::emitTaskInit(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), evaluateCDTSize(), clang::ento::SMTConv::fixAPSInt(), getBytesReturnedByAllocSizeCall(), clang::ento::SMTConv::getCastExpr(), GetCFNumberSize(), getFieldSize(), getFixedPointSemantics(), GetGCAttrTypeForType(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::getSymVal(), getTypeString(), clang::ento::SMTConv::getZeroExpr(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), HandleNeonVectorTypeAttr(), hasUniqueObjectRepresentations(), clang::Expr::IgnoreParenNoopCasts(), clang::Sema::Initialize(), is32Or64BitBasicType(), isArithmeticArgumentPromotion(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isRecordWithSSEVectorType(), isSSEVectorType(), isZeroSized(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), OpenCLConvertScalarsToVectors(), RecoverCastedSymbol(), rewriteInputConstraintReferences(), rewriteToNumericBoxedExpression(), roundUpSizeToCharAlignment(), supportsNilWithFloatRet(), TryReinterpretCast(), and widenIterationCount().
|
inline |
Definition at line 2071 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 2167 of file ASTContext.cpp.
References getTypeInfoInChars().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), addValue(), AtomicUsesUnsupportedLibcall(), buildMemcpyForAssignmentOp(), clang::ento::StoreManager::castRegion(), castValueToType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), computeBlockInfo(), ContainsFloatAtOffset(), createRuntimeShuffleFunction(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), EmitCXXNewAllocSize(), clang::CodeGen::emitDeclareSimdFunction(), EmitDeclInvariant(), emitInterWarpCopyFunction(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPointerArithmetic(), emitRTtypeidCall(), emitStructSetterCall(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), evenFlexibleArraySize(), forConstantArrayExpansion(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), clang::ento::ElementRegion::getAsArrayOffset(), getBlockLayoutInfoString(), clang::ento::TypedValueRegion::getExtent(), GetGCAttrTypeForType(), GetNumNonZeroBytesInInit(), 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(), isRecordWithSSEVectorType(), isSimpleZero(), isTrivialFiller(), isValidBaseType(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), clang::CodeGen::registerTargetGlobalVariable(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), shuffleAndStore(), treatUnusedNewEscaped(), tryEmitFMulAdd(), and Write__ivar_list_t_initializer().
Definition at line 2170 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 2099 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 2123 of file ASTContext.cpp.
References clang::Type::getAs(), getASTObjCInterfaceLayout(), getASTRecordLayout(), getTypeAlign(), clang::ASTRecordLayout::getUnadjustedAlignment(), clang::if(), and toBits().
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 2186 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
Definition at line 2189 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 1778 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 1134 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 4974 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
QualType ASTContext::getUIntPtrType | ( | ) | const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4996 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitOutlinedFunctionPrologue(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), 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 4820 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 5041 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 1968 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 5009 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
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 4987 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 7557 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 3116 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 3251 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 3385 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.
Referenced by convertVector(), getCorrespondingUnsignedType(), HandleNeonVectorTypeAttr(), and clang::CodeGen::ABIInfo::isHomogeneousAggregate().
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 1177 of file ASTContext.h.
References clang::QualType::withFastQualifiers().
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 9971 of file ASTContext.cpp.
References clang::Target.
|
inline |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
Definition at line 1560 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 1565 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 1579 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 3821 of file ASTContext.cpp.
Referenced by HandleOpenCLAccessAttr().
|
inline |
Definition at line 713 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().
Determine if two types are similar, ignoring only CVR qualifiers.
Definition at line 5186 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 2781 of file ASTContext.cpp.
References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), and hasSameType().
Referenced by isSameEntity().
|
inline |
Definition at line 2298 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 5296 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 2269 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(), clang::Sema::FindCompositePointerType(), 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(), TryUserDefinedConversion(), and typesAreCompatible().
Definition at line 2272 of file ASTContext.h.
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 2293 of file ASTContext.h.
Referenced by AddSuperSendCompletion(), AnalyzeComparison(), areCompatibleVectorTypes(), clang::Sema::BuildPseudoDestructorExpr(), checkArithmeticOrEnumeralThreeWayCompare(), checkEnumComparison(), CheckMoveOnConstruction(), clang::Sema::CheckPointerToMemberOperands(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CopyObject(), createObjCPropertyGetter(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseBadFunctionCast(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitAtomicCmpXchgForMSIntrin(), EmitBinaryAtomicPost(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), findPeephole(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::getDeclUsageType(), GetIntrinsic(), getParamType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::Sema::handlerCanCatch(), hasCopyOrMoveCtorParam(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializationSequence::InitializeFrom(), isBlockVarRef(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), IsVectorConversion(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::Sema::PerformImplicitConversion(), clang::Sema::ProcessPropertyDecl(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), TryConstructorInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryStaticMemberPointerUpcast(), TryUserDefinedConversion(), 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 5174 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 2404 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 1146 of file ASTContext.cpp.
References AccumTy, ARCUnbridgedCastTy, BoolTy, BoundMemberTy, BuiltinFnTy, Char16Ty, Char32Ty, Char8Ty, CharTy, createCXXABI(), 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 1705 of file ASTContext.cpp.
References clang::TypeInfo::AlignIsRequired, and getTypeInfo().
Referenced by clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), isAlignmentRequired(), and isVarDeclStrongDefinition().
Definition at line 1709 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 6149 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 9966 of file ASTContext.cpp.
Definition at line 2539 of file ASTContext.h.
Definition at line 2535 of file ASTContext.h.
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 2050 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
Definition at line 2543 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 5650 of file ASTContext.cpp.
References clang::FieldDecl::getBitWidthValue(), getLangOpts(), clang::Expr::getSourceBitField(), clang::Expr::getType(), clang::ValueDecl::getType(), getTypeSize(), IntTy, clang::Type::isEnumeralType(), clang::Type::isSignedIntegerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UnsignedIntTy.
Definition at line 2489 of file ASTContext.cpp.
References clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Type::isAnyPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by getNSArrayObjects(), rewriteToArrayLiteral(), and rewriteToDictionaryLiteral().
|
inline |
Definition at line 967 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 3121 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 2633 of file ASTContext.h.
References clang::Type::isSignedIntegerOrEnumerationType().
Referenced by getTrivialIntegralTemplateArgument().
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 986 of file ASTContext.cpp.
References getASTMutationListener(), clang::Decl::getCanonicalDecl(), Listener, and clang::ASTMutationListener::RedefinedHiddenDefinition().
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 9022 of file ASTContext.cpp.
References clang::FunctionProtoType::getExtParameterInfo(), clang::FunctionProtoType::getExtParameterInfos(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionType::ExtParameterInfo::isNoEscape(), and clang::FunctionType::ExtParameterInfo::withIsNoEscape().
Referenced by mergeFunctionTypes().
QualType ASTContext::mergeFunctionParameterTypes | ( | QualType | lhs, |
QualType | rhs, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeFunctionParameterTypes - merge two types which appear as function parameter types
Definition at line 8479 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 8498 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::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::FunctionProtoType::hasExceptionSpec(), clang::QualType::hasQualifiers(), clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), clang::FunctionProtoType::isVariadic(), mergeExtParameterInfo(), mergeFunctionParameterTypes(), mergeTypes(), and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by mergeTypes().
mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and returns the merged version; including for function return types.
Definition at line 9076 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 8459 of file ASTContext.cpp.
References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::Decl::hasAttr(), clang::QualType::isNull(), and mergeTypes().
Referenced by mergeFunctionParameterTypes().
QualType ASTContext::mergeTypes | ( | QualType | LHS, |
QualType | RHS, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false , |
||
bool | BlockReturnType = false |
||
) |
Definition at line 8697 of file ASTContext.cpp.
References areCompatVectorTypes(), clang::Auto, canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), getLangOpts(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), getPointerType(), clang::QualType::getQualifiers(), clang::ConstantArrayType::getSize(), clang::VariableArrayType::getSizeExpr(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasUnaligned(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isBlockPointerType(), clang::Expr::isIntegerConstantExpr(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), mergeEnumWithInteger(), mergeFunctionTypes(), clang::OpenCL, clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
Referenced by checkConditionalPointerCompatibility(), mergeFunctionParameterTypes(), mergeFunctionTypes(), mergeTransparentUnionType(), typesAreBlockPointerCompatible(), and typesAreCompatible().
bool ASTContext::ObjCMethodsAreEqual | ( | const ObjCMethodDecl * | MethodDecl, |
const ObjCMethodDecl * | MethodImp | ||
) |
Definition at line 10296 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().
Referenced by ClassImplementsAllMethodsAndProperties().
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 4622 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 7856 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 7878 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedIdType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isVoidPointerType(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), and isObjCTypeSubstitutable().
|
delete |
ASTContext::overridden_method_range ASTContext::overridden_methods | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1488 of file ASTContext.cpp.
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 1472 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 1477 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 1482 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 925 of file ASTContext.cpp.
Definition at line 8448 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 7844 of file ASTContext.cpp.
References clang::declaresSameEntity(), and clang::ObjCProtocolDecl::protocols().
Referenced by clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
bool ASTContext::QIdProtocolsAdoptObjCObjectProtocols | ( | QualType | QT, |
ObjCInterfaceDecl * | IDecl | ||
) |
QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.
Definition at line 4641 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 2672 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 9069 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 1092 of file ASTContext.h.
Referenced by clang::FrontendAction::BeginSourceFile(), and clang::CompilerInstance::createModuleManager().
Set the copy inialization expression of a block var decl.
CanThrow
indicates whether the copy expression can throw or not.
Definition at line 2578 of file ASTContext.cpp.
References clang::Decl::hasAttr().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 1885 of file ASTContext.h.
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 5926 of file ASTContext.cpp.
References clang::Type::getAs().
void ASTContext::setClassScopeSpecializationPattern | ( | FunctionDecl * | FD, |
FunctionDecl * | Pattern | ||
) |
Definition at line 1405 of file ASTContext.cpp.
|
inline |
Definition at line 1275 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 921 of file ASTContext.cpp.
References ExternalSource.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::createModuleManager(), and clang::CompilerInstance::createPCHExternalASTSource().
|
inline |
Set the type for the C FILE type.
Definition at line 1739 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 1377 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1461 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 1422 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1446 of file ASTContext.cpp.
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1749 of file ASTContext.h.
void ASTContext::setManglingNumber | ( | const NamedDecl * | ND, |
unsigned | Number | ||
) |
Definition at line 10051 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 3078 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 1656 of file ASTContext.h.
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 7577 of file ASTContext.cpp.
References getObjCInterfaceType().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1643 of file ASTContext.h.
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 2528 of file ASTContext.cpp.
Referenced by clang::ObjCImplDecl::setClassInterface(), clang::ObjCInterfaceDecl::setImplementation(), and clang::ObjCCategoryDecl::setImplementation().
void ASTContext::setObjCImplementation | ( | ObjCCategoryDecl * | CatD, |
ObjCCategoryImplDecl * | ImplD | ||
) |
Set the implementation of ObjCCategoryDecl.
Definition at line 2535 of file ASTContext.cpp.
void ASTContext::setObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD, |
const ObjCMethodDecl * | Redecl | ||
) |
Definition at line 2546 of file ASTContext.cpp.
References getObjCMethodRedeclaration().
Referenced by clang::ObjCMethodDecl::setAsRedeclaration().
|
inline |
Definition at line 1630 of file ASTContext.h.
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1669 of file ASTContext.h.
|
inline |
Definition at line 1607 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 10117 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::isParameterPack().
Definition at line 975 of file ASTContext.h.
|
inline |
Definition at line 658 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1761 of file ASTContext.h.
void ASTContext::setStaticLocalNumber | ( | const VarDecl * | VD, |
unsigned | Number | ||
) |
Definition at line 10061 of file ASTContext.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1387 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
void ASTContext::setTraversalScope | ( | const std::vector< Decl *> & | TopLevelDecls | ) |
Definition at line 911 of file ASTContext.cpp.
|
inline |
Set the type for the C ucontext_t type.
Definition at line 1773 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 2161 of file ASTContext.cpp.
References getCharWidth(), and clang::CharUnits::getQuantity().
Referenced by AddDirectArgument(), AtomicUsesUnsupportedLibcall(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitInterWarpCopyFunction(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getDeclAlign(), getTypeInfo(), getTypeUnadjustedAlign(), isVarDeclStrongDefinition(), 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 2156 of file ASTContext.cpp.
References clang::CharUnits::fromQuantity(), and getCharWidth().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), DumpRecordLayout(), emitAddrOfFieldStorage(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::emitDeclareSimdFunction(), clang::CodeGen::CodeGenFunction::emitImplicitAssignmentOperatorBody(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitX86_64VAArgFromMemory(), getAlignOfGlobalVarInChars(), getDeclAlign(), getFieldSize(), GetGCAttrTypeForType(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), GetNumNonZeroBytesInInit(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), getTypeAlignInChars(), getTypeInfoInChars(), getTypeUnadjustedAlignInChars(), isFullSizeType(), recordUsesEBO(), and roundUpSizeToCharAlignment().
Definition at line 8452 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 8440 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 5100 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 5138 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(), AttributeLangSupport::ObjC, and UnwrapSimilarArrayTypes().
Referenced by CompareQualificationConversions(), hasCvrSimilarType(), hasSimilarType(), and shouldBeModeledWithNoOp().
|
friend |
Definition at line 425 of file ASTContext.h.
|
friend |
Definition at line 426 of file ASTContext.h.
|
friend |
Definition at line 427 of file ASTContext.h.
|
friend |
Definition at line 428 of file ASTContext.h.
|
friend |
Definition at line 2894 of file ASTContext.h.
|
friend |
Definition at line 2895 of file ASTContext.h.
|
friend |
Definition at line 172 of file ASTContext.h.
CanQualType clang::ASTContext::AccumTy |
Definition at line 1029 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 1047 of file ASTContext.h.
Referenced by InitBuiltinTypes().
|
mutable |
Definition at line 1061 of file ASTContext.h.
Referenced by getAutoDeductType().
|
mutable |
Definition at line 1062 of file ASTContext.h.
Referenced by getAutoRRefDeductType().
CanQualType clang::ASTContext::BoolTy |
Definition at line 1017 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::CodeGen::emitTaskInit(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::ento::SMTConv::fixAPSInt(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::ento::SMTConv::getBinExpr(), clang::ento::SValBuilder::getConditionType(), getFloatingTypeOrder(), GetIntrinsic(), getPreferredTypeOfBinaryRHS(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and TryContextuallyConvertToBool().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 1045 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), hasOnlyNonStaticMemberFunctions(), InitBuiltinTypes(), clang::Sema::MaybeBindToTemporary(), and clang::Sema::tryExprAsCall().
CanQualType clang::ASTContext::BuiltinFnTy |
Definition at line 1046 of file ASTContext.h.
Referenced by buildMemcpyForAssignmentOp(), InitBuiltinTypes(), and clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().
Builtin::Context& clang::ASTContext::BuiltinInfo |
Definition at line 568 of file ASTContext.h.
Referenced by canBuiltinBeRedeclared(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), emitReplacement(), GetBuiltinType(), clang::CallExpr::isUnevaluatedBuiltinCall(), and LookupBuiltin().
CanQualType clang::ASTContext::Char16Ty |
Definition at line 1023 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Char32Ty |
Definition at line 1024 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::Char8Ty |
Definition at line 1022 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::CharTy |
Definition at line 1018 of file ASTContext.h.
Referenced by clang::ento::StoreManager::castRegion(), checkLiteralOperatorTemplateParameterList(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), diagnoseStringPlusChar(), doRewriteToUTF8StringBoxedExpressionHelper(), getBlockLayoutInfoString(), GetCFNumberSize(), getFloatingTypeOrder(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtOffloadEntryQTy(), InitBuiltinTypes(), isArithmeticArgumentPromotion(), and clang::ento::ExprEngine::VisitArraySubscriptExpr().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 724 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
True if comments are already loaded from ExternalASTSource.
Definition at line 727 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 2026 of file ASTContext.h.
|
mutable |
Definition at line 569 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 1045 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(), getDecltypeForExpr(), getInjectedTemplateArg(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleComplexTy |
Definition at line 1042 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleTy |
Definition at line 1028 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::analyze_format_string::ParseFormatStringHasSArg(), and supportsNilWithFloatRet().
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource |
Definition at line 570 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache(), and setExternalSource().
CanQualType clang::ASTContext::Float128ComplexTy |
Definition at line 1043 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::Float128Ty |
Definition at line 1028 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), InitBuiltinTypes(), and IsStandardConversion().
CanQualType clang::ASTContext::Float16Ty |
Definition at line 1041 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::FloatComplexTy |
Definition at line 1042 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::FloatTy |
Definition at line 1028 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 1032 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::HalfTy |
Definition at line 1040 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), InitBuiltinTypes(), and needsConversionOfHalfVec().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 566 of file ASTContext.h.
Referenced by AllTrivialInitializers(), buildCapture(), buildMemcpyForAssignmentOp(), clang::CodeGen::CGCXXABI::buildThisParam(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), emitGlobalDtorWithCXAAtExit(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitOutlinedFunctionPrologue(), emitReplacement(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getBlockLayoutInfoString(), GetCFNumberSize(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::Sema::getFloat128Identifier(), getFunctionSourceLocation(), clang::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(), hasDefaultCXXMethodCC(), hasMRCWeakIvars(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isArithmeticArgumentPromotion(), 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 1025 of file ASTContext.h.
Referenced by getFloatingTypeOrder(), getInt128Decl(), getIntTypeForBitwidth(), InitBuiltinTypes(), and isValidBaseType().
CanQualType clang::ASTContext::IntTy |
Definition at line 1025 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBound(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable(), emitInterWarpCopyFunction(), emitRTtypeidCall(), emitTaskDupFunction(), evaluateCDTSize(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), GetDeclSpecTypeForDeclarator(), getFloatingTypeOrder(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getObjCEncodingTypeSize(), getPreferredTypeOfBinaryRHS(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), hasDefaultCXXMethodCC(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isArithmeticArgumentPromotion(), isOverflowingIntegerType(), isPromotableBitField(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), rewriteToNumericBoxedExpression(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
ASTMutationListener* clang::ASTContext::Listener = nullptr |
Definition at line 571 of file ASTContext.h.
Referenced by mergeDefinitionIntoModule().
CanQualType clang::ASTContext::LongAccumTy |
Definition at line 1029 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleComplexTy |
Definition at line 1042 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleTy |
Definition at line 1028 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), GetX86_64ByValArgumentPair(), InitBuiltinTypes(), IsStandardConversion(), clang::analyze_format_string::ParseFormatStringHasSArg(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::LongFractTy |
Definition at line 1032 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 1025 of file ASTContext.h.
Referenced by ComputeVMIClassTypeInfoFlags(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::LongTy |
Definition at line 1025 of file ASTContext.h.
Referenced by ComputeVMIClassTypeInfoFlags(), create_dispatch_once(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 1044 of file ASTContext.h.
Referenced by DeduceNullPtrTemplateArgument(), and InitBuiltinTypes().
|
static |
The number of implicitly-declared copy assignment operators.
Definition at line 2809 of file ASTContext.h.
|
static |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 2813 of file ASTContext.h.
|
static |
The number of implicitly-declared copy constructors.
Definition at line 2795 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass().
|
static |
The number of implicitly-declared copy constructors for which declarations were built.
Definition at line 2799 of file ASTContext.h.
|
static |
The number of implicitly-declared default constructors.
Definition at line 2788 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass().
|
static |
The number of implicitly-declared default constructors for which declarations were built.
Definition at line 2792 of file ASTContext.h.
|
static |
The number of implicitly-declared destructors.
Definition at line 2823 of file ASTContext.h.
|
static |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 2827 of file ASTContext.h.
|
static |
The number of implicitly-declared move assignment operators.
Definition at line 2816 of file ASTContext.h.
|
static |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 2820 of file ASTContext.h.
|
static |
The number of implicitly-declared move constructors.
Definition at line 2802 of file ASTContext.h.
|
static |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 2806 of file ASTContext.h.
CanQualType clang::ASTContext::ObjCBuiltinBoolTy |
Definition at line 1049 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinClassTy |
Definition at line 1048 of file ASTContext.h.
Referenced by applyObjCProtocolQualifiers(), getObjCClassDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinIdTy |
Definition at line 1048 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 1048 of file ASTContext.h.
Referenced by getObjCSelDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::OCLClkEventTy |
Definition at line 1053 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLEventTy |
Definition at line 1053 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLQueueTy |
Definition at line 1054 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), and SemaOpenCLBuiltinEnqueueKernel().
CanQualType clang::ASTContext::OCLReserveIDTy |
Definition at line 1054 of file ASTContext.h.
Referenced by InitBuiltinTypes(), clang::Sema::Initialize(), SemaBuiltinCommitRWPipe(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
CanQualType clang::ASTContext::OCLSamplerTy |
Definition at line 1053 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OMPArraySectionTy |
Definition at line 1055 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::OverloadTy |
Definition at line 1045 of file ASTContext.h.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), DiagnoseBadFunctionCast(), DiagnoseReinterpretUpDownCast(), getLValueReferenceType(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), clang::Sema::tryExprAsCall(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), and TryStaticMemberPointerUpcast().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 792 of file ASTContext.h.
Referenced by getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 1047 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 788 of file ASTContext.h.
Referenced by getRawCommentForAnyRedecl().
CanQualType clang::ASTContext::SatAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedAccumTy |
Definition at line 1035 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedFractTy |
Definition at line 1038 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongAccumTy |
Definition at line 1035 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedLongFractTy |
Definition at line 1038 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortAccumTy |
Definition at line 1035 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatUnsignedShortFractTy |
Definition at line 1038 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingUnsignedType(), and InitBuiltinTypes().
llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos |
Definition at line 2949 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 567 of file ASTContext.h.
Referenced by AllTrivialInitializers(), CheckKeyForObjCARCConversion(), cleanupDeallocOrFinalize(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), GCRewriteFinalize(), clang::getKeywordSelector(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), clang::GetUnarySelector(), clang::ASTImporter::Import(), clang::NSAPI::isSubclassOfNSClass(), and clang::ObjCNoReturn::ObjCNoReturn().
CanQualType clang::ASTContext::ShortAccumTy |
Definition at line 1029 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ShortFractTy |
Definition at line 1032 of file ASTContext.h.
Referenced by InitBuiltinTypes().
CanQualType clang::ASTContext::ShortTy |
Definition at line 1025 of file ASTContext.h.
Referenced by emitShuffleAndReduceFunction(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOrder(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
CanQualType clang::ASTContext::SignedCharTy |
Definition at line 1025 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), and clang::analyze_format_string::ParseFormatStringHasSArg().
CanQualType clang::ASTContext::UnknownAnyTy |
Definition at line 1045 of file ASTContext.h.
Referenced by clang::Sema::ActOnFinishFullExpr(), ClassifyInternal(), ClassifyMemberExpr(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedAccumTy |
Definition at line 1031 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedCharTy |
Definition at line 1026 of file ASTContext.h.
Referenced by checkPointerTypesForAssignment(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), and roundUpSizeToCharAlignment().
CanQualType clang::ASTContext::UnsignedFractTy |
Definition at line 1033 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedInt128Ty |
Definition at line 1027 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), getIntTypeForBitwidth(), getUInt128Decl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedIntTy |
Definition at line 1026 of file ASTContext.h.
Referenced by ComputeVMIClassTypeInfoFlags(), extractPBaseFlags(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), getUnsignedWCharType(), InitBuiltinTypes(), clang::Sema::Initialize(), isArithmeticArgumentPromotion(), isPromotableBitField(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), roundUpSizeToCharAlignment(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
CanQualType clang::ASTContext::UnsignedLongAccumTy |
Definition at line 1031 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongFractTy |
Definition at line 1033 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedLongLongTy |
Definition at line 1027 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), roundUpSizeToCharAlignment(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::UnsignedLongTy |
Definition at line 1026 of file ASTContext.h.
Referenced by buildBlockDescriptor(), CheckKeyForObjCARCConversion(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCorrespondingUnsignedType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), and roundUpSizeToCharAlignment().
CanQualType clang::ASTContext::UnsignedShortAccumTy |
Definition at line 1031 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortFractTy |
Definition at line 1033 of file ASTContext.h.
Referenced by getCorrespondingUnsignedType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedShortTy |
Definition at line 1026 of file ASTContext.h.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isArithmeticArgumentPromotion(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::ParseFormatStringHasSArg(), and roundUpSizeToCharAlignment().
|
mutable |
Definition at line 1066 of file ASTContext.h.
Referenced by AddLazyVectorDecls(), getVaListTagDecl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::VoidPtrTy |
Definition at line 1044 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::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCopyprivateCopyFunction(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable(), emitInterWarpCopyFunction(), clang::CodeGen::emitKmpRoutineEntryT(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionCombiner(), emitReductionListCopy(), emitShuffleAndReduceFunction(), emitStructSetterCall(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), 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 1016 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), AllTrivialInitializers(), 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(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::emitDeclareTargetVarDefinition(), emitGlobalDtorWithCXAAtExit(), emitInterWarpCopyFunction(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitOutlinedFunctionPrologue(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionCombiner(), emitShuffleAndReduceFunction(), emitStructSetterCall(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), 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::CallEvent::getResultType(), clang::ento::MemRegionManager::getVarRegion(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), clang::CodeGen::CodeGenFunction::StartThunk(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::WCharTy |
Definition at line 1019 of file ASTContext.h.
Referenced by getSignedWCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WideCharTy |
Definition at line 1020 of file ASTContext.h.
Referenced by InitBuiltinTypes(), and clang::analyze_format_string::ParseFormatStringHasSArg().
CanQualType clang::ASTContext::WIntTy |
Definition at line 1021 of file ASTContext.h.
Referenced by InitBuiltinTypes().