clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends
clang::ASTContext Class Reference

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>

Inheritance diagram for clang::ASTContext:
Inheritance graph
[legend]
Collaboration diagram for clang::ASTContext:
Collaboration graph
[legend]

List of all members.

Classes

class  CanonicalTemplateTemplateParm
 Representation of a "canonical" template template parameter that is used in canonical template names.
class  import_iterator
 Iterator that visits import declarations.
class  RawCommentAndCacheFlags
struct  SectionInfo

Public Types

enum  GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext }
enum  PragmaSectionFlag {
  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.
typedef llvm::SmallVector
< ast_type_traits::DynTypedNode, 2 > 
ParentVector
 Contains parents of a node.
typedef llvm::DenseMap< const
void *, llvm::PointerUnion
< ast_type_traits::DynTypedNode
*, ParentVector * > > 
ParentMap
 Maps from a node to its parents.
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.
ArrayRef
< ast_type_traits::DynTypedNode
getParents (const ast_type_traits::DynTypedNode &Node)
const clang::PrintingPolicygetPrintingPolicy () const
void setPrintingPolicy (const clang::PrintingPolicy &Policy)
SourceManagergetSourceManager ()
const SourceManagergetSourceManager () 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.
PartialDiagnostic::StorageAllocatorgetDiagAllocator ()
const TargetInfogetTargetInfo () const
QualType getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const
QualType getRealTypeForBitwidth (unsigned DestWidth) const
bool AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const
const LangOptionsgetLangOpts () const
const SanitizerBlacklistgetSanitizerBlacklist () const
DiagnosticsEnginegetDiagnostics () const
FullSourceLoc getFullLoc (SourceLocation Loc) const
RawCommentgetRawCommentForDeclNoCache (const Decl *D) const
 Return the documentation comment attached to a given declaration, without looking into cache.
RawCommentListgetRawCommentList ()
void addComment (const RawComment &RC)
const RawCommentgetRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const
 Return the documentation comment attached to a given declaration. Returns NULL if no comment is attached.
comments::FullCommentgetCommentForDecl (const Decl *D, const Preprocessor *PP) const
comments::FullCommentgetLocalCommentForDeclUncached (const Decl *D) const
comments::FullCommentcloneFullComment (comments::FullComment *FC, const Decl *D) const
comments::CommandTraitsgetCommentCommandTraits () const
AttrVecgetDeclAttrs (const Decl *D)
 Retrieve the attributes for the given declaration.
void eraseDeclAttrs (const Decl *D)
 Erase the attributes corresponding to the given declaration.
MemberSpecializationInfogetInstantiatedFromStaticDataMember (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.
TemplateOrSpecializationInfo getTemplateOrSpecializationInfo (const VarDecl *Var)
FunctionDeclgetClassScopeSpecializationPattern (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.
void setTemplateOrSpecializationInfo (VarDecl *Inst, TemplateOrSpecializationInfo TSI)
NamedDeclgetInstantiatedFromUsingDecl (UsingDecl *Inst)
 If the given using decl Inst is an instantiation of a (possibly unresolved) using decl from a template instantiation, return it.
void setInstantiatedFromUsingDecl (UsingDecl *Inst, NamedDecl *Pattern)
 Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template.
void setInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst, UsingShadowDecl *Pattern)
UsingShadowDeclgetInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst)
FieldDeclgetInstantiatedFromUnnamedFieldDecl (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.
void getOverriddenMethods (const NamedDecl *Method, SmallVectorImpl< const NamedDecl * > &Overridden) const
 Return C++ or ObjC overridden methods for the given Method.
void addedLocalImportDecl (ImportDecl *Import)
 Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit.
import_range local_imports () const
DeclgetPrimaryMergedDecl (Decl *D)
void setPrimaryMergedDecl (Decl *D, Decl *Primary)
TranslationUnitDeclgetTranslationUnitDecl () 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.
ExternalASTSourcegetExternalSource () const
 Retrieve a pointer to the external AST source associated with this AST context, if any.
void setASTMutationListener (ASTMutationListener *Listener)
 Attach an AST mutation listener to the AST context.
ASTMutationListenergetASTMutationListener () const
 Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
void PrintStats () const
const SmallVectorImpl< Type * > & getTypes () const
RecordDeclbuildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const
 Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
TypedefDeclbuildImplicitTypedef (QualType T, StringRef Name) const
 Create a new implicit TU-level typedef declaration.
TypedefDeclgetInt128Decl () const
 Retrieve the declaration for the 128-bit signed integer type.
TypedefDeclgetUInt128Decl () const
 Retrieve the declaration for the 128-bit unsigned integer type.
TypeDeclgetFloat128StubType () const
 Retrieve the declaration for a 128-bit float stub type.
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.
QualType getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const
 Return the uniqued reference to the type for an Objective-C gc-qualified type.
QualType getRestrictType (QualType T) const
 Return the uniqued reference to the type for a restrict qualified type.
QualType getVolatileType (QualType T) const
 Return the uniqued reference to the type for a volatile qualified type.
QualType getConstType (QualType T) const
 Return the uniqued reference to the type for a const qualified type.
const FunctionTypeadjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo)
 Change the ExtInfo on a function type.
void adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType)
 Change the result type of a function type once it is deduced.
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.
QualType getComplexType (QualType T) const
 Return the uniqued reference to the type for a complex number with the specified element type.
CanQualType getComplexType (CanQualType T) const
QualType getPointerType (QualType T) const
 Return the uniqued reference to the type for a pointer to the specified type.
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.
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.
CanQualType getDecayedType (CanQualType T) const
QualType getAtomicType (QualType T) const
 Return the uniqued reference to the atomic type for the specified type.
QualType getBlockPointerType (QualType T) const
 Return the uniqued reference to the type for a block of the specified type.
QualType getBlockDescriptorType () const
QualType getBlockDescriptorExtendedType () const
void setcudaConfigureCallDecl (FunctionDecl *FD)
FunctionDeclgetcudaConfigureCallDecl ()
bool BlockRequiresCopying (QualType Ty, const VarDecl *D)
 Returns true iff we need copy/dispose helpers for the given type.
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.
QualType getRValueReferenceType (QualType T) const
 Return the uniqued reference to the type for an rvalue reference to the specified type.
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.
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.
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.
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.
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.
QualType getVariableArrayDecayedType (QualType Ty) const
 Returns a vla type where known sizes are replaced with [*].
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.
QualType getExtVectorType (QualType VectorType, unsigned NumElts) const
 Return the unique reference to an extended vector type of the specified element type and size.
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()'.
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.
QualType getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
 Return the unique reference to the type for the specified type declaration.
QualType getTypedefType (const TypedefNameDecl *Decl, QualType Canon=QualType()) const
 Return the unique reference to the type for the specified typedef-name decl.
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.
QualType getSubstTemplateTypeParmPackType (const TemplateTypeParmType *Replaced, const TemplateArgument &ArgPack)
 Retrieve a.
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.
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
TypeSourceInfogetTemplateSpecializationTypeInfo (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
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.
QualType getTypeOfExprType (Expr *e) const
 GCC extension.
QualType getTypeOfType (QualType t) const
QualType getDecltypeType (Expr *e, QualType UnderlyingType) const
 C++11 decltype.
QualType getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
 Unary type transforms.
QualType getAutoType (QualType DeducedType, bool IsDecltypeAuto, bool IsDependent) const
 C++11 deduced auto type.
QualType getAutoDeductType () const
 C++11 deduction pattern for 'auto' type.
QualType getAutoRRefDeductType () const
 C++11 deduction pattern for 'auto &&' type.
QualType getTagDeclType (const TagDecl *Decl) const
 Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
CanQualType getSizeType () const
 Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
CanQualType getIntMaxType () const
 Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
CanQualType getUIntMaxType () const
 Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
QualType getWCharType () const
 Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).
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.
QualType getSignedWCharType () const
 Return the type of "signed wchar_t".
QualType getUnsignedWCharType () const
 Return the type of "unsigned wchar_t".
QualType getWIntType () const
 In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
QualType getIntPtrType () const
 Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
QualType getUIntPtrType () const
 Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
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).
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().
QualType getCFConstantStringType () const
 Return the C structure type used to represent constant CFStrings.
QualType getObjCSuperType () const
 Returns the C struct type for objc_super.
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.
void setObjCIdRedefinitionType (QualType RedefType)
 Set the user-written type that redefines id.
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.
void setObjCClassRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'.
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.
void setObjCSelRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'.
QualType getObjCInstanceType ()
 Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
TypedefDeclgetObjCInstanceTypeDecl ()
 Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
void setFILEDecl (TypeDecl *FILEDecl)
 Set the type for the C FILE type.
QualType getFILEType () const
 Retrieve the C FILE type.
void setjmp_bufDecl (TypeDecl *jmp_bufDecl)
 Set the type for the C jmp_buf type.
QualType getjmp_bufType () const
 Retrieve the C jmp_buf type.
void setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl)
 Set the type for the C sigjmp_buf type.
QualType getsigjmp_bufType () const
 Retrieve the C sigjmp_buf type.
void setucontext_tDecl (TypeDecl *ucontext_tDecl)
 Set the type for the C ucontext_t type.
QualType getucontext_tType () const
 Retrieve the C ucontext_t type.
QualType getLogicalOperationType () const
 The result type of logical operations, '<', '>', '!=', etc.
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.
void getObjCEncodingForPropertyType (QualType T, std::string &S) const
 Emit the Objective-C property type encoding for the given type T into S.
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.
bool getObjCEncodingForFunctionDecl (const FunctionDecl *Decl, std::string &S)
 Emit the encoded type for the function Decl into S.
