clang
3.7.0
|
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More...
#include <ASTContext.h>
Classes | |
class | RawCommentAndCacheFlags |
struct | SectionInfo |
Public Types | |
enum | GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext } |
enum | PragmaSectionFlag : unsigned { PSF_None = 0, PSF_Read = 0x1, PSF_Write = 0x2, PSF_Execute = 0x4, PSF_Implicit = 0x8, PSF_Invalid = 0x80000000U } |
typedef llvm::PointerUnion < VarTemplateDecl *, MemberSpecializationInfo * > | TemplateOrSpecializationInfo |
A type synonym for the TemplateOrInstantiation mapping. More... | |
typedef llvm::SmallVector < ast_type_traits::DynTypedNode, 2 > | ParentVector |
Contains parents of a node. More... | |
typedef llvm::DenseMap< const void *, llvm::PointerUnion < ast_type_traits::DynTypedNode *, ParentVector * > > | ParentMap |
Maps from a node to its parents. More... | |
typedef CXXMethodVector::const_iterator | overridden_cxx_method_iterator |
typedef llvm::iterator_range < import_iterator > | import_range |
typedef llvm::iterator_range < SmallVectorImpl< Type * > ::const_iterator > | type_const_range |
Public Member Functions | |
template<typename NodeT > | |
ArrayRef < ast_type_traits::DynTypedNode > | getParents (const NodeT &Node) |
Returns the parents of the given node. More... | |
ArrayRef < ast_type_traits::DynTypedNode > | 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 |
void | Deallocate (void *Ptr) const |
size_t | getASTAllocatedMemory () const |
size_t | getSideTableAllocatedMemory () const |
Return the total memory used for various side tables. More... | |
PartialDiagnostic::StorageAllocator & | getDiagAllocator () |
const TargetInfo & | getTargetInfo () const |
QualType | getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const |
QualType | getRealTypeForBitwidth (unsigned DestWidth) const |
bool | AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const |
const LangOptions & | getLangOpts () const |
const SanitizerBlacklist & | getSanitizerBlacklist () const |
DiagnosticsEngine & | getDiagnostics () const |
FullSourceLoc | getFullLoc (SourceLocation Loc) const |
RawComment * | getRawCommentForDeclNoCache (const Decl *D) const |
Return the documentation comment attached to a given declaration, without looking into cache. More... | |
RawCommentList & | getRawCommentList () |
void | addComment (const RawComment &RC) |
const RawComment * | getRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const |
Return the documentation comment attached to a given declaration. Returns NULL if no comment is attached. More... | |
comments::FullComment * | getCommentForDecl (const Decl *D, const Preprocessor *PP) const |
comments::FullComment * | getLocalCommentForDeclUncached (const Decl *D) const |
comments::FullComment * | cloneFullComment (comments::FullComment *FC, const Decl *D) const |
comments::CommandTraits & | getCommentCommandTraits () const |
AttrVec & | getDeclAttrs (const Decl *D) |
Retrieve the attributes for the given declaration. More... | |
void | eraseDeclAttrs (const Decl *D) |
Erase the attributes corresponding to the given declaration. More... | |
MemberSpecializationInfo * | getInstantiatedFromStaticDataMember (const VarDecl *Var) |
If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated. More... | |
TemplateOrSpecializationInfo | getTemplateOrSpecializationInfo (const VarDecl *Var) |
FunctionDecl * | getClassScopeSpecializationPattern (const FunctionDecl *FD) |
void | setClassScopeSpecializationPattern (FunctionDecl *FD, FunctionDecl *Pattern) |
void | setInstantiatedFromStaticDataMember (VarDecl *Inst, VarDecl *Tmpl, TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation()) |
Note that the static data member Inst is an instantiation of the static data member template Tmpl of a class template. More... | |
void | setTemplateOrSpecializationInfo (VarDecl *Inst, TemplateOrSpecializationInfo TSI) |
NamedDecl * | getInstantiatedFromUsingDecl (UsingDecl *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 (UsingDecl *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 |
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. Call this if you might have added duplicates into the list. More... | |
ArrayRef< Module * > | getModulesWithMergedDefinition (NamedDecl *Def) |
Get the additional modules in which the definition Def has been merged. More... | |
TranslationUnitDecl * | getTranslationUnitDecl () const |
ExternCContextDecl * | getExternCContextDecl () const |
ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins) | |
~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 |
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... | |
TypeDecl * | getFloat128StubType () const |
Retrieve the declaration for a 128-bit float stub type. More... | |
QualType | getAddrSpaceQualType (QualType T, unsigned AddressSpace) const |
Return the uniqued reference to the type for an address space qualified type with the specified type and address space. More... | |
QualType | getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const |
Return the uniqued reference to the type for an Objective-C gc-qualified type. More... | |
QualType | getRestrictType (QualType T) const |
Return the uniqued reference to the type for a restrict qualified type. More... | |
QualType | getVolatileType (QualType T) const |
Return the uniqued reference to the type for a volatile qualified type. More... | |
QualType | getConstType (QualType T) const |
Return the uniqued reference to the type for a const qualified type. More... | |
const FunctionType * | adjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo) |
Change the ExtInfo on a function type. More... | |
void | adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType) |
Change the result type of a function type once it is deduced. More... | |
void | adjustExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI, bool AsWritten=false) |
Change the exception specification on a function once it is delay-parsed, instantiated, or computed. More... | |
QualType | getComplexType (QualType T) const |
Return the uniqued reference to the type for a complex number with the specified element type. More... | |
CanQualType | getComplexType (CanQualType T) const |
QualType | getPointerType (QualType T) const |
Return the uniqued reference to the type for a pointer to the specified type. More... | |
CanQualType | getPointerType (CanQualType T) const |
QualType | getAdjustedType (QualType Orig, QualType New) const |
Return the uniqued reference to a type adjusted from the original type to a new type. More... | |
CanQualType | getAdjustedType (CanQualType Orig, CanQualType New) const |
QualType | getDecayedType (QualType T) const |
Return the uniqued reference to the decayed version of the given type. Can only be called on array and function types which decay to pointer types. 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 |
QualType | getBlockDescriptorExtendedType () const |
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 |
QualType | getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const |
Return the uniqued reference to the type for an lvalue reference to the specified type. More... | |
QualType | getRValueReferenceType (QualType T) const |
Return the uniqued reference to the type for an rvalue reference to the specified type. More... | |
QualType | getMemberPointerType (QualType T, const Type *Cls) const |
Return the uniqued reference to the type for a member pointer to the specified type in the specified class. More... | |
QualType | getVariableArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const |
Return a non-unique reference to the type for a variable array of the specified element type. More... | |
QualType | getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const |
Return a non-unique reference to the type for a dependently-sized array of the specified element type. More... | |
QualType | getIncompleteArrayType (QualType EltTy, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const |
Return a unique reference to the type for an incomplete array of the specified element type. More... | |
QualType | getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const |
Return the unique reference to the type for a constant array of the specified element type. More... | |
QualType | getVariableArrayDecayedType (QualType Ty) const |
Returns a vla type where known sizes are replaced with [*]. More... | |
QualType | getVectorType (QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const |
Return the unique reference to a vector type of the specified element type and size. More... | |
QualType | getExtVectorType (QualType VectorType, unsigned NumElts) const |
Return the unique reference to an extended vector type of the specified element type and size. More... | |
QualType | getDependentSizedExtVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc) const |
QualType | getFunctionNoProtoType (QualType ResultTy, const FunctionType::ExtInfo &Info) const |
Return a K&R style C function type like 'int()'. More... | |
QualType | getFunctionNoProtoType (QualType ResultTy) const |
QualType | getFunctionType (QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const |
Return a normal function type with a typed argument list. More... | |
QualType | getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const |
Return the unique reference to the type for the specified type declaration. More... | |
QualType | getTypedefType (const TypedefNameDecl *Decl, QualType Canon=QualType()) const |
Return the unique reference to the type for the specified typedef-name decl. More... | |
QualType | getRecordType (const RecordDecl *Decl) const |
QualType | getEnumType (const EnumDecl *Decl) const |
QualType | getInjectedClassNameType (CXXRecordDecl *Decl, QualType TST) const |
QualType | getAttributedType (AttributedType::Kind attrKind, QualType modifiedType, QualType equivalentType) |
QualType | getSubstTemplateTypeParmType (const TemplateTypeParmType *Replaced, QualType Replacement) const |
Retrieve a substitution-result type. More... | |
QualType | getSubstTemplateTypeParmPackType (const TemplateTypeParmType *Replaced, const TemplateArgument &ArgPack) |
Retrieve a. More... | |
QualType | getTemplateTypeParmType (unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *ParmDecl=nullptr) const |
Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name. More... | |
QualType | getTemplateSpecializationType (TemplateName T, const TemplateArgument *Args, unsigned NumArgs, QualType Canon=QualType()) const |
QualType | getCanonicalTemplateSpecializationType (TemplateName T, const TemplateArgument *Args, unsigned NumArgs) const |
QualType | getTemplateSpecializationType (TemplateName T, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const |
TypeSourceInfo * | getTemplateSpecializationTypeInfo (TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const |
QualType | getParenType (QualType NamedType) const |
QualType | getElaboratedType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType) const |
QualType | getDependentNameType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const |
QualType | getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, const TemplateArgumentListInfo &Args) const |
QualType | getDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, unsigned NumArgs, const TemplateArgument *Args) const |
QualType | getPackExpansionType (QualType Pattern, Optional< unsigned > NumExpansions) |
QualType | getObjCInterfaceType (const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const |
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 |
bool | ObjCObjectAdoptsQTypeProtocols (QualType QT, ObjCInterfaceDecl *Decl) |
bool | QIdProtocolsAdoptObjCObjectProtocols (QualType QT, ObjCInterfaceDecl *IDecl) |
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 |
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, bool IsDecltypeAuto, bool IsDependent) const |
C++11 deduced auto type. More... | |
QualType | getAutoDeductType () const |
C++11 deduction pattern for 'auto' type. More... | |
QualType | getAutoRRefDeductType () const |
C++11 deduction pattern for 'auto &&' type. More... | |
QualType | getTagDeclType (const TagDecl *Decl) const |
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl. More... | |
CanQualType | getSizeType () const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>. More... | |
CanQualType | getIntMaxType () const |
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
CanQualType | getUIntMaxType () const |
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>. More... | |
QualType | getWCharType () const |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension). More... | |
QualType | getWideCharType () const |
Return the type of wide characters. 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. 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>. Pointer - pointer requires this (C99 6.5.6p9). More... | |
QualType | getProcessIDType () const |
Return the unique type for "pid_t" defined in <sys/types.h>. We need this to compute the correct type for vfork(). 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 |
void | setCFConstantStringType (QualType T) |
void | setObjCConstantStringInterface (ObjCInterfaceDecl *Decl) |
QualType | getObjCConstantStringInterface () const |
QualType | getObjCNSStringType () const |
void | setObjCNSStringType (QualType T) |
QualType | getObjCIdRedefinitionType () const |
Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd. More... | |
void | setObjCIdRedefinitionType (QualType RedefType) |
Set the user-written type that redefines id . More... | |
QualType | getObjCClassRedefinitionType () const |
Retrieve the type that Class has been defined to, which may be different from the built-in Class if Class has been typedef'd. More... | |
void | setObjCClassRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
QualType | getObjCSelRedefinitionType () const |
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd. More... | |
void | setObjCSelRedefinitionType (QualType RedefType) |
Set the user-written type that redefines 'SEL'. More... | |
IdentifierInfo * | getNSObjectName () |
Retrieve the identifier 'NSObject'. More... | |
IdentifierInfo * | getNSCopyingName () |
Retrieve the identifier 'NSCopying'. More... | |
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 |
void | getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const |
Put the string version of the type qualifiers QT into S . More... | |
bool | getObjCEncodingForFunctionDecl (const FunctionDecl *Decl, std::string &S) |
Emit the encoded type for the function Decl into S . More... | |
bool | getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, std::string &S, 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... | |
void | getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container, std::string &S) const |
bool | ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const |
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... | |
QualType | getVaListTagType () 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... | |
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 |
DeclarationNameInfo | getNameForTemplate (TemplateName Name, SourceLocation NameLoc) const |
TemplateName | getOverloadedTemplateName (UnresolvedSetIterator Begin, UnresolvedSetIterator End) const |
Retrieve the template name that corresponds to a non-empty lookup. More... | |
TemplateName | getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *Template) const |
Retrieve the template name that represents a qualified template name such as std::vector . More... | |
TemplateName | getDependentTemplateName (NestedNameSpecifier *NNS, const IdentifierInfo *Name) const |
Retrieve the template name that represents a dependent template name such as MetaFun::template apply. More... | |
TemplateName | getDependentTemplateName (NestedNameSpecifier *NNS, OverloadedOperatorKind Operator) const |
Retrieve the template name that represents a dependent template name such as MetaFun::template operator+. More... | |
TemplateName | getSubstTemplateTemplateParm (TemplateTemplateParmDecl *param, TemplateName replacement) const |
TemplateName | getSubstTemplateTemplateParmPack (TemplateTemplateParmDecl *Param, const TemplateArgument &ArgPack) const |
QualType | GetBuiltinType (unsigned ID, GetBuiltinTypeError &Error, unsigned *IntegerConstantArgs=nullptr) const |
Return the type for the specified builtin. More... | |
Qualifiers::GC | getObjCGCAttrKind (QualType Ty) const |
Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes. More... | |
bool | areCompatibleVectorTypes (QualType FirstVec, QualType SecondVec) |
Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type. More... | |
const llvm::fltSemantics & | getFloatTypeSemantics (QualType T) const |
Return the APFloat 'semantics' for the specified scalar floating point type. More... | |
TypeInfo | getTypeInfo (const Type *T) const |
Get the size and alignment of the specified complete type in bits. More... | |
TypeInfo | getTypeInfo (QualType T) const |
unsigned | getOpenMPDefaultSimdAlign (QualType T) const |
Get default simd alignment of the specified complete type in bits. More... | |
uint64_t | getTypeSize (QualType T) const |
Return the size of the specified (complete) type T , in bits. More... | |
uint64_t | getTypeSize (const Type *T) const |
uint64_t | getCharWidth () const |
Return the size of the character type, in bits. More... | |
CharUnits | toCharUnitsFromBits (int64_t BitSize) const |
Convert a size in bits to a size in characters. More... | |
int64_t | toBits (CharUnits CharSize) const |
Convert a size in characters to a size in bits. More... | |
CharUnits | getTypeSizeInChars (QualType T) const |
Return the size of the specified (complete) type T , in characters. More... | |
CharUnits | getTypeSizeInChars (const Type *T) const |
unsigned | getTypeAlign (QualType T) const |
Return the ABI-specified alignment of a (complete) type T , in bits. More... | |
unsigned | getTypeAlign (const Type *T) const |
CharUnits | getTypeAlignInChars (QualType T) const |
Return the ABI-specified alignment of a (complete) type T , in characters. More... | |
CharUnits | getTypeAlignInChars (const Type *T) const |
std::pair< CharUnits, CharUnits > | getTypeInfoDataSizeInChars (QualType T) const |
std::pair< CharUnits, CharUnits > | getTypeInfoInChars (const Type *T) const |
std::pair< CharUnits, CharUnits > | getTypeInfoInChars (QualType T) const |
bool | isAlignmentRequired (const Type *T) const |
Determine if the alignment the type has was required using an alignment attribute. More... | |
bool | isAlignmentRequired (QualType T) const |
unsigned | getPreferredTypeAlign (const Type *T) const |
Return the "preferred" alignment of the specified type T for the current target, in bits. More... | |
unsigned | getTargetDefaultAlignForAttributeAligned (void) const |
Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified. More... | |
unsigned | getAlignOfGlobalVar (QualType T) const |
Return the alignment in bits that should be given to a global variable with type T . More... | |
CharUnits | getAlignOfGlobalVarInChars (QualType T) const |
Return the alignment in characters that should be given to a global variable with type T . More... | |
CharUnits | getDeclAlign (const Decl *D, bool ForAlignof=false) const |
Return a conservative estimate of the alignment of the specified decl D . More... | |
const ASTRecordLayout & | getASTRecordLayout (const RecordDecl *D) const |
Get or compute information about the layout of the specified record (struct/union/class) D , which indicates its size and field position information. More... | |
const ASTRecordLayout * | BuildMicrosoftASTRecordLayout (const RecordDecl *D) const |
Get or compute information about the layout of the specified record (struct/union/class), 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 NULL if there isn't one. More... | |
void | 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. More... | |
CharUnits | getOffsetOfBaseWithVBPtr (const CXXRecordDecl *RD) const |
uint64_t | getFieldOffset (const ValueDecl *FD) const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits. More... | |
bool | isNearlyEmpty (const CXXRecordDecl *RD) const |
VTableContextBase * | getVTableContext () |
MangleContext * | createMangleContext () |
void | DeepCollectObjCIvars (const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl< const ObjCIvarDecl * > &Ivars) const |
unsigned | CountNonClassIvars (const ObjCInterfaceDecl *OI) const |
void | CollectInheritedProtocols (const Decl *CDecl, llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &Protocols) |
CanQualType | getCanonicalType (QualType T) const |
Return the canonical (structural) type corresponding to the specified potentially non-canonical type T . More... | |
const Type * | getCanonicalType (const Type *T) const |
CanQualType | getCanonicalParamType (QualType T) const |
Return the canonical parameter type corresponding to the specific potentially non-canonical one. More... | |
bool | hasSameType (QualType T1, QualType T2) const |
Determine whether the given types T1 and T2 are equivalent. More... | |
bool | hasSameType (const Type *T1, const Type *T2) const |
QualType | getUnqualifiedArrayType (QualType T, Qualifiers &Quals) |
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals . More... | |
bool | hasSameUnqualifiedType (QualType T1, QualType T2) const |
Determine whether the given types are equivalent after cvr-qualifiers have been removed. More... | |
bool | hasSameNullabilityTypeQualifier (QualType SubT, QualType SuperT, bool IsParam) const |
bool | ObjCMethodsAreEqual (const ObjCMethodDecl *MethodDecl, const ObjCMethodDecl *MethodImp) |
bool | UnwrapSimilarPointerTypes (QualType &T1, QualType &T2) |
NestedNameSpecifier * | getCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const |
Retrieves the "canonical" nested name specifier for a given nested name specifier. More... | |
CallingConv | getDefaultCallingConvention (bool isVariadic, bool IsCXXMethod) const |
Retrieves the default calling convention for the current target. More... | |
TemplateName | getCanonicalTemplateName (TemplateName Name) const |
Retrieves the "canonical" template name that refers to a given template. More... | |
bool | hasSameTemplateName (TemplateName X, TemplateName Y) |
Determine whether the given template names refer to the same template. More... | |
TemplateArgument | getCanonicalTemplateArgument (const TemplateArgument &Arg) const |
Retrieve the "canonical" template argument. More... | |
const ArrayType * | getAsArrayType (QualType T) const |
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. 'double' == '_Complex double'). 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 (unsigned AS) const |
bool | addressSpaceMapManglingFor (unsigned AS) const |
bool | typesAreCompatible (QualType T1, QualType T2, bool CompareUnqualified=false) |
Compatibility predicates used to check assignment expressions. More... | |
bool | propertyTypesAreCompatible (QualType, QualType) |
bool | typesAreBlockPointerCompatible (QualType, QualType) |
bool | isObjCIdType (QualType T) const |
bool | isObjCClassType (QualType T) const |
bool | isObjCSelType (QualType T) const |
bool | ObjCQualifiedIdTypesAreCompatible (QualType LHS, QualType RHS, bool ForCompare) |
bool | ObjCQualifiedClassTypesAreCompatible (QualType LHS, QualType RHS) |
bool | canAssignObjCInterfaces (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT) |
bool | canAssignObjCInterfaces (const ObjCObjectType *LHS, const ObjCObjectType *RHS) |
bool | canAssignObjCInterfacesInBlockPointer (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, bool BlockReturnType) |
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) |
QualType | mergeTransparentUnionType (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false) |
QualType | mergeObjCGCQualifiers (QualType, QualType) |
bool | FunctionTypesMatchOnNSConsumedAttrs (const FunctionProtoType *FromFunctionType, const FunctionProtoType *ToFunctionType) |
void | ResetObjCLayout (const ObjCContainerDecl *CD) |
unsigned | getIntWidth (QualType T) const |
QualType | getCorrespondingUnsignedType (QualType T) const |
type_const_range | types () 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 NULL if none exists. More... | |
ObjCCategoryImplDecl * | getObjCImplementation (ObjCCategoryDecl *D) |
Get the implementation of the ObjCCategoryDecl D , or NULL if none exists. More... | |
bool | AnyObjCImplementation () |
Return true if there is at least one @implementation in the TU. More... | |
void | setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD) |
Set the implementation of ObjCInterfaceDecl. More... | |
void | setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD) |
Set the implementation of ObjCCategoryDecl. More... | |
const 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. that is part of an interface, otherwise returns null. More... | |
void | setBlockVarCopyInits (VarDecl *VD, Expr *Init) |
Set the copy inialization expression of a block var decl. More... | |
Expr * | getBlockVarCopyInits (const VarDecl *VD) |
Get the copy initialization expression of the VarDecl VD , or NULL if none exists. More... | |
TypeSourceInfo * | CreateTypeSourceInfo (QualType T, unsigned Size=0) const |
Allocate an uninitialized TypeSourceInfo. More... | |
TypeSourceInfo * | getTrivialTypeSourceInfo (QualType T, SourceLocation Loc=SourceLocation()) const |
Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location. More... | |
void | AddDeallocation (void(*Callback)(void *), void *Data) |
Add a deallocation callback that will be invoked when the ASTContext is destroyed. More... | |
GVALinkage | GetGVALinkageForFunction (const FunctionDecl *FD) const |
GVALinkage | GetGVALinkageForVariable (const VarDecl *VD) |
bool | DeclMustBeEmitted (const Decl *D) |
Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is only relevant for function or file scoped var definitions. More... | |
const CXXConstructorDecl * | getCopyConstructorForExceptionObject (CXXRecordDecl *RD) |
void | addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD) |
void | addDefaultArgExprForConstructor (const CXXConstructorDecl *CD, unsigned ParmIdx, Expr *DAE) |
Expr * | getDefaultArgExprForConstructor (const CXXConstructorDecl *CD, unsigned ParmIdx) |
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 * | createMangleNumberingContext () const |
void | setParameterIndex (const ParmVarDecl *D, unsigned index) |
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
unsigned | getParameterIndex (const ParmVarDecl *D) const |
Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield. More... | |
APValue * | getMaterializedTemporaryValue (const MaterializeTemporaryExpr *E, bool MayCreate) |
Get the storage for the constant value of a materialized temporary of static storage duration. More... | |
void | InitBuiltinTypes (const TargetInfo &Target) |
Initialize built-in types. More... | |
void | getObjCEncodingForMethodParameter (Decl::ObjCDeclQualifier QT, QualType T, std::string &S, bool Extended) const |
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... | |
Static Public Member Functions | |
static ImportDecl * | getNextLocalImport (ImportDecl *Import) |
static bool | isObjCNSObjectType (QualType Ty) |
Return true if this is an NSObject object with its NSObject attribute set. More... | |
Static Public Attributes | |
static unsigned | NumImplicitDefaultConstructors |
The number of implicitly-declared default constructors. More... | |
static unsigned | NumImplicitDefaultConstructorsDeclared |
The number of implicitly-declared default constructors for which declarations were built. More... | |
static unsigned | NumImplicitCopyConstructors |
The number of implicitly-declared copy constructors. More... | |
static unsigned | NumImplicitCopyConstructorsDeclared |
The number of implicitly-declared copy constructors for which declarations were built. More... | |
static unsigned | NumImplicitMoveConstructors |
The number of implicitly-declared move constructors. More... | |
static unsigned | NumImplicitMoveConstructorsDeclared |
The number of implicitly-declared move constructors for which declarations were built. More... | |
static unsigned | NumImplicitCopyAssignmentOperators |
The number of implicitly-declared copy assignment operators. More... | |
static unsigned | NumImplicitCopyAssignmentOperatorsDeclared |
The number of implicitly-declared copy assignment operators for which declarations were built. More... | |
static unsigned | NumImplicitMoveAssignmentOperators |
The number of implicitly-declared move assignment operators. More... | |
static unsigned | NumImplicitMoveAssignmentOperatorsDeclared |
The number of implicitly-declared move assignment operators for which declarations were built. More... | |
static unsigned | NumImplicitDestructors |
The number of implicitly-declared destructors. More... | |
static unsigned | NumImplicitDestructorsDeclared |
The number of implicitly-declared destructors for which declarations were built. More... | |
Friends | |
class | NestedNameSpecifier |
class | ASTDeclReader |
class | ASTReader |
class | ASTWriter |
class | CXXRecordDecl |
class | DeclContext |
class | DeclarationNameTable |
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 89 of file ASTContext.h.
typedef llvm::iterator_range<import_iterator> clang::ASTContext::import_range |
Definition at line 782 of file ASTContext.h.
typedef CXXMethodVector::const_iterator clang::ASTContext::overridden_cxx_method_iterator |
Definition at line 749 of file ASTContext.h.
typedef llvm::DenseMap<const void *, llvm::PointerUnion<ast_type_traits::DynTypedNode *, ParentVector *> > clang::ASTContext::ParentMap |
Maps from a node to its parents.
Definition at line 452 of file ASTContext.h.
Contains parents of a node.
Definition at line 447 of file ASTContext.h.
typedef llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *> clang::ASTContext::TemplateOrSpecializationInfo |
A type synonym for the TemplateOrInstantiation mapping.
Definition at line 301 of file ASTContext.h.
typedef llvm::iterator_range<SmallVectorImpl<Type *>::const_iterator> clang::ASTContext::type_const_range |
Definition at line 2194 of file ASTContext.h.
Enumerator | |
---|---|
GE_None |
No error. |
GE_Missing_stdio |
Missing a type from <stdio.h> |
GE_Missing_setjmp |
Missing a type from <setjmp.h> |
GE_Missing_ucontext |
Missing a type from <ucontext.h> |
Definition at line 1644 of file ASTContext.h.
Enumerator | |
---|---|
PSF_None | |
PSF_Read | |
PSF_Write | |
PSF_Execute | |
PSF_Implicit | |
PSF_Invalid |
Definition at line 2451 of file ASTContext.h.
ASTContext::ASTContext | ( | LangOptions & | LOpts, |
SourceManager & | SM, | ||
IdentifierTable & | idents, | ||
SelectorTable & | sels, | ||
Builtin::Context & | builtins | ||
) |
Definition at line 727 of file ASTContext.cpp.
References clang::TranslationUnitDecl::Create().
ASTContext::~ASTContext | ( | ) |
Definition at line 752 of file ASTContext.cpp.
|
inline |
Definition at line 625 of file ASTContext.h.
References clang::RawCommentList::addComment(), Comments, clang::SourceRange::getBegin(), clang::RawComment::getSourceRange(), and clang::SourceManager::isInSystemHeader().
Referenced by clang::Sema::ActOnComment().
void ASTContext::addCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD, |
CXXConstructorDecl * | CD | ||
) |
Definition at line 8527 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by clang::Sema::CheckCXXThrowOperand().
void ASTContext::AddDeallocation | ( | void(*)(void *) | Callback, |
void * | Data | ||
) |
Add a deallocation callback that will be invoked when the ASTContext is destroyed.
Callback | A callback function that will be invoked on destruction. |
Data | Pointer data that will be provided to the callback function when it is called. |
Definition at line 801 of file ASTContext.cpp.
References Callback.
Referenced by clang::VarDecl::evaluateValue(), clang::FunctionTemplateDecl::newCommon(), clang::ClassTemplateDecl::newCommon(), clang::TypeAliasTemplateDecl::newCommon(), and clang::VarTemplateDecl::newCommon().
void ASTContext::addDefaultArgExprForConstructor | ( | const CXXConstructorDecl * | CD, |
unsigned | ParmIdx, | ||
Expr * | DAE | ||
) |
Definition at line 8534 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by clang::Sema::CheckCXXThrowOperand(), and getDefaultArgExprsForConstructors().
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 1278 of file ASTContext.cpp.
References clang::Decl::isFromASTFile().
Referenced by clang::DeclContext::addHiddenDecl().
void ASTContext::addOverriddenMethod | ( | const CXXMethodDecl * | Method, |
const CXXMethodDecl * | Overridden | ||
) |
Note that the given C++ Method
overrides the given Overridden
method.
Definition at line 1252 of file ASTContext.cpp.
References clang::Decl::isCanonicalDecl().
Referenced by clang::CXXMethodDecl::addOverriddenMethod(), and clang::CXXConstructorDecl::setInheritedConstructor().
Definition at line 2104 of file ASTContext.h.
References clang::LangAS::Count, and clang::LangAS::Offset.
void ASTContext::adjustDeducedFunctionResultType | ( | FunctionDecl * | FD, |
QualType | ResultType | ||
) |
Change the result type of a function type once it is deduced.
Definition at line 2175 of file ASTContext.cpp.
References clang::Type::castAs(), getASTMutationListener(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionType(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionProtoType::getParamTypes(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ValueDecl::getType(), Next, and clang::ValueDecl::setType().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), SubstAutoWithinFunctionReturnType(), and clang::ASTDeclReader::UpdateDecl().
void ASTContext::adjustExceptionSpec | ( | FunctionDecl * | FD, |
const FunctionProtoType::ExceptionSpecInfo & | ESI, | ||
bool | AsWritten = false |
||
) |
Change the exception specification on a function once it is delay-parsed, instantiated, or computed.
Definition at line 2219 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType(), getFunctionTypeWithExceptionSpec(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::ValueDecl::setType().
Referenced by clang::Sema::actOnDelayedExceptionSpecification(), and clang::Sema::UpdateExceptionSpec().
const FunctionType * ASTContext::adjustFunctionType | ( | const FunctionType * | Fn, |
FunctionType::ExtInfo | EInfo | ||
) |
Change the ExtInfo on a function type.
Definition at line 2157 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::QualType::getTypePtr(), and clang::Result.
Referenced by clang::Sema::adjustCCAndNoReturn(), clang::Sema::adjustMemberFunctionCC(), handleFunctionTypeAttr(), clang::Sema::IsNoReturnConversion(), and clang::Sema::MergeFunctionDecl().
Definition at line 501 of file ASTContext.h.
Referenced by clang::DeclGroup::Create(), clang::TemplateParameterList::Create(), clang::CXXTryStmt::Create(), clang::ObjCArrayLiteral::Create(), clang::ObjCAtTryStmt::Create(), clang::OMPParallelDirective::Create(), clang::CXXStaticCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::ObjCDictionaryLiteral::Create(), clang::CXXReinterpretCastExpr::Create(), clang::ASTTemplateArgumentListInfo::Create(), clang::ObjCTypeParamList::create(), clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::ObjCSubscriptRefExpr::Create(), clang::OMPForSimdDirective::Create(), clang::AttributedStmt::Create(), clang::OMPSectionsDirective::Create(), clang::CXXDefaultArgExpr::Create(), clang::OMPSectionDirective::Create(), clang::OMPSingleDirective::Create(), clang::DeclRefExpr::Create(), clang::OMPPrivateClause::Create(), clang::OMPMasterDirective::Create(), clang::OMPCriticalDirective::Create(), clang::OMPFirstprivateClause::Create(), clang::OMPParallelForDirective::Create(), clang::OMPParallelForSimdDirective::Create(), clang::CXXFunctionalCastExpr::Create(), clang::OMPParallelSectionsDirective::Create(), clang::OMPLastprivateClause::Create(), clang::OMPTaskDirective::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPBarrierDirective::Create(), clang::LambdaExpr::Create(), clang::OMPTaskwaitDirective::Create(), clang::StringLiteral::Create(), clang::OMPTaskgroupDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPFlushDirective::Create(), clang::OMPOrderedDirective::Create(), clang::OMPAtomicDirective::Create(), clang::OMPTargetDirective::Create(), OMPAlignedClause::Create(), clang::OMPTeamsDirective::Create(), clang::OffsetOfExpr::Create(), clang::OMPCancellationPointDirective::Create(), OMPCopyinClause::Create(), clang::OMPCancelDirective::Create(), clang::CXXCtorInitializer::Create(), clang::CapturedStmt::Create(), OMPCopyprivateClause::Create(), clang::TypeTraitExpr::Create(), OMPFlushClause::Create(), OMPDependClause::Create(), clang::MemberExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::ImplicitCastExpr::Create(), clang::ExprWithCleanups::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::CStyleCastExpr::Create(), clang::CXXDependentScopeMemberExpr::Create(), clang::UnresolvedMemberExpr::Create(), clang::FunctionParmPackExpr::Create(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), clang::TemplateArgumentList::CreateCopy(), clang::LambdaExpr::CreateDeserialized(), clang::CapturedStmt::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::ObjCArrayLiteral::CreateEmpty(), clang::ObjCAtTryStmt::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::DeclRefExpr::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), OMPFlushClause::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::ImplicitCastExpr::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::CStyleCastExpr::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), clang::FunctionParmPackExpr::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), getCanonicalTemplateSpecializationType(), getDeclAttrs(), getDependentTemplateSpecializationType(), clang::ASTReader::GetExternalCXXBaseSpecifiers(), getFunctionType(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getOverloadedTemplateName(), getTemplateSpecializationType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::OverloadExpr::initializeResults(), clang::Decl::operator new(), clang::OverloadExpr::OverloadExpr(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::BlockDecl::setCaptures(), clang::FunctionDecl::setDependentTemplateSpecialization(), clang::QualType::substObjCTypeArgs(), and clang::TemplateArgument::TemplateArgument().
|
inline |
Return true if there is at least one @implementation in the TU.
Definition at line 2223 of file ASTContext.h.
Referenced by clang::Sema::DiagnoseUseOfUnimplementedSelectors().
QualType ASTContext::areCommonBaseCompatible | ( | const ObjCObjectPointerType * | LHSOPT, |
const ObjCObjectPointerType * | RHSOPT | ||
) |
Definition at line 7008 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().
Referenced by clang::Sema::FindCompositeObjCPointerType().
Definition at line 7184 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and clang::Type::getAs().
Referenced by clang::Sema::CheckCompareOperands().
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 6587 of file ASTContext.cpp.
References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::Type::getAs(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), hasSameType(), hasSameUnqualifiedType(), and clang::Type::isVectorType().
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckVectorOperands(), clang::Sema::IsPointerConversion(), and IsVectorConversion().
bool ASTContext::AtomicUsesUnsupportedLibcall | ( | const AtomicExpr * | E | ) | const |
Definition at line 8570 of file ASTContext.cpp.
References clang::TargetInfo::getMaxAtomicInlineWidth(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), getTypeAlignInChars(), getTypeSizeInChars(), and toBits().
Returns true iff we need copy/dispose helpers for the given type.
BlockRequiresCopying - Returns true if byref variable "D" of type "Ty" requires copy/dispose. Note that this must match the logic in buildByrefHelpers.
Definition at line 4897 of file ASTContext.cpp.
References clang::Type::getAsCXXRecordDecl(), getBlockVarCopyInits(), getLangOpts(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Type::isBlockPointerType(), isObjCNSObjectType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by clang::CodeGen::CodeGenFunction::BuildByRefType().
RecordDecl * ASTContext::buildImplicitRecord | ( | StringRef | Name, |
RecordDecl::TagKind | TK = TTK_Struct |
||
) | const |
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
Definition at line 901 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, clang::CXXRecordDecl::Create(), clang::RecordDecl::Create(), clang::IdentifierTable::get(), getLangOpts(), getTranslationUnitDecl(), Idents, and clang::Decl::setImplicit().
Referenced by CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), CreatePowerABIBuiltinVaListDecl(), createPrivatesRecordDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringType(), getFloat128StubType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), and clang::Sema::Initialize().
TypedefDecl * ASTContext::buildImplicitTypedef | ( | QualType | T, |
StringRef | Name | ||
) | const |
Create a new implicit TU-level typedef declaration.
Definition at line 917 of file ASTContext.cpp.
References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and clang::Decl::setImplicit().
Referenced by clang::Sema::addImplicitTypedef(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateCharPtrBuiltinVaListDecl(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), getInt128Decl(), getObjCClassDecl(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCSelDecl(), and getUInt128Decl().
const ASTRecordLayout * ASTContext::BuildMicrosoftASTRecordLayout | ( | const RecordDecl * | D | ) | const |
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 2847 of file RecordLayoutBuilder.cpp.
References Builder, and clang::CharUnits::Zero().
Referenced by getASTRecordLayout().
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 6772 of file ASTContext.cpp.
References clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCObjectType::isKindOfType(), clang::ObjCObjectType::isObjCQualifiedClass(), clang::ObjCObjectType::isObjCQualifiedId(), clang::ObjCObjectType::isObjCUnqualifiedIdOrClass(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by clang::Sema::ActOnPropertyImplDecl(), applyObjCTypeArgs(), areComparableObjCPointerTypes(), canAssignObjCObjectTypes(), canBindObjCObjectType(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::isObjCPointerConversion(), isObjCTypeSubstitutable(), and mergeTypes().
bool ASTContext::canAssignObjCInterfaces | ( | const ObjCObjectType * | LHS, |
const ObjCObjectType * | RHS | ||
) |
Definition at line 7122 of file ASTContext.cpp.
References clang::Type::castAs(), CollectInheritedProtocols(), clang::declaresSameEntity(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectType::getNumProtocols(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCObjectType::isSpecialized(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::ObjCObjectType::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 6821 of file ASTContext.cpp.
References clang::ObjCInterfaceType::getDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::ObjCObjectPointerType::isKindOfType(), clang::Type::isObjCBuiltinType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ObjCInterfaceDecl::isSuperClassOf(), ObjCQualifiedIdTypesAreCompatible(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().
Referenced by mergeTypes().
Definition at line 7196 of file ASTContext.cpp.
References canAssignObjCInterfaces(), and getObjCObjectPointerType().
Referenced by clang::Sema::CompareReferenceRelationship().
comments::FullComment * ASTContext::cloneFullComment | ( | comments::FullComment * | FC, |
const Decl * | D | ||
) | const |
Definition at line 418 of file ASTContext.cpp.
References clang::comments::DeclInfo::CommentDecl, clang::comments::DeclInfo::fill(), clang::comments::FullComment::getBlocks(), clang::comments::FullComment::getDecl(), clang::comments::FullComment::getDeclInfo(), clang::comments::DeclInfo::IsFilled, and clang::comments::DeclInfo::TemplateParameters.
Referenced by getCommentForDecl().
void ASTContext::CollectInheritedProtocols | ( | const Decl * | CDecl, |
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > & | Protocols | ||
) |
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
Definition at line 1914 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getSuperClass().
Referenced by clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), canAssignObjCInterfaces(), getIntersectionOfProtocols(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().
unsigned ASTContext::CountNonClassIvars | ( | const ObjCInterfaceDecl * | OI | ) | const |
Definition at line 1947 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCInterfaceDecl::known_extensions().
MangleContext * ASTContext::createMangleContext | ( | ) |
Definition at line 8420 of file ASTContext.cpp.
References clang::ItaniumMangleContext::create(), clang::MicrosoftMangleContext::create(), clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, clang::TargetInfo::getCXXABI(), getDiagnostics(), clang::TargetCXXABI::getKind(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, and clang::TargetCXXABI::Microsoft.
Referenced by clang::PredefinedExpr::ComputeName().
MangleNumberingContext * ASTContext::createMangleNumberingContext | ( | ) | const |
Definition at line 8517 of file ASTContext.cpp.
Referenced by clang::Sema::ExpressionEvaluationContextRecord::getMangleNumberingContext(), and getManglingNumberContext().
TypeSourceInfo * ASTContext::CreateTypeSourceInfo | ( | QualType | T, |
unsigned | Size = 0 |
||
) | const |
Allocate an uninitialized TypeSourceInfo.
The caller should initialize the memory held by TypeSourceInfo using the TypeLoc wrappers.
T | the type that will be the basis for type source info. This type should refer to how the declarator was written in source code, not to what type semantic analysis resolved the declarator to. |
Size | the size of the type info to create, or 0 if the size should be calculated based on the type. |
Definition at line 2043 of file ASTContext.cpp.
References clang::TypeLoc::getFullDataSizeForType().
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTypenameType(), getTemplateSpecializationTypeInfo(), getTrivialTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), and clang::Sema::GetTypeSourceInfoForDeclarator().
|
inline |
Definition at line 504 of file ASTContext.h.
Referenced by clang::Sema::AttachBaseSpecifiers(), clang::CXXRecordDecl::setBases(), clang::ShuffleVectorExpr::setExprs(), clang::VarDecl::setInit(), clang::APNumericStorage::setIntValue(), clang::CallExpr::setNumArgs(), clang::DeclaratorDecl::setQualifierInfo(), clang::TagDecl::setQualifierInfo(), clang::CompoundStmt::setStmts(), 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 8309 of file ASTContext.cpp.
References clang::VarDecl::DeclarationOnly, clang::CXXMethodDecl::getCanonicalDecl(), getCurrentKeyFunction(), clang::Decl::getDeclContext(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::VarDecl::getInit(), clang::DeclContext::getParent(), getTargetInfo(), clang::ValueDecl::getType(), clang::GVA_AvailableExternally, clang::GVA_DiscardableODR, clang::GVA_Internal, clang::Decl::hasAttr(), clang::Expr::HasSideEffects(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::CXXRecordDecl::isDynamicClass(), clang::VarDecl::isFileVarDecl(), isMSStaticDataMemberInlineDefinition(), clang::VarDecl::isThisDeclarationADefinition(), clang::SC_Register, and clang::FunctionDecl::TK_FunctionTemplate.
Referenced by isRequiredDecl(), and clang::Sema::ShouldWarnIfUnusedFileScopedDecl().
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 881 of file ASTContext.cpp.
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 1896 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), and clang::ObjCInterfaceDecl::ivars().
Referenced by clang::Sema::ActOnDefs().
void ASTContext::DumpRecordLayout | ( | const RecordDecl * | RD, |
raw_ostream & | OS, | ||
bool | Simple = false |
||
) | const |
Definition at line 3194 of file RecordLayoutBuilder.cpp.
References clang::Decl::dump(), DumpCXXRecordLayout(), clang::ASTRecordLayout::getAlignment(), clang::QualType::getAsString(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getSize(), getTypeDeclType(), isMsLayout(), and toBits().
Referenced by getASTRecordLayout().
void ASTContext::eraseDeclAttrs | ( | const Decl * | D | ) |
Erase the attributes corresponding to the given declaration.
Definition at line 1104 of file ASTContext.cpp.
Referenced by clang::Decl::dropAttrs().
bool ASTContext::FunctionTypesMatchOnNSConsumedAttrs | ( | const FunctionProtoType * | FromFunctionType, |
const FunctionProtoType * | ToFunctionType | ||
) |
Definition at line 7719 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ConsumedParameters, clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionProtoType::getNumParams(), and clang::FunctionProtoType::hasAnyConsumedParams().
Referenced by clang::Sema::IsBlockPointerConversion(), and mergeFunctionTypes().
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 2110 of file ASTContext.cpp.
References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().
Referenced by clang::Sema::ActOnStringLiteral(), DecodeTypeFromStr(), HandleAddressSpaceTypeAttribute(), and rewriteBuiltinFunctionDecl().
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 4436 of file ASTContext.cpp.
References getDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::BuildFunctionType(), clang::Sema::CheckParameter(), and getSignatureParameterType().
Return the uniqued reference to a type adjusted from the original type to a new type.
Definition at line 2303 of file ASTContext.cpp.
References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::adjustMemberFunctionCC(), and getAdjustedType().
|
inline |
Definition at line 984 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getAdjustedType().
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 1870 of file ASTContext.cpp.
References getTargetInfo(), and getTypeAlign().
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 1876 of file ASTContext.cpp.
References getAlignOfGlobalVar(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral().
|
inline |
Definition at line 497 of file ASTContext.h.
Referenced by clang::RawComment::parse().
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.
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.
Definition at line 4467 of file ASTContext.cpp.
References getAsArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeQualifiers(), getPointerType(), and getQualifiedType().
Referenced by clang::Sema::ActOnStringLiteral(), AdjustFunctionParmAndArgTypesForDeduction(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::CreateBuiltinArraySubscriptExpr(), DecodeTypeFromStr(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DiagnoseAssignmentResult(), doRewriteToUTF8StringBoxedExpressionHelper(), GetBuiltinType(), getCanonicalParamType(), getDecayedType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), 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 4378 of file ASTContext.cpp.
References clang::Qualifiers::empty(), clang::VariableArrayType::getBracketsRange(), clang::QualType::getCanonicalType(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::ArrayType::getIndexTypeCVRQualifiers(), getQualifiedType(), clang::ConstantArrayType::getSize(), clang::VariableArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by clang::Sema::ActOnFields(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::CheckAllocatedType(), checkFormatStringExpr(), clang::Sema::CheckStaticArrayArgument(), CheckUnaryTypeTraitTypeCompleteness(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::emitDestroy(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), getArrayDecayedType(), getAsConstantArrayType(), getAsDependentSizedArrayType(), getAsIncompleteArrayType(), getAsVariableArrayType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), handleInitPriorityAttr(), clang::InitializationSequence::InitializeFrom(), isSafeToConvert(), IsStringInit(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::LookupInlineAsmIdentifier(), makeZeroElementRegion(), mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), clang::APValue::printPretty(), clang::Sema::RequireNonAbstractType(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), and clang::ASTNodeImporter::VisitVarDecl().
|
inline |
Definition at line 2003 of file ASTContext.h.
References getAsArrayType().
Referenced by BitsContainNoUserData(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), buildSingleCopyAssignRecursively(), clang::Sema::CheckFormatString(), clang::Sema::CheckStaticArrayArgument(), clang::StringLiteral::Create(), DeduceTemplateArgumentsByTypeMatch(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), EmitCXXNewAllocSize(), EmitMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EvaluateArrayTypeTrait(), evenFlexibleArraySize(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::Sema::FormatStringHasSArg(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), getTypeExpansion(), isConstantSizeArrayWithMoreThanOneElement(), isEmptyField(), isIncompleteOrZeroLengthArrayType(), isSingleElementStruct(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), and performLambdaVarCaptureInitialization().
|
inline |
Definition at line 2012 of file ASTContext.h.
References getAsArrayType().
Referenced by DeduceTemplateArgumentsByTypeMatch().
|
inline |
Definition at line 2009 of file ASTContext.h.
References getAsArrayType().
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddInitializerToDecl(), DeduceTemplateArgumentsByTypeMatch(), and clang::InitializationSequence::Perform().
|
inline |
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition at line 508 of file ASTContext.h.
|
inline |
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition at line 879 of file ASTContext.h.
References Listener.
Referenced by adjustDeducedFunctionResultType(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::ObjCCategoryDecl::Create(), clang::Decl::getASTMutationListener(), clang::Sema::HandlePropertyInClassExtension(), 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 2070 of file ASTContext.cpp.
References clang::ObjCImplDecl::getClassInterface().
Referenced by LookupFieldBitOffset().
const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout | ( | const ObjCInterfaceDecl * | D | ) | const |
Get or compute information about the layout of the specified Objective-C interface.
Definition at line 2065 of file ASTContext.cpp.
Referenced by LookupFieldBitOffset().
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 2873 of file RecordLayoutBuilder.cpp.
References Builder, BuildMicrosoftASTRecordLayout(), clang::ExternalASTSource::CompleteType(), DumpRecordLayout(), clang::CharUnits::fromQuantity(), clang::RecordDecl::getDefinition(), getExternalSource(), getLangOpts(), getTargetInfo(), clang::DeclContext::hasExternalLexicalStorage(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), clang::Decl::isInvalidDecl(), isMsLayout(), and mustSkipTailPadding().
Referenced by AddIndirectPrimaryBases(), BitsContainNoUserData(), computeFullPathsForVFTables(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), computeOffsetHint(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DiagnoseReinterpretUpDownCast(), DumpCXXRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), EmitDtorSanitizerCallback(), EmitNullBaseClassInitialization(), EncodeBitField(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), getClassAtVTableLocation(), getDeclAlign(), getFieldOffset(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getOffsetOfBaseWithVBPtr(), getOffsetOfFullPath(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), isIntegerLikeType(), clang::Sema::LookupInlineAsmField(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().
|
inline |
Definition at line 2006 of file ASTContext.h.
References getAsArrayType().
Referenced by clang::Sema::CheckVariableDeclarationType(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::getVLASize(), and mergeTypes().
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 3947 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::AtomicType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildAtomicType(), getVariableArrayDecayedType(), clang::Sema::Initialize(), and mergeTypes().
QualType ASTContext::getAttributedType | ( | AttributedType::Kind | attrKind, |
QualType | modifiedType, | ||
QualType | equivalentType | ||
) |
Definition at line 3147 of file ASTContext.cpp.
References getCanonicalType(), clang::ast_matchers::id(), clang::AttributedType::Profile(), clang::ast_matchers::type, and clang::TypeAlignment.
Referenced by clang::Sema::checkNullabilityTypeSpecifier(), clang::Sema::checkObjCKindOfType(), clang::Sema::CheckObjCPropertyAttributes(), getBaseMessageSendResultType(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::Sema::getMessageSendResultType(), handleFunctionTypeAttr(), handleMSPointerTypeQualifierAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), mergeParamDeclTypes(), mergeTypeNullabilityForRedecl(), clang::Sema::ProcessPropertyDecl(), stripObjCInstanceType(), and clang::ASTNodeImporter::VisitAttributedType().
QualType ASTContext::getAutoDeductType | ( | ) | const |
C++11 deduction pattern for 'auto' type.
getAutoDeductType - Get type pattern for deducing against 'auto'.
Definition at line 3974 of file ASTContext.cpp.
References AutoDeductTy, clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::BuildCXXForRangeStmt(), ConvertDeclSpecToType(), getAutoRRefDeductType(), getAutoType(), clang::ASTReader::GetType(), and clang::Sema::performLambdaInitCaptureInitialization().
QualType ASTContext::getAutoRRefDeductType | ( | ) | const |
C++11 deduction pattern for 'auto &&' type.
getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.
Definition at line 3984 of file ASTContext.cpp.
References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().
Referenced by clang::Sema::ActOnCXXForRangeStmt(), and clang::ASTReader::GetType().
QualType ASTContext::getAutoType | ( | QualType | DeducedType, |
bool | IsDecltypeAuto, | ||
bool | IsDependent | ||
) | const |
C++11 deduced auto type.
getAutoType - Return the uniqued reference to the 'auto' type which has been deduced to the given type, or to the canonical undeduced 'auto' type, or the canonical deduced-but-dependent 'auto' type.
Definition at line 3924 of file ASTContext.cpp.
References getAutoDeductType(), clang::QualType::isNull(), clang::AutoType::Profile(), and clang::TypeAlignment.
Referenced by ConvertDeclSpecToType(), and clang::ASTNodeImporter::VisitAutoType().
Return the innermost element type of an array type.
For example, will return "int" for int[m][n]
Definition at line 4481 of file ASTContext.cpp.
References clang::ArrayType::getElementType().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildArrayType(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), BuildImplicitMemberInitializer(), CheckAggExprForMemSetUse(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckNontrivialField(), checkTrivialClassMembers(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), clang::Sema::ComputeInheritingCtorExceptionSpec(), defaultedSpecialMemberIsConstexpr(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenModule::EmitConstantInit(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getInnerObjCOwnership(), handleInitPriorityAttr(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::QualType::isCXX98PODType(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::Sema::RequireLiteralType(), clang::Sema::SetIvarInitializers(), TryDefaultInitialization(), and TryValueInitialization().
Return the innermost element type of a type (which needn't actually be an array type).
Definition at line 4485 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 4855 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::EmitDeclareOfBlockLiteralArgVariable().
QualType ASTContext::getBlockDescriptorType | ( | ) | const |
Gets the struct used to keep track of the descriptor for pointer to blocks.
Definition at line 4820 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::EmitDeclareOfBlockLiteralArgVariable().
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 2365 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isFunctionType(), clang::BlockPointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnBlockStmtExpr(), addBlockPointerConversion(), clang::Sema::BuildBlockPointerType(), checkConditionalPointerCompatibility(), clang::ento::MemRegionManager::getVarRegion(), mergeTypes(), and clang::ASTNodeImporter::VisitBlockPointerType().
Get the copy initialization expression of the VarDecl VD
, or NULL if none exists.
Get the copy initialization expression of VarDecl,or NULL if none exists.
Definition at line 2026 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by BlockRequiresCopying().
|
inline |
Retrieve declaration of 'BOOL' typedef.
Definition at line 1541 of file ASTContext.h.
Referenced by clang::Sema::ActOnObjCBoolLiteral(), and getBOOLType().
|
inline |
type of 'BOOL' type.
Definition at line 1551 of file ASTContext.h.
References getBOOLDecl(), and getTypeDeclType().
Referenced by clang::Sema::ActOnObjCBoolLiteral().
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 8128 of file ASTContext.cpp.
References BuiltinInfo, clang::CC_C, DecodeTypeFromStr(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, GE_None, getArrayDecayedType(), getFunctionNoProtoType(), getFunctionType(), clang::Builtin::Context::GetTypeString(), clang::Type::isArrayType(), clang::Builtin::Context::isNoReturn(), clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by clang::Sema::CheckFunctionDeclaration(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), getAbsoluteValueArgumentType(), and clang::Sema::LazilyCreateBuiltin().
TypedefDecl * ASTContext::getBuiltinVaListDecl | ( | ) | const |
Retrieve the C type declaration corresponding to the predefined __builtin_va_list
type.
Definition at line 6333 of file ASTContext.cpp.
References CreateVaListDecl(), clang::TargetInfo::getBuiltinVaListKind(), and clang::Decl::isImplicit().
Referenced by getBuiltinVaListType(), getPredefinedDecl(), getVaListTagType(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the __builtin_va_list
type.
Definition at line 1565 of file ASTContext.h.
References getBuiltinVaListDecl(), and getTypeDeclType().
Referenced by clang::Sema::BuildVAArgExpr(), DecodeTypeFromStr(), and Desugar().
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 4935 of file ASTContext.cpp.
References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.
Referenced by clang::CodeGen::CodeGenFunction::emitByrefStructureInit().
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 4322 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::Sema::CheckUsingDeclRedeclaration(), clang::NamedDecl::declarationReplaces(), getDependentNameType(), getDependentTemplateName(), and getDependentTemplateSpecializationType().
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 4055 of file ASTContext.cpp.
References clang::CanQual< Type >::CreateUnsafe(), getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::QualType::getTypePtr(), getVariableArrayDecayedType(), and clang::Result.
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), arrangeFreeFunctionLikeCall(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), and getFunctionType().
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 4270 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 getCanonicalTemplateName(), getCanonicalTemplateSpecializationType(), and getDependentTemplateSpecializationType().
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 4221 of file ASTContext.cpp.
References clang::TemplateName::DependentTemplate, clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getCanonicalDecl(), getCanonicalTemplateArgument(), clang::TemplateName::getKind(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::SubstTemplateTemplateParmStorage::getReplacement(), getSubstTemplateTemplateParmPack(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::CheckTemplateIdType(), DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), clang::Sema::getMoreSpecializedPartialSpecialization(), hasSameTemplateName(), isSameTemplateArg(), and clang::TemplateArgument::Profile().
QualType ASTContext::getCanonicalTemplateSpecializationType | ( | TemplateName | T, |
const TemplateArgument * | Args, | ||
unsigned | NumArgs | ||
) | const |
Definition at line 3351 of file ASTContext.cpp.
References Allocate(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsQualifiedTemplateName(), getCanonicalTemplateArgument(), getCanonicalTemplateName(), clang::Type::isDependentType(), clang::TemplateSpecializationType::Profile(), and clang::TypeAlignment.
Referenced by getTemplateSpecializationType().
|
inline |
Return the canonical (structural) type corresponding to the specified potentially non-canonical type T
.
The non-canonical version of a type may have many "decorated" versions of types. Decorators can include typedefs, 'typeof' operators, etc. The returned type is guaranteed to be free of any of these, allowing two canonical types to be compared for exact equality with a simple pointer comparison.
Definition at line 1855 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and clang::QualType::getCanonicalType().
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCXXMemberReference(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), clang::Sema::AddConversionCandidate(), addFunctionPointerConversion(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildDeclaratorGroup(), BuildFieldReferenceExpr(), clang::Sema::BuildReferenceType(), BuildSimilarlyQualifiedPointerType(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), clang::Sema::BuildUsingDeclaration(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckConstructor(), clang::Sema::CheckDerivedToBaseConversion(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCMethodOverrides(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CodeCompleteConstructorInitializer(), CollectVRQualifiers(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadConversion(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::ento::SValBuilder::evalCast(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), FindOverriddenMethod(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), getBlockPointerType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), getComplexType(), getConstantArrayType(), GetConversionType(), getDecayedType(), getDecltypeType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), clang::CXXRecordDecl::getDestructor(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getFunctionNoProtoType(), getFunctionType(), getIncompleteArrayType(), getIntegerTypeOrder(), GetKeyForBase(), getLValueReferenceType(), getMemberPointerType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getPackExpansionType(), getParenType(), getPointerType(), getRValueReferenceType(), getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTagInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), clang::Sema::getTemplateInstantiationArgs(), getTemplateSpecializationType(), getTypedefType(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), getVectorType(), clang::Sema::HandlePropertyInClassExtension(), hasSameType(), hasSameUnqualifiedType(), clang::ento::SValBuilder::haveSameType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitCatchParam(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), IsModifiable(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Sema::IsNoReturnConversion(), clang::Sema::isObjCPointerConversion(), isObjCReceiverType(), clang::Sema::IsOverload(), clang::Sema::IsQualificationConversion(), clang::Sema::isSameOrCompatibleFunctionType(), isSameTemplateArg(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), IsStandardConversion(), IsStringInit(), clang::Expr::isUnusedResultAWarning(), clang::Sema::LookupConstructors(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupSpecialMember(), clang::Sema::MarkDeclarationsReferencedInType(), MarkUsedTemplateParameters(), MatchesFriend(), clang::analyze_format_string::ArgType::matchesType(), matchTypes(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypes(), MightInstantiateTo(), NoteIndirectBases(), OpenCLArithmeticConversions(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::ProcessPropertyDecl(), clang::ASTReader::ReadDeclarationName(), clang::LookupResult::resolveKind(), ResolveOverloadedFunctionForReferenceBinding(), rewriteToObjCProperty(), clang::CXXRecordDecl::setBases(), TryConstCast(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), clang::CodeGen::CodeGenFunction::TypeOfSelfObject(), clang::Sema::UsualArithmeticConversions(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().
Definition at line 1859 of file ASTContext.h.
References clang::Type::getCanonicalTypeInternal(), and clang::QualType::getTypePtr().
QualType ASTContext::getCFConstantStringType | ( | ) | const |
Return the C structure type used to represent constant CFStrings.
Definition at line 4770 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, buildImplicitRecord(), CharTy, clang::RecordDecl::completeDefinition(), clang::FieldDecl::Create(), getPointerType(), getTagDeclType(), clang::ICIS_NoInit, IntTy, LongTy, clang::Decl::setAccess(), clang::TagDecl::startDefinition(), and clang::CanQual< T >::withConst().
Referenced by DecodeTypeFromStr(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().
|
inline |
Return the size of the character type, in bits.
Definition at line 1705 of file ASTContext.h.
References CharTy, and getTypeSize().
Referenced by clang::Sema::BuildCXXNew(), collectSubRegionBindings(), clang::CodeGen::CGObjCRuntime::ComputeIvarBaseOffset(), diagnoseStringPlusChar(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::ento::MemRegion::getAsOffset(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), toBits(), and toCharUnitsFromBits().
FunctionDecl * ASTContext::getClassScopeSpecializationPattern | ( | const FunctionDecl * | FD | ) |
Definition at line 1148 of file ASTContext.cpp.
Referenced by clang::FunctionDecl::getClassScopeSpecializationPattern().
|
inline |
Definition at line 697 of file ASTContext.h.
Referenced by clang::index::CommentToXMLConverter::convertCommentToHTML(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::index::CommentToXMLConverter::convertHTMLTagNodeToText(), clang::comments::Comment::dump(), 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 NULL if no comment is attached.
PP | the Preprocessor used with this TU. Could be NULL if preprocessor is not available. |
Definition at line 439 of file ASTContext.cpp.
References addRedeclaredMethods(), clang::AS_public, cloneFullComment(), clang::ObjCMethodDecl::findPropertyDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getCanonicalDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::RawComment::parse(), and ParsedComments.
Referenced by clang::Sema::ActOnDocumentableDecls().
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 2249 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ComplexType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnNumericConstant(), DecodeTypeFromStr(), getComplexType(), handleComplexFloatConversion(), handleIntToFloatConversion(), handleModeAttr(), InitBuiltinTypes(), and clang::ASTNodeImporter::VisitComplexType().
|
inline |
Definition at line 970 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and 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 4501 of file ASTContext.cpp.
References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().
Referenced by clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().
QualType ASTContext::getConstantArrayType | ( | QualType | EltTy, |
const llvm::APInt & | ArySizeIn, | ||
ArrayType::ArraySizeModifier | ASM, | ||
unsigned | IndexTypeQuals | ||
) | const |
Return the unique reference to the type for a constant array of the specified element type.
getConstantArrayType - Return the unique reference to the type for an array of the specified element type.
Definition at line 2504 of file ASTContext.cpp.
References getCanonicalType(), clang::TargetInfo::getPointerWidth(), getQualifiedType(), getTargetAddressSpace(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPredefinedExpr(), CheckStringInit(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), getAsArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), TryInitializerListConstruction(), TryToFixInvalidVariablyModifiedType(), and clang::ASTNodeImporter::VisitConstantArrayType().
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 952 of file ASTContext.h.
References clang::QualType::withConst().
const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject | ( | CXXRecordDecl * | RD | ) |
Definition at line 8522 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Definition at line 7825 of file ASTContext.cpp.
References clang::Type::getAs(), clang::BuiltinType::getKind(), getVectorType(), clang::Type::hasSignedIntegerRepresentation(), UnsignedCharTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongLongTy, UnsignedLongTy, and UnsignedShortTy.
Referenced by checkPointerTypesForAssignment(), getUIntPtrType(), handleIntegerConversion(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 1016 of file ASTContext.h.
Referenced by clang::Sema::ActOnCUDAExecConfigExpr().
const CXXMethodDecl * ASTContext::getCurrentKeyFunction | ( | const CXXRecordDecl * | RD | ) |
Get our current best idea for the key function of the given record decl, or NULL if there isn't one.
The key function is, according to the Itanium C++ ABI section 5.2.3: ...the first non-pure virtual function that is not inline at the point of class definition.
Other ABIs use the same idea. However, the ARM C++ ABI ignores virtual functions that are defined 'inline', which means that the result of this computation can change.
Definition at line 2955 of file RecordLayoutBuilder.cpp.
References bool, computeKeyFunction(), clang::CXXRecordDecl::getDefinition(), getExternalSource(), getTargetInfo(), and clang::Result.
Referenced by clang::Sema::ActOnFinishFunctionBody(), DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::CodeGen::CodeGenVTables::isVTableExternal(), and clang::ASTDeclWriter::VisitCXXRecordDecl().
Return a type with additional const
, volatile
, or restrict
qualifiers.
Definition at line 1576 of file ASTContext.h.
References clang::Qualifiers::fromCVRMask(), and getQualifiedType().
Referenced by clang::Sema::CheckPointerToMemberOperands(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), and TryObjectArgumentInitialization().
Return the uniqued reference to the decayed version of the given type. Can only be called on array and function types which decay to pointer types.
Definition at line 2324 of file ASTContext.cpp.
References getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckNonTypeTemplateParameterType(), getAdjustedParameterType(), getDecayedType(), and getExceptionObjectType().
|
inline |
Definition at line 993 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getDecayedType().
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 1309 of file ASTContext.cpp.
References clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::TargetInfo::getCharWidth(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getLargeArrayAlign(), clang::TargetInfo::getLargeArrayMinWidth(), clang::Decl::getMaxAlignment(), clang::TargetInfo::getMinGlobalAlign(), clang::DeclContext::getParent(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), getTargetInfo(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), toBits(), and toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenFunction::BuildByRefType(), computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitFunctionDeclLValue(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::Sema::FinalizeDeclaration(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), InitCatchParam(), and clang::Sema::isCopyElisionCandidate().
Retrieve the attributes for the given declaration.
Definition at line 1093 of file ASTContext.cpp.
References Allocate(), and clang::Result.
Referenced by clang::Decl::getAttrs().
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 3877 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentDecltypeType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildDecltypeType(), and clang::ASTNodeImporter::VisitDecltypeType().
Expr * ASTContext::getDefaultArgExprForConstructor | ( | const CXXConstructorDecl * | CD, |
unsigned | ParmIdx | ||
) |
Definition at line 8540 of file ASTContext.cpp.
References clang::Redeclarable< decl_type >::getFirstDecl().
Referenced by clang::Sema::CheckCXXThrowOperand(), and getDefaultArgExprsForConstructors().
CallingConv ASTContext::getDefaultCallingConvention | ( | bool | isVariadic, |
bool | IsCXXMethod | ||
) | const |
Retrieves the default calling convention for the current target.
Definition at line 8394 of file ASTContext.cpp.
References clang::CC_X86StdCall, clang::TargetInfo::CCMT_Unknown, and clang::TargetInfo::getDefaultCallingConv().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), getCCForDeclaratorChunk(), getImplicitMethodEPI(), and hasDefaultCXXMethodCC().
QualType ASTContext::getDependentNameType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3445 of file ASTContext.cpp.
References clang::ETK_None, clang::ETK_Typename, getCanonicalNestedNameSpecifier(), clang::QualType::isNull(), clang::DependentNameType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnDelayedDefaultTemplateArg(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckTypenameType(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), and recoverFromTypeInKnownDependentBase().
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.
FIXME: We will need these to be uniqued, or at least comparable, at some point.
getDependentSizedArrayType - Returns a non-unique reference to the type for a dependently-sized array of the specified element type.
Definition at line 2710 of file ASTContext.cpp.
References getCanonicalType(), getQualifiedType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::DependentSizedArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.
Referenced by clang::Sema::BuildArrayType(), 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 2876 of file ASTContext.cpp.
References getCanonicalType(), clang::DependentSizedExtVectorType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildExtVectorType().
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 6409 of file ASTContext.cpp.
References getCanonicalNestedNameSpecifier(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().
Referenced by clang::Sema::ActOnDependentTemplateName(), clang::Sema::DiagnoseUnknownTemplateName(), getDependentTemplateName(), clang::ASTImporter::Import(), and clang::ASTReader::ReadTemplateName().
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 6445 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 3475 of file ASTContext.cpp.
References clang::TemplateArgumentListInfo::size().
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::CheckTemplateIdType(), and getDependentTemplateSpecializationType().
QualType ASTContext::getDependentTemplateSpecializationType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
const IdentifierInfo * | Name, | ||
unsigned | NumArgs, | ||
const TemplateArgument * | Args | ||
) | const |
Definition at line 3490 of file ASTContext.cpp.
References Allocate(), clang::ETK_None, clang::ETK_Typename, getCanonicalNestedNameSpecifier(), getCanonicalTemplateArgument(), getDependentTemplateSpecializationType(), clang::NestedNameSpecifier::isDependent(), clang::DependentTemplateSpecializationType::Profile(), and clang::TypeAlignment.
|
inline |
Definition at line 514 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().
DiagnosticsEngine & ASTContext::getDiagnostics | ( | ) | const |
Definition at line 1089 of file ASTContext.cpp.
References clang::SourceManager::getDiagnostics().
Referenced by checkNullabilityConsistency(), createMangleContext(), clang::ASTImporter::FromDiag(), clang::ASTImporter::Import(), clang::ASTReader::InitializeContext(), clang::RecordDecl::mayInsertExtraPadding(), clang::RawComment::parse(), rewriteToNumericBoxedExpression(), selectBestPath(), and clang::ASTImporter::ToDiag().
QualType ASTContext::getElaboratedType | ( | ElaboratedTypeKeyword | Keyword, |
NestedNameSpecifier * | NNS, | ||
QualType | NamedType | ||
) | const |
Definition at line 3396 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ElaboratedType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::BuildMemInitializer(), clang::Sema::CheckTypenameType(), clang::Sema::getElaboratedType(), GetFullTypeForDeclarator(), and clang::ASTNodeImporter::VisitElaboratedType().
Definition at line 3134 of file ASTContext.cpp.
References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by clang::CodeGen::CGDebugInfo::completeType().
Definition at line 4448 of file ASTContext.cpp.
References getDecayedType(), clang::QualType::getUnqualifiedType(), getVariableArrayDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by clang::Sema::BuildCXXThrow(), clang::Sema::BuildExceptionDeclaration(), and decomposeTypeForEH().
|
inline |
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition at line 864 of file ASTContext.h.
References ExternalSource.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::ASTUnit::findFileRegionDecls(), getASTRecordLayout(), getCurrentKeyFunction(), clang::Sema::getStdBadAlloc(), clang::Sema::getStdNamespace(), clang::Sema::hasVisibleDefinition(), clang::ExternalASTSource::incrementGeneration(), clang::Sema::Initialize(), clang::FunctionTemplateDecl::LoadLazySpecializations(), clang::ClassTemplateDecl::LoadLazySpecializations(), clang::VarTemplateDecl::LoadLazySpecializations(), clang::DeclContext::lookup(), clang::DeclContext::lookups(), clang::LazyGenerationalUpdatePtr< Owner, T, Update >::makeValue(), clang::ParseAST(), setNonKeyFunction(), clang::Decl::updateOutOfDate(), clang::ASTNodeImporter::VisitRecordDecl(), and clang::Sema::~Sema().
ExternCContextDecl * ASTContext::getExternCContextDecl | ( | ) | const |
Definition at line 894 of file ASTContext.cpp.
References clang::ExternCContextDecl::Create(), and getTranslationUnitDecl().
Referenced by clang::Sema::findLocallyScopedExternCDecl(), getPredefinedDecl(), and clang::Sema::RegisterLocallyScopedExternCDecl().
Return the unique reference to an extended vector type of the specified element type and size.
VectorType
must be a built-in type.getExtVectorType - Return the unique reference to an extended vector type of the specified element type and size. VectorType must be a built-in type.
Definition at line 2847 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 clang::Sema::BuildExtVectorType(), CheckExtVectorComponent(), checkOpenCLVectorShift(), DecodeTypeFromStr(), clang::Sema::GetSignedVectorType(), OpenCLConvertScalarsToVectors(), and clang::ASTNodeImporter::VisitExtVectorType().
uint64_t ASTContext::getFieldOffset | ( | const ValueDecl * | FD | ) | const |
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition at line 3006 of file RecordLayoutBuilder.cpp.
References clang::IndirectFieldDecl::chain().
Referenced by clang::CodeGen::CodeGenModule::getMemberPointerConstant().
|
inline |
Retrieve the C FILE type.
Definition at line 1398 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
TypeDecl * ASTContext::getFloat128StubType | ( | ) | const |
Retrieve the declaration for a 128-bit float stub type.
Definition at line 939 of file ASTContext.cpp.
References buildImplicitRecord().
Referenced by LookupBuiltin().
Return 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. |
getFloatingTypeOfSizeWithinDomain - Returns a real floating point or a complex type (based on typeDomain/typeSize). 'typeDomain' is a real floating point or complex type. 'typeSize' is a real floating point or complex type.
Definition at line 4531 of file ASTContext.cpp.
References DoubleComplexTy, DoubleRank, DoubleTy, 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. 'double' == '_Complex double').
If LHS
> RHS
, returns 1. If LHS
== RHS
, returns 0. If LHS
< RHS
, return -1.
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, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.
Definition at line 4557 of file ASTContext.cpp.
References getFloatingRank().
Referenced by clang::StandardConversionSequence::getNarrowingKind(), handleComplexFloatConversion(), handleFloatConversion(), and tryVectorConvertAndSplat().
const llvm::fltSemantics & ASTContext::getFloatTypeSemantics | ( | QualType | T | ) | const |
Return the APFloat 'semantics' for the specified scalar floating point type.
getFloatTypeSemantics - Return the APFloat 'semantics' for the specified scalar floating point type.
Definition at line 1297 of file ASTContext.cpp.
References clang::Type::getAs(), clang::TargetInfo::getDoubleFormat(), clang::TargetInfo::getFloatFormat(), clang::TargetInfo::getHalfFormat(), clang::BuiltinType::getKind(), and clang::TargetInfo::getLongDoubleFormat().
Referenced by clang::Sema::ActOnOpenMPReductionClause(), BuildFloatingLiteral(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::StandardConversionSequence::getNarrowingKind(), and TryEvaluateBuiltinNaN().
|
inline |
Definition at line 541 of file ASTContext.h.
References SourceMgr.
Referenced by clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and clang::CodeGen::CGCXXABI::ErrorUnsupportedABI().
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 2920 of file ASTContext.cpp.
References getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::QualType::isCanonical(), clang::FunctionNoProtoType::Profile(), clang::TypeAlignment, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by adjustFunctionType(), clang::Sema::BuildDeclarationNameExpr(), EmitFunctionDeclLValue(), GetBuiltinType(), GetFullTypeForDeclarator(), getFunctionNoProtoType(), clang::ento::MemRegionManager::getVarRegion(), mergeFunctionTypes(), clang::QualType::substObjCTypeArgs(), and clang::ASTNodeImporter::VisitFunctionNoProtoType().
Definition at line 1104 of file ASTContext.h.
References getFunctionNoProtoType().
QualType ASTContext::getFunctionType | ( | QualType | ResultTy, |
ArrayRef< QualType > | Args, | ||
const FunctionProtoType::ExtProtoInfo & | EPI | ||
) | const |
Return a normal function type with a typed argument list.
Definition at line 2960 of file ASTContext.cpp.
References Allocate(), bool, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_None, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, getCanonicalParamType(), getCanonicalType(), getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, isCanonicalResultType(), clang::FunctionProtoType::Profile(), clang::Qualifiers::removeObjCLifetime(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStartOfLambdaDefinition(), addBlockPointerConversion(), addFunctionPointerConversion(), adjustDeducedFunctionResultType(), clang::Sema::AdjustDestructorExceptionSpec(), adjustFunctionType(), adjustFunctionTypeForInstantiation(), clang::Sema::BuildFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::FindAllocationFunctions(), GetBuiltinType(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::startLambdaDefinition(), clang::QualType::substObjCTypeArgs(), clang::ASTDeclReader::UpdateDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitFunctionProtoType().
GVALinkage ASTContext::GetGVALinkageForFunction | ( | const FunctionDecl * | FD | ) | const |
Definition at line 8251 of file ASTContext.cpp.
References adjustGVALinkageForDLLAttribute(), and basicGVALinkageForFunction().
Referenced by basicGVALinkageForVariable(), DeclMustBeEmitted(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), isFunctionDefinitionDiscarded(), and shouldBeInCOMDAT().
GVALinkage ASTContext::GetGVALinkageForVariable | ( | const VarDecl * | VD | ) |
Definition at line 8304 of file ASTContext.cpp.
References adjustGVALinkageForDLLAttribute(), 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 2777 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::BuildArrayType(), getAsArrayType(), getUnqualifiedArrayType(), mergeTypes(), and clang::ASTNodeImporter::VisitIncompleteArrayType().
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 3057 of file ASTContext.cpp.
References clang::CXXRecordDecl::getPreviousDecl(), NeedsInjectedClassNameType(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckClassTemplate(), and clang::ClassTemplatePartialSpecializationDecl::Create().
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 4696 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.
Referenced by clang::Sema::GetTypeForDeclaratorCast().
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 1114 of file ASTContext.cpp.
References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().
Definition at line 1203 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitFieldDecl().
If the given using decl Inst
is an instantiation of a (possibly unresolved) using decl from a template instantiation, return it.
Definition at line 1167 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitUsingDecl().
UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst | ) |
Definition at line 1187 of file ASTContext.cpp.
Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitUsingShadowDecl().
TypedefDecl * ASTContext::getInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit signed integer type.
Definition at line 927 of file ASTContext.cpp.
References buildImplicitTypedef(), and Int128Ty.
Referenced by getPredefinedDecl(), and clang::Sema::Initialize().
Return the highest ranked integer type, see C99 6.3.1.8p1.
If LHS
> RHS
, returns 1. If LHS
== RHS
, returns 0. If LHS
< RHS
, return -1.
getIntegerTypeOrder - Returns the highest ranked integer type: C99 6.3.1.8p1. If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.
Definition at line 4724 of file ASTContext.cpp.
References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().
Referenced by handleIntegerConversion(), and tryVectorConvertAndSplat().
CanQualType ASTContext::getIntMaxType | ( | ) | const |
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5).
Definition at line 4008 of file ASTContext.cpp.
References clang::TargetInfo::getIntMaxType().
Referenced by clang::Sema::ActOnNumericConstant(), clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getIntPtrType | ( | ) | const |
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4031 of file ASTContext.cpp.
References clang::TargetInfo::getIntPtrType().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), getUIntPtrType(), and clang::Sema::Initialize().
getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned. Returns empty type if there is no appropriate target types.
Definition at line 8458 of file ASTContext.cpp.
References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionStart(), AddDirectArgument(), CheckOpenMPLoop(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitIfStmt(), and handleModeAttr().
Definition at line 7816 of file ASTContext.cpp.
References clang::Type::getAs(), getTypeSize(), and clang::Type::isBooleanType().
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), CheckICE(), clang::Sema::DiagnoseAssignmentEnum(), getLegacyIntegralTypeEncoding(), clang::StandardConversionSequence::getNarrowingKind(), getPromotedIntegerType(), handleIntegerConversion(), clang::IntegerLiteral::IntegerLiteral(), isOverflowingIntegerType(), isRepresentableIntegerValue(), and MakeIntValue().
|
inline |
Retrieve the C jmp_buf type.
Definition at line 1410 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
|
inline |
Definition at line 533 of file ASTContext.h.
Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), AllowOverloadingOfFunction(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), basicGVALinkageForFunction(), BlockRequiresCopying(), buildBlockDescriptor(), buildImplicitRecord(), CalculateHiddenNames(), clang::arcmt::trans::canApplyWeak(), clang::Decl::canBeWeakImported(), CastsAwayConstness(), CheckAvailability(), CheckForIncompatibleAttributes(), clang::arcmt::checkForManualIssues(), CheckICE(), clang::VarDecl::checkInitIsICE(), clang::Sema::CheckLogicalOperands(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeBlockInfo(), computeDeclRefDependence(), clang::PredefinedExpr::ComputeName(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXRecordDecl::Create(), clang::ObjCInterfaceDecl::Create(), clang::ObjCProtocolDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinUnaryOp(), clang::ObjCInterfaceDecl::CreateDeserialized(), clang::ObjCProtocolDecl::CreateDeserialized(), clang::EnumDecl::CreateDeserialized(), clang::RecordDecl::CreateDeserialized(), DiagnoseSwitchLabelsFallthrough(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenModule::EmitConstantValue(), EncodeBitField(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), clang::Sema::FindAllocationFunctions(), clang::arcmt::trans::findSemiAfterLocation(), clang::FormatASTNodeDiagnosticArgument(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getASTRecordLayout(), clang::FunctionDecl::getBuiltinID(), getByrefLifetime(), getCallingConvMangling(), clang::ento::SValBuilder::getConditionType(), getDeclLanguageLinkage(), GetDiagForGotoScopeDecl(), clang::ento::CheckerContext::getLangOpts(), clang::ASTWriter::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getLogicalOperationType(), clang::LinkageComputer::getLVForDecl(), getLVForLocalDecl(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCEncodingForBlock(), getObjCGCAttrKind(), clang::Sema::getPrintingPolicy(), clang::ObjCMethodDecl::getSelfType(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::Sema::handleTagNumbering(), clang::Decl::hasLocalOwningModuleStorage(), clang::InitializedEntity::InitializeParameter(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::Expr::isCXX11ConstantExpr(), clang::QualType::isCXX11PODType(), clang::QualType::isCXX98PODType(), clang::ASTReader::isGlobalIndexUnavailable(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::Sema::isLaxVectorConversion(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::FunctionDecl::isMSExternInline(), isMSStaticDataMemberInlineDefinition(), clang::RecordDecl::isMsStruct(), clang::Expr::isNullPointerConstant(), isObjCReceiverType(), isOutOfScopePreviousDeclaration(), clang::QualType::isPODType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::VarDecl::isThisDeclarationADefinition(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), isVarDeclStrongDefinition(), IsWideCharCompatible(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::ASTReader::loadGlobalIndex(), LocPropertyAttribute(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), mayInlineDecl(), clang::RecordDecl::mayInsertExtraPadding(), mergeDefinitionIntoModule(), clang::ASTDeclReader::mergeDefinitionVisibility(), PrintStats(), clang::ASTReader::ReadAST(), clang::ASTReader::ReadComments(), clang::CodeGen::CodeGenModule::Release(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::edit::rewriteToObjCLiteralSyntax(), setObjCGCLValueClass(), shouldNotRewriteImmediateMessageArgs(), ShouldUseExternalRTTIDescriptor(), typesAreCompatible(), UnwrapSimilarPointerTypes(), clang::ASTDeclReader::UpdateDecl(), useInlineVisibilityHidden(), clang::ASTNodeImporter::VisitBuiltinType(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitRecordDecl(), and clang::ASTDeclWriter::VisitRedeclarable().
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 5288 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 1604 of file ASTContext.h.
References clang::Qualifiers::addObjCLifetime(), clang::QualType::getObjCLifetime(), getQualifiedType(), and clang::Qualifiers::OCL_None.
Referenced by clang::Sema::BuildCXXNew(), clang::Sema::CheckParameter(), and clang::Sema::inferObjCARCLifetime().
comments::FullComment * ASTContext::getLocalCommentForDeclUncached | ( | const Decl * | D | ) | const |
Return parsed documentation comment attached to a given declaration. Returns NULL if no comment is attached. Does not look at any redeclarations of the declaration.
Definition at line 434 of file ASTContext.cpp.
References getRawCommentForDeclNoCache(), and clang::RawComment::parse().
|
inline |
The result type of logical operations, '<', '>', '!=', etc.
Definition at line 1441 of file ASTContext.h.
References BoolTy, getLangOpts(), and IntTy.
Referenced by clang::Sema::BuildTypeTrait(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CreateBuiltinUnaryOp(), 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 2398 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::ReferenceType::getPointeeType(), clang::QualType::isCanonical(), OverloadTy, clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AddBuiltinAssignmentOperatorCandidates(), AddImplicitObjectParameterType(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildReferenceType(), clang::Sema::BuildVAArgExpr(), captureInCapturedRegion(), captureInLambda(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitMoveAssignment(), DecodeTypeFromStr(), Desugar(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), clang::Expr::EvaluateAsLValue(), getDecltypeForExpr(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), NoteSurrogateCandidate(), clang::InitializationSequence::Perform(), clang::Sema::SpecialMemberIsTrivial(), clang::Sema::tryCaptureVariable(), TryClassUnification(), and clang::ASTNodeImporter::VisitLValueReferenceType().
Definition at line 8491 of file ASTContext.cpp.
Referenced by clang::Sema::BuildVariableInstantiation(), and clang::TemplateDeclInstantiator::InitFunctionInstantiation().
MangleNumberingContext & ASTContext::getManglingNumberContext | ( | const DeclContext * | DC | ) |
Retrieve the context for computing mangling numbers in the given DeclContext.
Definition at line 8509 of file ASTContext.cpp.
References createMangleNumberingContext().
Referenced by clang::Sema::getCurrentMangleNumberContext(), and clang::Sema::handleTagNumbering().
APValue * ASTContext::getMaterializedTemporaryValue | ( | const MaterializeTemporaryExpr * | E, |
bool | MayCreate | ||
) |
Get the storage for the constant value of a materialized temporary of static storage duration.
Definition at line 8558 of file ASTContext.cpp.
References clang::MaterializeTemporaryExpr::getStorageDuration(), and clang::SD_Static.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary().
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.
getMemberPointerType - Return the uniqued reference to the type for a member pointer to the specified type, in the specified class.
Definition at line 2473 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isCanonicalUnqualified(), clang::MemberPointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildMemberPointerType(), clang::Sema::CheckAddressOfOperand(), decomposeTypeForEH(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), GetTypeOfFunction(), clang::Sema::IsMemberPointerConversion(), IsStandardConversion(), TryStaticMemberPointerUpcast(), and clang::ASTNodeImporter::VisitMemberPointerType().
Get the additional modules in which the definition Def
has been merged.
Definition at line 805 of file ASTContext.h.
References clang::None.
Referenced by clang::Sema::diagnoseMissingImport(), hasVisibleDefaultArgument(), and clang::Sema::hasVisibleMergedDefinition().
DeclarationNameInfo ASTContext::getNameForTemplate | ( | TemplateName | Name, |
SourceLocation | NameLoc | ||
) | const |
Definition at line 4172 of file ASTContext.cpp.
References clang::OverloadedTemplateStorage::begin(), clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationNameLoc::CXXOperatorName, DeclarationNames, clang::TemplateName::DependentTemplate, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getDeclName(), clang::DeclarationNameTable::getIdentifier(), clang::DependentTemplateName::getIdentifier(), clang::TemplateName::getKind(), clang::DependentTemplateName::getOperator(), clang::SubstTemplateTemplateParmStorage::getParameter(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::SourceLocation::getRawEncoding(), clang::DependentTemplateName::isIdentifier(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.
Referenced by clang::Sema::DecomposeUnqualifiedId(), and clang::Sema::GetNameFromUnqualifiedId().
|
inlinestatic |
Definition at line 778 of file ASTContext.h.
|
inline |
Retrieve the identifier 'NSCopying'.
Definition at line 1376 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
|
inline |
Retrieve the identifier 'NSObject'.
Definition at line 1367 of file ASTContext.h.
References clang::IdentifierTable::get(), and Idents.
Referenced by clang::Type::isBlockCompatibleObjCPointerType().
TypedefDecl * ASTContext::getObjCClassDecl | ( | ) | const |
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
Definition at line 5974 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinClassTy.
Referenced by getObjCClassType(), getPredefinedDecl(), and 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 1341 of file ASTContext.h.
References getObjCClassType(), and clang::QualType::isNull().
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::FindCompositeObjCPointerType(), and 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 1532 of file ASTContext.h.
References getObjCClassDecl(), and getTypeDeclType().
Referenced by Desugar(), getObjCClassRedefinitionType(), clang::ObjCMethodDecl::getSelfType(), isObjCClassType(), LookupMemberExpr(), and clang::Sema::MergeTypedefNameDecl().
|
inline |
Definition at line 1314 of file ASTContext.h.
Referenced by clang::Sema::BuildObjCStringLiteral().
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 5005 of file ASTContext.cpp.
References charUnitsToString(), clang::Type::getAs(), clang::BlockExpr::getBlockDecl(), clang::Type::getCanonicalTypeInternal(), getLangOpts(), getObjCEncodingForMethodParameter(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::FunctionType::getReturnType(), clang::Expr::getType(), getTypeSizeInChars(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::Decl::OBJC_TQ_None, clang::BlockDecl::params(), S, and VoidPtrTy.
Referenced by buildBlockDescriptor().
bool ASTContext::getObjCEncodingForFunctionDecl | ( | const FunctionDecl * | Decl, |
std::string & | S | ||
) |
Emit the encoded type for the function Decl
into S
.
This is in the same format as Objective-C method encodings.
Definition at line 5061 of file ASTContext.cpp.
References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::FunctionDecl::getReturnType(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::FunctionDecl::params(), S, and clang::CharUnits::Zero().
bool ASTContext::getObjCEncodingForMethodDecl | ( | const ObjCMethodDecl * | Decl, |
std::string & | S, | ||
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 5118 of file ASTContext.cpp.
References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ParmVarDecl::getObjCDeclQualifier(), getObjCEncodingForMethodParameter(), getObjCEncodingTypeSize(), clang::ParmVarDecl::getOriginalType(), clang::ObjCMethodDecl::getReturnType(), clang::ValueDecl::getType(), getTypeSizeInChars(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::ObjCMethodDecl::param_begin(), S, clang::ObjCMethodDecl::sel_param_end(), and VoidPtrTy.
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 5102 of file ASTContext.cpp.
References getObjCEncodingForTypeQualifier().
Referenced by getObjCEncodingForBlock(), and getObjCEncodingForMethodDecl().
void ASTContext::getObjCEncodingForPropertyDecl | ( | const ObjCPropertyDecl * | PD, |
const Decl * | Container, | ||
std::string & | S | ||
) | const |
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration. If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties.
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. 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 5216 of file ASTContext.cpp.
References clang::ObjCPropertyDecl::Assign, clang::ObjCPropertyDecl::Copy, clang::ObjCPropertyImplDecl::Dynamic, clang::Selector::getAsString(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getNameAsString(), getObjCEncodingForPropertyType(), getObjCPropertyImplDeclForPropertyDecl(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyDecl::getSetterKind(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_getter, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_setter, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::ObjCPropertyDecl::Retain, S, and clang::ObjCPropertyDecl::Weak.
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 5312 of file ASTContext.cpp.
Referenced by getObjCEncodingForPropertyDecl().
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 5300 of file ASTContext.cpp.
Referenced by clang::Sema::BuildObjCEncodeExpression(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), getObjCEncodingForBlock(), and getObjCEncodingForFunctionDecl().
void ASTContext::getObjCEncodingForTypeQualifier | ( | Decl::ObjCDeclQualifier | QT, |
std::string & | S | ||
) | const |
Put the string version of the type qualifiers QT
into S
.
Definition at line 5941 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.
Referenced by getObjCEncodingForMethodParameter().
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 4977 of file ASTContext.cpp.
References getTypeSizeInChars(), IntTy, clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::CharUnits::isPositive(), VoidPtrTy, and clang::CharUnits::Zero().
Referenced by getObjCEncodingForBlock(), getObjCEncodingForFunctionDecl(), and getObjCEncodingForMethodDecl().
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 6546 of file ASTContext.cpp.
References clang::Qualifiers::GCNone, clang::Type::getAs(), clang::Type::getCanonicalTypeInternal(), clang::ArrayType::getElementType(), getLangOpts(), clang::QualType::getObjCGCAttr(), clang::PointerType::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::LangOptions::NonGC, and clang::Qualifiers::Strong.
Referenced by clang::Expr::isOBJCGCCandidate(), and clang::CodeGen::LValue::MakeAddr().
QualType ASTContext::getObjCGCQualType | ( | QualType | T, |
Qualifiers::GC | gcAttr | ||
) | const |
Return the uniqued reference to the type for an Objective-C gc-qualified type.
The retulting type has a union of the qualifiers from T and the gc attribute.
Definition at line 2129 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 clang::Sema::ActOnPropertyImplDecl(), handleObjCGCTypeAttr(), and mergeTypes().
TypedefDecl * ASTContext::getObjCIdDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined id
type in Objective-C.
Definition at line 5957 of file ASTContext.cpp.
References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinIdTy.
Referenced by getObjCIdType(), getPredefinedDecl(), and 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 1328 of file ASTContext.h.
References getObjCIdType(), and clang::QualType::isNull().
Referenced by clang::Sema::FindCompositeObjCPointerType(), and 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 1510 of file ASTContext.h.
References getObjCIdDecl(), and getTypeDeclType().
Referenced by clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::actOnObjCTypeParam(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), DecodeTypeFromStr(), Desugar(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::Sema::FindCompositeObjCPointerType(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCIdRedefinitionType(), getObjCInstanceTypeDecl(), clang::ObjCMethodDecl::getSelfType(), isObjCIdType(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::PerformContextuallyConvertToObjCPointer(), stripObjCInstanceType(), and TryContextuallyConvertToObjCPointer().
ObjCImplementationDecl * ASTContext::getObjCImplementation | ( | ObjCInterfaceDecl * | D | ) |
Get the implementation of the ObjCInterfaceDecl D
, or NULL if none exists.
Get the implementation of ObjCInterfaceDecl,or NULL if none exists.
Definition at line 1980 of file ASTContext.cpp.
Referenced by clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCCategoryDecl::getImplementation().
ObjCCategoryImplDecl * ASTContext::getObjCImplementation | ( | ObjCCategoryDecl * | D | ) |
Get the implementation of the ObjCCategoryDecl D
, or NULL if none exists.
Get the implementation of ObjCCategoryDecl, or NULL if none exists.
Definition at line 1988 of file ASTContext.cpp.
|
inline |
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition at line 1386 of file ASTContext.h.
References getObjCInstanceTypeDecl(), and getTypeDeclType().
Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), ReplaceWithInstancetype(), and stripObjCInstanceType().
TypedefDecl * ASTContext::getObjCInstanceTypeDecl | ( | ) |
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
Definition at line 4958 of file ASTContext.cpp.
References buildImplicitTypedef(), and getObjCIdType().
Referenced by getObjCInstanceType(), and getPredefinedDecl().
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 3804 of file ASTContext.cpp.
References Allocate(), clang::ObjCInterfaceDecl::getDefinition(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnSuperClassOfClassInterface(), areCommonBaseCompatible(), clang::Sema::BuildClassMessage(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckObjCBridgeRelatedConversions(), clang::Sema::CheckObjCMethodOverride(), clang::Sema::ClassifyName(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CodeCompleteObjCSuperMessage(), clang::ObjCObjectType::computeSuperClassTypeSlow(), clang::ObjCInterfaceDecl::Create(), getBaseMessageSendResultType(), clang::getDeclUsageType(), getNSNumberFactoryMethod(), clang::Sema::getObjCMessageKind(), getObjCProtoType(), clang::ObjCPropertyRefExpr::getReceiverType(), GetReturnType(), clang::ObjCMethodDecl::getSelfType(), clang::Sema::getTypeName(), LookupMethodInReceiverType(), setObjCConstantStringInterface(), and clang::ASTNodeImporter::VisitObjCInterfaceType().
|
inline |
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
Definition at line 2236 of file ASTContext.h.
Referenced by setObjCMethodRedeclaration(), and clang::ASTDeclWriter::VisitObjCMethodDecl().
|
inline |
Definition at line 1318 of file ASTContext.h.
Referenced by clang::Sema::BuildObjCStringLiteral().
Return a ObjCObjectPointerType type for the given ObjCObjectType.
getObjCObjectPointerType - Return a ObjCObjectPointerType type for the given object type.
Definition at line 3774 of file ASTContext.cpp.
References Allocate(), getCanonicalType(), clang::QualType::isCanonical(), clang::ObjCObjectPointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnFields(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnSuperMessage(), applyObjCProtocolQualifiers(), areCommonBaseCompatible(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildReturnStmt(), BuildSimilarlyQualifiedPointerType(), canBindObjCObjectType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::checkObjCKindOfType(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CreatePropertyDecl(), Desugar(), getBaseMessageSendResultType(), GetFullTypeForDeclarator(), clang::ento::TypedValueRegion::getLocationType(), getNSNumberFactoryMethod(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), clang::ObjCMethodDecl::getSelfType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::Sema::ParseObjCProtocolExpression(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), and clang::ASTNodeImporter::VisitObjCObjectPointerType().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ObjCProtocolDecl *const * | Protocols, | ||
unsigned | NumProtocols | ||
) | const |
Legacy interface: cannot provide type arguments or __kindof.
Definition at line 3614 of file ASTContext.cpp.
Referenced by clang::Sema::actOnObjCProtocolQualifierType(), applyObjCProtocolQualifiers(), applyObjCTypeArgs(), areCommonBaseCompatible(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::checkObjCKindOfType(), Desugar(), getObjCClassDecl(), getObjCIdDecl(), getObjCObjectType(), clang::Type::getObjCSubstitutions(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), and clang::ASTNodeImporter::VisitObjCObjectType().
QualType ASTContext::getObjCObjectType | ( | QualType | Base, |
ArrayRef< QualType > | typeArgs, | ||
ArrayRef< ObjCProtocolDecl * > | protocols, | ||
bool | isKindOf | ||
) | const |
Definition at line 3622 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 2009 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 5172 of file ASTContext.cpp.
References clang::ObjCImplDecl::property_impls().
Referenced by getObjCEncodingForPropertyDecl().
ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl | ( | ) | const |
Retrieve the Objective-C class declaration corresponding to the predefined Protocol
class.
Definition at line 5983 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), and Idents.
Referenced by getObjCProtoType(), getPredefinedDecl(), and clang::Sema::Initialize().
|
inline |
Retrieve the type of the Objective-C Protocol
class.
Definition at line 1556 of file ASTContext.h.
References getObjCInterfaceType(), and getObjCProtocolDecl().
Referenced by Desugar(), and clang::Sema::ParseObjCProtocolExpression().
TypedefDecl * ASTContext::getObjCSelDecl | ( | ) | const |
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition at line 5966 of file ASTContext.cpp.
References buildImplicitTypedef(), getPointerType(), and ObjCBuiltinSelTy.
Referenced by getObjCSelType(), getPredefinedDecl(), and 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 1354 of file ASTContext.h.
References getObjCSelType(), and clang::QualType::isNull().
Referenced by clang::Sema::FindCompositeObjCPointerType(), and LookupMemberExpr().
|
inline |
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
Definition at line 1520 of file ASTContext.h.
References getObjCSelDecl(), and getTypeDeclType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), clang::ObjCMethodDecl::createImplicitParams(), DecodeTypeFromStr(), Desugar(), getObjCSelRedefinitionType(), isObjCSelType(), clang::Sema::MergeTypedefNameDecl(), and clang::Sema::ParseObjCSelectorExpression().
QualType ASTContext::getObjCSuperType | ( | ) | const |
Returns the C struct type for objc_super.
Definition at line 4805 of file ASTContext.cpp.
References clang::DeclContext::addDecl(), buildImplicitRecord(), getTagDeclType(), and clang::QualType::isNull().
Referenced by DecodeTypeFromStr().
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 1880 of file ASTContext.cpp.
References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), and clang::CharUnits::Zero().
Get default simd alignment of the specified complete type in bits.
Definition at line 1789 of file ASTContext.cpp.
References clang::TargetInfo::getSimdDefaultAlign(), getTargetInfo(), and clang::Type::isSpecificBuiltinType().
Referenced by emitAlignedClause().
TemplateName ASTContext::getOverloadedTemplateName | ( | UnresolvedSetIterator | Begin, |
UnresolvedSetIterator | End | ||
) | const |
Retrieve the template name that corresponds to a non-empty lookup.
Definition at line 6361 of file ASTContext.cpp.
References Allocate(), End, and clang::NamedDecl::getUnderlyingDecl().
Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), and clang::ASTReader::ReadTemplateName().
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 1258 of file ASTContext.cpp.
References clang::ObjCMethodDecl::getOverriddenMethods(), overridden_methods_begin(), and overridden_methods_end().
Referenced by getCommentForDecl().
Definition at line 3542 of file ASTContext.cpp.
References clang::Type::containsUnexpandedParameterPack(), getCanonicalType(), clang::QualType::isCanonical(), clang::PackExpansionType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::CheckPackExpansion(), GenerateInjectedTemplateArgs(), and GetFullTypeForDeclarator().
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 8550 of file ASTContext.cpp.
|
inline |
Returns the parents of the given node.
Note that this will lazily compute the parents of all nodes and store them for later retrieval. Thus, the first call is O(n) in the number of AST nodes.
Caveats and FIXMEs: Calculating the parent map over all AST nodes will need to load the full AST. This can be undesirable in the case where the full AST is expensive to create (for example, when using precompiled header preambles). Thus, there are good opportunities for optimization here. One idea is to walk the given node downwards, looking for references to declaration contexts - once a declaration context is found, compute the parent map for the declaration context; if that can satisfy the request, loading the whole AST can be avoided. Note that this is made more complex by statements in templates having multiple parents - those problems can be solved by building closure over the templated parts of the AST, which also avoids touching large parts of the AST. Additionally, we will want to add an interface to already give a hint where to search for the parents, for example when looking at a statement inside a certain function.
'NodeT' can be one of Decl, Stmt, Type, TypeLoc, NestedNameSpecifier or NestedNameSpecifierLoc.
Definition at line 479 of file ASTContext.h.
References clang::ast_type_traits::DynTypedNode::create().
ArrayRef< ast_type_traits::DynTypedNode > ASTContext::getParents | ( | const ast_type_traits::DynTypedNode & | Node | ) |
Definition at line 8692 of file ASTContext.cpp.
References clang::ast_type_traits::DynTypedNode::getMemoizationData(), getTranslationUnitDecl(), and clang::None.
Definition at line 3422 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::ParenType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildParenType(), getFunctionTypeWithExceptionSpec(), TryToFixInvalidVariablyModifiedType(), and clang::ASTNodeImporter::VisitParenType().
QualType ASTContext::getPointerDiffType | ( | ) | const |
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9).
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 4041 of file ASTContext.cpp.
References clang::TargetInfo::getPtrDiffType().
Referenced by clang::ento::SimpleConstraintManager::assumeAux(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::CheckSubtractionOperands(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getItaniumDynamicCastFn(), getPreferredTypeAlign(), clang::Sema::Initialize(), and performTypeAdjustment().
Return the uniqued reference to the type for a pointer to the specified type.
getPointerType - Return the uniqued reference to the type for a pointer to the specified type.
Definition at line 2277 of file ASTContext.cpp.
References getCanonicalType(), clang::QualType::isCanonical(), clang::PointerType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::AddConversionCandidate(), AddDirectArgument(), addFunctionPointerConversion(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPointerType(), clang::Sema::BuildResolvedCallExpr(), BuildSimilarlyQualifiedPointerType(), clang::Sema::CallExprUnaryConversions(), clang::ento::StoreManager::CastRetrievedVal(), CastsAwayConstness(), clang::Sema::CheckAddressOfOperand(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckMain(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::SValBuilder::conjureSymbolVal(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateCharPtrBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DeclareGlobalNewDelete(), DecodeTypeFromStr(), decomposeTypeForEH(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), Desugar(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), EmitFunctionDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::ento::SValBuilder::evalCast(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::analyze_printf::PrintfSpecifier::getArgType(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCFConstantStringType(), clang::Sema::getCurrentThisType(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionTextRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), getPointerType(), clang::analyze_format_string::ArgType::getRepresentativeType(), GetThisType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getVariableArrayDecayedType(), handleCleanupAttr(), InitBuiltinTypes(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), IsStandardConversion(), mergeTypes(), NoteSurrogateCandidate(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), recordFixedType(), ResolveOverloadForDeduction(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), TryConstCast(), tryObjCWritebackConversion(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryToFixInvalidVariablyModifiedType(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitDeclStmt(), and clang::ASTNodeImporter::VisitPointerType().
|
inline |
Definition at line 977 of file ASTContext.h.
References clang::CanQual< Type >::CreateUnsafe(), and getPointerType().
Return the "preferred" alignment of the specified type T
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.
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 1832 of file ASTContext.cpp.
References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), clang::TargetInfo::getTriple(), getTypeInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Type::isMemberPointerType(), and clang::Type::isSpecificBuiltinType().
Referenced by clang::Sema::BuildCXXNew(), and getDeclAlign().
Definition at line 787 of file ASTContext.h.
References clang::Result.
Referenced by clang::getPrimaryMergedDecl().
|
inline |
Definition at line 486 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::BuildAnonymousStructOrUnion(), checkTypeParamListConsistency(), ConvertDeclSpecToType(), ConvertTypeToDiagnosticString(), clang::ento::CallEvent::dump(), clang::DeclContext::dumpDeclContext(), clang::FormatASTNodeDiagnosticArgument(), GenOpenCLArgMetadata(), clang::Sema::getPrintingPolicy(), clang::Sema::ImplicitlyDefineFunction(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::APValue::printPretty(), rewriteToNSMacroDecl(), and rewriteToObjCProperty().
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 4047 of file ASTContext.cpp.
References clang::TargetInfo::getProcessIDType().
Referenced by DecodeTypeFromStr().
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 4653 of file ASTContext.cpp.
References clang::Type::getAs(), getIntWidth(), getTypeSize(), IntTy, clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), LongLongTy, LongTy, UnsignedIntTy, UnsignedLongLongTy, and UnsignedLongTy.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAdditionOperands(), GetFullTypeForDeclarator(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().
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 6385 of file ASTContext.cpp.
References clang::QualifiedTemplateName::Profile().
Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), and clang::ASTReader::ReadTemplateName().
|
inline |
Un-split a SplitQualType.
Definition at line 1581 of file ASTContext.h.
References clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by clang::Sema::ActOnPropertyImplDecl(), AddImplicitObjectParameterType(), AdoptQualifiers(), clang::QualifierCollector::apply(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildFieldReferenceExpr(), BuildImplicitBaseInitializer(), clang::Sema::BuildQualifiedType(), BuildSimilarlyQualifiedPointerType(), CastsAwayConstness(), checkARCPropertyImpl(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), CheckOriginalCallArgDeduction(), clang::Sema::CheckTemplateTypeArgument(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsArrayType(), getBaseElementType(), getConstantArrayType(), getCVRQualifiedType(), getDependentSizedArrayType(), getFunctionType(), getIncompleteArrayType(), getLifetimeQualifiedType(), clang::ObjCMethodDecl::getSelfType(), clang::CXXMethodDecl::getThisType(), getUnqualifiedObjCPointerType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::Sema::isObjCWritebackConversion(), rewriteToObjCProperty(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), transferARCOwnershipToDeclSpec(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and UnwrapTypeForDebugInfo().
|
inline |
Return a type with additional qualifiers.
Definition at line 1586 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 1595 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 1305 of file ASTContext.h.
References getTagDeclType().
const RawComment * ASTContext::getRawCommentForAnyRedecl | ( | const Decl * | D, |
const Decl ** | OriginalDecl = nullptr |
||
) | const |
Return the documentation comment attached to a given declaration. Returns NULL if no comment is attached.
OriginalDecl | if not NULL, is set to declaration AST node that had the comment, if the comment we found comes from a redeclaration. |
Definition at line 332 of file ASTContext.cpp.
References clang::ASTContext::RawCommentAndCacheFlags::FromDecl, clang::ASTContext::RawCommentAndCacheFlags::FromRedecl, clang::ASTContext::RawCommentAndCacheFlags::getKind(), clang::ASTContext::RawCommentAndCacheFlags::getOriginalDecl(), clang::ASTContext::RawCommentAndCacheFlags::getRaw(), getRawCommentForDeclNoCache(), clang::RawComment::isDocumentation(), clang::ASTContext::RawCommentAndCacheFlags::NoCommentInDecl, RedeclComments, clang::Decl::redecls(), clang::ASTContext::RawCommentAndCacheFlags::setKind(), clang::ASTContext::RawCommentAndCacheFlags::setOriginalDecl(), and clang::ASTContext::RawCommentAndCacheFlags::setRaw().
Referenced by clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), and getCommentForDecl().
RawComment * ASTContext::getRawCommentForDeclNoCache | ( | const Decl * | D | ) | const |
Return the documentation comment attached to a given declaration, without looking into cache.
Definition at line 63 of file ASTContext.cpp.
References clang::LangOptions::CommentOpts, Comments, CommentsLoaded, ExternalSource, clang::SourceManager::getBufferData(), clang::RawCommentList::getComments(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getExpansionLoc(), clang::SourceManager::getLineNumber(), clang::Decl::getLocation(), clang::Decl::getLocStart(), clang::SourceLocation::isFileID(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::SourceManager::isMacroArgExpansion(), clang::SourceLocation::isMacroID(), clang::CommentOptions::ParseAllComments, SourceMgr, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by getLocalCommentForDeclUncached(), and getRawCommentForAnyRedecl().
|
inline |
Definition at line 621 of file ASTContext.h.
References Comments.
Referenced by clang::Sema::ActOnDocumentableDecls().
getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth. Returns empty type if there is no appropriate target types.
Definition at line 8470 of file ASTContext.cpp.
References clang::TargetInfo::Double, DoubleTy, clang::TargetInfo::Float, FloatTy, clang::TargetInfo::getRealTypeByWidth(), getTargetInfo(), clang::TargetInfo::LongDouble, LongDoubleTy, and clang::TargetInfo::NoFloat.
Referenced by handleModeAttr().
QualType ASTContext::getRecordType | ( | const RecordDecl * | Decl | ) | const |
Definition at line 3121 of file ASTContext.cpp.
References clang::RecordDecl::getPreviousDecl(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckCompletedCXXClass(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CGDebugInfo::completeClassData(), clang::CodeGen::CGDebugInfo::completeRequiredType(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateOverloadedBinOp(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DiagnoseNontrivial(), findAnonymousStructOrUnionIndex(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CodeGen::CodeGenFunction::InitCapturedStruct(), clang::Sema::LookupInSuper(), clang::APValue::printPretty(), recordFixedType(), recoverFromTypeInKnownDependentBase(), and clang::Sema::SpecialMemberIsTrivial().
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 932 of file ASTContext.h.
References clang::Qualifiers::Restrict, and 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 2438 of file ASTContext.cpp.
References clang::Type::getAs(), getCanonicalType(), clang::ReferenceType::getPointeeType(), clang::QualType::isCanonical(), clang::ReferenceType::Profile(), and clang::TypeAlignment.
Referenced by AddImplicitObjectParameterType(), clang::Sema::BuildReferenceType(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), Desugar(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), getAutoRRefDeductType(), getDecltypeForExpr(), clang::ento::CallEvent::getResultType(), getVariableArrayDecayedType(), NoteSurrogateCandidate(), clang::InitializationSequence::Perform(), clang::Sema::SpecialMemberIsTrivial(), and clang::ASTNodeImporter::VisitRValueReferenceType().
|
inline |
Definition at line 535 of file ASTContext.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCast(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), and clang::RecordDecl::mayInsertExtraPadding().
size_t ASTContext::getSideTableAllocatedMemory | ( | ) | const |
Return the total memory used for various side tables.
Definition at line 8437 of file ASTContext.cpp.
|
inline |
Retrieve the C sigjmp_buf type.
Definition at line 1422 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
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 4442 of file ASTContext.cpp.
References getAdjustedParameterType(), clang::QualType::getUnqualifiedType(), and getVariableArrayDecayedType().
QualType ASTContext::getSignedWCharType | ( | ) | const |
Return the type of "signed wchar_t".
Used when in C++, as a GCC extension.
getSignedWCharType - Return the type of "signed wchar_t". Used when in C++, as a GCC extension.
Definition at line 4019 of file ASTContext.cpp.
References WCharTy.
Referenced by ConvertDeclSpecToType().
CanQualType ASTContext::getSizeType | ( | ) | const |
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
The sizeof operator requires this (C99 6.5.3.4p4).
getSizeType - Return the unique type for "size_t" (C99 7.17), the result of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and needs to agree with the definition in <stddef.h>.
Definition at line 4003 of file ASTContext.cpp.
References clang::TargetInfo::getSizeType().
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnSizeofParameterPackExpr(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildArrayType(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), clang::Sema::CheckLiteralOperatorDeclaration(), CheckOperatorNewDeclaration(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareGlobalNewDelete(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), diagnoseListInit(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::ento::SymbolExtent::getType(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CXXMethodDecl::isUsualDeallocationFunction(), performLambdaVarCaptureInitialization(), clang::Sema::tryCaptureVariable(), and TryInitializerListConstruction().
|
inline |
Definition at line 494 of file ASTContext.h.
References SourceMgr.
Referenced by clang::Sema::ActOnAtEnd(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::arcmt::checkForManualIssues(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::comments::Comment::dump(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::BackendConsumer::EmitOptimizationMessage(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getAsmSrcLocInfo(), getLiteralInfo(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ento::AnalysisManager::getSourceManager(), clang::Sema::getUndefinedButUsed(), clang::BackendConsumer::HandleInlineMethodDefinition(), clang::BackendConsumer::HandleTagDeclDefinition(), clang::BackendConsumer::HandleTopLevelDecl(), clang::ASTImporter::Import(), clang::BackendConsumer::InlineAsmDiagHandler2(), isEmptyARCMTMacroStatement(), isForbiddenTypeAllowed(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), LocPropertyAttribute(), clang::Sema::makeUnavailableInSystemHeader(), mayInlineDecl(), clang::Sema::MergeTypedefNameDecl(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), rewriteToNSMacroDecl(), clang::CodeGen::CGDebugInfo::setLocation(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), and clang::ento::ExprEngine::ViewGraph().
|
inline |
Definition at line 495 of file ASTContext.h.
References SourceMgr.
Definition at line 8502 of file ASTContext.cpp.
Referenced by clang::Sema::BuildVariableInstantiation().
TemplateName ASTContext::getSubstTemplateTemplateParm | ( | TemplateTemplateParmDecl * | param, |
TemplateName | replacement | ||
) | const |
Definition at line 6480 of file ASTContext.cpp.
References clang::SubstTemplateTemplateParmStorage::Profile().
Referenced by clang::ASTImporter::Import(), and clang::ASTReader::ReadTemplateName().
TemplateName ASTContext::getSubstTemplateTemplateParmPack | ( | TemplateTemplateParmDecl * | Param, |
const TemplateArgument & | ArgPack | ||
) | const |
Definition at line 6498 of file ASTContext.cpp.
References clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), and clang::SubstTemplateTemplateParmPackStorage::Profile().
Referenced by getCanonicalTemplateName(), clang::ASTImporter::Import(), and clang::ASTReader::ReadTemplateName().
QualType ASTContext::getSubstTemplateTypeParmPackType | ( | const TemplateTypeParmType * | Replaced, |
const TemplateArgument & | ArgPack | ||
) |
Retrieve a.
Definition at line 3192 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 3170 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 3993 of file ASTContext.cpp.
References getTypeDeclType().
Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnTag(), BuildImplicitMemberInitializer(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckConstructor(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::InitializationSequence::Diagnose(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), getRawCFConstantStringType(), GetThisType(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), isSafeToConvert(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), LookupPredefedObjCSuperType(), clang::Sema::LookupSpecialMember(), mergeAlignedAttrs(), clang::Sema::PerformImplicitConversion(), clang::Sema::setTagNameForLinkagePurposes(), clang::CodeGen::CodeGenTypes::UpdateCompletedType(), clang::ASTNodeImporter::VisitEnumType(), and clang::ASTNodeImporter::VisitRecordType().
Definition at line 2089 of file ASTContext.h.
References clang::QualType::getQualifiers().
Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), buildBlockDescriptor(), clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), GenerateStringLiteral(), GenOpenCLArgMetadata(), getConstantArrayType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), getTargetAddressSpace(), and clang::CodeGen::CodeGenModule::GetWeakRefReference().
|
inline |
Definition at line 2093 of file ASTContext.h.
References clang::Qualifiers::getAddressSpace(), and getTargetAddressSpace().
Definition at line 2097 of file ASTContext.h.
References clang::LangAS::Count, and clang::LangAS::Offset.
unsigned ASTContext::getTargetDefaultAlignForAttributeAligned | ( | void | ) | 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 1864 of file ASTContext.cpp.
References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().
|
inline |
Definition at line 518 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishCXXMemberDefaultArgs(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnSEHTryBlock(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), clang::Sema::BuildArrayType(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXNew(), clang::arcmt::trans::canApplyWeak(), clang::Sema::CheckAddressOfOperand(), CheckAvailability(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCallingConvAttr(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCXXThrowOperand(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFormatString(), clang::Sema::CheckMain(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckRegparmAttr(), clang::Sema::checkSectionName(), CheckTemplateArgumentPointerToMember(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeKeyFunction(), ConvertDeclSpecToType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), DecodeTypeFromStr(), emitOMPAtomicRMW(), clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause(), clang::CodeGen::CodeGenModule::EmitVTableBitSetEntries(), clang::Sema::FinalizeDeclaration(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::Sema::FormatStringHasSArg(), getAlignOfGlobalVar(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getASTRecordLayout(), clang::FunctionDecl::getBuiltinID(), getCallingConvMangling(), getConstantArrayInfoInChars(), getCurrentKeyFunction(), getDeclAlign(), getIntTypeForBitwidth(), clang::Sema::getLocationOfStringLiteralByte(), getObjCEncodingForPrimitiveKind(), getOpenMPDefaultSimdAlign(), clang::getOrCreateThreadPrivateCache(), getRealTypeForBitwidth(), getTargetDefaultAlignForAttributeAligned(), getVisibilityOf(), handleAliasAttr(), handleDeclspecThreadAttr(), handleDLLAttr(), handleInterruptAttr(), handleModeAttr(), HandleNeonVectorTypeAttr(), handleSectionAttr(), clang::BackendConsumer::HandleTranslationUnit(), handleVisibilityAttr(), handleWeakImportAttr(), clang::Sema::Initialize(), isArc4RandomAvailable(), isMsLayout(), clang::FunctionDecl::isMSVCRTEntryPoint(), isPermittedNeonBaseType(), clang::MangleContext::mangleName(), clang::Sema::MarkVTableUsed(), clang::Sema::PerformImplicitConversion(), ProcessDeclAttribute(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), clang::StringLiteral::setString(), TryEvaluateBuiltinNaN(), TryReinterpretCast(), TryStaticImplicitCast(), clang::CodeGen::CodeGenFunction::typeIsSuitableForInlineAtomic(), and clang::Sema::VerifyBitField().
ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo | ( | const VarDecl * | Var | ) |
Definition at line 1121 of file ASTContext.cpp.
Referenced by clang::VarDecl::getDescribedVarTemplate(), getInstantiatedFromStaticDataMember(), and clang::VarDecl::getMemberSpecializationInfo().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
const TemplateArgument * | Args, | ||
unsigned | NumArgs, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3309 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::Sema::ActOnClassTemplateSpecialization(), clang::Sema::CheckTemplateIdType(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::Sema::getMoreSpecializedPartialSpecialization(), getTemplateSpecializationType(), getTemplateSpecializationTypeInfo(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().
QualType ASTContext::getTemplateSpecializationType | ( | TemplateName | T, |
const TemplateArgumentListInfo & | Args, | ||
QualType | Canon = QualType() |
||
) | const |
Definition at line 3280 of file ASTContext.cpp.
References 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 3259 of file ASTContext.cpp.
References clang::TypeLoc::castAs(), CreateTypeSourceInfo(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::TemplateArgumentListInfo::getRAngleLoc(), getTemplateSpecializationType(), clang::TypeSourceInfo::getTypeLoc(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), and clang::TemplateSpecializationTypeLoc::setTemplateNameLoc().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnExplicitInstantiation(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
QualType ASTContext::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.
Definition at line 3228 of file ASTContext.cpp.
References clang::TemplateTypeParmType::Profile(), and clang::TypeAlignment.
Referenced by clang::TemplateTypeParmDecl::Create().
|
inline |
Definition at line 812 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnModuleInclude(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTranslationUnitScope(), clang::Sema::ActOnTypeParameter(), addFunctionPointerConversion(), clang::ASTImporter::ASTImporter(), buildImplicitRecord(), buildImplicitTypedef(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildPredefinedExpr(), clang::arcmt::trans::checkAPIUses(), checkGlobalOrExternCConflict(), cleanupDeallocOrFinalize(), clang::Sema::CodeCompleteNamespaceDecl(), clang::Sema::CodeCompleteObjCImplementationDecl(), clang::Sema::CodeCompleteObjCInterfaceCategory(), clang::Sema::CodeCompleteObjCInterfaceDecl(), clang::Sema::CodeCompleteObjCProtocolDecl(), clang::Sema::CodeCompleteObjCProtocolReferences(), clang::Sema::CodeCompleteObjCSuperclass(), clang::Sema::computeDeclContext(), ConvertDeclSpecToType(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::createImplicitModuleImportForErrorRecovery(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindUsualDeallocationFunction(), clang::Sema::GatherGlobalCodeCompletions(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), getExternCContextDecl(), getNSNumberFactoryMethod(), getObjCProtocolDecl(), clang::Sema::getOrCreateStdNamespace(), getParents(), getPredefinedDecl(), clang::Sema::ImplicitlyDefineFunction(), clang::ASTReader::InitializeContext(), clang::Sema::LazilyCreateBuiltin(), clang::Sema::LookupVisibleDecls(), LookupVisibleDecls(), clang::arcmt::trans::makeAssignARCSafe(), clang::ast_matchers::MatchFinder::matchAST(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), clang::arcmt::trans::rewriteAutoreleasePool(), rewriteBuiltinFunctionDecl(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), traverseAST(), clang::arcmt::trans::GCAttrsTraverser::traverseTU(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), and clang::ASTNodeImporter::VisitTranslationUnitDecl().
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 2057 of file ASTContext.cpp.
References CreateTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), and clang::TypeLoc::initialize().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnArrayTypeTrait(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBuiltinOffsetOf(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnCompoundLiteral(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnObjCBridgedCast(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStringLiteral(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTypeTrait(), addAsFieldToClosureType(), addBlockPointerConversion(), addFieldToRecordDecl(), addFunctionPointerConversion(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildClassMessageImplicit(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), buildImplicitTypedef(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildParmVarDeclForTypedef(), clang::Sema::BuildPseudoDestructorExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), buildVarDecl(), captureInCapturedRegion(), captureThis(), CastForMoving(), checkTypeParamListConsistency(), ConstructTransparentUnion(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::CreatePropertyDecl(), clang::Sema::getDestructorName(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), clang::Sema::getObjCMessageKind(), clang::Sema::getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), clang::Sema::HandleField(), handleIBOutletCollection(), clang::Sema::HandleMSProperty(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ObjCObjectTypeLoc::initializeLocal(), clang::TypeOfTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::Sema::ParseObjCEncodeExpression(), clang::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), performLambdaVarCaptureInitialization(), RebuildDeclaratorInCurrentInstantiation(), translateTemplateArgument(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Return the ABI-specified alignment of a (complete) type T
, in bits.
Definition at line 1722 of file ASTContext.h.
References clang::TypeInfo::Align, and getTypeInfo().
Referenced by EmitVAArgFromMemory(), getAlignOfGlobalVar(), getTypeAlignInChars(), handlePackedAttr(), handleTransparentUnionAttr(), and mergeAlignedAttrs().
Definition at line 1723 of file ASTContext.h.
References clang::TypeInfo::Align, and getTypeInfo().
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 1821 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
Referenced by AddDirectArgument(), AtomicUsesUnsupportedLibcall(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckCastAlign(), clang::CodeGen::CodeGenFunction::CreateAggTemp(), clang::CodeGen::CodeGenFunction::CreateIRTemp(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), createReferenceTemporary(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitAggregateCopyCtor(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::Sema::isCopyElisionCandidate(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), and StoreAnyExprIntoOneUnit().
Definition at line 1824 of file ASTContext.cpp.
References getTypeAlign(), and toCharUnitsFromBits().
|
inline |
Return the unique reference to the type for the specified type declaration.
Definition at line 1114 of file ASTContext.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnSuperClassOfClassInterface(), AddImplicitObjectParameterType(), clang::Sema::AddOverloadCandidate(), AddResultTypeChunk(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTypenameType(), clang::Sema::ClassifyName(), clang::Sema::CodeCompleteObjCSuperMessage(), ConvertDeclSpecToType(), clang::CXXRecordDecl::Create(), clang::LambdaExpr::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::CXXRecordDecl::CreateLambda(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::deduceClosureReturnType(), clang::InitializationSequence::Diagnose(), DiagnoseBadAccess(), clang::Sema::diagnoseQualifiedDeclaration(), DiagnoseUninstantiableTemplate(), DumpCXXRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), FindBaseInitializer(), clang::Sema::FindInstantiatedDecl(), FindOverriddenMethod(), clang::Sema::FixOverloadedFunctionReference(), clang::FormatASTNodeDiagnosticArgument(), GenerateInjectedTemplateArgs(), clang::Sema::getAmbiguousPathsDisplayString(), getBOOLType(), getBuiltinVaListType(), clang::Sema::getCurrentThisType(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), clang::CXXRecordDecl::getDestructor(), clang::Sema::getDestructorName(), getFILEType(), GetFullTypeForDeclarator(), getjmp_bufType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCClassType(), getObjCIdType(), getObjCInstanceType(), clang::Sema::getObjCMessageKind(), getObjCSelType(), getRequiredQualification(), getsigjmp_bufType(), getTagDeclType(), clang::CXXMethodDecl::getThisType(), clang::Sema::getTypeName(), GetTypeOfFunction(), getucontext_tType(), clang::ASTNodeImporter::ImportDefinition(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Sema::isIncompatibleTypedef(), clang::CXXMethodDecl::isMoveAssignmentOperator(), IsStandardConversion(), clang::Expr::isTemporaryObject(), clang::Sema::LookupConstructors(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), MatchesFriend(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::InitializationSequence::Perform(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrintInstantiationStack(), clang::Sema::RequireCompleteDeclContext(), ShouldDiagnoseSwitchCaseNotInEnum(), TryDiagnoseProtectedAccess(), TryObjectArgumentInitialization(), TryStaticMemberPointerUpcast(), clang::CXXRecordDecl::viewInheritance(), and clang::ASTNodeImporter::VisitTypedefType().
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 3108 of file ASTContext.cpp.
References getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), and clang::TypeAlignment.
Referenced by CheckExtVectorComponent(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), and CreateX86_64ABIBuiltinVaListDecl().
Get the size and alignment of the specified complete type in bits.
Definition at line 1463 of file ASTContext.cpp.
Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), getPreferredTypeAlign(), getTypeAlign(), getTypeInfoInChars(), getTypeSize(), isAlignmentRequired(), matchTypes(), and tryMatchRecordTypes().
Definition at line 1695 of file ASTContext.h.
References getTypeInfo(), and clang::QualType::getTypePtr().
Referenced by getTypeInfo().
Definition at line 1405 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAs(), getASTRecordLayout(), clang::ASTRecordLayout::getDataSize(), getLangOpts(), and getTypeInfoInChars().
Referenced by clang::CodeGen::CodeGenFunction::EmitAggregateCopy().
Definition at line 1442 of file ASTContext.cpp.
References clang::TypeInfo::Align, getConstantArrayInfoInChars(), getTypeInfo(), toCharUnitsFromBits(), and clang::TypeInfo::Width.
Referenced by CheckAggExprForMemSetUse(), computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), getConstantArrayInfoInChars(), getTypeInfoDataSizeInChars(), getTypeInfoInChars(), getTypeSizeInChars(), and initializeForBlockHeader().
Definition at line 1451 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 3831 of file ASTContext.cpp.
References getCanonicalType(), clang::Expr::getType(), clang::Expr::isTypeDependent(), clang::DependentTypeOfExprType::Profile(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildTypeofExprType(), and clang::ASTNodeImporter::VisitTypeOfExprType().
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 3865 of file ASTContext.cpp.
References getCanonicalType(), and clang::TypeAlignment.
Referenced by ConvertDeclSpecToType(), and clang::ASTNodeImporter::VisitTypeOfType().
|
inline |
Definition at line 882 of file ASTContext.h.
|
inline |
Return the size of the specified (complete) type T
, in bits.
Definition at line 1701 of file ASTContext.h.
References getTypeInfo(), and clang::TypeInfo::Width.
Referenced by clang::Sema::ActOnAsTypeExpr(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOpenMPReductionClause(), BitsContainNoUserData(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), canExpandIndirectArgument(), clang::Sema::CheckCompatibleReinterpretCast(), checkIntToPointerCast(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckVectorOperands(), checkVectorResult(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), create_dispatch_once(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadShiftValues(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), emitOMPAtomicRMW(), emitReplacement(), EmitVAArgFromMemory(), clang::ento::BasicValueFactory::getAPSIntType(), clang::ento::MemRegion::getAsOffset(), getBestAbsFunction(), GetCFNumberSize(), getCharWidth(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), clang::ConstantArrayType::getMaxSizeBits(), getNextLargerIntegralType(), clang::ConstantArrayType::getNumAddressingBits(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::Sema::GetSignedVectorType(), clang::ento::BasicValueFactory::getTruthValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), handleModeAttr(), HandleNeonVectorTypeAttr(), handleTransparentUnionAttr(), HandleVectorSizeAttr(), clang::Expr::IgnoreParenNoopCasts(), is32Or64BitBasicType(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isSingleElementStruct(), isSSEVectorType(), isZeroSized(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), mergeEnumWithInteger(), OpenCLConvertScalarsToVectors(), clang::ento::ExprEngine::processSwitch(), RecoverCastedSymbol(), rewriteToNumericBoxedExpression(), TryInitializerListConstruction(), TryReinterpretCast(), VectorTypesMatch(), clang::Sema::VerifyBitField(), and clang::ento::ExprEngine::VisitOffsetOfExpr().
|
inline |
Definition at line 1702 of file ASTContext.h.
References getTypeInfo(), and 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 1812 of file ASTContext.cpp.
References getTypeInfoInChars().
Referenced by clang::Sema::ActOnFields(), AtomicUsesUnsupportedLibcall(), buildMemcpyForAssignmentOp(), clang::Sema::BuildPredefinedExpr(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckSubtractionOperands(), computeBlockInfo(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitCXXNewAllocSize(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitPointerArithmetic(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), evenFlexibleArraySize(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ento::TypedValueRegion::getExtent(), clang::ConstantArrayType::getNumAddressingBits(), GetNumNonZeroBytesInInit(), getObjCEncodingForBlock(), getObjCEncodingForMethodDecl(), getObjCEncodingTypeSize(), getTypeExpansion(), isOnePastTheEndOfCompleteObject(), clang::Sema::LookupInlineAsmIdentifier(), clang::APValue::printPretty(), and clang::CodeGen::CodeGenModule::Release().
Definition at line 1815 of file ASTContext.cpp.
References getTypeInfoInChars().
|
inline |
Retrieve the C ucontext_t type.
Definition at line 1434 of file ASTContext.h.
References getTypeDeclType().
Referenced by DecodeTypeFromStr().
TypedefDecl * ASTContext::getUInt128Decl | ( | ) | const |
Retrieve the declaration for the 128-bit unsigned integer type.
Definition at line 933 of file ASTContext.cpp.
References buildImplicitTypedef(), and UnsignedInt128Ty.
Referenced by getPredefinedDecl(), and 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 4013 of file ASTContext.cpp.
References clang::TargetInfo::getUIntMaxType().
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().
QualType ASTContext::getUIntPtrType | ( | ) | const |
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition at line 4035 of file ASTContext.cpp.
References getCorrespondingUnsignedType(), and getIntPtrType().
Referenced by clang::Sema::Initialize().
QualType ASTContext::getUnaryTransformType | ( | QualType | BaseType, |
QualType | UnderlyingType, | ||
UnaryTransformType::UTTKind | Kind | ||
) | const |
Unary type transforms.
getUnaryTransformationType - We don't unique these, since the memory savings are minimal and these are rare.
Definition at line 3908 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isDependentType(), and clang::TypeAlignment.
Referenced by clang::Sema::BuildUnaryTransformType(), and clang::ASTNodeImporter::VisitUnaryTransformType().
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 4073 of file ASTContext.cpp.
References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::ConstantArrayType::getSize(), clang::DependentSizedArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitUnqualifiedType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
Referenced by clang::Sema::BuildCXXTypeId(), CastsAwayConstness(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), hasSimilarType(), shouldBeModeledWithNoOp(), TryConstCast(), TryReferenceInitialization(), and TryReferenceListInitialization().
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.
Definition at line 1616 of file ASTContext.h.
References getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::removeObjCLifetime().
QualType ASTContext::getUnsignedWCharType | ( | ) | const |
Return the type of "unsigned wchar_t".
Used when in C++, as a GCC extension.
getUnsignedWCharType - Return the type of "unsigned wchar_t". Used when in C++, as a GCC extension.
Definition at line 4026 of file ASTContext.cpp.
References UnsignedIntTy.
Referenced by ConvertDeclSpecToType().
QualType ASTContext::getVaListTagType | ( | ) | 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 6342 of file ASTContext.cpp.
References getBuiltinVaListDecl(), clang::QualType::isNull(), and VaListTagTy.
Referenced by clang::ASTReader::GetType().
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 2551 of file ASTContext.cpp.
References getAtomicType(), clang::VariableArrayType::getBracketsRange(), clang::DependentSizedArrayType::getBracketsRange(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeCVRQualifiers(), getLValueReferenceType(), clang::ReferenceType::getPointeeType(), getPointerType(), getQualifiedType(), getRValueReferenceType(), clang::ConstantArrayType::getSize(), clang::DependentSizedArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), clang::Type::getTypeClass(), clang::AtomicType::getValueType(), getVariableArrayType(), clang::ReferenceType::isSpelledAsLValue(), clang::Type::isVariablyModifiedType(), clang::ArrayType::Normal, clang::SplitQualType::Quals, clang::ArrayType::Star, clang::SplitQualType::Ty, and clang::ast_matchers::type.
Referenced by getCanonicalParamType(), getExceptionObjectType(), getSignatureParameterType(), and clang::InitializedEntity::InitializeParameter().
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 2682 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 clang::Sema::BuildArrayType(), getAsArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and clang::ASTNodeImporter::VisitVariableArrayType().
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.
VectorType
must be a built-in type.getVectorType - Return the unique reference to a vector type of the specified element type and size. VectorType must be a built-in type.
Definition at line 2815 of file ASTContext.cpp.
References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.
Referenced by DecodeTypeFromStr(), getCorrespondingUnsignedType(), handleModeAttr(), HandleNeonVectorTypeAttr(), HandleVectorSizeAttr(), clang::Sema::SemaBuiltinShuffleVector(), and clang::ASTNodeImporter::VisitVectorType().
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 941 of file ASTContext.h.
References clang::Qualifiers::Volatile, and clang::QualType::withFastQualifiers().
Referenced by AddBuiltinAssignmentOperatorCandidates(), and DecodeTypeFromStr().
VTableContextBase * ASTContext::getVTableContext | ( | ) |
Definition at line 8410 of file ASTContext.cpp.
References clang::TargetInfo::getCXXABI(), and clang::TargetCXXABI::isMicrosoft().
|
inline |
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
Definition at line 1259 of file ASTContext.h.
References WCharTy.
|
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 1264 of file ASTContext.h.
References WideCharTy.
Referenced by clang::Sema::ActOnStringLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCNumericLiteral(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::analyze_format_string::ArgType::getRepresentativeType(), IsStringInit(), IsWideCharCompatible(), 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 1278 of file ASTContext.h.
References WIntTy.
Referenced by clang::analyze_format_string::ArgType::getRepresentativeType(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 1901 of file ASTContext.h.
References clang::Type::getNullability(), clang::NonNull, clang::Nullable, and clang::Unspecified.
Referenced by CheckMethodOverrideParam(), and CheckMethodOverrideReturn().
bool ASTContext::hasSameTemplateName | ( | TemplateName | X, |
TemplateName | Y | ||
) |
Determine whether the given template names refer to the same template.
Definition at line 4263 of file ASTContext.cpp.
References clang::TemplateName::getAsVoidPointer(), and getCanonicalTemplateName().
Referenced by checkDeducedTemplateArguments(), and DeduceTemplateArguments().
Determine whether the given types T1
and T2
are equivalent.
Definition at line 1871 of file ASTContext.h.
References getCanonicalType().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnPropertyImplDecl(), AddResultTypeChunk(), adjustBlockReturnsToEnum(), areCompatibleVectorTypes(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentConstraints(), checkConditionalPointerCompatibility(), checkDeducedTemplateArguments(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMain(), clang::Sema::CheckMemberSpecialization(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckTemplateArgument(), checkTypeParamListConsistency(), clang::Sema::CheckVectorOperands(), ClassImplementsAllMethodsAndProperties(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), compareStandardConversionSubsets(), clang::Sema::computeDeclContext(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), DeduceTemplateArguments(), clang::Sema::DeduceTemplateArguments(), DiagnoseBadDeduction(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::diagnoseQualifiedDeclaration(), EvaluateBinaryTypeTrait(), filterNonConflictingPreviousTypedefDecls(), clang::Sema::FindAllocationFunctions(), findAnonymousStructOrUnionIndex(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::Sema::FixOverloadedFunctionReference(), clang::Sema::FunctionParamTypesAreEqual(), getBestAbsFunction(), clang::Sema::HandleFunctionTypeMismatch(), clang::Sema::HandlePropertyInClassExtension(), handleVecTypeHint(), hasCompatibleArrayTypes(), hasSimilarParameters(), clang::Sema::IsBlockPointerConversion(), IsEquivalentForUsingDecl(), clang::Sema::isIncompatibleTypedef(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), isSameTemplateArg(), IsStandardConversion(), clang::ASTImporter::IsStructurallyEquivalent(), MatchTemplateParameterKind(), mergeEnumWithInteger(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PrepareScalarCast(), rewriteToNumberLiteral(), sameObjCTypeArgs(), clang::Sema::setTagNameForLinkagePurposes(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), and typesAreCompatible().
Definition at line 1875 of file ASTContext.h.
References getCanonicalType().
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition at line 1896 of file ASTContext.h.
References getCanonicalType(), and clang::CanQual< T >::getTypePtr().
Referenced by clang::Sema::ActOnExplicitInstantiation(), AddObjCKeyValueCompletions(), clang::Sema::AddOverloadCandidate(), AddSuperSendCompletion(), areCompatibleVectorTypes(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPseudoDestructorExpr(), clang::ento::StoreManager::CastRetrievedVal(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), checkEnumComparison(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckMain(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMoveOnConstruction(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CodeCompleteConstructorInitializer(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), createObjCPropertyGetter(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAssignmentEnum(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitBinaryAtomicPost(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), FindImplementableMethods(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::Sema::getDestructorName(), clang::Sema::getDestructorType(), getExistingLazyBinding(), getParamType(), getPreferredArgumentTypeForMessageSend(), getRangeOfTypeInNestedNameSpecifier(), hasSimilarParameters(), hasSimilarType(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), isAllowableExplicitConversion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Sema::isCopyElisionCandidate(), isFirstArgumentCompatibleWithType(), clang::Sema::IsIntegralPromotion(), clang::Sema::IsMemberPointerConversion(), clang::Sema::isMicrosoftMissingTypename(), clang::CXXMethodDecl::isMoveAssignmentOperator(), isNonPlacementDeallocationFunction(), clang::Sema::IsNoReturnConversion(), isNullPointerValueTemplateArgument(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsPointerConversion(), clang::Sema::IsQualificationConversion(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsVectorConversion(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::ProcessPropertyDecl(), clang::Sema::SemaBuiltinShuffleVector(), ShouldDiagnoseSwitchCaseNotInEnum(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryStaticMemberPointerUpcast(), and UnwrapSimilarPointerTypes().
void ASTContext::InitBuiltinTypes | ( | const TargetInfo & | Target | ) |
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 953 of file ASTContext.cpp.
References ARCUnbridgedCastTy, BoolTy, BoundMemberTy, BuiltinFnTy, Char16Ty, Char32Ty, CharTy, DependentTy, DoubleComplexTy, DoubleTy, FloatComplexTy, FloatTy, getAddressSpaceMap(), getComplexType(), getPointerType(), HalfTy, Int128Ty, IntTy, isAddrSpaceMapManglingEnabled(), clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongDoubleComplexTy, LongDoubleTy, LongLongTy, LongTy, NullPtrTy, ObjCBuiltinBoolTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OCLEventTy, OCLImage1dArrayTy, OCLImage1dBufferTy, OCLImage1dTy, OCLImage2dArrayTy, OCLImage2dTy, OCLImage3dTy, OCLSamplerTy, OverloadTy, PseudoObjectTy, ShortTy, SignedCharTy, UnknownAnyTy, UnsignedCharTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortTy, VaListTagTy, VoidPtrTy, VoidTy, WCharTy, WideCharTy, and WIntTy.
Referenced by clang::CompilerInstance::createASTContext().
Determine if the alignment the type has was required using an alignment attribute.
Definition at line 1455 of file ASTContext.cpp.
References clang::TypeInfo::AlignIsRequired, and getTypeInfo().
Referenced by isAlignmentRequired(), isVarDeclStrongDefinition(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
Definition at line 1459 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 4992 of file ASTContext.cpp.
References getLangOpts(), clang::ValueDecl::getType(), clang::VarDecl::hasInit(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::Type::isIntegralOrEnumerationType(), clang::VarDecl::isOutOfLine(), and clang::VarDecl::isStaticDataMember().
Referenced by basicGVALinkageForVariable(), DeclMustBeEmitted(), and clang::CodeGen::CodeGenModule::EmitGlobal().
bool ASTContext::isNearlyEmpty | ( | const CXXRecordDecl * | RD | ) | const |
Definition at line 8405 of file ASTContext.cpp.
Definition at line 2130 of file ASTContext.h.
References getObjCClassType().
Definition at line 2127 of file ASTContext.h.
References getObjCIdType().
Referenced by maybeAdjustInterfaceForSubscriptingCheck().
Return true if this is an NSObject
object with its NSObject
attribute set.
Definition at line 1681 of file ASTContext.h.
References clang::Type::isObjCNSObjectType().
Referenced by BlockRequiresCopying(), clang::Sema::BuildInstanceMessage(), clang::Sema::CheckAssignmentOperands(), and isValidSubjectOfNSAttribute().
Definition at line 2133 of file ASTContext.h.
References getObjCSelType().
Referenced by clang::Sema::FindCompositeObjCPointerType().
Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
Definition at line 4606 of file ASTContext.cpp.
References clang::FieldDecl::getBitWidthValue(), clang::Expr::getSourceBitField(), clang::ValueDecl::getType(), getTypeSize(), IntTy, clang::Type::isSignedIntegerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UnsignedIntTy.
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().
Definition at line 1961 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 clang::Sema::DiagnoseSentinelCalls(), getNSArrayObjects(), rewriteToArrayLiteral(), and rewriteToDictionaryLiteral().
|
inline |
Definition at line 783 of file ASTContext.h.
|
inline |
Make an APSInt of the appropriate width and signedness for the given Value
and integer Type
.
Definition at line 2206 of file ASTContext.h.
References getIntWidth(), and clang::Type::isSignedIntegerOrEnumerationType().
void ASTContext::mergeDefinitionIntoModule | ( | NamedDecl * | ND, |
Module * | M, | ||
bool | NotifyListeners = true |
||
) |
Note that the definition ND
has been merged into module M
, and should be visible whenever M
is visible.
Definition at line 869 of file ASTContext.cpp.
References getASTMutationListener(), getLangOpts(), Listener, clang::ASTMutationListener::RedefinedHiddenDefinition(), and clang::NamedDecl::setHidden().
Referenced by clang::Sema::makeMergedDefinitionVisible(), clang::ASTDeclReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::UpdateDecl().
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 7245 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 7264 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, FloatTy, FunctionTypesMatchOnNSConsumedAttrs(), clang::Type::getAs(), getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getFunctionNoProtoType(), getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), 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(), mergeFunctionParameterTypes(), mergeTypes(), types(), 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 7740 of file ASTContext.cpp.
References clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getCanonicalType(), clang::Qualifiers::getCVRQualifiers(), clang::getFunctionExtInfo(), getFunctionType(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), clang::QualType::getTypePtr(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
Referenced by clang::Sema::MergeFunctionDecl(), and clang::Sema::MergeVarDeclTypes().
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 7225 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 7447 of file ASTContext.cpp.
References areCompatVectorTypes(), canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), getAsArrayType(), getAsConstantArrayType(), getAsVariableArrayType(), getAtomicType(), getBlockPointerType(), getCanonicalType(), getConstantArrayType(), clang::Qualifiers::getCVRQualifiers(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::QualType::getLocalQualifiers(), clang::Qualifiers::getObjCGCAttr(), getObjCGCQualType(), clang::Qualifiers::getObjCLifetime(), getPointerType(), clang::ConstantArrayType::getSize(), clang::Type::getTypeClass(), clang::QualType::getUnqualifiedType(), clang::Type::isBlockPointerType(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), mergeEnumWithInteger(), mergeFunctionTypes(), clang::Qualifiers::Strong, and clang::Qualifiers::Weak.
Referenced by checkConditionalPointerCompatibility(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeFunctionDecl(), mergeFunctionParameterTypes(), mergeFunctionTypes(), mergeTransparentUnionType(), clang::Sema::MergeVarDeclTypes(), typesAreBlockPointerCompatible(), and typesAreCompatible().
bool ASTContext::ObjCMethodsAreEqual | ( | const ObjCMethodDecl * | MethodDecl, |
const ObjCMethodDecl * | MethodImp | ||
) |
Definition at line 8713 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 3709 of file ASTContext.cpp.
References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().
Referenced by CheckObjCBridgeNSCast().
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
Definition at line 6629 of file ASTContext.cpp.
References clang::Type::getAs(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces().
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
Definition at line 6651 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedIdType(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isVoidPointerType(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), clang::ObjCObjectPointerType::qual_empty(), and clang::ObjCObjectPointerType::quals().
Referenced by canAssignObjCInterfaces(), canAssignObjCInterfacesInBlockPointer(), clang::Sema::FindCompositeObjCPointerType(), and isObjCTypeSubstitutable().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1223 of file ASTContext.cpp.
References clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::begin_overridden_methods(), clang::CXXConstructorDecl::getInheritedConstructor(), and getOverriddenMethods().
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1233 of file ASTContext.cpp.
References clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::end_overridden_methods(), and getOverriddenMethods().
unsigned ASTContext::overridden_methods_size | ( | const CXXMethodDecl * | Method | ) | const |
Definition at line 1243 of file ASTContext.cpp.
References clang::CXXMethodDecl::getCanonicalDecl().
Referenced by clang::CXXMethodDecl::size_overridden_methods().
void ASTContext::PrintStats | ( | ) | const |
Definition at line 810 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, ExternalSource, getLangOpts(), clang::Type::getTypeClass(), NumImplicitCopyAssignmentOperators, NumImplicitCopyAssignmentOperatorsDeclared, NumImplicitCopyConstructors, NumImplicitCopyConstructorsDeclared, NumImplicitDefaultConstructors, NumImplicitDefaultConstructorsDeclared, NumImplicitDestructors, NumImplicitDestructorsDeclared, NumImplicitMoveAssignmentOperators, NumImplicitMoveAssignmentOperatorsDeclared, NumImplicitMoveConstructors, and NumImplicitMoveConstructorsDeclared.
Referenced by clang::ParseAST().
Definition at line 7214 of file ASTContext.cpp.
References typesAreCompatible().
Referenced by clang::Sema::DiagnosePropertyMismatch(), and DiagnosePropertyMismatchDeclInProtocols().
bool ASTContext::ProtocolCompatibleWithProtocol | ( | ObjCProtocolDecl * | lProto, |
ObjCProtocolDecl * | rProto | ||
) | const |
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.
Definition at line 6617 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 3728 of file ASTContext.cpp.
References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().
Referenced by CheckObjCBridgeCFCast().
|
inline |
Definition at line 2173 of file ASTContext.h.
Referenced by clang::Sema::ActOnFields().
|
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 873 of file ASTContext.h.
References Listener.
Referenced by clang::FrontendAction::BeginSourceFile(), and clang::CompilerInstance::createModuleManager().
Set the copy inialization expression of a block var decl.
Definition at line 2036 of file ASTContext.cpp.
References clang::Decl::hasAttr().
Referenced by clang::Sema::CheckCompleteVariableDeclaration().
|
inline |
Save declaration of 'BOOL' typedef.
Definition at line 1546 of file ASTContext.h.
Referenced by clang::Sema::ActOnObjCBoolLiteral().
void ASTContext::setCFConstantStringType | ( | QualType | T | ) |
Definition at line 4814 of file ASTContext.cpp.
References clang::Type::getAs(), and clang::RecordType::getDecl().
Referenced by clang::ASTReader::InitializeContext().
void ASTContext::setClassScopeSpecializationPattern | ( | FunctionDecl * | FD, |
FunctionDecl * | Pattern | ||
) |
Definition at line 1159 of file ASTContext.cpp.
|
inline |
Definition at line 1013 of file ASTContext.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::ASTReader::InitializeContext().
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 806 of file ASTContext.cpp.
References ExternalSource.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::createModuleManager(), and clang::CompilerInstance::createPCHExternalASTSource().
|
inline |
Set the type for the C FILE type.
Definition at line 1395 of file ASTContext.h.
Referenced by clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().
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 1131 of file ASTContext.cpp.
References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().
Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().
Definition at line 1212 of file ASTContext.cpp.
References clang::NamedDecl::getDeclName().
Remember that the using decl Inst
is an instantiation of the using decl Pattern
of a class template.
Definition at line 1177 of file ASTContext.cpp.
void ASTContext::setInstantiatedFromUsingShadowDecl | ( | UsingShadowDecl * | Inst, |
UsingShadowDecl * | Pattern | ||
) |
Definition at line 1197 of file ASTContext.cpp.
|
inline |
Set the type for the C jmp_buf type.
Definition at line 1405 of file ASTContext.h.
Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().
Definition at line 8486 of file ASTContext.cpp.
Referenced by clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildVariableInstantiation(), clang::Sema::handleTagNumbering(), 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 2978 of file RecordLayoutBuilder.cpp.
References clang::LazyOffsetPtr< T, OffsT, Get >::get(), getExternalSource(), clang::Redeclarable< decl_type >::getFirstDecl(), and clang::CXXMethodDecl::getParent().
Referenced by clang::Sema::ActOnFinishFunctionBody().
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1348 of file ASTContext.h.
Referenced by clang::Sema::MergeTypedefNameDecl().
void ASTContext::setObjCConstantStringInterface | ( | ObjCInterfaceDecl * | Decl | ) |
Definition at line 6351 of file ASTContext.cpp.
References getObjCInterfaceType(), and clang::QualType::isNull().
Referenced by clang::Sema::BuildObjCStringLiteral().
|
inline |
Set the user-written type that redefines id
.
Definition at line 1335 of file ASTContext.h.
Referenced by clang::Sema::MergeTypedefNameDecl().
void ASTContext::setObjCImplementation | ( | ObjCInterfaceDecl * | IFaceD, |
ObjCImplementationDecl * | ImplD | ||
) |
Set the implementation of ObjCInterfaceDecl.
Definition at line 1997 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 2003 of file ASTContext.cpp.
|
inline |
Definition at line 2241 of file ASTContext.h.
References getObjCMethodRedeclaration().
Referenced by clang::ObjCMethodDecl::setAsRedeclaration().
|
inline |
Definition at line 1322 of file ASTContext.h.
Referenced by clang::Sema::BuildObjCStringLiteral().
|
inline |
Set the user-written type that redefines 'SEL'.
Definition at line 1362 of file ASTContext.h.
Referenced by clang::Sema::MergeTypedefNameDecl().
|
inline |
Definition at line 1301 of file ASTContext.h.
Referenced by LookupPredefedObjCSuperType().
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 8546 of file ASTContext.cpp.
Definition at line 791 of file ASTContext.h.
|
inline |
Definition at line 490 of file ASTContext.h.
Referenced by clang::Sema::EmitCurrentDiagnostic().
|
inline |
Set the type for the C sigjmp_buf type.
Definition at line 1417 of file ASTContext.h.
Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().
Definition at line 8497 of file ASTContext.cpp.
Referenced by clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildVariableInstantiation(), and clang::ASTDeclReader::UpdateDecl().
void ASTContext::setTemplateOrSpecializationInfo | ( | VarDecl * | Inst, |
TemplateOrSpecializationInfo | TSI | ||
) |
Definition at line 1141 of file ASTContext.cpp.
Referenced by clang::VarDecl::setDescribedVarTemplate(), and setInstantiatedFromStaticDataMember().
|
inline |
Set the type for the C ucontext_t type.
Definition at line 1429 of file ASTContext.h.
Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().
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 1806 of file ASTContext.cpp.
References getCharWidth(), and clang::CharUnits::getQuantity().
Referenced by AddDirectArgument(), AtomicUsesUnsupportedLibcall(), BitsContainNoUserData(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitOMPAtomicRMW(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getDeclAlign(), and clang::CodeGen::CGBitFieldInfo::MakeInfo().
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 1801 of file ASTContext.cpp.
References clang::CharUnits::fromQuantity(), and getCharWidth().
Referenced by clang::Sema::AddAlignedAttr(), clang::Sema::CheckAlignasUnderalignment(), clang::CodeGen::CodeGenModule::CodeGenModule(), DumpCXXRecordLayout(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenModule::EmitVTableBitSetEntries(), clang::Sema::FinalizeDeclaration(), getAlignOfGlobalVarInChars(), getDeclAlign(), clang::CodeGen::CodeGenModule::getMemberPointerConstant(), GetNumNonZeroBytesInInit(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), getTypeAlignInChars(), getTypeInfoInChars(), clang::Sema::LookupInlineAsmField(), and mergeAlignedAttrs().
|
inline |
Definition at line 2196 of file ASTContext.h.
Referenced by clang::TypoCorrectionConsumer::addNamespaces(), and mergeFunctionTypes().
Definition at line 7218 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 7206 of file ASTContext.cpp.
References clang::frontend::CPlusPlus, getLangOpts(), hasSameType(), clang::QualType::isNull(), and mergeTypes().
Referenced by AreTypesCompatible(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckObjCMethodOverrides(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CreateGenericSelectionExpr(), EvaluateBinaryTypeTrait(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsPointerConversion(), IsStandardConversion(), IsStringInit(), IsWideCharCompatible(), clang::Sema::MergeFunctionDecl(), and propertyTypesAreCompatible().
UnwrapSimilarPointerTypes - If T1 and T2 are pointer types that may be similar (C++ 4.4), replaces T1 and T2 with the type that they point to and return true. If T1 and T2 aren't pointer types or pointer-to-member types, or if they are not similar at this level, returns false and leaves T1 and T2 unchanged. Top-level qualifiers on T1 and T2 are ignored. This function will typically be called in a loop that successively "unwraps" pointer and pointer-to-member types to compare them at each level.
Definition at line 4137 of file ASTContext.cpp.
References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), and hasSameUnqualifiedType().
Referenced by CompareQualificationConversions(), hasSimilarType(), clang::Sema::IsQualificationConversion(), shouldBeModeledWithNoOp(), and TryConstCast().
|
friend |
Definition at line 430 of file ASTContext.h.
|
friend |
Definition at line 431 of file ASTContext.h.
|
friend |
Definition at line 432 of file ASTContext.h.
|
friend |
Definition at line 433 of file ASTContext.h.
|
friend |
Definition at line 2442 of file ASTContext.h.
|
friend |
Definition at line 2441 of file ASTContext.h.
|
friend |
Definition at line 146 of file ASTContext.h.
CanQualType clang::ASTContext::ARCUnbridgedCastTy |
Definition at line 834 of file ASTContext.h.
Referenced by clang::Sema::GatherArgumentsForCall(), clang::ASTReader::GetType(), and InitBuiltinTypes().
|
mutable |
Definition at line 843 of file ASTContext.h.
Referenced by getAutoDeductType(), and clang::serialization::MakeTypeID().
|
mutable |
Definition at line 844 of file ASTContext.h.
Referenced by getAutoRRefDeductType(), and clang::serialization::MakeTypeID().
CanQualType clang::ASTContext::BoolTy |
Definition at line 818 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXBoolLiteral(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::AddBuiltinCandidate(), clang::ento::SimpleConstraintManager::assume(), clang::Sema::BuildCXXNoexceptExpr(), clang::Sema::BuildExpressionTrait(), clang::Sema::BuildResolvedCallExpr(), buildSingleCopyAssignRecursively(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::checkExceptionSpecification(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckPointerConversion(), ConvertDeclSpecToType(), clang::Sema::CreateBuiltinUnaryOp(), DecodeTypeFromStr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitIfStmt(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::ento::SValBuilder::getConditionType(), getLogicalOperationType(), clang::ASTReader::GetType(), InitBuiltinTypes(), IsStandardConversion(), clang::Sema::PerformContextuallyConvertToBool(), clang::Sema::PerformImplicitConversion(), and TryContextuallyConvertToBool().
CanQualType clang::ASTContext::BoundMemberTy |
Definition at line 832 of file ASTContext.h.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::FixOverloadedFunctionReference(), clang::ASTReader::GetType(), clang::Sema::getVariadicCallType(), InitBuiltinTypes(), clang::Sema::MaybeBindToTemporary(), and clang::Sema::tryExprAsCall().
CanQualType clang::ASTContext::BuiltinFnTy |
Definition at line 833 of file ASTContext.h.
Referenced by clang::Sema::BuildDeclarationNameExpr(), buildMemcpyForAssignmentOp(), clang::ASTReader::GetType(), and InitBuiltinTypes().
Builtin::Context& clang::ASTContext::BuiltinInfo |
Definition at line 441 of file ASTContext.h.
Referenced by clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::ConvertArgumentsForCall(), emitReplacement(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getBuiltinLibFunction(), GetBuiltinType(), clang::ento::CheckerContext::isCLibraryFunction(), clang::CallExpr::isUnevaluatedBuiltinCall(), clang::Sema::LazilyCreateBuiltin(), LookupBuiltin(), clang::Sema::LookupInObjCMethod(), clang::Sema::MergeFunctionDecl(), and rewriteBuiltinFunctionDecl().
CanQualType clang::ASTContext::Char16Ty |
Definition at line 823 of file ASTContext.h.
Referenced by clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCNumericLiteral(), clang::Sema::CheckLiteralOperatorDeclaration(), ConvertDeclSpecToType(), clang::ASTReader::GetType(), InitBuiltinTypes(), IsStringInit(), and IsWideCharCompatible().
CanQualType clang::ASTContext::Char32Ty |
Definition at line 824 of file ASTContext.h.
Referenced by clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCNumericLiteral(), clang::Sema::CheckLiteralOperatorDeclaration(), ConvertDeclSpecToType(), clang::ASTReader::GetType(), InitBuiltinTypes(), IsStringInit(), and IsWideCharCompatible().
CanQualType clang::ASTContext::CharTy |
Definition at line 819 of file ASTContext.h.
Referenced by clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildObjCNumericLiteral(), clang::Sema::BuildPredefinedExpr(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckMain(), ConvertDeclSpecToType(), CreateCharPtrBuiltinVaListDecl(), DecodeTypeFromStr(), diagnoseStringPlusChar(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getCFConstantStringType(), GetCFNumberSize(), getCharWidth(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::Sema::GetSignedVectorType(), clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::ASTNodeImporter::VisitBuiltinType().
RawCommentList clang::ASTContext::Comments |
All comments in this translation unit.
Definition at line 546 of file ASTContext.h.
Referenced by addComment(), getRawCommentForDeclNoCache(), getRawCommentList(), and clang::ASTReader::ReadComments().
|
mutable |
True if comments are already loaded from ExternalASTSource.
Definition at line 549 of file ASTContext.h.
Referenced by getRawCommentForDeclNoCache().
|
mutable |
Definition at line 442 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToObjectOfClassType(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckDestructor(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CodeCompleteCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), FindOverriddenMethod(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::getLambdaCallOperator(), getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), hasMember(), HasNoThrowOperator(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), clang::Sema::LookupConstructors(), clang::Sema::LookupOverloadedOperatorName(), clang::Sema::LookupSpecialMember(), clang::ASTReader::ReadDeclarationName(), clang::Sema::ShouldDeleteSpecialMember(), clang::Sema::startLambdaDefinition(), and threadSafetyCheckIsSmartPointer().
CanQualType clang::ASTContext::DependentTy |
Definition at line 832 of file ASTContext.h.
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), AddResultTypeChunk(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXFoldExpr(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::buildOverloadedCallSet(), clang::Sema::BuildPredefinedExpr(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckEnumConstant(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), clang::Sema::CheckPackExpansion(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), CheckRealImagOperand(), ConvertDeclSpecToType(), clang::DependentScopeDeclRefExpr::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), GenerateInjectedTemplateArgs(), getDecltypeForExpr(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDeclTypes(), clang::OverloadExpr::OverloadExpr(), and clang::Sema::startLambdaDefinition().
CanQualType clang::ASTContext::DoubleComplexTy |
Definition at line 830 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::DoubleTy |
Definition at line 828 of file ASTContext.h.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::BuildVAArgExpr(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::Sema::DefaultArgumentPromotion(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), GetFullTypeForDeclarator(), getNeonEltType(), getRealTypeForBitwidth(), clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource |
Definition at line 443 of file ASTContext.h.
Referenced by getExternalSource(), getRawCommentForDeclNoCache(), PrintStats(), and setExternalSource().
CanQualType clang::ASTContext::FloatComplexTy |
Definition at line 830 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::FloatTy |
Definition at line 828 of file ASTContext.h.
Referenced by clang::Sema::ActOnNumericConstant(), ConvertDeclSpecToType(), clang::Sema::CreateBuiltinUnaryOp(), DecodeTypeFromStr(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getFloatingTypeOfSizeWithinDomain(), getNeonEltType(), getRealTypeForBitwidth(), clang::ASTReader::GetType(), handleFloatConversion(), InitBuiltinTypes(), clang::Sema::Initialize(), mergeFunctionTypes(), clang::Sema::PerformImplicitConversion(), and clang::Sema::UsualUnaryConversions().
CanQualType clang::ASTContext::HalfTy |
Definition at line 829 of file ASTContext.h.
Referenced by ConvertDeclSpecToType(), DecodeTypeFromStr(), getFloatingTypeOfSizeWithinDomain(), getNeonEltType(), clang::ASTReader::GetType(), and InitBuiltinTypes().
IdentifierTable& clang::ASTContext::Idents |
Definition at line 439 of file ASTContext.h.
Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnInstanceMessage(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::ActOnStringLiteral(), addFunctionPointerConversion(), clang::Sema::addImplicitTypedef(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), BuildImplicitMemberInitializer(), buildImplicitRecord(), buildImplicitTypedef(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), buildSingleCopyAssignRecursively(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Sema::CheckFunctionDeclaration(), CheckKeyForObjCARCConversion(), clang::Sema::CheckObjCForCollectionOperand(), CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinBinOp(), clang::ObjCMethodDecl::createImplicitParams(), CreatePowerABIBuiltinVaListDecl(), clang::Sema::CreatePropertyDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), CXXRecordMembersNamed(), clang::Sema::DefaultLvalueConversion(), DiagnoseDirectIsaAccess(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitReplacement(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::Sema::getFloat128Identifier(), clang::ento::getKeywordSelectorImpl(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), getNSCopyingName(), clang::NSAPI::getNSDictionarySelector(), getNSNumberFactoryMethod(), clang::NSAPI::getNSNumberLiteralSelector(), getNSObjectName(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), getObjCProtocolDecl(), clang::Sema::getPrintingPolicy(), clang::Sema::getSuperIdentifier(), clang::GetUnarySelector(), handleFormatAttr(), handleIBOutletCollection(), hasMember(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), clang::Sema::isKnownName(), isMacroDefined(), clang::NSAPI::isMacroDefined(), isNSStringType(), IsValidIdentifier(), clang::Sema::LookupInlineAsmField(), clang::Sema::LookupInObjCMethod(), LookupPredefedObjCSuperType(), mergeDeclAttribute(), clang::ObjCNoReturn::ObjCNoReturn(), performLambdaVarCaptureInitialization(), PropertyMemoryAttribute(), shouldRunOnFunctionOrMethod(), and transferARCOwnershipToDeclaratorChunk().
CanQualType clang::ASTContext::Int128Ty |
Definition at line 825 of file ASTContext.h.
Referenced by ConvertDeclSpecToType(), DecodeTypeFromStr(), getInt128Decl(), getIntTypeForBitwidth(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::IntTy |
Definition at line 825 of file ASTContext.h.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnTag(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBound(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMain(), clang::Sema::CheckPlaceholderExpr(), ConvertDeclSpecToType(), create_dispatch_once(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EnterSEHTryStmt(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringType(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getLogicalOperationType(), getNeonEltType(), getNextLargerIntegralType(), getObjCEncodingTypeSize(), getPromotedIntegerType(), clang::Sema::GetSignedVectorType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), InitBuiltinTypes(), clang::Sema::Initialize(), initializeForBlockHeader(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::IsIntegralPromotion(), isOverflowingIntegerType(), isPromotableBitField(), clang::analyze_format_string::ArgType::matchesType(), rewriteToNumericBoxedExpression(), and shouldNotPrintDirectly().
ASTMutationListener* clang::ASTContext::Listener |
Definition at line 444 of file ASTContext.h.
Referenced by getASTMutationListener(), mergeDefinitionIntoModule(), and setASTMutationListener().
CanQualType clang::ASTContext::LongDoubleComplexTy |
Definition at line 830 of file ASTContext.h.
Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongDoubleTy |
Definition at line 828 of file ASTContext.h.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::CheckLiteralOperatorDeclaration(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getFloatingTypeOfSizeWithinDomain(), getRealTypeForBitwidth(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::LongLongTy |
Definition at line 825 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnNumericConstant(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getNeonEltType(), getNextLargerIntegralType(), getPromotedIntegerType(), clang::Sema::GetSignedVectorType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::IsIntegralPromotion(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::LongTy |
Definition at line 825 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnNumericConstant(), ConvertDeclSpecToType(), CreateSystemZBuiltinVaListDecl(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringType(), GetCFNumberSize(), getNeonEltType(), getNextLargerIntegralType(), getPromotedIntegerType(), clang::Sema::GetSignedVectorType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::Sema::IsIntegralPromotion(), clang::analyze_format_string::ArgType::matchesType(), shouldNotPrintDirectly(), and clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper().
CanQualType clang::ASTContext::NullPtrTy |
Definition at line 831 of file ASTContext.h.
Referenced by clang::Sema::ActOnCXXNullPtrLiteral(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::ASTReader::GetType(), and InitBuiltinTypes().
|
static |
The number of implicitly-declared copy assignment operators.
Definition at line 2361 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition at line 2365 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitCopyAssignment(), and PrintStats().
|
static |
The number of implicitly-declared copy constructors.
Definition at line 2347 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared copy constructors for which declarations were built.
Definition at line 2351 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitCopyConstructor(), and PrintStats().
|
static |
The number of implicitly-declared default constructors.
Definition at line 2340 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared default constructors for which declarations were built.
Definition at line 2344 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitDefaultConstructor(), and PrintStats().
|
static |
The number of implicitly-declared destructors.
Definition at line 2375 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared destructors for which declarations were built.
Definition at line 2379 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitDestructor(), and PrintStats().
|
static |
The number of implicitly-declared move assignment operators.
Definition at line 2368 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared move assignment operators for which declarations were built.
Definition at line 2372 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitMoveAssignment(), and PrintStats().
|
static |
The number of implicitly-declared move constructors.
Definition at line 2354 of file ASTContext.h.
Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().
|
static |
The number of implicitly-declared move constructors for which declarations were built.
Definition at line 2358 of file ASTContext.h.
Referenced by clang::Sema::DeclareImplicitMoveConstructor(), and PrintStats().
CanQualType clang::ASTContext::ObjCBuiltinBoolTy |
Definition at line 836 of file ASTContext.h.
Referenced by clang::Sema::ActOnObjCBoolLiteral(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinClassTy |
Definition at line 835 of file ASTContext.h.
Referenced by getObjCClassDecl(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinIdTy |
Definition at line 835 of file ASTContext.h.
Referenced by clang::Sema::actOnObjCProtocolQualifierType(), applyObjCProtocolQualifiers(), clang::Sema::BuildObjCDictionaryLiteral(), getObjCIdDecl(), clang::Type::getObjCSubstitutions(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::ObjCBuiltinSelTy |
Definition at line 835 of file ASTContext.h.
Referenced by getObjCSelDecl(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::OCLEventTy |
Definition at line 840 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage1dArrayTy |
Definition at line 837 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage1dBufferTy |
Definition at line 837 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage1dTy |
Definition at line 837 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage2dArrayTy |
Definition at line 838 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage2dTy |
Definition at line 838 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLImage3dTy |
Definition at line 839 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OCLSamplerTy |
Definition at line 840 of file ASTContext.h.
Referenced by clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::Sema::Initialize().
CanQualType clang::ASTContext::OverloadTy |
Definition at line 832 of file ASTContext.h.
Referenced by clang::Sema::ActOnCallExpr(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildReferenceType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckTemplateArgument(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseBadConversion(), clang::Sema::FindAssociatedClassesAndNamespaces(), getLValueReferenceType(), clang::ASTReader::GetType(), handleCleanupAttr(), InitBuiltinTypes(), clang::InitializationSequence::InitializeFrom(), IsStandardConversion(), clang::Sema::NoteAllOverloadCandidates(), clang::Sema::PerformImplicitConversion(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveOverloadedFunctionForReferenceBinding(), clang::Sema::tryExprAsCall(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), and TryStaticMemberPointerUpcast().
|
mutable |
Mapping from declarations to parsed comments attached to any redeclaration.
Definition at line 614 of file ASTContext.h.
Referenced by getCommentForDecl().
CanQualType clang::ASTContext::PseudoObjectTy |
Definition at line 834 of file ASTContext.h.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::ActOnClassPropertyRefExpr(), BuildMSPropertyRefExpr(), clang::Sema::BuildObjCSubscriptExpression(), clang::ASTReader::GetType(), clang::Sema::HandleExprPropertyRefExpr(), InitBuiltinTypes(), and LookupMemberExpr().
|
mutable |
Mapping from declarations to comments attached to any redeclaration.
Raw comments are owned by Comments list. This mapping is populated lazily.
Definition at line 610 of file ASTContext.h.
Referenced by getRawCommentForAnyRedecl().
llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos |
Definition at line 2473 of file ASTContext.h.
Referenced by clang::Sema::UnifySection().
SelectorTable& clang::ASTContext::Selectors |
Definition at line 440 of file ASTContext.h.
Referenced by clang::Sema::ActOnInstanceMessage(), AddObjCKeyValueCompletions(), clang::Sema::BuildObjCBoxedExpr(), CheckKeyForObjCARCConversion(), clang::Sema::checkObjCBridgeRelatedComponents(), clang::Sema::CheckObjCForCollectionOperand(), CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), GCRewriteFinalize(), clang::ento::getKeywordSelectorImpl(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSDictionarySelector(), clang::NSAPI::getNSNumberLiteralSelector(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), clang::GetUnarySelector(), clang::ASTImporter::Import(), and clang::ObjCNoReturn::ObjCNoReturn().
CanQualType clang::ASTContext::ShortTy |
Definition at line 825 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), GetCFNumberSize(), getNeonEltType(), getNextLargerIntegralType(), clang::Sema::GetSignedVectorType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::SignedCharTy |
Definition at line 825 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getNeonEltType(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), and clang::ASTNodeImporter::VisitBuiltinType().
CanQualType clang::ASTContext::UnknownAnyTy |
Definition at line 832 of file ASTContext.h.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckMessageArgumentTypes(), ClassifyInternal(), ClassifyMemberExpr(), ConvertDeclSpecToType(), clang::Sema::GatherArgumentsForCall(), clang::ASTReader::GetType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedCharTy |
Definition at line 826 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnStringLiteral(), checkPointerTypesForAssignment(), ConvertDeclSpecToType(), CreatePowerABIBuiltinVaListDecl(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getNeonEltType(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::analyze_format_string::ArgType::matchesType(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::ASTNodeImporter::VisitBuiltinType().
CanQualType clang::ASTContext::UnsignedInt128Ty |
Definition at line 827 of file ASTContext.h.
Referenced by ConvertDeclSpecToType(), DecodeTypeFromStr(), getCorrespondingUnsignedType(), getIntTypeForBitwidth(), clang::ASTReader::GetType(), getUInt128Decl(), and InitBuiltinTypes().
CanQualType clang::ASTContext::UnsignedIntTy |
Definition at line 826 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnNumericConstant(), ConvertDeclSpecToType(), CreateX86_64ABIBuiltinVaListDecl(), DecodeTypeFromStr(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getNeonEltType(), getNextLargerIntegralType(), getPromotedIntegerType(), clang::ASTReader::GetType(), getUnsignedWCharType(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::Sema::IsIntegralPromotion(), isPromotableBitField(), clang::analyze_format_string::ArgType::matchesType(), and shouldNotPrintDirectly().
CanQualType clang::ASTContext::UnsignedLongLongTy |
Definition at line 827 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnNumericConstant(), clang::Sema::CheckLiteralOperatorDeclaration(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getNeonEltType(), getNextLargerIntegralType(), getPromotedIntegerType(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::IsIntegralPromotion(), and clang::analyze_format_string::ArgType::matchesType().
CanQualType clang::ASTContext::UnsignedLongTy |
Definition at line 826 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnNumericConstant(), buildBlockDescriptor(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), ConvertDeclSpecToType(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCorrespondingUnsignedType(), getNeonEltType(), getNextLargerIntegralType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getPromotedIntegerType(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::Sema::IsIntegralPromotion(), clang::analyze_format_string::ArgType::matchesType(), and shouldNotPrintDirectly().
CanQualType clang::ASTContext::UnsignedShortTy |
Definition at line 826 of file ASTContext.h.
Referenced by clang::Sema::ActOnEnumBody(), ConvertDeclSpecToType(), CreatePowerABIBuiltinVaListDecl(), DecodeTypeFromStr(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCorrespondingUnsignedType(), getNeonEltType(), getNextLargerIntegralType(), clang::ASTReader::GetType(), InitBuiltinTypes(), and clang::analyze_format_string::ArgType::matchesType().
|
mutable |
Definition at line 848 of file ASTContext.h.
Referenced by CreateAArch64ABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), getVaListTagType(), InitBuiltinTypes(), and clang::serialization::MakeTypeID().
CanQualType clang::ASTContext::VoidPtrTy |
Definition at line 831 of file ASTContext.h.
Referenced by clang::Sema::ActOnOpenMPRegionStart(), AddDirectArgument(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::ento::SimpleConstraintManager::assume(), buildBlockDescriptor(), clang::Sema::BuildObjCBoxedExpr(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), computeBlockInfo(), clang::Sema::DiagnoseUnusedExprResult(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), getBlockDescriptorExtendedType(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getObjCEncodingForBlock(), getObjCEncodingForMethodDecl(), getObjCEncodingTypeSize(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), InitBuiltinTypes(), initializeForBlockHeader(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::CodeGen::CodeGenFunction::StartThunk().
CanQualType clang::ASTContext::VoidTy |
Definition at line 817 of file ASTContext.h.
Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnInitList(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStmtExpr(), clang::Sema::AdjustDestructorExceptionSpec(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::Sema::BuildReturnStmt(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckARCMethodDecl(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckOperatorDeleteDeclaration(), ConvertDeclSpecToType(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), create_dispatch_once(), create_dispatch_sync(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::CodeGen::CodeGenFunction::createAtExitStub(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), DecodeTypeFromStr(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::ASTReader::GetType(), clang::ento::MemRegionManager::getVarRegion(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::ento::ExprEngine::Visit().
CanQualType clang::ASTContext::WCharTy |
Definition at line 820 of file ASTContext.h.
Referenced by ConvertDeclSpecToType(), getSignedWCharType(), clang::ASTReader::GetType(), getWCharType(), InitBuiltinTypes(), and clang::ASTNodeImporter::VisitBuiltinType().
CanQualType clang::ASTContext::WideCharTy |
Definition at line 821 of file ASTContext.h.
Referenced by clang::Sema::ActOnCharacterConstant(), clang::Sema::BuildPredefinedExpr(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::analyze_printf::PrintfSpecifier::getArgType(), getWideCharType(), and InitBuiltinTypes().
CanQualType clang::ASTContext::WIntTy |
Definition at line 822 of file ASTContext.h.
Referenced by getWIntType(), and InitBuiltinTypes().