clang
10.0.0git
|
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More...
#include "clang/AST/ASTContext.h"
Classes | |
class | DynTypedNodeList |
Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode. More... | |
class | ParentMap |
struct | SectionInfo |
Public Types | |
enum | GetBuiltinTypeError { GE_None, GE_Missing_type, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext } |
enum | NeedExtraManglingDecl_t { NeedExtraManglingDecl } |
enum | 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 | |
ast_type_traits::TraversalKind | getTraversalKind () const |
void | setTraversalKind (ast_type_traits::TraversalKind TK) |
const Expr * | traverseIgnored (const Expr *E) const |
Expr * | traverseIgnored (Expr *E) const |
ast_type_traits::DynTypedNode | traverseIgnored (const ast_type_traits::DynTypedNode &N) const |
interp::Context & | getInterpContext () |
Returns the clang bytecode interpreter context. More... | |
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 |
void | cacheRawCommentForDecl (const Decl &OriginalD, const RawComment &Comment) const |
Attaches Comment to OriginalD and to its redeclaration chain and removes the redeclaration chain from the set of commentless chains. More... | |
RawComment * | getRawCommentForDeclNoCacheImpl (const Decl *D, const SourceLocation RepresentativeLocForDecl, const std::map< unsigned, RawComment *> &CommentsInFile) const |
RawComment * | getRawCommentForDeclNoCache (const Decl *D) const |
Return the documentation comment attached to a given declaration, without looking into cache. More... | |
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... | |
void | attachCommentsToJustParsedDecls (ArrayRef< Decl *> Decls, const Preprocessor *PP) |
Searches existing comments for doc comments that should be attached to Decls . More... | |
comments::FullComment * | getCommentForDecl (const Decl *D, const Preprocessor *PP) const |
Return parsed documentation comment attached to a given declaration. More... | |
comments::FullComment * | getLocalCommentForDeclUncached (const Decl *D) const |
Return parsed documentation comment attached to a given declaration. More... | |
comments::FullComment * | cloneFullComment (comments::FullComment *FC, const Decl *D) const |
comments::CommandTraits & | getCommentCommandTraits () const |
AttrVec & | getDeclAttrs (const Decl *D) |
Retrieve the attributes for the given declaration. More... | |
void | eraseDeclAttrs (const Decl *D) |
Erase the attributes corresponding to the given declaration. More... | |
MemberSpecializationInfo * | getInstantiatedFromStaticDataMember (const VarDecl *Var) |
If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated. More... | |
TemplateOrSpecializationInfo | getTemplateOrSpecializationInfo (const VarDecl *Var) |
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 | removePtrSizeAddrSpace (QualType T) const |
Remove the existing address space on the type if it is a pointer size address space and return the type with qualifiers intact. More... | |
QualType | getRestrictType (QualType T) const |
Return the uniqued reference to the type for a restrict qualified type. More... | |
QualType | getVolatileType (QualType T) const |
Return the uniqued reference to the type for a volatile qualified type. More... | |
QualType | getConstType (QualType T) const |
Return the uniqued reference to the type for a const qualified type. More... | |
const FunctionType * | adjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo) |
Change the ExtInfo on a function type. More... | |
CanQualType | getCanonicalFunctionResultType (QualType ResultType) const |
Adjust the given function result type. More... | |
void | adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType) |
Change the result type of a function type once it is deduced. More... | |
QualType | getFunctionTypeWithExceptionSpec (QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI) |
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 | getFunctionTypeWithoutPtrSizes (QualType T) |
Get a function type and produce the equivalent function type where pointer size address spaces in the return type and parameter tyeps are replaced with the default address space. More... | |
bool | hasSameFunctionTypeIgnoringPtrSizes (QualType T, QualType U) |
Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types. More... | |
QualType | getComplexType (QualType T) const |
Return the uniqued reference to the type for a complex number with the specified element type. More... | |
CanQualType | getComplexType (CanQualType T) const |
QualType | getPointerType (QualType T) const |
Return the uniqued reference to the type for a pointer to the specified type. More... | |
CanQualType | getPointerType (CanQualType T) const |
QualType | 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, const Expr *SizeExpr, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const |
Return the unique reference to the type for a constant array of the specified element type. More... | |
QualType | getStringLiteralArrayType (QualType EltTy, unsigned Length) const |
Return a type for a constant array for a string literal of the specified element type and length. More... | |
QualType | getVariableArrayDecayedType (QualType Ty) const |
Returns a vla type where known sizes are replaced with [*]. More... | |
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 | getMacroQualifiedType (QualType UnderlyingTy, const IdentifierInfo *MacroII) const |
QualType | getElaboratedType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType, TagDecl *OwnedTagDecl=nullptr) const |
QualType | getDependentNameType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const |
QualType | getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, 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) 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, bool IsPack=false, ConceptDecl *TypeConstraintConcept=nullptr, ArrayRef< TemplateArgument > TypeConstraintArgs={}) const |
C++11 deduced auto type. More... | |
QualType | getAutoDeductType () const |
C++11 deduction pattern for 'auto' type. More... | |
QualType | getAutoRRefDeductType () const |
C++11 deduction pattern for 'auto &&' type. More... | |
QualType | 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 | getAssumedTemplateName (DeclarationName Name) const |
Retrieve a template name representing an unqualified-id that has been assumed to name a template for ADL purposes. More... | |
TemplateName | getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, 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... | |
bool | hasDirectOwnershipQualifier (QualType Ty) const |
Return true if the type has been explicitly qualified with ObjC ownership. More... | |
const llvm::fltSemantics & | getFloatTypeSemantics (QualType T) const |
Return the APFloat 'semantics' for the specified scalar floating point type. More... | |
TypeInfo | getTypeInfo (const Type *T) const |
Get the size and alignment of the specified complete type in bits. More... | |
TypeInfo | getTypeInfo (QualType T) const |
unsigned | getOpenMPDefaultSimdAlign (QualType T) const |
Get default simd alignment of the specified complete type in bits. More... | |
uint64_t | getTypeSize (QualType T) const |
Return the size of the specified (complete) type T , in bits. More... | |
uint64_t | getTypeSize (const Type *T) const |
uint64_t | getCharWidth () const |
Return the size of the character type, in bits. More... | |
CharUnits | toCharUnitsFromBits (int64_t BitSize) const |
Convert a size in bits to a size in characters. More... | |
int64_t | toBits (CharUnits CharSize) const |
Convert a size in characters to a size in bits. More... | |
CharUnits | getTypeSizeInChars (QualType T) const |
Return the size of the specified (complete) type T , in characters. More... | |
CharUnits | getTypeSizeInChars (const Type *T) const |
Optional< CharUnits > | getTypeSizeInCharsIfKnown (QualType Ty) const |
Optional< CharUnits > | getTypeSizeInCharsIfKnown (const Type *Ty) const |
unsigned | getTypeAlign (QualType T) const |
Return the ABI-specified alignment of a (complete) type T , in bits. More... | |
unsigned | getTypeAlign (const Type *T) const |
unsigned | getTypeUnadjustedAlign (QualType T) const |
Return the ABI-specified natural alignment of a (complete) type T , before alignment adjustments, in bits. More... | |
unsigned | getTypeUnadjustedAlign (const Type *T) const |
unsigned | getTypeAlignIfKnown (QualType T) 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... | |
CharUnits | getExnObjectAlignment () const |
Return the alignment (in bytes) of the thrown exception object. More... | |
const ASTRecordLayout & | getASTRecordLayout (const RecordDecl *D) const |
Get or compute information about the layout of the specified record (struct/union/class) D , which indicates its size and field position information. More... | |
const ASTRecordLayout & | getASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const |
Get or compute information about the layout of the specified Objective-C interface. More... | |
void | DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const |
const ASTRecordLayout & | getASTObjCImplementationLayout (const ObjCImplementationDecl *D) const |
Get or compute information about the layout of the specified Objective-C implementation. More... | |
const CXXMethodDecl * | getCurrentKeyFunction (const CXXRecordDecl *RD) |
Get our current best idea for the key function of the given record decl, or nullptr if there isn't one. More... | |
void | setNonKeyFunction (const CXXMethodDecl *method) |
Observe that the given method cannot be a key function. More... | |
CharUnits | getOffsetOfBaseWithVBPtr (const CXXRecordDecl *RD) const |
Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero. More... | |
uint64_t | getFieldOffset (const ValueDecl *FD) const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits. More... | |
uint64_t | lookupFieldBitOffset (const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) const |
Get the offset of an ObjCIvarDecl in bits. More... | |
bool | isNearlyEmpty (const CXXRecordDecl *RD) const |
VTableContextBase * | getVTableContext () |
MangleContext * | createMangleContext (const TargetInfo *T=nullptr) |
If T is null pointer, assume the target in ASTContext. More... | |
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, bool IsBuiltin=false) 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... | |
int | getFloatingTypeSemanticOrder (QualType LHS, QualType RHS) const |
Compare the rank of two floating point types as above, but compare equal if both types have the same floating-point semantics on the target (i.e. More... | |
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 (const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS, bool ForCompare) |
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType. More... | |
bool | ObjCQualifiedClassTypesAreCompatible (const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS) |
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>. More... | |
bool | canAssignObjCInterfaces (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT) |
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS. More... | |
bool | canAssignObjCInterfaces (const ObjCObjectType *LHS, const ObjCObjectType *RHS) |
bool | canAssignObjCInterfacesInBlockPointer (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, bool BlockReturnType) |
canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safety for objective-c pointers used to pass/return arguments in block literals. More... | |
bool | areComparableObjCPointerTypes (QualType LHS, QualType RHS) |
QualType | areCommonBaseCompatible (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT) |
bool | canBindObjCObjectType (QualType To, QualType From) |
QualType | mergeTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false, bool BlockReturnType=false) |
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 |
QualType | getCorrespondingSignedFixedPointType (QualType Ty) const |
llvm::APSInt | MakeIntValue (uint64_t Value, QualType Type) const |
Make an APSInt of the appropriate width and signedness for the given Value and integer Type . More... | |
bool | isSentinelNullExpr (const Expr *E) |
ObjCImplementationDecl * | getObjCImplementation (ObjCInterfaceDecl *D) |
Get the implementation of the ObjCInterfaceDecl D , or nullptr if none exists. More... | |
ObjCCategoryImplDecl * | getObjCImplementation (ObjCCategoryDecl *D) |
Get the implementation of the ObjCCategoryDecl D , or nullptr if none exists. More... | |
bool | AnyObjCImplementation () |
Return true if there is at least one @implementation in the TU. More... | |
void | setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD) |
Set the implementation of ObjCInterfaceDecl. More... | |
void | setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD) |
Set the implementation of ObjCCategoryDecl. More... | |
const ObjCMethodDecl * | getObjCMethodRedeclaration (const ObjCMethodDecl *MD) const |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists. More... | |
void | setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl) |
const ObjCInterfaceDecl * | getObjContainingInterface (const NamedDecl *ND) const |
Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc. More... | |
void | setBlockVarCopyInit (const VarDecl *VD, Expr *CopyExpr, bool CanThrow) |
Set the copy initialization expression of a block var decl. More... | |
BlockVarCopyInit | getBlockVarCopyInit (const VarDecl *VD) const |
Get the copy initialization expression of the VarDecl VD , or nullptr if none exists. More... | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. More... | |
TypeSourceInfo * | getTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location. More... | |
void | AddDeallocation (void(*Callback)(void *), void *Data) const |
Add a deallocation callback that will be invoked when the ASTContext is destroyed. More... | |
template<typename T > | |
void | addDestruction (T *Ptr) const |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction. More... | |
GVALinkage | GetGVALinkageForFunction (const FunctionDecl *FD) const |
GVALinkage | GetGVALinkageForVariable (const VarDecl *VD) |
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... | |
MangleNumberingContext & | getManglingNumberContext (NeedExtraManglingDecl_t, const Decl *D) |
std::unique_ptr< MangleNumberingContext > | createMangleNumberingContext () const |
void | setParameterIndex (const ParmVarDecl *D, unsigned index) |
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
unsigned | getParameterIndex (const ParmVarDecl *D) const |
Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
StringLiteral * | getPredefinedStringLiteralFromCache (StringRef Key) const |
Return a string representing the human readable name for the specified function declaration or file name. More... | |
ParsedTargetAttr | filterFunctionTargetAttrs (const TargetAttr *TD) const |
Parses the target attributes passed in, and returns only the ones that are valid feature names. More... | |
void | getFunctionFeatureMap (llvm::StringMap< bool > &FeatureMap, const FunctionDecl *) const |
void | getFunctionFeatureMap (llvm::StringMap< bool > &FeatureMap, GlobalDecl GD) const |
void | InitBuiltinTypes (const TargetInfo &Target, const TargetInfo *AuxTarget=nullptr) |
Initialize built-in types. More... | |
void | getObjCEncodingForMethodParameter (Decl::ObjCDeclQualifier QT, QualType T, std::string &S, bool Extended) const |
getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return type. More... | |
bool | isMSStaticDataMemberInlineDefinition (const VarDecl *VD) const |
Returns true if this is an inline-initialized static data member which is treated as a definition for MSVC compatibility. More... | |
InlineVariableDefinitionKind | getInlineVariableDefinitionKind (const VarDecl *VD) const |
Determine whether a definition of this inline variable should be treated as a weak or strong definition. More... | |
Static Public Member Functions | |
static ImportDecl * | getNextLocalImport (ImportDecl *Import) |
static bool | isObjCNSObjectType (QualType Ty) |
Return true if this is an NSObject object with its NSObject attribute set. More... | |
Friends | |
class | NestedNameSpecifier |
class | ASTDeclReader |
class | ASTReader |
class | ASTWriter |
template<class > | |
class | serialization::AbstractTypeReader |
class | CXXRecordDecl |
class | 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 168 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.
Definition at line 2028 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 2981 of file ASTContext.h.
Enumerator | |
---|---|
NeedExtraManglingDecl |
Definition at line 2832 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 3037 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins | ||
) |
Definition at line 954 of file ASTContext.cpp.
References clang::TranslationUnitDecl::Create().
|
delete |
ASTContext::~ASTContext | ( | ) |
Definition at line 974 of file ASTContext.cpp.
|
inline |
Definition at line 798 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 10453 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
void ASTContext::AddDeallocation | ( | void(*)(void *) | Callback, |
void * | Data | ||
) | const |
Add a deallocation callback that will be invoked when the ASTContext is destroyed.
Callback | A callback function that will be invoked on destruction. |
Data | Pointer data that will be provided to the callback function when it is called. |
Definition at line 1087 of file ASTContext.cpp.
void ASTContext::addDeclaratorForUnnamedTagDecl | ( | TagDecl * | TD, |
DeclaratorDecl * | DD | ||
) |
Definition at line 10470 of file ASTContext.cpp.
|
inline |
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition at line 2785 of file ASTContext.h.
References V.
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 1681 of file ASTContext.cpp.
References clang::Decl::isFromASTFile().
Referenced by clang::DeclContext::addHiddenDecl().
Definition at line 1222 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 1196 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 1655 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod().
Definition at line 2573 of file ASTContext.h.
References clang::isTargetAddressSpace().
void ASTContext::addTypedefNameForUnnamedTagDecl | ( | TagDecl * | TD, |
TypedefNameDecl * | TND | ||
) |
Definition at line 10460 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 2961 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 3040 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 2943 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 4077 of file ASTContext.cpp.
References getAddrSpaceQualType(), and clang::opencl_constant.
Referenced by getStringLiteralArrayType().
|
inline |
Definition at line 686 of file ASTContext.h.
Referenced by clang::DeclGroup::Create(), clang::ConceptSpecializationExpr::Create(), clang::CXXTryStmt::Create(), clang::ASTConstraintSatisfaction::Create(), clang::CXXOperatorCallExpr::Create(), clang::TemplateParameterList::Create(), clang::CXXMemberCallExpr::Create(), clang::ObjCArrayLiteral::Create(), clang::CUDAKernelCallExpr::Create(), clang::ObjCDictionaryLiteral::Create(), clang::CoroutineBodyStmt::Create(), clang::OMPParallelDirective::Create(), clang::CXXStaticCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::RequiresExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::FunctionTemplateSpecializationInfo::Create(), clang::UserDefinedLiteral::Create(), clang::ObjCTypeParamList::create(), clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::CompoundStmt::Create(), clang::OMPForSimdDirective::Create(), clang::OMPSectionsDirective::Create(), clang::CXXConstructExpr::Create(), clang::OMPSectionDirective::Create(), clang::OMPOrderedClause::Create(), clang::CaseStmt::Create(), clang::OMPSingleDirective::Create(), clang::OMPMasterDirective::Create(), clang::CXXFunctionalCastExpr::Create(), clang::OMPParallelForDirective::Create(), clang::CXXTemporaryObjectExpr::Create(), clang::StringLiteral::Create(), clang::AttributedStmt::Create(), clang::OMPParallelForSimdDirective::Create(), clang::LambdaExpr::Create(), clang::OMPParallelMasterDirective::Create(), clang::IfStmt::Create(), clang::OMPPrivateClause::Create(), clang::PredefinedExpr::Create(), clang::OMPParallelSectionsDirective::Create(), clang::OMPTaskDirective::Create(), clang::OMPFirstprivateClause::Create(), clang::OMPTaskyieldDirective::Create(), clang::SwitchStmt::Create(), clang::OMPBarrierDirective::Create(), clang::OMPTaskwaitDirective::Create(), clang::CXXNewExpr::Create(), clang::OMPTaskgroupDirective::Create(), clang::WhileStmt::Create(), clang::OMPLastprivateClause::Create(), clang::OffsetOfExpr::Create(), clang::OMPFlushDirective::Create(), clang::OMPOrderedDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPAtomicDirective::Create(), clang::OMPTargetDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPTargetDataDirective::Create(), clang::CallExpr::Create(), clang::TypeTraitExpr::Create(), clang::ReturnStmt::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::OMPTargetExitDataDirective::Create(), clang::OMPTargetParallelDirective::Create(), clang::OMPTaskReductionClause::Create(), clang::OMPTargetParallelForDirective::Create(), clang::OMPTeamsDirective::Create(), clang::OMPCancellationPointDirective::Create(), clang::OMPCancelDirective::Create(), clang::OMPInReductionClause::Create(), clang::UnresolvedLookupExpr::Create(), clang::OMPTaskLoopDirective::Create(), clang::OMPTaskLoopSimdDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::OMPMasterTaskLoopDirective::Create(), clang::ImplicitCastExpr::Create(), clang::OMPMasterTaskLoopSimdDirective::Create(), clang::ExprWithCleanups::Create(), clang::OMPParallelMasterTaskLoopDirective::Create(), clang::CStyleCastExpr::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::OMPParallelMasterTaskLoopSimdDirective::Create(), OMPAlignedClause::Create(), clang::OMPDistributeDirective::Create(), clang::OMPTargetUpdateDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), OMPCopyinClause::Create(), clang::OMPDistributeParallelForDirective::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::OMPDistributeSimdDirective::Create(), OMPCopyprivateClause::Create(), clang::UnresolvedMemberExpr::Create(), clang::OMPTargetParallelForSimdDirective::Create(), OMPFlushClause::Create(), clang::OMPTargetSimdDirective::Create(), clang::OMPTeamsDistributeDirective::Create(), OMPDependClause::Create(), clang::OMPTeamsDistributeSimdDirective::Create(), clang::OMPTeamsDistributeParallelForSimdDirective::Create(), clang::SizeOfPackExpr::Create(), clang::OMPTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDirective::Create(), clang::OMPTargetTeamsDistributeDirective::Create(), clang::FunctionParmPackExpr::Create(), clang::OMPTargetTeamsDistributeParallelForDirective::Create(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create(), clang::OMPTargetTeamsDistributeSimdDirective::Create(), clang::DesignatedInitExpr::Create(), OMPMapClause::Create(), clang::ParenListExpr::Create(), clang::GenericSelectionExpr::Create(), clang::PseudoObjectExpr::Create(), OMPToClause::Create(), OMPFromClause::Create(), OMPUseDevicePtrClause::Create(), OMPIsDevicePtrClause::Create(), OMPNontemporalClause::Create(), clang::OMPDeclareMapperDecl::CreateClauses(), clang::OMPDeclareMapperDecl::CreateDeserialized(), clang::LambdaExpr::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::SizeOfPackExpr::CreateDeserialized(), clang::CXXOperatorCallExpr::CreateEmpty(), clang::CXXMemberCallExpr::CreateEmpty(), clang::ObjCArrayLiteral::CreateEmpty(), clang::CUDAKernelCallExpr::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::OMPAllocateClause::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::UserDefinedLiteral::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::CompoundStmt::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::CXXConstructExpr::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPOrderedClause::CreateEmpty(), clang::CaseStmt::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::CXXTemporaryObjectExpr::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::IfStmt::CreateEmpty(), clang::OMPParallelMasterDirective::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::PredefinedExpr::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::SwitchStmt::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::CXXNewExpr::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::WhileStmt::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPTargetDataDirective::CreateEmpty(), clang::CallExpr::CreateEmpty(), clang::ReturnStmt::CreateEmpty(), clang::OMPTargetEnterDataDirective::CreateEmpty(), clang::OMPTargetExitDataDirective::CreateEmpty(), clang::OMPTargetParallelDirective::CreateEmpty(), clang::OMPTaskReductionClause::CreateEmpty(), clang::OMPTargetParallelForDirective::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), clang::OMPInReductionClause::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::OMPMasterTaskLoopDirective::CreateEmpty(), clang::ImplicitCastExpr::CreateEmpty(), clang::OMPMasterTaskLoopSimdDirective::CreateEmpty(), clang::OMPParallelMasterTaskLoopDirective::CreateEmpty(), clang::CStyleCastExpr::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::OMPParallelMasterTaskLoopSimdDirective::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPTargetSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeDirective::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::OMPTeamsDistributeSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTeamsDistributeParallelForDirective::CreateEmpty(), clang::OMPTargetTeamsDirective::CreateEmpty(), clang::FunctionParmPackExpr::CreateEmpty(), clang::OMPTargetTeamsDistributeDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPTargetTeamsDistributeSimdDirective::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), OMPMapClause::CreateEmpty(), clang::ParenListExpr::CreateEmpty(), clang::GenericSelectionExpr::CreateEmpty(), OMPToClause::CreateEmpty(), OMPFromClause::CreateEmpty(), OMPUseDevicePtrClause::CreateEmpty(), OMPIsDevicePtrClause::CreateEmpty(), OMPNontemporalClause::CreateEmpty(), getAutoType(), getCanonicalTemplateSpecializationType(), clang::LambdaCapture::getCaptureKind(), getConstantArrayType(), 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 689 of file ASTContext.h.
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2721 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 4800 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().
QualType ASTContext::areCommonBaseCompatible | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
Definition at line 8542 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 8727 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 8105 of file ASTContext.cpp.
References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::Type::castAs(), clang::First, 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 10515 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().
void ASTContext::attachCommentsToJustParsedDecls | ( | ArrayRef< Decl *> | Decls, |
const Preprocessor * | PP | ||
) |
Searches existing comments for doc comments that should be attached to Decls
.
If any doc comment is found, it is parsed.
Requirement: All Decls
are in the same file.
If the last comment in the file is already attached we assume there are not comments left to be attached to Decls
.
Definition at line 491 of file ASTContext.cpp.
References adjustDeclToTemplate(), cacheRawCommentForDecl(), Comments, DeclRawComments, clang::RawCommentList::empty(), clang::RawCommentList::getCommentsInFile(), getDeclLocForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), clang::SourceLocation::isFileID(), clang::SourceLocation::isInvalid(), and ParsedComments.
Returns true iff we need copy/dispose helpers for the given type.
BlockRequiresCopying - Returns true if byref variable "D" of type "Ty" requires copy/dispose.
Note that this must match the logic in buildByrefHelpers.
Definition at line 6355 of file ASTContext.cpp.
References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInit(), clang::BlockVarCopyInit::getCopyExpr(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), clang::QualType::isDestructedType(), clang::QualType::isNonTrivialToPrimitiveDestructiveMove(), isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl | ( | BuiltinTemplateKind | BTK, |
const IdentifierInfo * | II | ||
) | const |
Definition at line 1248 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 1273 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::getTgtOffloadEntryQTy(), and clang::Sema::Initialize().
TypedefDecl * ASTContext::buildImplicitTypedef | ( | QualType | T, |
StringRef | Name | ||
) | const |
Create a new implicit TU-level typedef declaration.
Definition at line 1289 of file ASTContext.cpp.
Referenced by getInt128Decl(), getObjCClassDecl(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCSelDecl(), and getUInt128Decl().
void ASTContext::cacheRawCommentForDecl | ( | const Decl & | OriginalD, |
const RawComment & | Comment | ||
) | const |
Attaches Comment
to OriginalD
and to its redeclaration chain and removes the redeclaration chain from the set of commentless chains.
Don't do anything if a comment has already been attached to OriginalD
or its redeclaration chain.
Definition at line 465 of file ASTContext.cpp.
References CommentlessRedeclChains, clang::LangOptions::CommentOpts, DeclRawComments, clang::Decl::getCanonicalDecl(), clang::RawComment::isDocumentation(), clang::CommentOptions::ParseAllComments, and RedeclChainComments.
Referenced by attachCommentsToJustParsedDecls(), and getRawCommentForAnyRedecl().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS.
This handles validation of any protocol qualifiers on the LHS or RHS.
Definition at line 8303 of file ASTContext.cpp.
References clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCQualifiedClass(), clang::ObjCObjectType::isObjCQualifiedId(), clang::ObjCObjectType::isObjCUnqualifiedId(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by areComparableObjCPointerTypes(), canAssignObjCObjectTypes(), canBindObjCObjectType(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::DiagnosePropertyAccessorMismatch(), findMethodDecl(), getReturnTypeForMethod(), hasDefinition(), isObjCTypeSubstitutable(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 8665 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 8356 of file ASTContext.cpp.
References clang::ObjCInterfaceType::getDecl(), 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 8739 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 7857 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 537 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 2491 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 2688 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
MangleContext * ASTContext::createMangleContext | ( | const TargetInfo * | T = nullptr | ) |
If T
is null pointer, assume the target in ASTContext.
Definition at line 10331 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetCXXABI::Fuchsia, clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, clang::TargetInfo::getCXXABI(), getDiagnostics(), clang::TargetCXXABI::getKind(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, clang::TargetCXXABI::Microsoft, clang::Target, clang::TargetCXXABI::WatchOS, clang::TargetCXXABI::WebAssembly, and clang::CXXABI::~CXXABI().
std::unique_ptr< MangleNumberingContext > ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 10443 of file ASTContext.cpp.
Referenced by getManglingNumberContext().
TypeSourceInfo * ASTContext::CreateTypeSourceInfo | ( | QualType | T, |
unsigned | Size = 0 |
||
) | const |
Allocate an uninitialized TypeSourceInfo.
The caller should initialize the memory held by TypeSourceInfo using the TypeLoc wrappers.
T | the type that will be the basis for type source info. This type should refer to how the declarator was written in source code, not to what type semantic analysis resolved the declarator to. |
Size | the size of the type info to create, or 0 if the size should be calculated based on the type. |
Definition at line 2798 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType().
Referenced by getTrivialTypeSourceInfo(), and GetTypeSourceInfoForDeclarator().
|
inline |
Definition at line 692 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 10116 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 1166 of file ASTContext.cpp.
References clang::Decl::getCanonicalDecl(), getExternalSource(), and clang::transformer::remove().
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 2473 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 3427 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 1527 of file ASTContext.cpp.
Referenced by clang::Decl::dropAttrs().
ParsedTargetAttr ASTContext::filterFunctionTargetAttrs | ( | const TargetAttr * | TD | ) | const |
Parses the target attributes passed in, and returns only the ones that are valid feature names.
Definition at line 10922 of file ASTContext.cpp.
References clang::ParsedTargetAttr::Features.
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), and getFunctionFeatureMap().
void ASTContext::forEachMultiversionedFunctionVersion | ( | const FunctionDecl * | FD, |
llvm::function_ref< void(FunctionDecl *)> | Pred | ||
) | const |
Visits all versions of a multiversioned function with the passed predicate.
Definition at line 10261 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 2864 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by adjustStringLiteralBaseType(), checkConditionalPointerCompatibility(), clang::CodeGen::CodeGenTypes::DeriveThisType(), HandleAddressSpaceTypeAttribute(), handleMSPointerTypeQualifierAttr(), clang::Sema::PerformImplicitConversion(), 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 5765 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 3124 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Referenced by getTypeInfo().
|
inline |
Definition at line 1250 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 2447 of file ASTContext.cpp.
References getTargetInfo(), getTypeAlign(), clang::QualType::getTypePtr(), getTypeSize(), 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 2454 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString().
|
inline |
Definition at line 682 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 5796 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 5707 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(), DiagnoseDivisionSizeofPointerOrArray(), clang::CodeGen::CodeGenFunction::emitArrayLength(), 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(), PerformConstructorInitialization(), clang::ento::ExprEngine::ProcessDeleteDtor(), roundUpSizeToCharAlignment(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TypeRequiresBuiltinLaunderImp(), and UnwrapSimilarArrayTypes().
|
inline |
Definition at line 2466 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 2475 of file ASTContext.h.
|
inline |
Definition at line 2472 of file ASTContext.h.
Referenced by clang::InitializationSequence::Perform().
TemplateName ASTContext::getAssumedTemplateName | ( | DeclarationName | Name | ) | const |
Retrieve a template name representing an unqualified-id that has been assumed to name a template for ADL purposes.
Definition at line 7895 of file ASTContext.cpp.
Referenced by clang::ASTImporter::Import().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 696 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 1101 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 2825 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 2820 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 3023 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(), decomposeTypeForEH(), detectAmbiguousBases(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), 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(), getTypeString(), getTypeUnadjustedAlign(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), hasDefaultCXXMethodCC(), isDesignatorAtObjectEnd(), recordUsesEBO(), RequiresVtordisp(), and roundUpSizeToCharAlignment().
|
inline |
Definition at line 2469 of file ASTContext.h.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitArraySubscriptGEP(), emitGlobalToListReduceFunction(), emitListToGlobalReduceFunction(), emitPointerArithmetic(), getFixedSizeElementType(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::CodeGen::CodeGenFunction::getVLAElements1D(), clang::CodeGen::CodeGenFunction::getVLASize(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), 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 5193 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 4195 of file ASTContext.cpp.
References getCanonicalType(), 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 5220 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 5231 of file ASTContext.cpp.
References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().
QualType ASTContext::getAutoType | ( | QualType | DeducedType, |
AutoTypeKeyword | Keyword, | ||
bool | IsDependent, | ||
bool | IsPack = false , |
||
ConceptDecl * | TypeConstraintConcept = nullptr , |
||
ArrayRef< TemplateArgument > | TypeConstraintArgs = {} |
||
) | const |
C++11 deduced auto type.
getAutoType - Return the uniqued reference to the 'auto' type which has been deduced to the given type, or to the canonical undeduced 'auto' type, or the canonical deduced-but-dependent 'auto' type.
Definition at line 5141 of file ASTContext.cpp.
References Allocate(), 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 708 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 5818 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(), DiagnoseDivisionSizeofPointerOrArray(), 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(), PerformConstructorInitialization(), 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 5822 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 6273 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 6238 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 3186 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(), mergeTypes(), and clang::Sema::PerformImplicitConversion().
BlockVarCopyInit ASTContext::getBlockVarCopyInit | ( | const VarDecl * | VD | ) | const |
Get the copy initialization expression of the VarDecl VD
, or nullptr if none exists.
Get the copy initialization expression of VarDecl, or nullptr if none exists.
Definition at line 2779 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying(), buildByrefHelpers(), and getBlockCaptureStr().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 1905 of file ASTContext.h.
|
inline |
Retrieve the identifier 'bool'.
Definition at line 1735 of file ASTContext.h.
References clang::IdentifierTable::get().
|
inline |
type of 'BOOL' type.
Definition at line 1915 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 7850 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 1943 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 9856 of file ASTContext.cpp.
References BuiltinInfo, DecodeTypeFromStr(), clang::EST_BasicNoexcept, clang::EST_DynamicNone, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, GE_Missing_type, GE_None, getArrayDecayedType(), getDefaultCallingConvention(), getFunctionNoProtoType(), getFunctionType(), getLangOpts(), clang::Builtin::Context::getTypeString(), 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 7832 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 1929 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 6395 of file ASTContext.cpp.
References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptions::NonGC, clang::ObjC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.
CanQualType ASTContext::getCanonicalFunctionResultType | ( | QualType | ResultType | ) | const |
Adjust the given function result type.
Definition at line 3863 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 5652 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 5315 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 5601 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(), and clang::ASTRecordReader::readTemplateArgument().
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 5552 of file ASTContext.cpp.
Referenced by DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), and hasSameTemplateName().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
ArrayRef< TemplateArgument > | Args | ||
) | const |
Definition at line 4391 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 2305 of file ASTContext.h.
References clang::QualType::getCanonicalType().
Referenced by canonicalizeImmediatelyDeclaredConstraint(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::CheckEquivalentExceptionSpecImpl(), clang::Sema::CheckFloatComparison(), CheckImplicitConversion(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CompareStandardConversionSequences(), clang::Sema::computeDeclContext(), clang::cross_tu::containsConst(), 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(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), clang::CodeGen::CodeGenTBAA::getBaseTypeInfo(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalParamType(), getCanonicalTemplateArgument(), getCastAwayConstnessCastKind(), GetCFNumberSize(), getComplexType(), getConstantArrayType(), getDecayedType(), getDecltypeType(), clang::getDeclUsageType(), getDependentAddressSpaceType(), getDependentSizedExtVectorType(), getDependentVectorType(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), getLValueReferenceType(), getMacroQualifiedType(), 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(), TryAddressSpaceCast(), 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 2309 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 6126 of file ASTContext.cpp.
References buildImplicitRecord().
Referenced by getCFConstantStringTagDecl(), getCFConstantStringType(), and clang::Sema::Initialize().
RecordDecl * ASTContext::getCFConstantStringTagDecl | ( | ) | const |
Definition at line 6210 of file ASTContext.cpp.
References getCFConstantStringDecl().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 6217 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 2108 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(), printExpectedDeallocName(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
|
inline |
Definition at line 880 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 557 of file ASTContext.cpp.
References addRedeclaredMethods(), adjustDeclToTemplate(), clang::AS_public, clang::TemplateParameterList::begin(), clang::C, cloneFullComment(), clang::TemplateParameterList::end(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::QualType::getAsOpaquePtr(), clang::Decl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::TemplateParmPosition::getDepth(), clang::TypeConstraint::getImmediatelyDeclaredConstraint(), getOverriddenMethods(), clang::TemplateParmPosition::getPosition(), getRawCommentForAnyRedecl(), clang::TemplateParameterList::getRequiresClause(), clang::TemplateDecl::getTemplateParameters(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::TemplateTemplateParmDecl::isParameterPack(), P, clang::RawComment::parse(), ParsedComments, clang::Stmt::Profile(), and clang::TemplateParameterList::size().
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 3070 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by InitBuiltinTypes().
|
inline |
Definition at line 1236 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 5838 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, | ||
const Expr * | SizeExpr, | ||
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 3321 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Expr::isInstantiationDependent(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::Target, clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), diagnoseListInit(), clang::CodeGen::emitDeclareSimdFunction(), emitOffloadingArrays(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), clang::Sema::FindCompositePointerType(), getAsArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getStringLiteralArrayType(), 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 1195 of file ASTContext.h.
References getComplexType(), and clang::QualType::withConst().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 10448 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by decomposeTypeForEH().
Definition at line 10721 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), clang::Type::isFixedPointType(), clang::Type::isSaturatedFixedPointType(), SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, SatUnsignedAccumTy, SatUnsignedFractTy, SatUnsignedLongAccumTy, SatUnsignedLongFractTy, SatUnsignedShortAccumTy, and SatUnsignedShortFractTy.
Referenced by handleFixedPointConversion().
Definition at line 10887 of file ASTContext.cpp.
References AccumTy, clang::Type::castAs(), FractTy, clang::BuiltinType::getKind(), clang::Type::isUnsignedFixedPointType(), LongAccumTy, LongFractTy, SatAccumTy, SatFractTy, SatLongAccumTy, SatLongFractTy, SatShortAccumTy, SatShortFractTy, ShortAccumTy, and ShortFractTy.
Referenced by handleFixedPointConversion().
Definition at line 9470 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Type::getAs(), clang::BuiltinType::getKind(), 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 1295 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 3112 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 1953 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 3145 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 1259 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 1720 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::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), getTargetInfo(), clang::QualType::getTypePtr(), getTypeSize(), 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::CGOpenMPRuntimeNVPTX::getAddressOfLocalVariable(), clang::CodeGen::getAddrOfDeclareTargetVar(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::Sema::isOpenMPCapturedByRef().
DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 10475 of file ASTContext.cpp.
Retrieve the attributes for the given declaration.
Definition at line 1516 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 5071 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 5172 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, | ||
bool | IsBuiltin = false |
||
) | const |
Retrieves the default calling convention for the current target.
Definition at line 10278 of file ASTContext.cpp.
References clang::CC_C, clang::CC_X86FastCall, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86VectorCall, 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::ASTNameGenerator::Implementation::getAllManglings(), GetBuiltinType(), getCCForDeclaratorChunk(), getImplicitMethodEPI(), and hasDefaultCXXMethodCC().
QualType ASTContext::getDependentAddressSpaceType | ( | QualType | PointeeType, |
Expr * | AddrSpaceExpr, | ||
SourceLocation | AttrLoc | ||
) | const |
Definition at line 3788 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 4501 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 3541 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 3747 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 7927 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 7963 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 4527 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 4540 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 3677 of file ASTContext.cpp.
References getCanonicalType(), getDependentSizedExtVectorType(), clang::DependentVectorType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 703 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1512 of file ASTContext.cpp.
Referenced by checkNullabilityConsistency(), computeKeyFunction(), createMangleContext(), clang::StructuralEquivalenceContext::Diag1(), clang::StructuralEquivalenceContext::Diag2(), clang::cross_tu::CrossTranslationUnitContext::emitCrossTUDiagnostics(), clang::ASTImporter::FromDiag(), getFunctionFeatureMap(), getObjCEncodingForPrimitiveType(), hasSuperInitCall(), clang::ASTImporter::Import(), clang::RawComment::parse(), clang::interp::State::report(), clang::ento::CheckerManager::reportInvalidCheckerOptionValue(), rewriteToNumericBoxedExpression(), clang::tooling::Transformer::run(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType, | ||
TagDecl * | OwnedTagDecl = nullptr |
||
) | const |
Definition at line 4435 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 4182 of file ASTContext.cpp.
References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.
Definition at line 5777 of file ASTContext.cpp.
References getDecayedType(), clang::QualType::getUnqualifiedType(), getVariableArrayDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by decomposeTypeForEH().
|
inline |
Return the alignment (in bytes) of the thrown exception object.
This is only meaningful for targets that allocate C++ exceptions in a system runtime, such as those using the Itanium C++ ABI.
Definition at line 2210 of file ASTContext.h.
References DumpRecordLayout(), clang::TargetInfo::getExnObjectAlignment(), and getFieldOffset().
Referenced by getThrowFn().
|
inline |
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition at line 1086 of file ASTContext.h.
Referenced by clang::ASTDeclWriter::AddTemplateSpecializations(), adjustGVALinkageForExternalDefinitionKind(), clang::ExternalASTMerger::CompleteType(), clang::AccessSpecDecl::CreateDeserialized(), clang::ObjCInterfaceDecl::CreateDeserialized(), DeclMustBeEmitted(), deduplicateMergedDefinitonsFor(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::BindingDecl::getDecomposedDecl(), 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 1240 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 3718 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 3163 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain(), and getFieldOffset().
Referenced by emitAddrOfZeroSizeField().
|
inline |
Retrieve the C FILE type.
Definition at line 1767 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
unsigned char ASTContext::getFixedPointIBits | ( | QualType | Ty | ) | const |
Definition at line 10821 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
APFixedPoint ASTContext::getFixedPointMax | ( | QualType | Ty | ) | const |
Definition at line 10877 of file ASTContext.cpp.
References getFixedPointSemantics(), clang::APFixedPoint::getMax(), and clang::Type::isFixedPointType().
Referenced by CheckImplicitConversion().
APFixedPoint ASTContext::getFixedPointMin | ( | QualType | Ty | ) | const |
Definition at line 10882 of file ASTContext.cpp.
References getFixedPointSemantics(), clang::APFixedPoint::getMin(), and clang::Type::isFixedPointType().
Referenced by CheckImplicitConversion().
unsigned char ASTContext::getFixedPointScale | ( | QualType | Ty | ) | const |
Definition at line 10775 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getTargetInfo(), clang::Type::isFixedPointType(), and clang::Target.
Referenced by getFixedPointSemantics().
FixedPointSemantics ASTContext::getFixedPointSemantics | ( | QualType | Ty | ) | const |
Definition at line 10862 of file ASTContext.cpp.
References clang::TargetInfo::doUnsignedFixedPointTypesHavePadding(), getFixedPointScale(), clang::FixedPointSemantics::GetIntegerSemantics(), getIntWidth(), getTargetInfo(), getTypeSize(), clang::Type::isFixedPointType(), clang::Type::isIntegerType(), clang::Type::isSaturatedFixedPointType(), clang::Type::isSignedFixedPointType(), and clang::Type::isSignedIntegerType().
Referenced by CheckImplicitConversion(), getFixedPointMax(), getFixedPointMin(), and tryEmitFMulAdd().
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 5869 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 5899 of file ASTContext.cpp.
References getFloatingRank().
Referenced by clang::ento::SMTConv::doFloatTypeConversion(), getFloatingTypeSemanticOrder(), clang::StandardConversionSequence::getNarrowingKind(), isArithmeticArgumentPromotion(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().
Compare the rank of two floating point types as above, but compare equal if both types have the same floating-point semantics on the target (i.e.
long double and double on AArch64 will return 0).
Definition at line 5910 of file ASTContext.cpp.
References BoolTy, CharTy, getFloatingTypeOrder(), getFloatTypeSemantics(), getIntWidth(), Int128Ty, IntTy, clang::Type::isCanonicalUnqualified(), LongLongTy, LongTy, and ShortTy.
Referenced by AnalyzeCompoundAssignment(), and CheckImplicitConversion().
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 1700 of file ASTContext.cpp.
References clang::Type::castAs(), clang::BuiltinType::getKind(), getLangOpts(), and clang::Target.
Referenced by BuildFloatingLiteral(), canConvertIntTyToFloatTy(), CheckImplicitConversion(), clang::CodeGen::CodeGenTypes::ConvertType(), getFloatingTypeSemanticOrder(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getZeroExpr(), IsStandardConversion(), and tryGCCVectorConvertAndSplat().
|
inline |
Definition at line 736 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and Write_RethrowObject().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
const FunctionDecl * | FD | ||
) | const |
Definition at line 10936 of file ASTContext.cpp.
References getDiagnostics(), and clang::Target.
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures(), hasRequiredFeatures(), and clang::CodeGen::CodeGenModule::SetCommonAttributes().
void ASTContext::getFunctionFeatureMap | ( | llvm::StringMap< bool > & | FeatureMap, |
GlobalDecl | GD | ||
) | const |
Definition at line 10948 of file ASTContext.cpp.
References clang::ParsedTargetAttr::Architecture, clang::ParsedTargetAttr::Features, filterFunctionTargetAttrs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::GlobalDecl::getDecl(), getDiagnostics(), clang::GlobalDecl::getMultiVersionIndex(), getName(), and clang::Target.
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 3832 of file ASTContext.cpp.
References getCanonicalFunctionResultType(), isCanonicalResultType(), clang::FunctionNoProtoType::Profile(), and clang::TypeAlignment.
Referenced by adjustFunctionType(), EmitFunctionDeclPointer(), GeneralizeFunctionType(), GetBuiltinType(), getFunctionTypeWithoutPtrSizes(), clang::ento::MemRegionManager::getVarRegion(), and mergeFunctionTypes().
Definition at line 1396 of file ASTContext.h.
|
inline |
Return a normal function type with a typed argument list.
Definition at line 1401 of file ASTContext.h.
Referenced by adjustDeducedFunctionResultType(), clang::TemplateDeclInstantiator::adjustForRewrite(), 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(), getFunctionTypeWithoutPtrSizes(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), mergeFunctionTypes(), mergeObjCGCQualifiers(), clang::CodeGen::CodeGenFunction::StartFunction(), 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 2981 of file ASTContext.cpp.
References clang::Type::castAs(), getAttributedType(), getFunctionType(), getMacroQualifiedType(), and getParenType().
Referenced by adjustExceptionSpec(), clang::CodeGen::CodeGenFunction::EmitCall(), extractPBaseFlags(), handleFunctionTypeAttr(), hasSameFunctionTypeIgnoringExceptionSpec(), and clang::CodeGen::CodeGenFunction::StartFunction().
Get a function type and produce the equivalent function type where pointer size address spaces in the return type and parameter tyeps are replaced with the default address space.
Definition at line 3017 of file ASTContext.cpp.
References clang::Type::getAs(), getFunctionNoProtoType(), getFunctionType(), and removePtrSizeAddrSpace().
Referenced by hasSameFunctionTypeIgnoringPtrSizes().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 10027 of file ASTContext.cpp.
References adjustGVALinkageForAttributes(), adjustGVALinkageForExternalDefinitionKind(), and basicGVALinkageForFunction().
Referenced by DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) |
Definition at line 10110 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 3609 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 clang::Sema::FindCompositePointerType(), 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 4106 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 4592 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 4625 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 6459 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 6053 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 1537 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1611 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 1572 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and isInstantiationOfUnresolvedUsingDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1595 of file ASTContext.cpp.
Referenced by isInstantiationOf().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 1299 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 6081 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().
interp::Context & ASTContext::getInterpContext | ( | ) |
Returns the clang bytecode interpreter context.
Definition at line 909 of file ASTContext.cpp.
CanQualType ASTContext::getIntMaxType | ( | ) | const |
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5).
Definition at line 5261 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
QualType ASTContext::getIntPtrType | ( | ) | const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 5284 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 10373 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(), emitOffloadingArrays(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::emitUserDefinedMapper(), clang::ento::SMTConv::getAPSIntType(), getOSLogArgType(), clang::CodeGen::getTgtOffloadEntryQTy(), getTypeString(), shuffleAndStore(), and widenIterationCount().
unsigned ASTContext::getIntWidth | ( | QualType | T | ) | const |
Definition at line 9461 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().
Referenced by AnalyzeComparison(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckFloatComparison(), CheckICE(), CheckImplicitConversion(), clang::interp::Context::classify(), DeduceFromInitializerList(), DiagnoseFloatingImpCast(), clang::ento::BasicValueFactory::getAPSIntType(), GetExprRange(), getFixedPointSemantics(), getFloatingTypeSemanticOrder(), clang::interp::ByteCodeExprGen< Emitter >::getIntWidth(), 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 1779 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
LangAS ASTContext::getLangASForBuiltinAddressSpace | ( | unsigned | AS | ) | const |
Definition at line 10756 of file ASTContext.cpp.
References clang::ExternalASTSource::CompleteRedeclChain(), clang::TargetInfo::getCUDABuiltinAddressSpace(), clang::getLangASFromTargetAS(), clang::TargetInfo::getOpenCLBuiltinAddressSpace(), and getTargetInfo().
|
inline |
Definition at line 724 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::NonTypeTemplateParmDecl::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(), clang::CXXRecordDecl::defaultedDefaultConstructorIsConstexpr(), clang::CXXRecordDecl::defaultedDestructorIsConstexpr(), clang::Stmt::dumpPretty(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), EmitDeclDestroy(), EmitDeclInit(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getBlockDescriptorName(), GetBuiltinType(), getByrefLifetime(), getCallingConvMangling(), clang::ASTNameGenerator::Implementation::getClassSymbolPrefix(), clang::ento::SValBuilder::getConditionType(), clang::diff::SyntaxTree::Impl::getDeclValue(), clang::NamedDecl::getExplicitVisibility(), getFloatTypeSemantics(), GetGCAttrTypeForType(), clang::index::IndexingContext::getLangOpts(), clang::interp::Context::getLangOpts(), clang::ento::CheckerContext::getLangOpts(), clang::interp::State::getLangOpts(), clang::ASTWriter::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), clang::cross_tu::CrossTranslationUnitContext::getLookupName(), clang::LinkageComputer::getLVForDecl(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCGCAttrKind(), clang::tooling::getRangeForEdit(), clang::DeclContext::getRedeclContext(), getStringLiteralArrayType(), getTypeInfo(), getTypeInfoDataSizeInChars(), clang::ento::retaincountchecker::RetainCountChecker::handleAutoreleaseCounts(), clang::Decl::hasLocalOwningModuleStorage(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSuperInitCall(), clang::Sema::isAcceptableNestedNameSpecifier(), isCanonicalExceptionSpecification(), clang::Expr::isCXX11ConstantExpr(), isCXXSharedPtrDtor(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::VarDecl::isKnownToBeDefined(), clang::CXXRecordDecl::isLiteral(), 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::CodeGenFunction::isTrivialInitializer(), clang::CodeGen::CodeGenModule::isTypeConstant(), isTypeSubstitutable(), clang::Expr::isUnusedResultAWarning(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), LocPropertyAttribute(), LookThroughTransitiveAssignmentsAndCommaOperators(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), mergeTypes(), clang::VarDecl::mightBeUsableInConstantExpressions(), needsConversionOfHalfVec(), printExprAsWritten(), clang::LocationContext::printJson(), 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::transformer::statements(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), typesAreCompatible(), UnwrapSimilarTypes(), clang::ento::retaincountchecker::RetainCountChecker::updateSymbol(), useInlineVisibilityHidden(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::JSONNodeDumper::Visit(), Write_IvarOffsetVar(), and Write_ProtocolExprReferencedMetadata().
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 6767 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 1981 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 552 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
Referenced by clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::Visit().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1810 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 3218 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), OverloadTy, clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), alignReferenceTypes(), buildCaptureDecl(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), clang::ObjCMessageExpr::getCallReturnType(), getCanonicalParamType(), getCaptureFieldType(), getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
QualType ASTContext::getMacroQualifiedType | ( | QualType | UnderlyingTy, |
const IdentifierInfo * | MacroII | ||
) | const |
Definition at line 4489 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), and clang::TypeAlignment.
Referenced by getFunctionTypeWithExceptionSpec(), and clang::TreeTransform< Derived >::RebuildMacroQualifiedType().
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl | ( | ) | const |
Definition at line 1258 of file ASTContext.cpp.
References clang::BTK__make_integer_seq, buildBuiltinTemplateDecl(), and getMakeIntegerSeqName().
|
inline |
Definition at line 1741 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getMakeIntegerSeqDecl().
unsigned ASTContext::getManglingNumber | ( | const NamedDecl * | ND | ) | const |
Definition at line 10408 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 10424 of file ASTContext.cpp.
References createMangleNumberingContext().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | NeedExtraManglingDecl_t | , |
const Decl * | D | ||
) |
Definition at line 10433 of file ASTContext.cpp.
References createMangleNumberingContext().
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 3291 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(), clang::TypeName::getFullyQualifiedType(), GetTypeOfFunction(), IsStandardConversion(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), and TryStaticMemberPointerUpcast().
Get the initializations to perform when importing a module, if any.
Definition at line 1230 of file ASTContext.cpp.
Referenced by getNumberOfModules(), and clang::TextNodeDumper::VisitImportDecl().
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 5498 of file ASTContext.cpp.
|
inlinestatic |
Definition at line 961 of file ASTContext.h.
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1708 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1725 of file ASTContext.h.
References clang::TargetInfo::getTriple().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1699 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by clang::ObjCMethodDecl::definedInNSObject(), and clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Definition at line 1716 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 7475 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 1674 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 1896 of file ASTContext.h.
Referenced by LookupMemberExpr(), and RewriteOneForwardClassDecl().
|
inline |
Definition at line 1647 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 6485 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 6541 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 6599 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 6582 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 6696 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 6794 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 6779 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 7442 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 6436 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 8064 of file ASTContext.cpp.
References clang::Type::castAs(), clang::Qualifiers::GCNone, clang::Type::getCanonicalTypeInternal(), getLangOpts(), clang::QualType::getObjCGCAttr(), clang::PointerType::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::LangOptions::NonGC, clang::ObjC, 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 2905 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 7458 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 1661 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 1874 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 2722 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 2732 of file ASTContext.cpp.
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1755 of file ASTContext.h.
Referenced by clang::ObjCMessageExpr::getCallReturnType(), getReturnTypeForMethod(), and ReplaceWithInstancetype().
TypedefDecl * ASTContext::getObjCInstanceTypeDecl | ( | ) |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
Definition at line 6417 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 4999 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 2755 of file ASTContext.cpp.
References clang::DeclContext::lookup().
Referenced by clang::ObjCMethodDecl::setMethodParams(), and setObjCMethodRedeclaration().
|
inline |
Definition at line 1651 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 4969 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::Sema::FindCompositePointerType(), clang::ento::TypedValueRegion::getLocationType(), getMostInformativeDerivedClassImpl(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::Sema::PerformImplicitConversion(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ObjCProtocolDecl *const * | Protocols, | ||
unsigned | NumProtocols | ||
) | const |
Legacy interface: cannot provide type arguments or __kindof.
Definition at line 4708 of file ASTContext.cpp.
Referenced by applyObjCProtocolQualifiers(), areCommonBaseCompatible(), checkObjCKindOfType(), getObjCClassDecl(), getObjCIdDecl(), getObjCObjectType(), clang::Type::getObjCSubstitutions(), and clang::ObjCObjectType::stripObjCKindOfTypeAndQuals().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ArrayRef< QualType > | typeArgs, | ||
ArrayRef< ObjCProtocolDecl *> | protocols, | ||
bool | isKindOf | ||
) | const |
Definition at line 4716 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 2765 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 6652 of file ASTContext.cpp.
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 7484 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 1920 of file ASTContext.h.
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 7467 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 1687 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 1884 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 6221 of file ASTContext.cpp.
References buildImplicitRecord(), and getTagDeclType().
QualType ASTContext::getObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl, |
ArrayRef< ObjCProtocolDecl *> | protocols | ||
) | const |
Definition at line 4871 of file ASTContext.cpp.
References Allocate(), applyObjCProtocolQualifiers(), getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), 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 2458 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 6348 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 6312 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 2356 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 7871 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 1661 of file ASTContext.cpp.
References overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
Definition at line 4633 of file ASTContext.cpp.
References clang::Type::containsUnexpandedParameterPack(), getCanonicalType(), clang::Type::getContainedDeducedType(), 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 10483 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::hasDefaultArg().
|
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 665 of file ASTContext.h.
References clang::serialized_diags::create(), and Node.
ASTContext::DynTypedNodeList ASTContext::getParents | ( | const ast_type_traits::DynTypedNode & | Node | ) |
Definition at line 10664 of file ASTContext.cpp.
Definition at line 4465 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 5294 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(), clang::Sema::Initialize(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), 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 3098 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(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkOpenCLPipePacketType(), CheckOperatorDeleteDeclaration(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::Sema::DeclareGlobalNewDelete(), decomposeTypeForEH(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), emitCombinerOrInitializer(), clang::CodeGen::CGDebugInfo::EmitDeclareOfArgVariable(), emitDeclTargetVarDeclLValue(), 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::CodeGen::emitUserDefinedMapper(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), clang::Sema::FindCompositePointerType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CodeGen::getAddrOfDeclareTargetVar(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getBlockLayoutInfoString(), getCanonicalParamType(), getCanonicalParamType(), clang::ento::SValBuilder::getCXXThis(), getDecayedSourceLocExprType(), 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::getTgtOffloadEntryQTy(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLVectorSplat(), handleMSPointerTypeQualifierAttr(), InitBuiltinTypes(), isArgInAlloca(), IsStandardConversion(), mergeTypes(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), clang::Sema::PerformImplicitConversion(), clang::ento::ExprEngine::processCallExit(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), recordFixedType(), RemoveAddressSpaceFromPtr(), removePtrSizeAddrSpace(), 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 1243 of file ASTContext.h.
StringLiteral * ASTContext::getPredefinedStringLiteralFromCache | ( | StringRef | Key | ) | const |
Return a string representing the human readable name for the specified function declaration or file name.
Used by SourceLocExpr and PredefinedExpr to cache evaluated results.
Definition at line 10505 of file ASTContext.cpp.
References clang::StringLiteral::Ascii, CharTy, clang::StringLiteral::Create(), getStringLiteralArrayType(), and clang::Result.
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 2409 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 671 of file ASTContext.h.
Referenced by clang::ento::CallEvent::dump(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpDeclContext(), clang::DeclContext::dumpLookups(), clang::CodeGen::CodeGenModule::GenOpenCLArgMetadata(), getFunctionSourceLocation(), getObjCEncodingForPrimitiveType(), getTupleLikeElementType(), HasLocalVariableExternalStorage(), IsCommonTypo(), isTupleLike(), lookupStdTypeTraitMember(), mustSynthesizeSetterGetterMethod(), clang::Parser::ParseTopLevelDecl(), clang::PrettyDeclStackTraceEntry::print(), print(), clang::ento::Environment::printJson(), printObjectsUnderConstructionJson(), clang::APValue::printPretty(), RewriteOneForwardClassDecl(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), scanToNextArgument(), clang::TextNodeDumper::VisitUnresolvedUsingTypenameDecl(), clang::TextNodeDumper::VisitUnresolvedUsingValueDecl(), and clang::TextNodeDumper::VisitUsingDecl().
QualType ASTContext::getProcessIDType | ( | ) | const |
Return the unique type for "pid_t" defined in <sys/types.h>.
We need this to compute the correct type for vfork().
Definition at line 5307 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 6009 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 7903 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 1958 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(), CompareStandardConversionSequences(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), clang::Type::getArrayElementTypeNoTypeQual(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getConstantArrayType(), clang::TypeName::getFullyQualifiedType(), getIncompleteArrayType(), getNonMemoryType(), getThisObjectType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCWriteback(), InitBuiltinTypes(), LookupMemberExpr(), rewriteToObjCProperty(), SemaOpenCLBuiltinToAddr(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), transferARCOwnershipToDeclSpec(), TryObjectArgumentInitialization(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), UnwrapTypeForDebugInfo(), and withoutUnaligned().
|
inline |
Return a type with additional qualifiers.
Definition at line 1963 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 1972 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 1636 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 394 of file ASTContext.cpp.
References adjustDeclToTemplate(), cacheRawCommentForDecl(), CommentlessRedeclChains, DeclRawComments, clang::Decl::getCanonicalDecl(), getRawCommentForDeclNoCache(), RedeclChainComments, and clang::Decl::redecls().
Referenced by getCommentForDecl(), clang::getCompletionComment(), clang::getParameterComment(), and clang::getPatternCompletionComment().
RawComment * ASTContext::getRawCommentForDeclNoCache | ( | const Decl * | D | ) | const |
Return the documentation comment attached to a given declaration, without looking into cache.
Definition at line 300 of file ASTContext.cpp.
References Comments, CommentsLoaded, clang::RawCommentList::empty(), ExternalSource, clang::RawCommentList::getCommentsInFile(), getDeclLocForCommentSearch(), clang::SourceManager::getDecomposedLoc(), getRawCommentForDeclNoCacheImpl(), clang::SourceLocation::isFileID(), and clang::SourceLocation::isInvalid().
Referenced by getLocalCommentForDeclUncached(), and getRawCommentForAnyRedecl().
RawComment * ASTContext::getRawCommentForDeclNoCacheImpl | ( | const Decl * | D, |
const SourceLocation | RepresentativeLocForDecl, | ||
const std::map< unsigned, RawComment *> & | CommentsInFile | ||
) | const |
CommentsInFile
for doc comment for D
.RepresentativeLocForDecl
is used as a location for searching doc comments. CommentsInFile
is a mapping offset -> comment of files in the same file where RepresentativeLocForDecl
is.
Definition at line 222 of file ASTContext.cpp.
References clang::LangOptions::CommentOpts, Comments, clang::SourceManager::getBufferData(), clang::RawCommentList::getCommentBeginLine(), clang::RawCommentList::getCommentEndOffset(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getLineNumber(), clang::RawComment::isDocumentation(), clang::SourceLocation::isFileID(), clang::SourceLocation::isInvalid(), clang::RawComment::isTrailingComment(), clang::CommentOptions::ParseAllComments, and Text.
Referenced by attachCommentsToJustParsedDecls(), and getRawCommentForDeclNoCache().
|
inline |
Definition at line 794 of file ASTContext.h.
Return a read_only pipe type for the specified type.
Definition at line 4083 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 10385 of file ASTContext.cpp.
References clang::TransferrableTargetInfo::Double, DoubleTy, clang::TransferrableTargetInfo::Float, clang::TransferrableTargetInfo::Float128, Float128Ty, FloatTy, clang::TargetInfo::getRealTypeByWidth(), getTargetInfo(), clang::TransferrableTargetInfo::LongDouble, LongDoubleTy, and clang::TransferrableTargetInfo::NoFloat.
QualType ASTContext::getRecordType | ( | const RecordDecl * | Decl | ) | const |
Definition at line 4169 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::interp::InterpFrame::describe(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::emitDeclareSimdFunction(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitPreserveStructAccess(), emitReduceFiniFunction(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), evaluateCDTSize(), clang::interp::EvalEmitter::fallthrough(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), 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 1175 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 3257 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by alignReferenceTypes(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), getAutoRRefDeductType(), clang::ObjCMessageExpr::getCallReturnType(), getDecltypeForExpr(), clang::TypeName::getFullyQualifiedType(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), clang::ento::ExprEngine::handleLValueBitCast(), clang::InitializationSequence::Perform(), and TryClassUnification().
|
inline |
Definition at line 726 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 10353 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1791 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 5771 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 5256 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
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 5272 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 5250 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::parseFormatStringHasFormattingSpecifiers().
|
inline |
Definition at line 679 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::createOffloadEntriesAndInfoMetadata(), clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), disambiguateSpellingInScope(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::DeclContext::dumpLookups(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), emitBody(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CodeGenModule::emitOpenMPDeviceFunctionRedefinition(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::tooling::findSelectedASTNodes(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), getAsmSrcLocInfo(), clang::ASTWriter::getDeclID(), clang::diff::SyntaxTree::Impl::getDeclValue(), getEnclosingStmtLocation(), clang::cross_tu::CrossTranslationUnitContext::getImportedFromSourceLocation(), getLiteralInfo(), clang::cross_tu::CrossTranslationUnitContext::getLookupName(), clang::getParameterABISpelling(), clang::tooling::getRangeForEdit(), 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(), isCXXSharedPtrDtor(), clang::ento::AnalysisManager::isInCodeFile(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::LastprivateConditionalRAII(), LocPropertyAttribute(), LookThroughTransitiveAssignmentsAndCommaOperators(), clang::Sema::makeUnavailableInSystemHeader(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), clang::PrettyDeclStackTraceEntry::print(), clang::index::FileIndexRecord::print(), printExprAsWritten(), shouldReportOccurrenceForSystemDeclOnlyMode(), and clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody().
|
inline |
Definition at line 680 of file ASTContext.h.
unsigned ASTContext::getStaticLocalNumber | ( | const VarDecl * | VD | ) | const |
Definition at line 10418 of file ASTContext.cpp.
Return a type for a constant array for a string literal of the specified element type and length.
Definition at line 10490 of file ASTContext.cpp.
References adjustStringLiteralBaseType(), clang::CPlusPlus, getConstantArrayType(), getLangOpts(), clang::ArrayType::Normal, and clang::QualType::withConst().
Referenced by getDecayedSourceLocExprType(), and getPredefinedStringLiteralFromCache().
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateTemplateParmDecl * | param, |
TemplateName | replacement | ||
) | const |
Definition at line 7998 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 8016 of file ASTContext.cpp.
References IntTy, LongLongTy, LongTy, clang::TransferrableTargetInfo::NoInt, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::SubstTemplateTemplateParmPackStorage::Profile(), ShortTy, clang::TransferrableTargetInfo::SignedChar, SignedCharTy, clang::TransferrableTargetInfo::SignedInt, clang::TransferrableTargetInfo::SignedLong, clang::TransferrableTargetInfo::SignedLongLong, clang::TransferrableTargetInfo::SignedShort, clang::TransferrableTargetInfo::UnsignedChar, UnsignedCharTy, clang::TransferrableTargetInfo::UnsignedInt, UnsignedIntTy, clang::TransferrableTargetInfo::UnsignedLong, clang::TransferrableTargetInfo::UnsignedLongLong, UnsignedLongLongTy, UnsignedLongTy, clang::TransferrableTargetInfo::UnsignedShort, and UnsignedShortTy.
Referenced by clang::ASTImporter::Import().
QualType ASTContext::getSubstTemplateTypeParmPackType | ( | const TemplateTypeParmType * | Replaced, |
const TemplateArgument & | ArgPack | ||
) |
Retrieve a.
Definition at line 4239 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 4217 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 5240 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by BuildImplicitMemberInitializer(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::DeriveThisType(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenFunction::emitImplicitAssignmentOperatorBody(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), isSafeToConvert(), clang::Sema::PerformImplicitConversion(), and clang::CodeGen::CodeGenTypes::UpdateCompletedType().
|
inline |
Definition at line 2557 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::CodeGenModule::createUnnamedGlobalFrom(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitDeclDestroy(), emitInterWarpCopyFunction(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), GenerateStringLiteral(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getAddressOfLocalVariable(), clang::CodeGen::ConstantEmitter::getCurrentAddrPrivate(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getDefaultFirstprivateAddressSpace(), 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(), requiresAMDGPUDefaultVisibility(), roundUpSizeToCharAlignment(), and supportsLightweightRuntime().
|
inline |
Definition at line 2561 of file ASTContext.h.
References clang::Qualifiers::getAddressSpace().
unsigned ASTContext::getTargetAddressSpace | ( | LangAS | AS | ) | const |
Definition at line 10714 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 2441 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 707 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnPragmaOptionsAlign(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), clang::arcmt::trans::canApplyWeak(), canPassInRegisters(), clang::ento::SMTConstraintManager::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::interp::Context::getCharBit(), clang::interp::ByteCodeExprGen< Emitter >::getCharBit(), clang::Sema::getCudaConfigureFuncName(), getDeclAlign(), getDefaultCallingConvention(), getFixedPointIBits(), getFixedPointScale(), getFixedPointSemantics(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), getIntTypeForBitwidth(), getLangASForBuiltinAddressSpace(), clang::cross_tu::CrossTranslationUnitContext::getLookupName(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getMSMemberPointerSlots(), getObjCEncodingForPrimitiveType(), getOpenMPDefaultSimdAlign(), clang::CodeGen::getOrCreateThreadPrivateCache(), getPaddingDiagFromTagKind(), getRealTypeForBitwidth(), getTargetDefaultAlignForAttributeAligned(), getTargetNullPointerValue(), getTypeInfo(), getTypeInfoLinkage(), clang::FloatingLiteral::getValueAsApproximateDouble(), handleMSPointerTypeQualifierAttr(), HandleNeonVectorTypeAttr(), clang::BackendConsumer::HandleTranslationUnit(), hasNewExtendedAlignment(), clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::CodeGen::initializationPatternFor(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), isArc4RandomAvailable(), isArithmeticArgumentPromotion(), 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::parseFormatStringHasFormattingSpecifiers(), clang::Sema::PerformImplicitConversion(), ReferenceDllExportedMembers(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), clang::CodeGen::CodeGenFunction::StartFunction(), 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 10704 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(), requiresAMDGPUDefaultVisibility(), and clang::APValue::toIntegralConstant().
ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo | ( | const VarDecl * | Var | ) |
Definition at line 1544 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 4352 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 4327 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 4306 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 4275 of file ASTContext.cpp.
Referenced by clang::TemplateTypeParmDecl::Create().
|
inline |
Definition at line 1009 of file ASTContext.h.
Referenced by clang::Sema::ActOnPragmaMSComment(), AddLazyVectorDecls(), clang::ASTImporter::ASTImporter(), canonicalizeImmediatelyDeclaredConstraint(), 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::ExternalASTMerger::ExternalASTMerger(), 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(), getExternCContextDecl(), clang::cross_tu::CrossTranslationUnitContext::getLookupName(), getObjCProtocolDecl(), clang::tooling::USRSymbolRenamer::HandleTranslationUnit(), hasSuperInitCall(), clang::cross_tu::CrossTranslationUnitContext::importDefinition(), InventTemplateParameter(), isBisonFile(), lookupStdNamespace(), 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 572 of file ASTContext.h.
References Traversal.
Referenced by clang::TraversalKindScope::TraversalKindScope().
|
inline |
Definition at line 638 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 2812 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(), clang::TemplateDeclInstantiator::adjustForRewrite(), BuildImplicitBaseInitializer(), buildPostUpdate(), clang::Sema::BuildPseudoDestructorExpr(), buildVarDecl(), canonicalizeImmediatelyDeclaredConstraint(), castForMoving(), CastForMoving(), CheckDeducedPlaceholderConstraints(), checkTupleLikeDecomposition(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), ConstructTransparentUnion(), clang::OMPCapturedExprDecl::Create(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), emitOutlinedFunctionPrologue(), 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 2135 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 2136 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 1879 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 2388 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
Referenced by AddDirectArgument(), AtomicUsesUnsupportedLibcall(), classifyType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), createConstantGlobalStructAndAddToParent(), emitGlobalToListCopyFunction(), emitInterWarpCopyFunction(), emitListToGlobalCopyFunction(), 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::Sema::isOpenMPCapturedByRef(), isTrivialFiller(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), performTypeAdjustment(), and roundUpSizeToCharAlignment().
Definition at line 2391 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1417 of file ASTContext.h.
References Depth.
Referenced by CheckImplicitConversion(), compareOverloads(), 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(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), getInjectedTemplateArg(), getPaddingDiagFromTagKind(), getTagDeclType(), getThisObjectType(), 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(), TryObjectArgumentInitialization(), and TryStaticMemberPointerUpcast().
TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl | ( | const TagDecl * | TD | ) |
Definition at line 10466 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 4156 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 1903 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::Auto, getAdjustedType(), clang::ASTRecordLayout::getAlignment(), getASTObjCInterfaceLayout(), getASTRecordLayout(), clang::EnumDecl::getIntegerType(), getKind(), getLangOpts(), clang::Decl::getMaxAlignment(), getOpenCLTypeKind(), clang::ASTRecordLayout::getSize(), getTargetAddressSpace(), getTargetInfo(), getTypeAlign(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), getUnderlyingType(), 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 2098 of file ASTContext.h.
References getTypeInfo(), and clang::QualType::getTypePtr().
Referenced by getTypeInfo().
Definition at line 1821 of file ASTContext.cpp.
References clang::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 1858 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(), and roundUpSizeToCharAlignment().
Definition at line 1867 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 5026 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 5060 of file ASTContext.cpp.
References getCanonicalType(), and clang::TypeAlignment.
BuiltinTemplateDecl * ASTContext::getTypePackElementDecl | ( | ) | const |
Definition at line 1266 of file ASTContext.cpp.
References clang::BTK__type_pack_element, buildBuiltinTemplateDecl(), and getTypePackElementName().
|
inline |
Definition at line 1747 of file ASTContext.h.
References clang::IdentifierTable::get().
Referenced by getTypePackElementDecl().
|
inline |
Definition at line 1104 of file ASTContext.h.
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 2104 of file ASTContext.h.
References clang::TypeInfo::Width.
Referenced by addBaseAndFieldSizes(), BitsContainNoUserData(), buildMemcpyForAssignmentOp(), canConvertIntTyToFloatTy(), canPassInRegisters(), clang::Sema::CheckGNUVectorConditionalTypes(), CheckImplicitConversion(), checkIntToPointerCast(), checkOpenMPLoop(), checkVectorResult(), checkVectorShift(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), DiagnoseBadShiftValues(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseForRangeConstVariableCopies(), 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(), getAArch64LS(), getAArch64PBV(), getAlignOfGlobalVar(), getBytesReturnedByAllocSizeCall(), clang::ento::SMTConv::getCastExpr(), GetCFNumberSize(), getDeclAlign(), getFieldSize(), getFixedPointSemantics(), GetGCAttrTypeForType(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), getTypeString(), clang::ento::SMTConv::getZeroExpr(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), HandleNeonVectorTypeAttr(), hasUniqueObjectRepresentations(), IgnoreNoopCastsSingleStep(), clang::Sema::Initialize(), is32Or64BitBasicType(), isArithmeticArgumentPromotion(), isIntegerLikeType(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isRecordWithSSEVectorType(), IsSizeGreaterThan128(), isSSEVectorType(), isZeroSized(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), OpenCLConvertScalarsToVectors(), RecoverCastedSymbol(), rewriteInputConstraintReferences(), rewriteToNumericBoxedExpression(), roundUpSizeToCharAlignment(), supportsNilWithFloatRet(), tryGCCVectorConvertAndSplat(), TryReinterpretCast(), and widenIterationCount().
|
inline |
Definition at line 2105 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 2379 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(), DiagnoseBadFunctionCast(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitCXXNewAllocSize(), EmitDeclInvariant(), emitInterWarpCopyFunction(), EmitISOVolatileLoad(), EmitISOVolatileStore(), 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(), clang::CodeGen::emitUserDefinedMapper(), evenFlexibleArraySize(), findPeephole(), 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(), getTypeString(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), hasNonTrivialConstructorCall(), isOnePastTheEndOfCompleteObject(), clang::Sema::isOpenMPCapturedByRef(), isRecordWithSSEVectorType(), isSimpleZero(), isTrivialFiller(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), isValidBaseType(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), clang::CodeGen::registerTargetFirstprivateCopy(), clang::CodeGen::registerTargetGlobalVariable(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), shuffleAndStore(), tryEmitFMulAdd(), and Write__ivar_list_t_initializer().
Definition at line 2382 of file ASTContext.cpp.
References getTypeInfoInChars().
Definition at line 2123 of file ASTContext.h.
References clang::Type::isDependentType(), and clang::Type::isIncompleteType().
Definition at line 2129 of file ASTContext.h.
|
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 2143 of file ASTContext.h.
References getDeclAlign(), and clang::QualType::getTypePtr().
Referenced by getTypeUnadjustedAlignInChars().
unsigned ASTContext::getTypeUnadjustedAlign | ( | const Type * | T | ) | const |
Definition at line 2335 of file ASTContext.cpp.
References clang::Type::getAs(), getASTObjCInterfaceLayout(), getASTRecordLayout(), getTypeAlign(), clang::ASTRecordLayout::getUnadjustedAlignment(), clang::Type::getUnqualifiedDesugaredType(), 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 2398 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
Definition at line 2401 of file ASTContext.cpp.
References getTypeUnadjustedAlign(), and toCharUnitsFromBits().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 1803 of file ASTContext.h.
Referenced by AddLazyVectorDecls().
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 1305 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 5266 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
QualType ASTContext::getUIntPtrType | ( | ) | const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 5288 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitOutlinedFunctionPrologue(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), getAArch64LS(), 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 5102 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 5333 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::FindCompositePointerType(), clang::Sema::handlerCanCatch(), hasCvrSimilarType(), hasSimilarType(), shouldBeModeledWithNoOp(), TryReferenceInitialization(), TryReferenceListInitialization(), and withoutUnaligned().
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
Definition at line 1993 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 5301 of file ASTContext.cpp.
References clang::Target.
Referenced by clang::analyze_scanf::ScanfSpecifier::getArgType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
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 5279 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 7841 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 3377 of file ASTContext.cpp.
References clang::Auto, clang::transformer::cat(), 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 3513 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 3647 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckGNUVectorConditionalTypes(), convertVector(), getCorrespondingUnsignedType(), and HandleNeonVectorTypeAttr().
Return the uniqued reference to the type for a volatile
qualified type.
The resulting type has a union of the qualifiers from T
and volatile
.
Definition at line 1184 of file ASTContext.h.
References clang::QualType::withFastQualifiers().
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 10321 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 1585 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 1590 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 1604 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 4087 of file ASTContext.cpp.
Referenced by HandleOpenCLAccessAttr().
|
inline |
Definition at line 730 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::imbueXRayAttrs().
Determine if two types are similar, ignoring only CVR qualifiers.
Definition at line 5478 of file ASTContext.cpp.
References getUnqualifiedArrayType(), hasSameType(), clang::Qualifiers::removeCVRQualifiers(), and UnwrapSimilarTypes().
Referenced by TryConstCast().
Return true if the type has been explicitly qualified with ObjC ownership.
A type may be implicitly qualified with ownership under ObjC ARC, and in some cases the compiler treats these differently.
Definition at line 8128 of file ASTContext.cpp.
References Paren.
Referenced by handleObjCOwnershipTypeAttr().
Determine whether two function types are the same, ignoring exception specifications in cases where they're part of the type.
Definition at line 3009 of file ASTContext.cpp.
References clang::EST_None, getFunctionTypeWithExceptionSpec(), getLangOpts(), and hasSameType().
Referenced by isSameEntity().
Determine whether two function types are the same, ignoring pointer sizes in the return type and parameter types.
Definition at line 3034 of file ASTContext.cpp.
References getFunctionTypeWithoutPtrSizes(), and hasSameType().
|
inline |
Definition at line 2350 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 5594 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 2321 of file ASTContext.h.
Referenced by areCompatibleVectorTypes(), buildCounterInit(), buildCounterUpdate(), buildDeclareReductionRef(), buildUserDefinedMapperRef(), castToBase(), clang::Sema::CheckARCMethodDecl(), checkConditionalPointerCompatibility(), clang::Sema::CheckGNUVectorConditionalTypes(), clang::Sema::CheckImplementationIvars(), checkLiteralOperatorTemplateParameterList(), checkOpenCLPipePacketType(), ClassImplementsAllMethodsAndProperties(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::computeDeclContext(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArguments(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnosePropertyAccessorMismatch(), EvaluateBinaryTypeTrait(), clang::Sema::FindCompositePointerType(), forEachMultiversionedFunctionVersion(), getFixedEnumPromtion(), hasCompatibleArrayTypes(), hasCvrSimilarType(), hasSameFunctionTypeIgnoringExceptionSpec(), hasSameFunctionTypeIgnoringPtrSizes(), hasSimilarType(), isLayoutCompatible(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), IsStandardConversion(), clang::ASTImporter::IsStructurallyEquivalent(), loadToBegin(), MatchTemplateParameterKind(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), rewriteToNumberLiteral(), sameObjCTypeArgs(), TryAddressSpaceCast(), TryConstructorInitialization(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), and typesAreCompatible().
Definition at line 2324 of file ASTContext.h.
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 2345 of file ASTContext.h.
Referenced by AddSuperSendCompletion(), AnalyzeComparison(), areCompatibleVectorTypes(), clang::Sema::BuildPseudoDestructorExpr(), checkArithmeticOrEnumeralThreeWayCompare(), checkEnumArithmeticConversions(), CheckMoveOnConstruction(), clang::Sema::CheckPointerToMemberOperands(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), CopyObject(), createObjCPropertyGetter(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseBadFunctionCast(), DiagnoseDivisionSizeofPointerOrArray(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitAtomicCmpXchgForMSIntrin(), EmitBinaryAtomicPost(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), findPeephole(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::getDeclUsageType(), GetIntrinsic(), getParamType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::Sema::handlerCanCatch(), hasCopyOrMoveCtorParam(), IgnoreNoopCastsSingleStep(), clang::InitializationSequence::InitializeFrom(), isBlockVarRef(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), IsVectorConversion(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::Sema::PerformImplicitConversion(), clang::Sema::ProcessPropertyDecl(), clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), 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 5466 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 2617 of file ASTContext.cpp.
References clang::Type::castAs(), 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 1317 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 1871 of file ASTContext.cpp.
References clang::TypeInfo::AlignIsRequired, and getTypeInfo().
Referenced by clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), isAlignmentRequired(), and isVarDeclStrongDefinition().
Definition at line 1875 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 6451 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 10316 of file ASTContext.cpp.
Definition at line 2597 of file ASTContext.h.
Definition at line 2593 of file ASTContext.h.
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 2084 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying(), and buildByrefHelpers().
Definition at line 2601 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 5954 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 2702 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 3178 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 2699 of file ASTContext.h.
References clang::Type::isSignedIntegerOrEnumerationType().
Referenced by getTrivialIntegralTemplateArgument(), and clang::APValue::toIntegralConstant().
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 1157 of file ASTContext.cpp.
References getASTMutationListener(), clang::Decl::getCanonicalDecl(), Listener, and clang::ASTMutationListener::RedefinedHiddenDefinition().
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 9331 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 8788 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 8807 of file ASTContext.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, FloatTy, clang::Type::getAs(), getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), clang::FunctionType::ExtInfo::getNoCallerSavedRegs(), clang::FunctionType::ExtInfo::getNoCfCheck(), clang::FunctionType::ExtInfo::getNoReturn(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getReturnType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::FunctionProtoType::hasExceptionSpec(), clang::QualType::hasQualifiers(), clang::QualType::isNull(), 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 9385 of file ASTContext.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::getAddressSpace(), getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::getFunctionExtInfo(), getFunctionType(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::QualType::getTypePtr(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
QualType ASTContext::mergeTransparentUnionType | ( | QualType | T, |
QualType | SubType, | ||
bool | OfBlockPointer = false , |
||
bool | Unqualified = false |
||
) |
mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType()
Definition at line 8768 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 9006 of file ASTContext.cpp.
References areCompatVectorTypes(), clang::Auto, canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Type::castAs(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), clang::Qualifiers::getAsOpaqueValue(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), getLangOpts(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), getPointerType(), clang::QualType::getQualifiers(), clang::ConstantArrayType::getSize(), clang::ConstantArrayType::getSizeExpr(), 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 10674 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 4904 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().
Referenced by CheckObjCBridgeNSCast().
bool ASTContext::ObjCQualifiedClassTypesAreCompatible | ( | const ObjCObjectPointerType * | lhs, |
const ObjCObjectPointerType * | rhs | ||
) |
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
Definition at line 8169 of file ASTContext.cpp.
References clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces().
bool ASTContext::ObjCQualifiedIdTypesAreCompatible | ( | const ObjCObjectPointerType * | lhs, |
const ObjCObjectPointerType * | rhs, | ||
bool | compare | ||
) |
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
Definition at line 8187 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::ObjCObjectPointerType::isObjCClassType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedClassType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), clang::ObjCObjectPointerType::qual_empty(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), and isObjCTypeSubstitutable().
|
delete |
ASTContext::overridden_method_range ASTContext::overridden_methods | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1647 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 1631 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 1636 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 1641 of file ASTContext.cpp.
References overridden_methods().
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 1096 of file ASTContext.cpp.
Definition at line 8757 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 8157 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 4923 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 2884 of file ASTContext.cpp.
References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasAddressSpace(), clang::Qualifiers::hasNonFastQualifiers(), clang::Qualifiers::removeAddressSpace(), and clang::QualifierCollector::strip().
Referenced by handleMSPointerTypeQualifierAttr(), clang::Sema::PerformImplicitConversion(), RemoveAddressSpaceFromPtr(), removePtrSizeAddrSpace(), and TryAddressSpaceCast().
Remove the existing address space on the type if it is a pointer size address space and return the type with qualifiers intact.
Definition at line 2933 of file ASTContext.cpp.
References clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), getPointerType(), clang::isPtrSizeAddressSpace(), and removeAddrSpaceQualType().
Referenced by getFunctionTypeWithoutPtrSizes().
void ASTContext::ResetObjCLayout | ( | const ObjCContainerDecl * | CD | ) |
Definition at line 9378 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 1095 of file ASTContext.h.
Referenced by clang::CompilerInstance::createASTReader().
Set the copy initialization expression of a block var decl.
CanThrow
indicates whether the copy expression can throw or not.
Definition at line 2790 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by checkEscapingByref().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 1910 of file ASTContext.h.
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 6230 of file ASTContext.cpp.
References clang::Type::castAs(), and clang::RecordType::getDecl().
|
inline |
Definition at line 1291 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 1092 of file ASTContext.cpp.
References ExternalSource.
Referenced by clang::CompilerInstance::createASTReader(), and clang::CompilerInstance::createPCHExternalASTSource().
|
inline |
Set the type for the C FILE type.
Definition at line 1764 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 1554 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1620 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 1581 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1605 of file ASTContext.cpp.
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1774 of file ASTContext.h.
void ASTContext::setManglingNumber | ( | const NamedDecl * | ND, |
unsigned | Number | ||
) |
Definition at line 10403 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 3135 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 1681 of file ASTContext.h.
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 7861 of file ASTContext.cpp.
References getObjCInterfaceType().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1668 of file ASTContext.h.
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 2741 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 2748 of file ASTContext.cpp.
void ASTContext::setObjCMethodRedeclaration | ( | const ObjCMethodDecl * | MD, |
const ObjCMethodDecl * | Redecl | ||
) |
Definition at line 2759 of file ASTContext.cpp.
References getObjCMethodRedeclaration().
Referenced by clang::ObjCMethodDecl::setAsRedeclaration().
|
inline |
Definition at line 1655 of file ASTContext.h.
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1694 of file ASTContext.h.
|
inline |
Definition at line 1632 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 10479 of file ASTContext.cpp.
Referenced by clang::ParmVarDecl::hasDefaultArg().
Definition at line 975 of file ASTContext.h.
|
inline |
Definition at line 675 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1786 of file ASTContext.h.
void ASTContext::setStaticLocalNumber | ( | const VarDecl * | VD, |
unsigned | Number | ||
) |
Definition at line 10413 of file ASTContext.cpp.
Referenced by clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1564 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
|
inline |
Definition at line 573 of file ASTContext.h.
Referenced by clang::TraversalKindScope::TraversalKindScope(), and clang::TraversalKindScope::~TraversalKindScope().
void ASTContext::setTraversalScope | ( | const std::vector< Decl *> & | TopLevelDecls | ) |
Definition at line 1082 of file ASTContext.cpp.
|
inline |
Set the type for the C ucontext_t type.
Definition at line 1798 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 2373 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 2368 of file ASTContext.cpp.
References clang::CharUnits::fromQuantity(), and getCharWidth().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), DumpRecordLayout(), emitAddrOfZeroSizeField(), 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 102 of file ASTContext.cpp.
Referenced by traverseIgnored().
ast_type_traits::DynTypedNode ASTContext::traverseIgnored | ( | const ast_type_traits::DynTypedNode & | N | ) | const |
Definition at line 122 of file ASTContext.cpp.
References clang::ast_type_traits::DynTypedNode::create(), clang::ast_type_traits::DynTypedNode::get(), and traverseIgnored().
Definition at line 8761 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 8749 of file ASTContext.cpp.
References clang::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 5392 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 5430 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(), clang::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 429 of file ASTContext.h.
|
friend |
Definition at line 3004 of file ASTContext.h.
|
friend |
Definition at line 3005 of file ASTContext.h.
|
friend |
Definition at line 169 of file ASTContext.h.
|
friend |
Definition at line 428 of file ASTContext.h.
CanQualType clang::ASTContext::AccumTy |
Definition at line 1029 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 1047 of file ASTContext.h.
Referenced by InitBuiltinTypes().
|
mutable |
Definition at line 1064 of file ASTContext.h.
Referenced by getAutoDeductType().
|
mutable |
Definition at line 1065 of file ASTContext.h.
Referenced by getAutoRRefDeductType().
CanQualType clang::ASTContext::BoolTy |
Definition at line 1017 of file ASTContext.h.
Referenced by clang::Sema::ActOnNoexceptSpec(), clang::TemplateDeclInstantiator::adjustForRewrite(), 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(), getFloatingTypeSemanticOrder(), GetIntrinsic(), clang::concepts::ExprRequirement::ReturnTypeRequirement::getTypeConstraint(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and TryContextuallyConvertToBool().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 1045 of file ASTContext.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), 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 582 of file ASTContext.h.
Referenced by canBuiltinBeRedeclared(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), emitReplacement(), GetBuiltinType(), and clang::CallExpr::isUnevaluatedBuiltinCall().
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(), getDecayedSourceLocExprType(), getFloatingTypeSemanticOrder(), getPredefinedStringLiteralFromCache(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtOffloadEntryQTy(), InitBuiltinTypes(), isArithmeticArgumentPromotion(), and clang::ento::ExprEngine::VisitArraySubscriptExpr().
Keeps track of redeclaration chains that don't have any comment attached.
Mapping from canonical declaration to redeclaration chain that has no comments attached to any redeclaration. Specifically it's mapping to the last redeclaration we've checked.
Shall not contain declarations that have comments attached to any redeclaration in their chain.
Definition at line 766 of file ASTContext.h.
Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 741 of file ASTContext.h.
Referenced by attachCommentsToJustParsedDecls(), getRawCommentForDeclNoCache(), and getRawCommentForDeclNoCacheImpl().
True if comments are already loaded from ExternalASTSource.
Definition at line 744 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 2055 of file ASTContext.h.
|
mutable |
Definition at line 583 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::TemplateDeclInstantiator::adjustForRewrite(), BuildCookedLiteralOperatorCall(), checkMappableExpressionList(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), findImplicitlyDeclaredEqualityComparisons(), clang::ASTImporter::Import(), parseOpenMPReductionId(), resolveAllocationOverload(), and resolveBuiltinNewDeleteOverload().
|
mutable |
Mapping from declaration to directly attached comment.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 750 of file ASTContext.h.
Referenced by attachCommentsToJustParsedDecls(), cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
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::parseFormatStringHasFormattingSpecifiers(), and supportsNilWithFloatRet().
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource |
Definition at line 584 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::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), clang::Sema::PerformImplicitConversion(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::FractTy |
Definition at line 1032 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::HalfTy |
Definition at line 1040 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), InitBuiltinTypes(), needsConversionOfHalfVec(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 580 of file ASTContext.h.
Referenced by clang::Sema::ActOnCompoundRequirement(), AllTrivialInitializers(), buildCapture(), buildMemcpyForAssignmentOp(), clang::CodeGen::CGCXXABI::buildThisParam(), CheckKeyForObjCARCConversion(), checkMappableExpressionList(), 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 getFloatingTypeSemanticOrder(), 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(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitRTtypeidCall(), emitTaskDupFunction(), evaluateCDTSize(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), GetDeclSpecTypeForDeclarator(), getFloatingTypeSemanticOrder(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getObjCEncodingTypeSize(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), hasDefaultCXXMethodCC(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isArithmeticArgumentPromotion(), isOverflowingIntegerType(), isPromotableBitField(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), mayBeSuccess(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), rewriteToNumericBoxedExpression(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
ASTMutationListener* clang::ASTContext::Listener = nullptr |
Definition at line 585 of file ASTContext.h.
Referenced by mergeDefinitionIntoModule().
CanQualType clang::ASTContext::LongAccumTy |
Definition at line 1029 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), and 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::parseFormatStringHasFormattingSpecifiers(), and supportsNilWithFloatRet().
CanQualType clang::ASTContext::LongFractTy |
Definition at line 1032 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 1025 of file ASTContext.h.
Referenced by ComputeVMIClassTypeInfoFlags(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeSemanticOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), 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(), getFloatingTypeSemanticOrder(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), clang::Sema::Initialize(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 1044 of file ASTContext.h.
Referenced by DeduceNullPtrTemplateArgument(), and InitBuiltinTypes().
unsigned clang::ASTContext::NumImplicitCopyAssignmentOperators = 0 |
The number of implicitly-declared copy assignment operators.
Definition at line 2886 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared = 0 |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 2890 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitCopyConstructors = 0 |
The number of implicitly-declared copy constructors.
Definition at line 2872 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitCopyConstructorsDeclared = 0 |
The number of implicitly-declared copy constructors for which declarations were built.
Definition at line 2876 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitDefaultConstructors = 0 |
The number of implicitly-declared default constructors.
Definition at line 2865 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitDefaultConstructorsDeclared = 0 |
The number of implicitly-declared default constructors for which declarations were built.
Definition at line 2869 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitDestructors = 0 |
The number of implicitly-declared destructors.
Definition at line 2900 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitDestructorsDeclared = 0 |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 2904 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitMoveAssignmentOperators = 0 |
The number of implicitly-declared move assignment operators.
Definition at line 2893 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared = 0 |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 2897 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitMoveConstructors = 0 |
The number of implicitly-declared move constructors.
Definition at line 2879 of file ASTContext.h.
unsigned clang::ASTContext::NumImplicitMoveConstructorsDeclared = 0 |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 2883 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(), TryAddressSpaceCast(), clang::Sema::tryExprAsCall(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), and TryStaticMemberPointerUpcast().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 770 of file ASTContext.h.
Referenced by attachCommentsToJustParsedDecls(), and getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 1047 of file ASTContext.h.
Referenced by BuildMSPropertyRefExpr(), InitBuiltinTypes(), and LookupMemberExpr().
Mapping from canonical declaration to the first redeclaration in chain that has a comment attached.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 757 of file ASTContext.h.
Referenced by cacheRawCommentForDecl(), and getRawCommentForAnyRedecl().
CanQualType clang::ASTContext::SatAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatLongFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortAccumTy |
Definition at line 1034 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::SatShortFractTy |
Definition at line 1037 of file ASTContext.h.
Referenced by getCorrespondingSaturatedType(), getCorrespondingSignedFixedPointType(), 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 3059 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), and clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 581 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 getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ShortFractTy |
Definition at line 1032 of file ASTContext.h.
Referenced by getCorrespondingSignedFixedPointType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ShortTy |
Definition at line 1025 of file ASTContext.h.
Referenced by emitShuffleAndReduceFunction(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeSemanticOrder(), getSubstTemplateTemplateParmPack(), InitBuiltinTypes(), isValidBaseType(), clang::analyze_format_string::ArgType::matchesType(), and clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers().
CanQualType clang::ASTContext::SignedCharTy |
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::parseFormatStringHasFormattingSpecifiers(), 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(), getDecayedSourceLocExprType(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getPromotedIntegerType(), getSubstTemplateTemplateParmPack(), getUnsignedWCharType(), InitBuiltinTypes(), clang::Sema::Initialize(), isArithmeticArgumentPromotion(), isPromotableBitField(), clang::analyze_format_string::ArgType::matchesType(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), 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::parseFormatStringHasFormattingSpecifiers(), 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::parseFormatStringHasFormattingSpecifiers(), 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::parseFormatStringHasFormattingSpecifiers(), and roundUpSizeToCharAlignment().
|
mutable |
Definition at line 1069 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::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(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), clang::CodeGen::emitKmpRoutineEntryT(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitOffloadingArrays(), 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::emitUserDefinedMapper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), getBlockDescriptorExtendedType(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getObjCEncodingTypeSize(), clang::analyze_format_string::ArgType::getRepresentativeType(), 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::CodeGenTypes::DeriveThisType(), clang::CodeGen::CodeGenFunction::EmitCfiCheckFail(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::emitDeclareTargetVarDefinition(), emitGlobalDtorWithCXAAtExit(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), emitOutlinedFunctionPrologue(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReductionCombiner(), clang::CodeGen::emitRequiresDirectiveRegFun(), emitShuffleAndReduceFunction(), emitStructSetterCall(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::emitUserDefinedMapper(), 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::parseFormatStringHasFormattingSpecifiers().
CanQualType clang::ASTContext::WIntTy |
Definition at line 1021 of file ASTContext.h.
Referenced by InitBuiltinTypes().