bool getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, std::string &S, bool Extended=false) const
 Emit the encoded type for the method declaration Decl into S.
std::string getObjCEncodingForBlock (const BlockExpr *blockExpr) const
 Return the encoded type for this block declaration.
void getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container, std::string &S) const
bool ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
ObjCPropertyImplDeclgetObjCPropertyImplDeclForPropertyDecl (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.
TypedefDeclgetObjCIdDecl () const
 Retrieve the typedef corresponding to the predefined id type in Objective-C.
QualType getObjCIdType () const
 Represents the Objective-CC id type.
TypedefDeclgetObjCSelDecl () const
 Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
QualType getObjCSelType () const
 Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
TypedefDeclgetObjCClassDecl () const
 Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
QualType getObjCClassType () const
 Represents the Objective-C Class type.
ObjCInterfaceDeclgetObjCProtocolDecl () const
 Retrieve the Objective-C class declaration corresponding to the predefined Protocol class.
TypedefDeclgetBOOLDecl () const
 Retrieve declaration of 'BOOL' typedef.
void setBOOLDecl (TypedefDecl *TD)
 Save declaration of 'BOOL' typedef.
QualType getBOOLType () const
 type of 'BOOL' type.
QualType getObjCProtoType () const
 Retrieve the type of the Objective-C Protocol class.
TypedefDeclgetBuiltinVaListDecl () const
 Retrieve the C type declaration corresponding to the predefined __builtin_va_list type.
QualType getBuiltinVaListType () const
 Retrieve the type of the __builtin_va_list type.
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.
QualType getCVRQualifiedType (QualType T, unsigned CVR) const
 Return a type with additional const, volatile, or restrict qualifiers.
QualType getQualifiedType (SplitQualType split) const
 Un-split a SplitQualType.
QualType getQualifiedType (QualType T, Qualifiers Qs) const
 Return a type with additional qualifiers.
QualType getQualifiedType (const Type *T, Qualifiers Qs) const
 Return a type with additional qualifiers.
QualType getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime)
 Return a type with the given lifetime qualifier.
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.
TemplateName getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *Template) const
 Retrieve the template name that represents a qualified template name such as std::vector.
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, const IdentifierInfo *Name) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template apply.
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, OverloadedOperatorKind Operator) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template operator+.
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.
Qualifiers::GC getObjCGCAttrKind (QualType Ty) const
 Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes.
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.
const llvm::fltSemantics & getFloatTypeSemantics (QualType T) const
 Return the APFloat 'semantics' for the specified scalar floating point type.
TypeInfo getTypeInfo (const Type *T) const
 Get the size and alignment of the specified complete type in bits.
TypeInfo getTypeInfo (QualType T) const
uint64_t getTypeSize (QualType T) const
 Return the size of the specified (complete) type T, in bits.
uint64_t getTypeSize (const Type *T) const
uint64_t getCharWidth () const
 Return the size of the character type, in bits.
CharUnits toCharUnitsFromBits (int64_t BitSize) const
 Convert a size in bits to a size in characters.
int64_t toBits (CharUnits CharSize) const
 Convert a size in characters to a size in bits.
CharUnits getTypeSizeInChars (QualType T) const
 Return the size of the specified (complete) type T, in characters.
CharUnits getTypeSizeInChars (const Type *T) const
unsigned getTypeAlign (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in bits.
unsigned getTypeAlign (const Type *T) const
CharUnits getTypeAlignInChars (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in characters.
CharUnits getTypeAlignInChars (const Type *T) const
std::pair< CharUnits, CharUnitsgetTypeInfoDataSizeInChars (QualType T) const
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (const Type *T) const
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (QualType T) const
bool isAlignmentRequired (const Type *T) const
 Determine if the alignment the type has was required using an alignment attribute.
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.
unsigned getAlignOfGlobalVar (QualType T) const
 Return the alignment in bits that should be given to a global variable with type T.
CharUnits getAlignOfGlobalVarInChars (QualType T) const
 Return the alignment in characters that should be given to a global variable with type T.
CharUnits getDeclAlign (const Decl *D, bool ForAlignof=false) const
 Return a conservative estimate of the alignment of the specified decl D.
const ASTRecordLayoutgetASTRecordLayout (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.
const ASTRecordLayoutBuildMicrosoftASTRecordLayout (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.
const ASTRecordLayoutgetASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const
 Get or compute information about the layout of the specified Objective-C interface.
void DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const
const ASTRecordLayoutgetASTObjCImplementationLayout (const ObjCImplementationDecl *D) const
 Get or compute information about the layout of the specified Objective-C implementation.
const CXXMethodDeclgetCurrentKeyFunction (const CXXRecordDecl *RD)
 Get our current best idea for the key function of the given record decl, or NULL if there isn't one.
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.
uint64_t getFieldOffset (const ValueDecl *FD) const
 Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
bool isNearlyEmpty (const CXXRecordDecl *RD) const
VTableContextBasegetVTableContext ()
MangleContextcreateMangleContext ()
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.
const TypegetCanonicalType (const Type *T) const
CanQualType getCanonicalParamType (QualType T) const
 Return the canonical parameter type corresponding to the specific potentially non-canonical one.
bool hasSameType (QualType T1, QualType T2) const
 Determine whether the given types T1 and T2 are equivalent.
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.
bool hasSameUnqualifiedType (QualType T1, QualType T2) const
 Determine whether the given types are equivalent after cvr-qualifiers have been removed.
bool ObjCMethodsAreEqual (const ObjCMethodDecl *MethodDecl, const ObjCMethodDecl *MethodImp)
bool UnwrapSimilarPointerTypes (QualType &T1, QualType &T2)
NestedNameSpecifiergetCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const
 Retrieves the "canonical" nested name specifier for a given nested name specifier.
CallingConv getDefaultCallingConvention (bool isVariadic, bool IsCXXMethod) const
 Retrieves the default calling convention for the current target.
TemplateName getCanonicalTemplateName (TemplateName Name) const
 Retrieves the "canonical" template name that refers to a given template.
bool hasSameTemplateName (TemplateName X, TemplateName Y)
 Determine whether the given template names refer to the same template.
TemplateArgument getCanonicalTemplateArgument (const TemplateArgument &Arg) const
 Retrieve the "canonical" template argument.
const ArrayTypegetAsArrayType (QualType T) const
const ConstantArrayTypegetAsConstantArrayType (QualType T) const
const VariableArrayTypegetAsVariableArrayType (QualType T) const
const IncompleteArrayTypegetAsIncompleteArrayType (QualType T) const
const DependentSizedArrayTypegetAsDependentSizedArrayType (QualType T) const
QualType getBaseElementType (const ArrayType *VAT) const
 Return the innermost element type of an array type.
QualType getBaseElementType (QualType QT) const
 Return the innermost element type of a type (which needn't actually be an array type).
uint64_t getConstantArrayElementCount (const ConstantArrayType *CA) const
 Return number of constant array elements.
QualType getAdjustedParameterType (QualType T) const
 Perform adjustment on the parameter type of a function.
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.
QualType getArrayDecayedType (QualType T) const
 Return the properly qualified result of decaying the specified array type to a pointer.
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.
Qualifiers::ObjCLifetime getInnerObjCOwnership (QualType T) const
 Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownership.
QualType isPromotableBitField (Expr *E) const
 Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
int getIntegerTypeOrder (QualType LHS, QualType RHS) const
 Return the highest ranked integer type, see C99 6.3.1.8p1.
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').
QualType getFloatingTypeOfSizeWithinDomain (QualType typeSize, QualType typeDomain) const
 Return a real floating point or a complex type (based on typeDomain/typeSize).
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.
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.
bool isSentinelNullExpr (const Expr *E)
ObjCImplementationDeclgetObjCImplementation (ObjCInterfaceDecl *D)
 Get the implementation of the ObjCInterfaceDecl D, or NULL if none exists.
ObjCCategoryImplDeclgetObjCImplementation (ObjCCategoryDecl *D)
 Get the implementation of the ObjCCategoryDecl D, or NULL if none exists.
bool AnyObjCImplementation ()
 Return true if there is at least one @implementation in the TU.
void setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD)
 Set the implementation of ObjCInterfaceDecl.
void setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD)
 Set the implementation of ObjCCategoryDecl.
const ObjCMethodDeclgetObjCMethodRedeclaration (const ObjCMethodDecl *MD) const
 Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
void setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
const ObjCInterfaceDeclgetObjContainingInterface (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.
void setBlockVarCopyInits (VarDecl *VD, Expr *Init)
 Set the copy inialization expression of a block var decl.
ExprgetBlockVarCopyInits (const VarDecl *VD)
 Get the copy initialization expression of the VarDecl VD, or NULL if none exists.
TypeSourceInfoCreateTypeSourceInfo (QualType T, unsigned Size=0) const
 Allocate an uninitialized TypeSourceInfo.
TypeSourceInfogetTrivialTypeSourceInfo (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.
TypeSourceInfogetNullTypeSourceInfo ()
void AddDeallocation (void(*Callback)(void *), void *Data)
 Add a deallocation callback that will be invoked when the ASTContext is destroyed.
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.
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
MangleNumberingContextgetManglingNumberContext (const DeclContext *DC)
 Retrieve the context for computing mangling numbers in the given DeclContext.
MangleNumberingContextcreateMangleNumberingContext () 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.
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.
APValuegetMaterializedTemporaryValue (const MaterializeTemporaryExpr *E, bool MayCreate)
 Get the storage for the constant value of a materialized temporary of static storage duration.
void InitBuiltinTypes (const TargetInfo &Target)
 Initialize built-in types.
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.

Static Public Member Functions

static ImportDeclgetNextLocalImport (ImportDecl *Import)
static bool isObjCNSObjectType (QualType Ty)
 Return true if this is an NSObject object with its NSObject attribute set.

Public Attributes

IdentifierTableIdents
SelectorTableSelectors
Builtin::ContextBuiltinInfo
DeclarationNameTable DeclarationNames
IntrusiveRefCntPtr
< ExternalASTSource
ExternalSource
ASTMutationListenerListener
RawCommentList Comments
 All comments in this translation unit.
bool CommentsLoaded
 True if comments are already loaded from ExternalASTSource.
llvm::DenseMap< const Decl
*, RawCommentAndCacheFlags
RedeclComments
 Mapping from declarations to comments attached to any redeclaration.
llvm::DenseMap< const Decl
*, comments::FullComment * > 
ParsedComments
 Mapping from declarations to parsed comments attached to any redeclaration.
CanQualType VoidTy
CanQualType BoolTy
CanQualType CharTy
CanQualType WCharTy
CanQualType WideCharTy
CanQualType WIntTy
CanQualType Char16Ty
CanQualType Char32Ty
CanQualType SignedCharTy
CanQualType ShortTy
CanQualType IntTy
CanQualType LongTy
CanQualType LongLongTy
CanQualType Int128Ty
CanQualType UnsignedCharTy
CanQualType UnsignedShortTy
CanQualType UnsignedIntTy
CanQualType UnsignedLongTy
CanQualType UnsignedLongLongTy
CanQualType UnsignedInt128Ty
CanQualType FloatTy
CanQualType DoubleTy
CanQualType LongDoubleTy
CanQualType HalfTy
CanQualType FloatComplexTy
CanQualType DoubleComplexTy
CanQualType LongDoubleComplexTy
CanQualType VoidPtrTy
CanQualType NullPtrTy
CanQualType DependentTy
CanQualType OverloadTy
CanQualType BoundMemberTy
CanQualType UnknownAnyTy
CanQualType BuiltinFnTy
CanQualType PseudoObjectTy
CanQualType ARCUnbridgedCastTy
CanQualType ObjCBuiltinIdTy
CanQualType ObjCBuiltinClassTy
CanQualType ObjCBuiltinSelTy
CanQualType ObjCBuiltinBoolTy
CanQualType OCLImage1dTy
CanQualType OCLImage1dArrayTy
CanQualType OCLImage1dBufferTy
CanQualType OCLImage2dTy
CanQualType OCLImage2dArrayTy
CanQualType OCLImage3dTy
CanQualType OCLSamplerTy
CanQualType OCLEventTy
QualType AutoDeductTy
QualType AutoRRefDeductTy
QualType VaListTagTy
llvm::StringMap< SectionInfoSectionInfos

Static Public Attributes

static unsigned NumImplicitDefaultConstructors
 The number of implicitly-declared default constructors.
static unsigned NumImplicitDefaultConstructorsDeclared
 The number of implicitly-declared default constructors for which declarations were built.
static unsigned NumImplicitCopyConstructors
 The number of implicitly-declared copy constructors.
static unsigned NumImplicitCopyConstructorsDeclared
 The number of implicitly-declared copy constructors for which declarations were built.
static unsigned NumImplicitMoveConstructors
 The number of implicitly-declared move constructors.
static unsigned NumImplicitMoveConstructorsDeclared
 The number of implicitly-declared move constructors for which declarations were built.
static unsigned NumImplicitCopyAssignmentOperators
 The number of implicitly-declared copy assignment operators.
static unsigned NumImplicitCopyAssignmentOperatorsDeclared
 The number of implicitly-declared copy assignment operators for which declarations were built.
static unsigned NumImplicitMoveAssignmentOperators
 The number of implicitly-declared move assignment operators.
static unsigned NumImplicitMoveAssignmentOperatorsDeclared
 The number of implicitly-declared move assignment operators for which declarations were built.
static unsigned NumImplicitDestructors
 The number of implicitly-declared destructors.
static unsigned NumImplicitDestructorsDeclared
 The number of implicitly-declared destructors for which declarations were built.

Friends

class NestedNameSpecifier
class ASTDeclReader
class ASTReader
class ASTWriter
class CXXRecordDecl
class DeclContext
class DeclarationNameTable

Detailed Description

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.


Member Typedef Documentation

typedef llvm::iterator_range<import_iterator> clang::ASTContext::import_range

Definition at line 772 of file ASTContext.h.

typedef CXXMethodVector::const_iterator clang::ASTContext::overridden_cxx_method_iterator

Definition at line 739 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 442 of file ASTContext.h.

Contains parents of a node.

Definition at line 437 of file ASTContext.h.

A type synonym for the TemplateOrInstantiation mapping.

Definition at line 292 of file ASTContext.h.

typedef llvm::iterator_range<SmallVectorImpl<Type *>::const_iterator> clang::ASTContext::type_const_range

Definition at line 2092 of file ASTContext.h.


Member Enumeration Documentation

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 1592 of file ASTContext.h.

Enumerator:
PSF_None 
PSF_Read 
PSF_Write 
PSF_Execute 
PSF_Implicit 
PSF_Invalid 

Definition at line 2339 of file ASTContext.h.


Constructor & Destructor Documentation

ASTContext::ASTContext ( LangOptions LOpts,
SourceManager SM,
IdentifierTable idents,
SelectorTable sels,
Builtin::Context builtins 
)

Definition at line 725 of file ASTContext.cpp.

References clang::TranslationUnitDecl::Create().

Definition at line 750 of file ASTContext.cpp.


Member Function Documentation

void clang::ASTContext::addComment ( const RawComment RC) [inline]
void ASTContext::AddDeallocation ( void(*)(void *)  Callback,
void *  Data 
)

Add a deallocation callback that will be invoked when the ASTContext is destroyed.

Parameters:
CallbackA callback function that will be invoked on destruction.
DataPointer data that will be provided to the callback function when it is called.

Definition at line 799 of file ASTContext.cpp.

References Callback.

Referenced by clang::VarDecl::evaluateValue(), clang::FunctionTemplateDecl::newCommon(), clang::ClassTemplateDecl::newCommon(), clang::TypeAliasTemplateDecl::newCommon(), and clang::VarTemplateDecl::newCommon().

Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit.

Definition at line 1242 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 1216 of file ASTContext.cpp.

References clang::Decl::isCanonicalDecl().

Referenced by clang::CXXMethodDecl::addOverriddenMethod(), and clang::CXXConstructorDecl::setInheritedConstructor().

Definition at line 2002 of file ASTContext.h.

References clang::LangAS::Count, and clang::LangAS::Offset.

void* clang::ASTContext::Allocate ( size_t  Size,
unsigned  Align = 8 
) const [inline]

Definition at line 491 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::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::ASTTemplateArgumentListInfo::Create(), clang::OMPForSimdDirective::Create(), clang::OMPSectionsDirective::Create(), clang::OMPSectionDirective::Create(), clang::OMPSingleDirective::Create(), clang::ObjCSubscriptRefExpr::Create(), clang::OMPMasterDirective::Create(), clang::AttributedStmt::Create(), clang::OMPCriticalDirective::Create(), clang::CXXDefaultArgExpr::Create(), clang::OMPParallelForDirective::Create(), clang::DeclRefExpr::Create(), clang::OMPPrivateClause::Create(), clang::OMPParallelForSimdDirective::Create(), clang::OMPFirstprivateClause::Create(), clang::OMPParallelSectionsDirective::Create(), clang::OMPTaskDirective::Create(), clang::OMPLastprivateClause::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPSharedClause::Create(), clang::CXXFunctionalCastExpr::Create(), clang::OMPBarrierDirective::Create(), clang::OMPTaskwaitDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPFlushDirective::Create(), clang::OMPLinearClause::Create(), clang::OMPOrderedDirective::Create(), clang::LambdaExpr::Create(), clang::OMPAtomicDirective::Create(), clang::OMPAlignedClause::Create(), clang::StringLiteral::Create(), clang::OMPTargetDirective::Create(), clang::OMPCopyinClause::Create(), clang::OMPTeamsDirective::Create(), clang::OMPCopyprivateClause::Create(), clang::OMPFlushClause::Create(), clang::OffsetOfExpr::Create(), clang::CXXCtorInitializer::Create(), clang::CapturedStmt::Create(), clang::TypeTraitExpr::Create(), clang::MemberExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::ExprWithCleanups::Create(), clang::ImplicitCastExpr::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::OMPParallelDirective::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::DeclRefExpr::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPLinearClause::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPAlignedClause::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPCopyinClause::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), clang::OMPCopyprivateClause::CreateEmpty(), clang::OMPFlushClause::CreateEmpty(), clang::OffsetOfExpr::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(), operator new(), clang::Decl::operator new(), operator new[](), clang::OverloadExpr::OverloadExpr(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::BlockDecl::setCaptures(), clang::FunctionDecl::setDependentTemplateSpecialization(), and clang::TemplateArgument::TemplateArgument().

Return true if there is at least one @implementation in the TU.

Definition at line 2121 of file ASTContext.h.

Referenced by clang::Sema::DiagnoseUseOfUnimplementedSelectors().

areCommonBaseCompatible - Returns common base class of the two classes if one found. Note that this is O'2 algorithm. But it will be called as the last type comparison in a ?-exp of ObjC pointer types before a warning is issued. So, its invokation is extremely rare.

Definition at line 6752 of file ASTContext.cpp.

References canAssignObjCInterfaces(), clang::declaresSameEntity(), clang::ObjCObjectType::getInterface(), getIntersectionOfProtocols(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), clang::ObjCObjectPointerType::getObjectType(), and clang::ObjCInterfaceDecl::getSuperClass().

Referenced by clang::Sema::FindCompositeObjCPointerType().

Definition at line 6830 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.

Note:
This ignores whether they are target-specific (AltiVec or Neon) types.

Definition at line 6457 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().

TypedefDecl * ASTContext::buildImplicitTypedef ( QualType  T,
StringRef  Name 
) 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 2770 of file RecordLayoutBuilder.cpp.

References Builder.

Referenced by getASTRecordLayout().

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 6673 of file ASTContext.cpp.

References clang::ObjCInterfaceType::getDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::Type::isObjCBuiltinType(), clang::ObjCObjectPointerType::isObjCIdType(), clang::ObjCObjectPointerType::isObjCQualifiedIdType(), clang::ObjCInterfaceDecl::isSuperClassOf(), and ObjCQualifiedIdTypesAreCompatible().

Referenced by mergeTypes().

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 1833 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::getSuperClass(), and P.

Referenced by canAssignObjCInterfaces(), getIntersectionOfProtocols(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().

Allocate an uninitialized TypeSourceInfo.

The caller should initialize the memory held by TypeSourceInfo using the TypeLoc wrappers.

Parameters:
Tthe 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.
Sizethe size of the type info to create, or 0 if the size should be calculated based on the type.

Definition at line 1966 of file ASTContext.cpp.

References clang::TypeLoc::getFullDataSizeForType().

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTypenameType(), getTemplateSpecializationTypeInfo(), getTrivialTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), and clang::Sema::GetTypeSourceInfoForDeclarator().

void clang::ASTContext::Deallocate ( void *  Ptr) const [inline]
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 1815 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
void ASTContext::eraseDeclAttrs ( const Decl D)

Erase the attributes corresponding to the given declaration.

Definition at line 1068 of file ASTContext.cpp.

Referenced by clang::Decl::dropAttrs().

bool ASTContext::FunctionTypesMatchOnNSConsumedAttrs ( const FunctionProtoType FromFunctionType,
const FunctionProtoType ToFunctionType 
)

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 2033 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(), and HandleAddressSpaceTypeAttribute().

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 4314 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 2226 of file ASTContext.cpp.

References getCanonicalType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::adjustMemberFunctionCC(), and getAdjustedType().

Definition at line 956 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 1799 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 1805 of file ASTContext.cpp.

References getAlignOfGlobalVar(), and toCharUnitsFromBits().

Referenced by clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral().

llvm::BumpPtrAllocator& clang::ASTContext::getAllocator ( ) const [inline]

Definition at line 487 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 4332 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::CheckNonTypeTemplateParameterType(), 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 4256 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::CheckParmsForFunctionDef(), clang::Sema::CheckStaticArrayArgument(), CheckUnaryTypeTraitTypeCompleteness(), DeduceTemplateArgumentsByTypeMatch(), 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(), IsStringInit(), clang::Sema::LookupInlineAsmIdentifier(), makeZeroElementRegion(), mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), clang::APValue::printPretty(), clang::Sema::RequireNonAbstractType(), TryListConversion(), tryObjCWritebackConversion(), and clang::ASTNodeImporter::VisitVarDecl().

Definition at line 1912 of file ASTContext.h.

References getAsArrayType().

Referenced by DeduceTemplateArgumentsByTypeMatch().

Return the total amount of physical memory allocated for representing AST nodes and type information.

Definition at line 498 of file ASTContext.h.

Retrieve a pointer to the AST mutation listener associated with this AST context, if any.

Definition at line 851 of file ASTContext.h.

References Listener.

Referenced by adjustDeducedFunctionResultType(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::ObjCCategoryDecl::Create(), clang::Decl::getASTMutationListener(), clang::Sema::HandlePropertyInClassExtension(), and clang::Decl::markUsed().

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 1993 of file ASTContext.cpp.

References clang::ObjCImplDecl::getClassInterface().

Referenced by LookupFieldBitOffset().

Get or compute information about the layout of the specified Objective-C interface.

Definition at line 1988 of file ASTContext.cpp.

Referenced by LookupFieldBitOffset().

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 2796 of file RecordLayoutBuilder.cpp.

References Builder, BuildMicrosoftASTRecordLayout(), clang::ExternalASTSource::CompleteType(), DumpRecordLayout(), clang::CharUnits::fromQuantity(), clang::Decl::getASTContext(), 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(), ComputeNonVirtualBaseClassOffset(), computeOffsetHint(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DiagnoseReinterpretUpDownCast(), DumpCXXRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EmitNullBaseClassInitialization(), EncodeBitField(), findPathForVPtr(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), getDeclAlign(), getFieldOffset(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getPolymorphicOffset(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), isIntegerLikeType(), clang::Sema::LookupInlineAsmField(), performBaseAdjustment(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().

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 3825 of file ASTContext.cpp.

References getCanonicalType(), clang::QualType::isCanonical(), clang::AtomicType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::BuildAtomicType(), getVariableArrayDecayedType(), and mergeTypes().

QualType ASTContext::getAttributedType ( AttributedType::Kind  attrKind,
QualType  modifiedType,
QualType  equivalentType 
)

C++11 deduction pattern for 'auto &&' type.

getAutoRRefDeductType - Get type pattern for deducing against 'auto &&'.

Definition at line 3862 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 3802 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 4346 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::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 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 2288 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(), 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 1949 of file ASTContext.cpp.

References clang::Decl::hasAttr().

Referenced by BlockRequiresCopying().

Retrieve declaration of 'BOOL' typedef.

Definition at line 1489 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral(), and getBOOLType().

type of 'BOOL' type.

Definition at line 1499 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 7774 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(), getAbsoluteValueArgumentType(), and clang::Sema::LazilyCreateBuiltin().

Retrieve the C type declaration corresponding to the predefined __builtin_va_list type.

Definition at line 6203 of file ASTContext.cpp.

References CreateVaListDecl(), clang::TargetInfo::getBuiltinVaListKind(), and clang::Decl::isImplicit().

Referenced by getBuiltinVaListType(), clang::ASTReader::GetExistingDecl(), getVaListTagType(), and clang::Sema::Initialize().

Retrieve the type of the __builtin_va_list type.

Definition at line 1513 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 4800 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().

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:

 namespace N {
   struct S {
     template<typename T> struct X { typename T* type; };
   };
 }

 template<typename T> struct Y {
   typename N::S::X<T>::type member;
 };

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 4200 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().

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 4099 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().

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 1785 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::AddInitializerToDecl(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildDeclaratorGroup(), BuildFieldReferenceExpr(), clang::Sema::BuildMemberPointerType(), 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::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), 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(), 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().

const Type* clang::ASTContext::getCanonicalType ( const Type T) const [inline]
uint64_t clang::ASTContext::getCharWidth ( ) const [inline]
comments::FullComment * ASTContext::getCommentForDecl ( const Decl D,
const Preprocessor PP 
) const

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 2172 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().

Definition at line 942 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getComplexType().

Return number of constant array elements.

getConstantArrayElementCount - Returns number of constant array elements.

Definition at line 4366 of file ASTContext.cpp.

References clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), and clang::ConstantArrayType::getSize().

Referenced by clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer().

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 2427 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 924 of file ASTContext.h.

References clang::QualType::withConst().

Definition at line 988 of file ASTContext.h.

Referenced by clang::Sema::ActOnCUDAExecConfigExpr().

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 2878 of file RecordLayoutBuilder.cpp.

References bool, computeKeyFunction(), clang::CXXRecordDecl::getDefinition(), getExternalSource(), and getTargetInfo().

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::CodeGen::CodeGenVTables::isVTableExternal(), and clang::ASTDeclWriter::VisitCXXRecordDecl().

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 2247 of file ASTContext.cpp.

References getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::AdjustedType::Profile(), and clang::TypeAlignment.

Referenced by getAdjustedParameterType(), and getDecayedType().

Definition at line 965 of file ASTContext.h.

References clang::CanQual< Type >::CreateUnsafe(), and getDecayedType().

CharUnits ASTContext::getDeclAlign ( const Decl D,
bool  ForAlignof = false 
) const

Return a conservative estimate of the alignment of the specified decl D.

Precondition:
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 1273 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(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), EmitFunctionDeclLValue(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), InitCatchParam(), and clang::Sema::isCopyElisionCandidate().

Retrieve the attributes for the given declaration.

Definition at line 1057 of file ASTContext.cpp.

References Allocate().

Referenced by clang::Decl::getAttrs().

QualType ASTContext::getDecltypeType ( Expr e,
QualType  UnderlyingType 
) const

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 3755 of file ASTContext.cpp.

References getCanonicalType(), clang::Expr::isInstantiationDependent(), clang::DependentDecltypeType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::BuildDecltypeType(), and clang::ASTNodeImporter::VisitDecltypeType().

CallingConv ASTContext::getDefaultCallingConvention ( bool  isVariadic,
bool  IsCXXMethod 
) const
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 2633 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
Precondition:
Return a non-unique reference to the type for a dependently-sized vector of the specified element type.

FIXME: We will need these to be uniqued, or at least comparable, at some point.

Definition at line 2799 of file ASTContext.cpp.

References getCanonicalType(), clang::DependentSizedExtVectorType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::BuildExtVectorType().

Retrieve the template name that represents a dependent template name such as MetaFun::template operator+.

Definition at line 6315 of file ASTContext.cpp.

References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), clang::NestedNameSpecifier::isDependent(), and clang::DependentTemplateName::Profile().

Definition at line 504 of file ASTContext.h.

Referenced by clang::Sema::EmitCurrentDiagnostic(), and clang::Sema::PDiag().

QualType ASTContext::getEnumType ( const EnumDecl Decl) const
QualType ASTContext::getExtVectorType ( QualType  vecType,
unsigned  NumElts 
) const

Return the unique reference to an extended vector type of the specified element type and size.

Precondition:
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 2770 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(), DecodeTypeFromStr(), clang::Sema::GetSignedVectorType(), and clang::ASTNodeImporter::VisitExtVectorType().

uint64_t ASTContext::getFieldOffset ( const ValueDecl FD) const

Retrieve the C FILE type.

Definition at line 1346 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

Retrieve the declaration for a 128-bit float stub type.

Definition at line 903 of file ASTContext.cpp.

References buildImplicitRecord().

Referenced by LookupBuiltin().

Return a real floating point or a complex type (based on typeDomain/typeSize).

Parameters:
typeDomaina real floating point or complex type.
typeSizea 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 4396 of file ASTContext.cpp.

References DoubleComplexTy, DoubleRank, DoubleTy, FloatComplexTy, FloatRank, FloatTy, getFloatingRank(), HalfRank, HalfTy, clang::Type::isComplexType(), clang::Type::isRealFloatingType(), LongDoubleComplexTy, LongDoubleRank, and LongDoubleTy.

int ASTContext::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').

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 4422 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 1261 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 BuildFloatingLiteral(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::StandardConversionSequence::getNarrowingKind(), and TryEvaluateBuiltinNaN().

Definition at line 1076 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 2883 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::ActOnFunctionDeclarator(), clang::Sema::ActOnLambdaExpr(), 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(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::startLambdaDefinition(), clang::ASTDeclReader::UpdateDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitFunctionProtoType().

getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration.

Definition at line 2980 of file ASTContext.cpp.

References clang::CXXRecordDecl::getPreviousDecl(), NeedsInjectedClassNameType(), and clang::TypeAlignment.

Referenced by clang::Sema::CheckClassTemplate(), and clang::ClassTemplatePartialSpecializationDecl::Create().

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 4561 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().

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 1078 of file ASTContext.cpp.

References getTemplateOrSpecializationInfo(), and clang::VarDecl::isStaticDataMember().

Definition at line 1167 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 1131 of file ASTContext.cpp.

Referenced by isInstantiationOf(), and clang::ASTDeclWriter::VisitUsingDecl().

Retrieve the declaration for the 128-bit signed integer type.

Definition at line 891 of file ASTContext.cpp.

References buildImplicitTypedef(), and Int128Ty.

Referenced by clang::ASTReader::GetExistingDecl(), and clang::Sema::Initialize().

int ASTContext::getIntegerTypeOrder ( QualType  LHS,
QualType  RHS 
) const

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 4589 of file ASTContext.cpp.

References getCanonicalType(), getIntegerTypeForEnum(), clang::CanQual< T >::getTypePtr(), and clang::Type::isUnsignedIntegerType().

Referenced by handleIntegerConversion(), and tryVectorConvertAndSplat().

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 3886 of file ASTContext.cpp.

References clang::TargetInfo::getIntMaxType().

Referenced by clang::Sema::ActOnNumericConstant(), clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.

Definition at line 3909 of file ASTContext.cpp.

References clang::TargetInfo::getIntPtrType().

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), and getUIntPtrType().

QualType ASTContext::getIntTypeForBitwidth ( unsigned  DestWidth,
unsigned  Signed 
) const

getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned. Returns empty type if there is no appropriate target types.

Definition at line 8098 of file ASTContext.cpp.

References clang::TargetInfo::getIntTypeByWidth(), getTargetInfo(), Int128Ty, and UnsignedInt128Ty.

Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOpenMPRegionStart(), AddDirectArgument(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::EmitOMPSerialCall(), clang::CodeGen::EmitThreadIDAddress(), and handleModeAttr().

Retrieve the C jmp_buf type.

Definition at line 1358 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

const LangOptions& clang::ASTContext::getLangOpts ( ) const [inline]

Definition at line 523 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(), 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(), clang::ObjCMethodDecl::createImplicitParams(), DiagnoseSwitchLabelsFallthrough(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::Stmt::dumpPretty(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenModule::EmitConstantValue(), EncodeBitField(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), filterNonConflictingPreviousDecls(), filterNonConflictingPreviousTypedefDecls(), clang::Sema::FindAllocationFunctions(), clang::arcmt::trans::findSemiAfterLocation(), clang::FormatASTNodeDiagnosticArgument(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getASTRecordLayout(), clang::FunctionDecl::getBuiltinID(), getByrefLifetime(), getCallingConvMangling(), clang::ento::SValBuilder::getConditionType(), clang::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), getDeclLanguageLinkage(), GetDiagForGotoScopeDecl(), clang::ento::CheckerContext::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(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenModule::getVTableLinkage(), HandleTagNumbering(), 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(), MaybeAddSentinel(), mayInlineDecl(), clang::RecordDecl::mayInsertExtraPadding(), 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(), useInlineVisibilityHidden(), clang::ASTNodeImporter::VisitBuiltinType(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitRecordDecl().

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 5153 of file ASTContext.cpp.

References clang::Type::getAs(), getIntWidth(), clang::QualType::getTypePtr(), IntTy, and UnsignedIntTy.

Return a type with the given lifetime qualifier.

Precondition:
Neither type.ObjCLifetime() nor lifetime may be OCL_None.

Definition at line 1552 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().

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().

QualType ASTContext::getLValueReferenceType ( QualType  T,
bool  SpelledAsLValue = true 
) const

Retrieve the context for computing mangling numbers in the given DeclContext.

Definition at line 8149 of file ASTContext.cpp.

References createMangleNumberingContext().

Referenced by clang::Sema::getCurrentMangleNumberContext(), and HandleTagNumbering().

Get the storage for the constant value of a materialized temporary of static storage duration.

Definition at line 8173 of file ASTContext.cpp.

References clang::MaterializeTemporaryExpr::getStorageDuration(), and clang::SD_Static.

Referenced by clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary().

QualType ASTContext::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.

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 2396 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(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), GetTypeOfFunction(), clang::Sema::IsMemberPointerConversion(), IsStandardConversion(), TryStaticMemberPointerUpcast(), and clang::ASTNodeImporter::VisitMemberPointerType().

static ImportDecl* clang::ASTContext::getNextLocalImport ( ImportDecl Import) [inline, static]

Definition at line 768 of file ASTContext.h.

Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.

Definition at line 5845 of file ASTContext.cpp.

References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinClassTy.

Referenced by clang::ASTReader::GetExistingDecl(), getObjCClassType(), and clang::Sema::Initialize().

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 1307 of file ASTContext.h.

References getObjCClassType(), and clang::QualType::isNull().

Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::FindCompositeObjCPointerType(), and ShouldTryAgainWithRedefinitionType().

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 1480 of file ASTContext.h.

References getObjCClassDecl(), and getTypeDeclType().

Referenced by clang::ObjCMethodDecl::createImplicitParams(), Desugar(), getObjCClassRedefinitionType(), isObjCClassType(), LookupMemberExpr(), and clang::Sema::MergeTypedefNameDecl().

Definition at line 1280 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

std::string ASTContext::getObjCEncodingForBlock ( const BlockExpr Expr) const
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.

Returns:
true if an error occurred (e.g., because one of the parameter types is incomplete), false otherwise.

Definition at line 4926 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
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 4967 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:

 enum PropertyAttributes {
 kPropertyReadOnly = 'R',   // property is read-only.
 kPropertyBycopy = 'C',     // property is a copy of the value last assigned
 kPropertyByref = '&',  // property is a reference to the value last assigned
 kPropertyDynamic = 'D',    // property is dynamic
 kPropertyGetter = 'G',     // followed by getter selector name
 kPropertySetter = 'S',     // followed by setter selector name
 kPropertyInstanceVariable = 'V'  // followed by instance variable  name
 kPropertyType = 'T'              // followed by old-style type encoding.
 kPropertyWeak = 'W'              // 'weak' property
 kPropertyStrong = 'P'            // property GC'able
 kPropertyNonAtomic = 'N'         // property non-atomic
 };

Definition at line 5081 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 5177 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 5165 of file ASTContext.cpp.

Referenced by clang::Sema::BuildObjCEncodeExpression(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), getObjCEncodingForBlock(), and getObjCEncodingForFunctionDecl().

void ASTContext::getObjCEncodingForTypeQualifier ( Decl::ObjCDeclQualifier  QT,
std::string &  S 
) const

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 4842 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().

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 2052 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().

Retrieve the typedef corresponding to the predefined id type in Objective-C.

Definition at line 5828 of file ASTContext.cpp.

References buildImplicitTypedef(), getObjCObjectPointerType(), getObjCObjectType(), and ObjCBuiltinIdTy.

Referenced by clang::ASTReader::GetExistingDecl(), getObjCIdType(), and clang::Sema::Initialize().

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 1294 of file ASTContext.h.

References getObjCIdType(), and clang::QualType::isNull().

Referenced by clang::Sema::FindCompositeObjCPointerType(), and ShouldTryAgainWithRedefinitionType().

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 1903 of file ASTContext.cpp.

Referenced by clang::ObjCInterfaceDecl::getImplementation(), and clang::ObjCCategoryDecl::getImplementation().

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 1911 of file ASTContext.cpp.

Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.

Definition at line 4823 of file ASTContext.cpp.

References buildImplicitTypedef(), and getObjCIdType().

Referenced by clang::ASTReader::GetExistingDecl(), and getObjCInstanceType().

QualType ASTContext::getObjCInterfaceType ( const ObjCInterfaceDecl Decl,
ObjCInterfaceDecl PrevDecl = nullptr 
) const

Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.

Definition at line 2134 of file ASTContext.h.

Referenced by setObjCMethodRedeclaration(), and clang::ASTDeclWriter::VisitObjCMethodDecl().

Definition at line 1284 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

QualType ASTContext::getObjCObjectType ( QualType  Base,
ObjCProtocolDecl *const *  Protocols,
unsigned  NumProtocols 
) 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 1932 of file ASTContext.cpp.

References clang::Decl::getDeclContext().

Referenced by clang::edit::rewriteToObjCSubscriptSyntax().

Definition at line 5037 of file ASTContext.cpp.

References clang::ObjCImplDecl::property_impls().

Referenced by getObjCEncodingForPropertyDecl().

Retrieve the Objective-C class declaration corresponding to the predefined Protocol class.

Definition at line 5854 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), and Idents.

Referenced by clang::ASTReader::GetExistingDecl(), getObjCProtoType(), and clang::Sema::Initialize().

Retrieve the type of the Objective-C Protocol class.

Definition at line 1504 of file ASTContext.h.

References getObjCInterfaceType(), and getObjCProtocolDecl().

Referenced by Desugar(), and clang::Sema::ParseObjCProtocolExpression().

Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.

Definition at line 5837 of file ASTContext.cpp.

References buildImplicitTypedef(), getPointerType(), and ObjCBuiltinSelTy.

Referenced by clang::ASTReader::GetExistingDecl(), getObjCSelType(), and clang::Sema::Initialize().

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 1320 of file ASTContext.h.

References getObjCSelType(), and clang::QualType::isNull().

Referenced by clang::Sema::FindCompositeObjCPointerType(), and LookupMemberExpr().

Returns the C struct type for objc_super.

Definition at line 4670 of file ASTContext.cpp.

References clang::DeclContext::addDecl(), buildImplicitRecord(), getTagDeclType(), and clang::QualType::isNull().

Referenced by DecodeTypeFromStr().

Retrieve the template name that corresponds to a non-empty lookup.

Definition at line 6231 of file ASTContext.cpp.

References Allocate(), 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 1222 of file ASTContext.cpp.

References clang::ObjCMethodDecl::getOverriddenMethods(), overridden_methods_begin(), and overridden_methods_end().

Referenced by getCommentForDecl().

QualType ASTContext::getPackExpansionType ( QualType  Pattern,
Optional< unsigned NumExpansions 
)

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 8165 of file ASTContext.cpp.

template<typename NodeT >
ArrayRef<ast_type_traits::DynTypedNode> clang::ASTContext::getParents ( const NodeT &  Node) [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 469 of file ASTContext.h.

References clang::ast_type_traits::DynTypedNode::create().

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 3919 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(), 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 2200 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::CheckNonTypeTemplateParameterType(), 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(), 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(), TryConstCast(), tryObjCWritebackConversion(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryToFixInvalidVariablyModifiedType(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitDeclStmt(), and clang::ASTNodeImporter::VisitPointerType().

Definition at line 949 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 1775 of file ASTContext.cpp.

References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), clang::TargetInfo::getTriple(), getTypeInfo(), getTypeSize(), and clang::Type::isSpecificBuiltinType().

Referenced by clang::Sema::BuildCXXNew(), and getDeclAlign().

Definition at line 777 of file ASTContext.h.

Referenced by clang::getPrimaryMergedDecl().

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 3925 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 4518 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 6255 of file ASTContext.cpp.

References clang::QualifiedTemplateName::Profile().

Referenced by clang::Sema::ClassifyName(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), and clang::ASTReader::ReadTemplateName().

Un-split a SplitQualType.

Definition at line 1529 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(), clang::ObjCMethodDecl::createImplicitParams(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsArrayType(), getBaseElementType(), getConstantArrayType(), getCVRQualifiedType(), getDependentSizedArrayType(), getFunctionType(), getIncompleteArrayType(), getLifetimeQualifiedType(), clang::CXXMethodDecl::getThisType(), getUnqualifiedObjCPointerType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::Sema::isObjCWritebackConversion(), rewriteToObjCProperty(), transferARCOwnershipToDeclSpec(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and UnwrapTypeForDebugInfo().

QualType clang::ASTContext::getQualifiedType ( const Type T,
Qualifiers  Qs 
) const [inline]

Return a type with additional qualifiers.

Definition at line 1543 of file ASTContext.h.

References clang::Qualifiers::getFastQualifiers(), and clang::Qualifiers::hasNonFastQualifiers().

Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.

Definition at line 1271 of file ASTContext.h.

References getTagDeclType().

const RawComment * ASTContext::getRawCommentForAnyRedecl ( const Decl D,
const Decl **  OriginalDecl = nullptr 
) const

Definition at line 611 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 8110 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().

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 904 of file ASTContext.h.

References clang::Qualifiers::Restrict, and clang::QualType::withFastQualifiers().

Return the total memory used for various side tables.

Definition at line 8077 of file ASTContext.cpp.

Retrieve the C sigjmp_buf type.

Definition at line 1370 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 4320 of file ASTContext.cpp.

References getAdjustedParameterType(), clang::QualType::getUnqualifiedType(), and getVariableArrayDecayedType().

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 3897 of file ASTContext.cpp.

References WCharTy.

Referenced by ConvertDeclSpecToType().

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 3881 of file ASTContext.cpp.

References clang::TargetInfo::getSizeType().

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnSizeofParameterPackExpr(), clang::Sema::ActOnStringLiteral(), addAsFieldToClosureType(), 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::EmitAtomicLoad(), 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::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::ento::SymbolExtent::getType(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::Sema::tryCaptureVariable(), and TryInitializerListConstruction().

Definition at line 484 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::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::CGDebugInfo::EmitLocation(), clang::CodeGen::EmitOpenMPUpdateLocation(), 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::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::CodeGen::CGDebugInfo::setLocation(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), and clang::ento::ExprEngine::ViewGraph().

Definition at line 485 of file ASTContext.h.

References SourceMgr.

Definition at line 8142 of file ASTContext.cpp.

Referenced by clang::Sema::BuildVariableInstantiation().

QualType ASTContext::getSubstTemplateTypeParmType ( const TemplateTypeParmType Replaced,
QualType  Replacement 
) const

Retrieve a substitution-result type.

Definition at line 3093 of file ASTContext.cpp.

References clang::QualType::isCanonical(), clang::SubstTemplateTypeParmType::Profile(), and clang::TypeAlignment.

QualType ASTContext::getTagDeclType ( const TagDecl Decl) const

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 3871 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::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), 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::ParseTypedefDecl(), clang::Sema::PerformImplicitConversion(), clang::CodeGen::CodeGenTypes::UpdateCompletedType(), clang::ASTNodeImporter::VisitEnumType(), and clang::ASTNodeImporter::VisitRecordType().

Definition at line 1991 of file ASTContext.h.

References clang::Qualifiers::getAddressSpace(), and getTargetAddressSpace().

Definition at line 1995 of file ASTContext.h.

References clang::LangAS::Count, and clang::LangAS::Offset.

const TargetInfo& clang::ASTContext::getTargetInfo ( ) const [inline]

Definition at line 508 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnVariableDeclarator(), 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(), checkDLLAttribute(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFormatString(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckMain(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckRegparmAttr(), CheckTemplateArgumentPointerToMember(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeKeyFunction(), ConvertDeclSpecToType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), DecodeTypeFromStr(), 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(), getCallingConvMangling(), getConstantArrayInfoInChars(), getCurrentKeyFunction(), getDeclAlign(), getIntTypeForBitwidth(), clang::Sema::getLocationOfStringLiteralByte(), getObjCEncodingForPrimitiveKind(), getRealTypeForBitwidth(), 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(), TryReinterpretCast(), TryStaticImplicitCast(), and clang::Sema::VerifyBitField().

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 3151 of file ASTContext.cpp.

References clang::TemplateTypeParmType::Profile(), and clang::TypeAlignment.

Referenced by clang::TemplateTypeParmDecl::Create().

Definition at line 785 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnModuleImport(), 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::ASTMergeAction::ExecuteAction(), 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(), clang::ASTReader::GetExistingDecl(), getNSNumberFactoryMethod(), getObjCProtocolDecl(), clang::Sema::getOrCreateStdNamespace(), getParents(), clang::Sema::ImplicitlyDefineFunction(), clang::ASTReader::InitializeContext(), clang::Sema::LazilyCreateBuiltin(), clang::CompilerInstance::loadModule(), 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(), 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().

Allocate a TypeSourceInfo where all locations have been initialized to a given location, which defaults to the empty location.

Definition at line 1980 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::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStringLiteral(), clang::Sema::ActOnTypeTrait(), addAsFieldToClosureType(), addBlockPointerConversion(), 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(), 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::TypeOfTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::Sema::ParseObjCEncodeExpression(), clang::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), RebuildDeclaratorInCurrentInstantiation(), translateTemplateArgument(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().

Return the ABI-specified alignment of a (complete) type T, in bits.

Definition at line 1667 of file ASTContext.h.

References clang::TypeInfo::Align, and getTypeInfo().

Referenced by EmitVAArgFromMemory(), getAlignOfGlobalVar(), getTypeAlignInChars(), handlePackedAttr(), handleTransparentUnionAttr(), and mergeAlignedAttrs().

unsigned clang::ASTContext::getTypeAlign ( const Type T) const [inline]

Definition at line 1668 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 1764 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(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), 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 1767 of file ASTContext.cpp.

References getTypeAlign(), and toCharUnitsFromBits().

QualType clang::ASTContext::getTypeDeclType ( const TypeDecl Decl,
const TypeDecl PrevDecl = nullptr 
) const [inline]

Return the unique reference to the type for the specified type declaration.

Definition at line 1086 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::ActOnStartCXXMemberDeclarations(), 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(), 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 3031 of file ASTContext.cpp.

References getCanonicalType(), clang::TypedefNameDecl::getUnderlyingType(), clang::QualType::isNull(), and clang::TypeAlignment.

Referenced by CheckExtVectorComponent(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), and CreateX86_64ABIBuiltinVaListDecl().

TypeInfo ASTContext::getTypeInfo ( const Type T) const

Definition at line 1643 of file ASTContext.h.

References getTypeInfo(), and clang::QualType::getTypePtr().

Referenced by getTypeInfo().

std::pair< CharUnits, CharUnits > ASTContext::getTypeInfoInChars ( const Type T) const

Definition at line 1415 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 3709 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 3743 of file ASTContext.cpp.

References getCanonicalType(), and clang::TypeAlignment.

Referenced by ConvertDeclSpecToType(), and clang::ASTNodeImporter::VisitTypeOfType().

const SmallVectorImpl<Type *>& clang::ASTContext::getTypes ( ) const [inline]

Definition at line 854 of file ASTContext.h.

uint64_t clang::ASTContext::getTypeSize ( QualType  T) const [inline]

Return the size of the specified (complete) type T, in bits.

Definition at line 1646 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(), BitsContainNoUserData(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), canExpandIndirectArgument(), clang::Sema::CheckCompatibleReinterpretCast(), checkIntToPointerCast(), clang::Sema::CheckTemplateArgument(), 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::EmitAsmStmt(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), 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(), HandleNeonVectorTypeAttr(), handleTransparentUnionAttr(), HandleVectorSizeAttr(), clang::Expr::IgnoreParenNoopCasts(), is32Or64BitBasicType(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isSingleElementStruct(), isSSEVectorType(), clang::MangleContext::mangleName(), mergeEnumWithInteger(), clang::ento::ExprEngine::processSwitch(), RecoverCastedSymbol(), rewriteToNumericBoxedExpression(), TryInitializerListConstruction(), TryReinterpretCast(), VectorTypesMatch(), clang::Sema::VerifyBitField(), and clang::ento::ExprEngine::VisitOffsetOfExpr().

uint64_t clang::ASTContext::getTypeSize ( const Type T) const [inline]

Definition at line 1647 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 1755 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::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitCXXNewAllocSize(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitPointerArithmetic(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), 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 1758 of file ASTContext.cpp.

References getTypeInfoInChars().

Retrieve the C ucontext_t type.

Definition at line 1382 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

Retrieve the declaration for the 128-bit unsigned integer type.

Definition at line 897 of file ASTContext.cpp.

References buildImplicitTypedef(), and UnsignedInt128Ty.

Referenced by clang::ASTReader::GetExistingDecl(), and clang::Sema::Initialize().

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 3891 of file ASTContext.cpp.

References clang::TargetInfo::getUIntMaxType().

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().

Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.

Definition at line 3913 of file ASTContext.cpp.

References getCorrespondingUnsignedType(), and getIntPtrType().

Unary type transforms.

getUnaryTransformationType - We don't unique these, since the memory savings are minimal and these are rare.

Definition at line 3786 of file ASTContext.cpp.

References getCanonicalType(), clang::Type::isDependentType(), and clang::TypeAlignment.

Referenced by clang::Sema::BuildUnaryTransformType(), and clang::ASTNodeImporter::VisitUnaryTransformType().

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().

Parameters:
Tis the qualified type, which may be an ArrayType
Qualswill receive the full set of qualifiers that were applied to the array.
Returns:
if this is an array type, the completely unqualified array type that corresponds to it. Otherwise, returns T.getUnqualifiedType().

Definition at line 3951 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 1564 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().

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 3904 of file ASTContext.cpp.

References UnsignedIntTy.

Referenced by ConvertDeclSpecToType().

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 6212 of file ASTContext.cpp.

References getBuiltinVaListDecl(), clang::QualType::isNull(), and VaListTagTy.

Referenced by clang::ASTReader::GetType().

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 2605 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.

Precondition:
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 2738 of file ASTContext.cpp.

References getCanonicalType(), clang::Type::isBuiltinType(), clang::QualType::isCanonical(), clang::VectorType::Profile(), and clang::TypeAlignment.

Referenced by DecodeTypeFromStr(), getCorrespondingUnsignedType(), 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 913 of file ASTContext.h.

References clang::Qualifiers::Volatile, and clang::QualType::withFastQualifiers().

Referenced by AddBuiltinAssignmentOperatorCandidates(), and DecodeTypeFromStr().

Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension).

Definition at line 1225 of file ASTContext.h.

References WCharTy.

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 1230 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().

In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.

Definition at line 1244 of file ASTContext.h.

References WIntTy.

Referenced by clang::analyze_format_string::ArgType::getRepresentativeType(), and clang::analyze_format_string::ArgType::matchesType().

Determine whether the given template names refer to the same template.

Definition at line 4141 of file ASTContext.cpp.

References clang::TemplateName::getAsVoidPointer(), and getCanonicalTemplateName().

Referenced by checkDeducedTemplateArguments(), and DeduceTemplateArguments().

bool clang::ASTContext::hasSameType ( QualType  T1,
QualType  T2 
) const [inline]

Determine whether the given types T1 and T2 are equivalent.

Definition at line 1801 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(), AdjustRelatedResultType(), 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(), 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::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), 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::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PrepareScalarCast(), rewriteToNumberLiteral(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), and typesAreCompatible().

bool clang::ASTContext::hasSameType ( const Type T1,
const Type T2 
) const [inline]

Definition at line 1805 of file ASTContext.h.

References getCanonicalType().

Determine whether the given types are equivalent after cvr-qualifiers have been removed.

Definition at line 1826 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(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteConstructorInitializer(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), createObjCPropertyGetter(), clang::Sema::CXXCheckConditionalOperands(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAssignmentEnum(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), FindImplementableMethods(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::Sema::getDestructorName(), clang::Sema::getDestructorType(), getExistingLazyBinding(), 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(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::ProcessPropertyDecl(), clang::Sema::SemaBuiltinShuffleVector(), ShouldDiagnoseSwitchCaseNotInEnum(), TryImplicitConversion(), TryStaticMemberPointerUpcast(), and UnwrapSimilarPointerTypes().

void ASTContext::InitBuiltinTypes ( const TargetInfo Target)

Determine if the alignment the type has was required using an alignment attribute.

Definition at line 1419 of file ASTContext.cpp.

References clang::TypeInfo::AlignIsRequired, and getTypeInfo().

Referenced by isAlignmentRequired(), isVarDeclStrongDefinition(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().

Definition at line 1423 of file ASTContext.cpp.

References clang::QualType::getTypePtr(), and isAlignmentRequired().

Definition at line 8046 of file ASTContext.cpp.

Definition at line 2028 of file ASTContext.h.

References getObjCClassType().

Definition at line 2025 of file ASTContext.h.

References getObjCIdType().

Referenced by maybeAdjustInterfaceForSubscriptingCheck().

static bool clang::ASTContext::isObjCNSObjectType ( QualType  Ty) [inline, static]

Return true if this is an NSObject object with its NSObject attribute set.

Definition at line 1629 of file ASTContext.h.

References clang::Type::isObjCNSObjectType().

Referenced by BlockRequiresCopying(), clang::Sema::BuildInstanceMessage(), clang::Sema::CheckAssignmentOperands(), and isValidSubjectOfNSAttribute().

Definition at line 2031 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).

Returns:
the type this bit-field will promote to, or NULL if no promotion occurs.

Definition at line 4471 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 773 of file ASTContext.h.

llvm::APSInt clang::ASTContext::MakeIntValue ( uint64_t  Value,
QualType  Type 
) const [inline]

Make an APSInt of the appropriate width and signedness for the given Value and integer Type.

Definition at line 2104 of file ASTContext.h.

References getIntWidth(), and clang::Type::isSignedIntegerOrEnumerationType().

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 6891 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 
)
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 6871 of file ASTContext.cpp.

References 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 
)
bool ASTContext::ObjCMethodsAreEqual ( const ObjCMethodDecl MethodDecl,
const ObjCMethodDecl MethodImp 
)

ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list.

Definition at line 3587 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 6499 of file ASTContext.cpp.

References clang::Type::getAs(), clang::ast_matchers::match(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().

Referenced by canAssignObjCInterfaces().

void ASTContext::PrintStats ( ) const

QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols.

Definition at line 3606 of file ASTContext.cpp.

References CollectInheritedProtocols(), clang::Type::getAs(), clang::ObjCInterfaceDecl::hasDefinition(), clang::Type::isObjCQualifiedIdType(), ProtocolCompatibleWithProtocol(), and clang::ObjCObjectPointerType::quals().

Referenced by CheckObjCBridgeCFCast().

Definition at line 2071 of file ASTContext.h.

Referenced by clang::Sema::ActOnFields().

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 845 of file ASTContext.h.

References Listener.

Referenced by clang::FrontendAction::BeginSourceFile(), and clang::CompilerInstance::createModuleManager().

void ASTContext::setBlockVarCopyInits ( VarDecl VD,
Expr Init 
)

Set the copy inialization expression of a block var decl.

Definition at line 1959 of file ASTContext.cpp.

References clang::Decl::hasAttr().

Referenced by clang::Sema::CheckCompleteVariableDeclaration().

Save declaration of 'BOOL' typedef.

Definition at line 1494 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral().

Definition at line 1123 of file ASTContext.cpp.

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 804 of file ASTContext.cpp.

References ExternalSource.

Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::createModuleManager(), and clang::CompilerInstance::createPCHExternalASTSource().

void clang::ASTContext::setFILEDecl ( TypeDecl FILEDecl) [inline]

Set the type for the C FILE type.

Definition at line 1343 of file ASTContext.h.

Referenced by clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

Note that the static data member Inst is an instantiation of the static data member template Tmpl of a class template.

Definition at line 1095 of file ASTContext.cpp.

References clang::VarDecl::isStaticDataMember(), and setTemplateOrSpecializationInfo().

Referenced by clang::VarDecl::setInstantiationOfStaticDataMember().

Definition at line 1176 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 1141 of file ASTContext.cpp.

Definition at line 1161 of file ASTContext.cpp.

void clang::ASTContext::setjmp_bufDecl ( TypeDecl jmp_bufDecl) [inline]

Set the type for the C jmp_buf type.

Definition at line 1353 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

void ASTContext::setManglingNumber ( const NamedDecl ND,
unsigned  Number 
)
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.

Parameters:
methodshould be the declaration from the class definition

Definition at line 2901 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::CheckFunctionDeclaration().

Set the user-written type that redefines 'SEL'.

Definition at line 1314 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

Set the user-written type that redefines id.

Definition at line 1301 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

Set the implementation of ObjCCategoryDecl.

Definition at line 1926 of file ASTContext.cpp.

void clang::ASTContext::setObjCMethodRedeclaration ( const ObjCMethodDecl MD,
const ObjCMethodDecl Redecl 
) [inline]

Definition at line 2139 of file ASTContext.h.

References getObjCMethodRedeclaration().

Referenced by clang::ObjCMethodDecl::setAsRedeclaration().

Definition at line 1288 of file ASTContext.h.

Referenced by clang::Sema::BuildObjCStringLiteral().

Set the user-written type that redefines 'SEL'.

Definition at line 1328 of file ASTContext.h.

Referenced by clang::Sema::MergeTypedefNameDecl().

Definition at line 1267 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 8161 of file ASTContext.cpp.

void clang::ASTContext::setPrimaryMergedDecl ( Decl D,
Decl Primary 
) [inline]

Definition at line 781 of file ASTContext.h.

Definition at line 480 of file ASTContext.h.

Referenced by clang::Sema::EmitCurrentDiagnostic().

void clang::ASTContext::setsigjmp_bufDecl ( TypeDecl sigjmp_bufDecl) [inline]

Set the type for the C sigjmp_buf type.

Definition at line 1365 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

void ASTContext::setStaticLocalNumber ( const VarDecl VD,
unsigned  Number 
)
void clang::ASTContext::setucontext_tDecl ( TypeDecl ucontext_tDecl) [inline]

Set the type for the C ucontext_t type.

Definition at line 1377 of file ASTContext.h.

Referenced by clang::Sema::ActOnTypedefNameDecl(), and clang::ASTReader::InitializeContext().

int64_t ASTContext::toBits ( CharUnits  CharSize) const
CharUnits ASTContext::toCharUnitsFromBits ( int64_t  BitSize) const

Definition at line 6864 of file ASTContext.cpp.

References clang::QualType::isNull(), and mergeTypes().

Referenced by checkBlockPointerTypesForAssignment().

bool ASTContext::typesAreCompatible ( QualType  LHS,
QualType  RHS,
bool  CompareUnqualified = false 
)

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 6852 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 4015 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().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Definition at line 420 of file ASTContext.h.

friend class ASTReader [friend]

Definition at line 421 of file ASTContext.h.

friend class ASTWriter [friend]

Definition at line 422 of file ASTContext.h.

friend class CXXRecordDecl [friend]

Definition at line 423 of file ASTContext.h.

friend class DeclarationNameTable [friend]

Definition at line 2330 of file ASTContext.h.

friend class DeclContext [friend]

Definition at line 2329 of file ASTContext.h.

friend class NestedNameSpecifier [friend]

Definition at line 146 of file ASTContext.h.


Member Data Documentation

Definition at line 815 of file ASTContext.h.

Referenced by getAutoDeductType(), and clang::serialization::MakeTypeID().

Definition at line 816 of file ASTContext.h.

Referenced by getAutoRRefDeductType(), and clang::serialization::MakeTypeID().

All comments in this translation unit.

Definition at line 536 of file ASTContext.h.

Referenced by addComment(), getRawCommentForDeclNoCache(), getRawCommentList(), and clang::ASTReader::ReadComments().

True if comments are already loaded from ExternalASTSource.

Definition at line 539 of file ASTContext.h.

Referenced by getRawCommentForDeclNoCache().

Definition at line 432 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::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().

Definition at line 804 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().

Definition at line 802 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

Definition at line 802 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

Definition at line 429 of file ASTContext.h.

Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnInstanceMessage(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::ActOnStringLiteral(), addAsFieldToClosureType(), addFunctionPointerConversion(), clang::Sema::addImplicitTypedef(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), AddOrdinaryNameResults(), 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(), clang::Sema::CodeCompleteObjCPassingType(), ConvertDeclSpecToType(), 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::arcmt::trans::getNilString(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), clang::NSAPI::getNSDictionarySelector(), getNSNumberFactoryMethod(), clang::NSAPI::getNSNumberLiteralSelector(), 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(), isNSStringType(), isObjCPtrBlockCompatible(), IsValidIdentifier(), clang::Sema::LookupInlineAsmField(), clang::Sema::LookupInObjCMethod(), LookupPredefedObjCSuperType(), MaybeAddSentinel(), clang::ObjCNoReturn::ObjCNoReturn(), PropertyMemoryAttribute(), rewriteToObjCProperty(), shouldRunOnFunctionOrMethod(), and transferARCOwnershipToDeclaratorChunk().

Definition at line 797 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::Sema::AddInitializerToDecl(), 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::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(), initializeForBlockHeader(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::IsIntegralPromotion(), isOverflowingIntegerType(), isPromotableBitField(), clang::analyze_format_string::ArgType::matchesType(), rewriteToNumericBoxedExpression(), and shouldNotPrintDirectly().

Definition at line 434 of file ASTContext.h.

Referenced by getASTMutationListener(), and setASTMutationListener().

Definition at line 802 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

The number of implicitly-declared copy assignment operators.

Definition at line 2249 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared copy assignment operators for which declarations were built.

Definition at line 2253 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitCopyAssignment(), and PrintStats().

The number of implicitly-declared copy constructors.

Definition at line 2235 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared copy constructors for which declarations were built.

Definition at line 2239 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitCopyConstructor(), and PrintStats().

The number of implicitly-declared default constructors.

Definition at line 2228 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared default constructors for which declarations were built.

Definition at line 2232 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitDefaultConstructor(), and PrintStats().

The number of implicitly-declared destructors.

Definition at line 2263 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared destructors for which declarations were built.

Definition at line 2267 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitDestructor(), and PrintStats().

The number of implicitly-declared move assignment operators.

Definition at line 2256 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared move assignment operators for which declarations were built.

Definition at line 2260 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitMoveAssignment(), and PrintStats().

The number of implicitly-declared move constructors.

Definition at line 2242 of file ASTContext.h.

Referenced by clang::Sema::AddImplicitlyDeclaredMembersToClass(), and PrintStats().

The number of implicitly-declared move constructors for which declarations were built.

Definition at line 2246 of file ASTContext.h.

Referenced by clang::Sema::DeclareImplicitMoveConstructor(), and PrintStats().

Definition at line 808 of file ASTContext.h.

Referenced by clang::Sema::ActOnObjCBoolLiteral(), and InitBuiltinTypes().

Definition at line 807 of file ASTContext.h.

Referenced by getObjCSelDecl(), clang::ASTReader::GetType(), and InitBuiltinTypes().

llvm::DenseMap<const Decl *, comments::FullComment *> clang::ASTContext::ParsedComments [mutable]

Mapping from declarations to parsed comments attached to any redeclaration.

Definition at line 604 of file ASTContext.h.

Referenced by getCommentForDecl().

Mapping from declarations to comments attached to any redeclaration.

Raw comments are owned by Comments list. This mapping is populated lazily.

Definition at line 600 of file ASTContext.h.

Referenced by getRawCommentForAnyRedecl().

Definition at line 2361 of file ASTContext.h.

Referenced by clang::Sema::UnifySection().

Definition at line 803 of file ASTContext.h.

Referenced by AddDirectArgument(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::ento::SimpleConstraintManager::assume(), buildBlockDescriptor(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), computeBlockInfo(), clang::Sema::DiagnoseUnusedExprResult(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), 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(), and clang::CodeGen::CodeGenFunction::StartThunk().

Definition at line 789 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::ActOnLambdaExpr(), clang::Sema::ActOnStmtExpr(), clang::Sema::AdjustDestructorExceptionSpec(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), 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(), GetDeclSpecTypeForDeclarator(), clang::ASTReader::GetType(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), and clang::ento::ExprEngine::Visit().

Definition at line 794 of file ASTContext.h.

Referenced by getWIntType(), and InitBuiltinTypes().


The documentation for this class was generated from the following files: