clang API Documentation

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

#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. More...

Public Types

enum  GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext }
typedef CXXMethodVector::iterator overridden_cxx_method_iterator
typedef std::vector< Type * >
::iterator 
type_iterator
typedef std::vector< Type * >
::const_iterator 
const_type_iterator

Public Member Functions

clang::PrintingPolicy getPrintingPolicy () const
void setPrintingPolicy (clang::PrintingPolicy Policy)
SourceManagergetSourceManager ()
const SourceManagergetSourceManager () const
void * Allocate (unsigned 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
const LangOptionsgetLangOptions () const
DiagnosticsEnginegetDiagnostics () const
FullSourceLoc getFullLoc (SourceLocation Loc) 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.
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.
NamedDeclgetInstantiatedFromUsingDecl (UsingDecl *Inst)
 If the given using decl 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)
bool ZeroBitfieldFollowsNonBitfield (const FieldDecl *FD, const FieldDecl *LastFD) const
bool ZeroBitfieldFollowsBitfield (const FieldDecl *FD, const FieldDecl *LastFD) const
bool BitfieldFollowsBitfield (const FieldDecl *FD, const FieldDecl *LastFD) const
bool NonBitfieldFollowsBitfield (const FieldDecl *FD, const FieldDecl *LastFD) const
bool BitfieldFollowsNonBitfield (const FieldDecl *FD, const FieldDecl *LastFD) const
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 addedLocalImportDecl (ImportDecl *Import)
 Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit.
import_iterator local_import_begin () const
import_iterator local_import_end () const
TranslationUnitDeclgetTranslationUnitDecl () const
 ASTContext (LangOptions &LOpts, SourceManager &SM, const TargetInfo *t, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, unsigned size_reserve, bool DelayInitialization=false)
 ~ASTContext ()
void setExternalSource (OwningPtr< 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 std::vector< Type * > & getTypes () const
TypedefDeclgetInt128Decl () const
 Retrieve the declaration for the 128-bit signed integer type.
TypedefDeclgetUInt128Decl () const
 Retrieve the declaration for the 128-bit unsigned integer type.
QualType getAddrSpaceQualType (QualType T, unsigned AddressSpace) const
QualType getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const
QualType getRestrictType (QualType T) const
QualType getVolatileType (QualType T) const
QualType getConstType (QualType T) const
const FunctionTypeadjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo)
 adjustFunctionType - Change the ExtInfo on a function type.
QualType getComplexType (QualType T) const
CanQualType getComplexType (CanQualType T) const
QualType getPointerType (QualType T) const
CanQualType getPointerType (CanQualType T) const
QualType getAtomicType (QualType T) const
QualType getBlockPointerType (QualType T) const
QualType getBlockDescriptorType () const
QualType getBlockDescriptorExtendedType () const
void setcudaConfigureCallDecl (FunctionDecl *FD)
FunctionDeclgetcudaConfigureCallDecl ()
QualType BuildByRefType (StringRef DeclName, QualType Ty) const
 This builds the struct used for __block variables.
bool BlockRequiresCopying (QualType Ty) const
 Returns true iff we need copy/dispose helpers for the given type.
QualType getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const
QualType getRValueReferenceType (QualType T) const
QualType getMemberPointerType (QualType T, const Type *Cls) const
QualType getVariableArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
QualType getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
QualType getIncompleteArrayType (QualType EltTy, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
QualType getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
QualType getVariableArrayDecayedType (QualType Ty) const
QualType getVectorType (QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const
QualType getExtVectorType (QualType VectorType, unsigned NumElts) const
QualType getDependentSizedExtVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc) const
QualType getFunctionNoProtoType (QualType ResultTy, const FunctionType::ExtInfo &Info) const
QualType getFunctionNoProtoType (QualType ResultTy) const
QualType getFunctionType (QualType ResultTy, const QualType *Args, unsigned NumArgs, const FunctionProtoType::ExtProtoInfo &EPI) const
QualType getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=0) const
QualType getTypedefType (const TypedefNameDecl *Decl, QualType Canon=QualType()) const
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=0) 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, llvm::Optional< unsigned > NumExpansions)
QualType getObjCInterfaceType (const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=0) const
QualType getObjCObjectType (QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const
QualType getObjCObjectPointerType (QualType OIT) const
QualType getTypeOfExprType (Expr *e) const
 getTypeOfType - GCC extension.
QualType getTypeOfType (QualType t) const
QualType getDecltypeType (Expr *e) const
 getDecltypeType - C++0x decltype.
QualType getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
 getUnaryTransformType - unary type transforms
QualType getAutoType (QualType DeducedType) const
 getAutoType - C++0x deduced auto type.
QualType getAutoDeductType () const
 getAutoDeductType - C++0x deduction pattern for 'auto' type.
QualType getAutoRRefDeductType () const
 getAutoRRefDeductType - C++0x deduction pattern for 'auto &&' type.
QualType getTagDeclType (const TagDecl *Decl) const
CanQualType getSizeType () const
CanQualType getIntMaxType () const
 getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5).
CanQualType getUIntMaxType () const
 getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5).
QualType getWCharType () const
QualType getSignedWCharType () const
QualType getUnsignedWCharType () const
QualType getPointerDiffType () const
QualType getCFConstantStringType () const
QualType getRawCFConstantStringType () const
void setCFConstantStringType (QualType T)
void setObjCConstantStringInterface (ObjCInterfaceDecl *Decl)
QualType getObjCConstantStringInterface () const
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=0) const
void getLegacyIntegralTypeEncoding (QualType &t) const
void getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const
bool getObjCEncodingForFunctionDecl (const FunctionDecl *Decl, std::string &S)
bool getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, std::string &S, bool Extended=false) const
std::string getObjCEncodingForBlock (const BlockExpr *blockExpr) const
void getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container, std::string &S) const
bool ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
CharUnits getObjCEncodingTypeSize (QualType t) const
TypedefDeclgetObjCIdDecl () const
 Retrieve the typedef corresponding to the predefined 'id' type in Objective-C.
QualType getObjCIdType () const
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
ObjCInterfaceDeclgetObjCProtocolDecl () const
 Retrieve the Objective-C class declaration corresponding to the predefined 'Protocol' class.
QualType getObjCProtoType () const
 Retrieve the type of the Objective-C "Protocol" class.
void setBuiltinVaListType (QualType T)
QualType getBuiltinVaListType () const
QualType getCVRQualifiedType (QualType T, unsigned CVR) const
QualType getQualifiedType (SplitQualType split) const
 getQualifiedType - Un-split a SplitQualType.
QualType getQualifiedType (QualType T, Qualifiers Qs) const
 getQualifiedType - Returns a type with additional qualifiers.
QualType getQualifiedType (const Type *T, Qualifiers Qs) const
 getQualifiedType - Returns a type with additional qualifiers.
QualType getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime)
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=0) const
 GetBuiltinType - Return the type for the specified builtin.
Qualifiers::GC getObjCGCAttrKind (QualType Ty) const
bool areCompatibleVectorTypes (QualType FirstVec, QualType SecondVec)
const llvm::fltSemantics & getFloatTypeSemantics (QualType T) const
std::pair< uint64_t, unsigned > getTypeInfo (const Type *T) const
std::pair< uint64_t, unsigned > getTypeInfo (QualType T) const
uint64_t getTypeSize (QualType T) const
uint64_t getTypeSize (const Type *T) const
uint64_t getCharWidth () const
 getCharWidth - Return the size of the character type, in bits
CharUnits toCharUnitsFromBits (int64_t BitSize) const
 toCharUnitsFromBits - Convert a size in bits to a size in characters.
int64_t toBits (CharUnits CharSize) const
 toBits - Convert a size in characters to a size in bits.
CharUnits getTypeSizeInChars (QualType T) const
CharUnits getTypeSizeInChars (const Type *T) const
unsigned getTypeAlign (QualType T) const
unsigned getTypeAlign (const Type *T) const
CharUnits getTypeAlignInChars (QualType T) const
CharUnits getTypeAlignInChars (const Type *T) const
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (const Type *T) const
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (QualType T) const
unsigned getPreferredTypeAlign (const Type *T) const
CharUnits getDeclAlign (const Decl *D, bool RefAsPointee=false) const
const ASTRecordLayoutgetASTRecordLayout (const RecordDecl *D) const
const ASTRecordLayoutgetASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const
void DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const
const ASTRecordLayoutgetASTObjCImplementationLayout (const ObjCImplementationDecl *D) const
const CXXMethodDeclgetKeyFunction (const CXXRecordDecl *RD)
uint64_t getFieldOffset (const ValueDecl *FD) const
 Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
bool isNearlyEmpty (const CXXRecordDecl *RD) const
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
const TypegetCanonicalType (const Type *T) const
CanQualType getCanonicalParamType (QualType T) const
bool hasSameType (QualType T1, QualType T2) const
 Determine whether the given types are equivalent.
QualType getUnqualifiedArrayType (QualType T, Qualifiers &Quals)
 Returns 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().
bool hasSameUnqualifiedType (QualType T1, QualType T2) const
 Determine whether the given types are equivalent after cvr-qualifiers have been removed.
bool UnwrapSimilarPointerTypes (QualType &T1, QualType &T2)
NestedNameSpecifiergetCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const
 Retrieves the "canonical" nested name specifier for a given nested name specifier.
CallingConv getDefaultMethodCallConv ()
 Retrieves the default calling convention to use for C++ instance methods.
CallingConv getCanonicalCallConv (CallingConv CC) const
 Retrieves the canonical representation of the given calling convention.
bool isSameCallConv (CallingConv lcc, CallingConv rcc)
 Determines whether two calling conventions name the same calling convention.
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
QualType getBaseElementType (QualType QT) const
uint64_t getConstantArrayElementCount (const ConstantArrayType *CA) const
 getConstantArrayElementCount - Returns number of constant array elements.
QualType getAdjustedParameterType (QualType T)
 Perform adjustment on the parameter type of a function.
QualType getSignatureParameterType (QualType T)
 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
QualType getPromotedIntegerType (QualType PromotableType) const
Qualifiers::ObjCLifetime getInnerObjCOwnership (QualType T) const
 Recurses in pointer/array types until it finds an objc 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
int getFloatingTypeOrder (QualType LHS, QualType RHS) const
QualType getFloatingTypeOfSizeWithinDomain (QualType typeSize, QualType typeDomain) const
unsigned getTargetAddressSpace (QualType T) const
unsigned getTargetAddressSpace (Qualifiers Q) const
unsigned getTargetAddressSpace (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 QualifiedIdConformsQualifiedId (QualType LHS, QualType RHS)
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 mergeFunctionArgumentTypes (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)
type_iterator types_begin ()
type_iterator types_end ()
const_type_iterator types_begin () const
const_type_iterator types_end () const
llvm::APSInt MakeIntValue (uint64_t Value, QualType Type) const
bool isSentinelNullExpr (const Expr *E)
ObjCImplementationDeclgetObjCImplementation (ObjCInterfaceDecl *D)
 Get the implementation of ObjCInterfaceDecl,or NULL if none exists.
ObjCCategoryImplDeclgetObjCImplementation (ObjCCategoryDecl *D)
 Get the implementation of ObjCCategoryDecl, or NULL if none exists.
bool AnyObjCImplementation ()
 returns true if there is at lease one in 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 non exists.
void setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
ObjCInterfaceDeclgetObjContainingInterface (NamedDecl *ND) const
 Returns the objc interface that.
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 VarDecl,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)
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 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.
void InitBuiltinTypes (const TargetInfo &Target)
 Initialize built-in types.

Static Public Member Functions

static ImportDeclgetNextLocalImport (ImportDecl *Import)
static bool isObjCNSObjectType (QualType Ty)

Public Attributes

IdentifierTableIdents
SelectorTableSelectors
Builtin::ContextBuiltinInfo
DeclarationNameTable DeclarationNames
OwningPtr< ExternalASTSourceExternalSource
ASTMutationListenerListener
CanQualType VoidTy
CanQualType BoolTy
CanQualType CharTy
CanQualType WCharTy
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 PseudoObjectTy
CanQualType ARCUnbridgedCastTy
CanQualType ObjCBuiltinIdTy
CanQualType ObjCBuiltinClassTy
CanQualType ObjCBuiltinSelTy
QualType AutoDeductTy
QualType AutoRRefDeductTy

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 DeclContext
class DeclarationNameTable

Detailed Description

ASTContext - This class 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 83 of file ASTContext.h.


Member Typedef Documentation

typedef std::vector<Type*>::const_iterator clang::ASTContext::const_type_iterator

Definition at line 1652 of file ASTContext.h.

Definition at line 474 of file ASTContext.h.

typedef std::vector<Type*>::iterator clang::ASTContext::type_iterator

Definition at line 1651 of file ASTContext.h.


Member Enumeration Documentation

Enumerator:
GE_None 
GE_Missing_stdio 
GE_Missing_setjmp 
GE_Missing_ucontext 

Definition at line 1189 of file ASTContext.h.


Constructor & Destructor Documentation

ASTContext::ASTContext ( LangOptions LOpts,
SourceManager SM,
const TargetInfo t,
IdentifierTable idents,
SelectorTable sels,
Builtin::Context builtins,
unsigned  size_reserve,
bool  DelayInitialization = false 
)

Definition at line 215 of file ASTContext.cpp.

References clang::TranslationUnitDecl::Create(), and InitBuiltinTypes().

ASTContext::~ASTContext ( )

Definition at line 253 of file ASTContext.cpp.


Member Function Documentation

void ASTContext::AddDeallocation ( void(*)(void *)  Callback,
void *  Data 
)

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

Callback A callback function that will be invoked on destruction.

Data Pointer data that will be provided to the callback function when it is called.

Definition at line 290 of file ASTContext.cpp.

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

void ASTContext::addedLocalImportDecl ( ImportDecl Import)

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

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

Referenced by clang::CXXMethodDecl::addOverriddenMethod().

const FunctionType * ASTContext::adjustFunctionType ( const FunctionType Fn,
FunctionType::ExtInfo  EInfo 
)
void* clang::ASTContext::Allocate ( unsigned  Size,
unsigned  Align = 8 
) const [inline]

Definition at line 381 of file ASTContext.h.

Referenced by clang::Decl::AllocateDeserializedDecl(), clang::DeclGroup::Create(), clang::TemplateParameterList::Create(), clang::CXXTryStmt::Create(), clang::ObjCAtTryStmt::Create(), clang::CXXStaticCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::ASTTemplateArgumentListInfo::Create(), clang::CXXDefaultArgExpr::Create(), clang::DeclRefExpr::Create(), clang::CXXFunctionalCastExpr::Create(), clang::NonTypeTemplateParmDecl::Create(), clang::LambdaExpr::Create(), clang::StringLiteral::Create(), clang::CXXCtorInitializer::Create(), clang::OffsetOfExpr::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::ImportDecl::Create(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), clang::TemplateArgumentList::CreateCopy(), clang::ObjCAtTryStmt::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::DeclRefExpr::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::StringLiteral::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::DesignatedInitExpr::CreateEmpty(), clang::ImportDecl::CreateImplicit(), getCanonicalTemplateSpecializationType(), getDeclAttrs(), getDependentTemplateSpecializationType(), getFunctionType(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getOverloadedTemplateName(), getTemplateSpecializationType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::OverloadExpr::initializeResults(), operator new[](), clang::OverloadExpr::OverloadExpr(), clang::Sema::SaveNestedNameSpecifierAnnotation(), clang::BlockDecl::setCaptures(), and clang::FunctionDecl::setDependentTemplateSpecialization().

bool clang::ASTContext::AnyObjCImplementation ( ) [inline]

returns true if there is at lease one in TU.

Definition at line 1680 of file ASTContext.h.

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

QualType ASTContext::areCommonBaseCompatible ( const ObjCObjectPointerType Lptr,
const ObjCObjectPointerType Rptr 
)

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

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

bool ASTContext::areComparableObjCPointerTypes ( QualType  LHS,
QualType  RHS 
)

Definition at line 5625 of file ASTContext.cpp.

References canAssignObjCInterfaces().

bool ASTContext::areCompatibleVectorTypes ( QualType  FirstVec,
QualType  SecondVec 
)

areCompatibleVectorTypes - Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type, ignoring whether they are target-specific (AltiVec or Neon) types.

Definition at line 5192 of file ASTContext.cpp.

References clang::VectorType::AltiVecBool, clang::VectorType::AltiVecPixel, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), hasSameType(), and hasSameUnqualifiedType().

Referenced by clang::IsVectorConversion().

bool ASTContext::BitfieldFollowsBitfield ( const FieldDecl FD,
const FieldDecl LastFD 
) const

BitfieldFollowsBitfield - return 'true" if 'FD' is a bitfield which follows the bitfield 'LastFD'.

Definition at line 632 of file ASTContext.cpp.

References clang::FieldDecl::getBitWidthValue(), and clang::FieldDecl::isBitField().

bool ASTContext::BitfieldFollowsNonBitfield ( const FieldDecl FD,
const FieldDecl LastFD 
) const

BitfieldFollowsNonBitfield - return 'true" if 'FD' is a bitfield which follows the none bitfield 'LastFD'.

Definition at line 645 of file ASTContext.cpp.

References clang::FieldDecl::getBitWidthValue(), and clang::FieldDecl::isBitField().

bool ASTContext::BlockRequiresCopying ( QualType  Ty) const

Returns true iff we need copy/dispose helpers for the given type.

Definition at line 3935 of file ASTContext.cpp.

References getLangOptions(), and clang::CXXRecordDecl::hasConstCopyConstructor().

Referenced by BuildByRefType(), and clang::CodeGen::CodeGenFunction::BuildByRefType().

QualType ASTContext::BuildByRefType ( StringRef  DeclName,
QualType  Ty 
) const
bool ASTContext::canAssignObjCInterfaces ( const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT 
)
bool ASTContext::canAssignObjCInterfaces ( const ObjCObjectType LHS,
const ObjCObjectType RHS 
)
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 5437 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().

bool ASTContext::canBindObjCObjectType ( QualType  To,
QualType  From 
)
void ASTContext::CollectInheritedProtocols ( const Decl CDecl,
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &  Protocols 
)
unsigned ASTContext::CountNonClassIvars ( const ObjCInterfaceDecl OI) const
MangleContext * ASTContext::createMangleContext ( )
TypeSourceInfo * ASTContext::CreateTypeSourceInfo ( QualType  T,
unsigned  DataSize = 0 
) const

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.

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.

Definition at line 1336 of file ASTContext.cpp.

References clang::TypeLoc::getFullDataSizeForType().

Referenced by clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::CheckPackExpansion(), clang::TemplateArgumentLoc::getPackExpansionPattern(), getTemplateSpecializationTypeInfo(), getTrivialTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), and clang::Sema::GetTypeSourceInfoForDeclarator().

void clang::ASTContext::Deallocate ( void *  Ptr) const [inline]
bool ASTContext::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.

Returns:
true if the function/var must be CodeGen'ed/deserialized even if it is not used.

Definition at line 6665 of file ASTContext.cpp.

References clang::VarDecl::DeclarationOnly, clang::CXXMethodDecl::getCanonicalDecl(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::VarDecl::getInit(), getKeyFunction(), clang::DeclContext::getParent(), clang::ValueDecl::getType(), clang::GVA_C99Inline, clang::GVA_CXXInline, clang::GVA_Internal, clang::GVA_TemplateInstantiation, clang::Decl::hasAttr(), clang::Expr::HasSideEffects(), clang::CXXRecordDecl::isDynamicClass(), clang::VarDecl::isFileVarDecl(), and clang::VarDecl::isThisDeclarationADefinition().

Referenced by isRequiredDecl().

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

References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCInterfaceDecl::ivar_begin(), and clang::ObjCInterfaceDecl::ivar_end().

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

Referenced by clang::Decl::dropAttrs(), and clang::Decl::swapAttrs().

bool ASTContext::FunctionTypesMatchOnNSConsumedAttrs ( const FunctionProtoType FromFunctionType,
const FunctionProtoType ToFunctionType 
)
QualType ASTContext::getAddrSpaceQualType ( QualType  T,
unsigned  AddressSpace 
) const

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

References clang::Qualifiers::addAddressSpace(), clang::QualType::getAddressSpace(), getCanonicalType(), clang::Qualifiers::hasAddressSpace(), and clang::QualifierCollector::strip().

Referenced by DecodeTypeFromStr(), and HandleAddressSpaceTypeAttribute().

QualType ASTContext::getAdjustedParameterType ( QualType  T)

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

References getArrayDecayedType(), and getPointerType().

Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::BuildFunctionType(), GetFullTypeForDeclarator(), and getSignatureParameterType().

QualType ASTContext::getArrayDecayedType ( QualType  Ty) const

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

References getAsArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeQualifiers(), getPointerType(), and getQualifiedType().

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildExceptionDeclaration(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::CompareDerivedToBaseConversions(), clang::CompareStandardConversionSequences(), DecodeTypeFromStr(), clang::Sema::DiagnoseAssignmentResult(), getAdjustedParameterType(), GetBuiltinType(), getCanonicalParamType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), and clang::IsStandardConversion().

const ArrayType * ASTContext::getAsArrayType ( QualType  T) const

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 3440 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::VariableArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::CheckParmsForFunctionDef(), CheckUnaryTypeTraitTypeCompleteness(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), getArrayDecayedType(), getAsConstantArrayType(), getAsDependentSizedArrayType(), getAsIncompleteArrayType(), getAsVariableArrayType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), handleInitPriorityAttr(), clang::InitializationSequence::InitializationSequence(), IsStringInit(), mergeTypes(), clang::InitializationSequence::Perform(), clang::APValue::printPretty(), clang::Sema::RequireNonAbstractType(), tryObjCWritebackConversion(), TryValueInitialization(), and clang::ASTNodeImporter::VisitVarDecl().

const ConstantArrayType* clang::ASTContext::getAsConstantArrayType ( QualType  T) const [inline]
const DependentSizedArrayType* clang::ASTContext::getAsDependentSizedArrayType ( QualType  T) const [inline]

Definition at line 1481 of file ASTContext.h.

References getAsArrayType().

Referenced by DeduceTemplateArgumentsByTypeMatch().

const IncompleteArrayType* clang::ASTContext::getAsIncompleteArrayType ( QualType  T) const [inline]
size_t clang::ASTContext::getASTAllocatedMemory ( ) const [inline]

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

Definition at line 388 of file ASTContext.h.

ASTMutationListener* clang::ASTContext::getASTMutationListener ( ) const [inline]

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

Definition at line 593 of file ASTContext.h.

References Listener.

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

const ASTRecordLayout & ASTContext::getASTObjCImplementationLayout ( const ObjCImplementationDecl D) const

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

References clang::ObjCImplDecl::getClassInterface().

Referenced by LookupFieldBitOffset().

const ASTRecordLayout & ASTContext::getASTObjCInterfaceLayout ( const ObjCInterfaceDecl D) const

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

Definition at line 1358 of file ASTContext.cpp.

Referenced by clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getTypeInfo(), and LookupFieldBitOffset().

const ASTRecordLayout & ASTContext::getASTRecordLayout ( const RecordDecl D) const
const VariableArrayType* clang::ASTContext::getAsVariableArrayType ( QualType  T) const [inline]
QualType ASTContext::getAtomicType ( QualType  T) const

getAtomicType - 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 3018 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 
)
QualType ASTContext::getAutoDeductType ( ) const

getAutoDeductType - C++0x deduction pattern for 'auto' type.

getAutoDeductType - Get type pattern for deducing against 'auto'.

Definition at line 3045 of file ASTContext.cpp.

References AutoDeductTy, getAutoType(), and clang::QualType::isNull().

Referenced by getAutoRRefDeductType().

QualType ASTContext::getAutoRRefDeductType ( ) const

getAutoRRefDeductType - C++0x deduction pattern for 'auto &&' type.

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

Definition at line 3053 of file ASTContext.cpp.

References AutoRRefDeductTy, getAutoDeductType(), getRValueReferenceType(), and clang::QualType::isNull().

QualType ASTContext::getAutoType ( QualType  DeducedType) const

getAutoType - C++0x deduced auto type.

getAutoType - We only unique auto types after they've been deduced.

Definition at line 2999 of file ASTContext.cpp.

References clang::QualType::isNull(), clang::AutoType::Profile(), and clang::TypeAlignment.

Referenced by ConvertDeclSpecToType(), getAutoDeductType(), and clang::ASTNodeImporter::VisitAutoType().

QualType ASTContext::getBaseElementType ( const ArrayType VAT) const

getBaseElementType - Returns the innermost element type of an array type. For example, will return "int" for int[m][n]

Definition at line 3543 of file ASTContext.cpp.

References clang::ArrayType::getElementType().

Referenced by clang::Sema::BuildArrayType(), BuildImplicitMemberInitializer(), CheckAggExprForMemSetUse(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpecAndConst(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), DeclIsConstantGlobal(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), FieldHasTrivialDestructorBody(), getDeclAlign(), getInnerObjCOwnership(), handleInitPriorityAttr(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isPODType(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::SetIvarInitializers(), clang::Sema::ShouldDeleteCopyAssignmentOperator(), clang::Sema::ShouldDeleteDestructor(), clang::Sema::ShouldDeleteMoveAssignmentOperator(), clang::Sema::ShouldDeleteSpecialMember(), TryDefaultInitialization(), and clang::TryListConversion().

QualType ASTContext::getBaseElementType ( QualType  QT) const

getBaseElementType - Returns the innermost element type of a type (which needn't actually be an array type).

Definition at line 3547 of file ASTContext.cpp.

References clang::Qualifiers::addConsistentQualifiers(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), getQualifiedType(), clang::QualType::getSplitDesugaredType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

QualType ASTContext::getBlockDescriptorExtendedType ( ) const
QualType ASTContext::getBlockDescriptorType ( ) const
QualType ASTContext::getBlockPointerType ( QualType  T) const

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

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

Referenced by clang::Sema::BuildBlockPointerType(), mergeTypes(), and clang::ASTNodeImporter::VisitBlockPointerType().

Expr * ASTContext::getBlockVarCopyInits ( const VarDecl VD)

Get the copy initialization expression of VarDecl,or NULL if none exists.

Definition at line 1311 of file ASTContext.cpp.

References clang::Decl::hasAttr().

QualType ASTContext::GetBuiltinType ( unsigned  ID,
GetBuiltinTypeError Error,
unsigned *  IntegerConstantArgs = 0 
) const

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

References BuiltinInfo, DecodeTypeFromStr(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, GE_None, getArrayDecayedType(), getFunctionNoProtoType(), getFunctionType(), clang::Builtin::Context::GetTypeString(), clang::Builtin::Context::isNoReturn(), clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::FunctionType::ExtInfo::withNoReturn().

QualType clang::ASTContext::getBuiltinVaListType ( ) const [inline]

Definition at line 1129 of file ASTContext.h.

Referenced by DecodeTypeFromStr(), and Desugar().

CallingConv clang::ASTContext::getCanonicalCallConv ( CallingConv  CC) const [inline]

Retrieves the canonical representation of the given calling convention.

Definition at line 1423 of file ASTContext.h.

References clang::CC_C, and clang::CC_Default.

Referenced by getFunctionNoProtoType(), getFunctionType(), handleFunctionTypeAttr(), and isSameCallConv().

NestedNameSpecifier * ASTContext::getCanonicalNestedNameSpecifier ( NestedNameSpecifier NNS) const

Retrieves the "canonical" nested name specifier for a given nested name specifier.

The canonical nested name specifier is a nested name specifier that uniquely identifies a type or namespace within the type system. For example, given:

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

References clang::NestedNameSpecifier::Create(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsType(), getCanonicalType(), getDependentTemplateSpecializationType(), 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::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by clang::Sema::CheckUsingDeclRedeclaration(), clang::NamedDecl::declarationReplaces(), getDependentNameType(), getDependentTemplateName(), and getDependentTemplateSpecializationType().

CanQualType ASTContext::getCanonicalParamType ( QualType  T) const

getCanonicalParamType - Return the canonical parameter type corresponding to the specific potentially non-canonical one. Qualifiers are stripped off, functions are turned into function pointers, and arrays decay one level into pointers.

Definition at line 3110 of file ASTContext.cpp.

References clang::CanQual< Type >::CreateUnsafe(), getArrayDecayedType(), getCanonicalType(), getPointerType(), clang::QualType::getTypePtr(), and getVariableArrayDecayedType().

Referenced by clang::CodeGen::CodeGenTypes::getFunctionInfo(), and getFunctionType().

TemplateArgument ASTContext::getCanonicalTemplateArgument ( const TemplateArgument Arg) const
TemplateName ASTContext::getCanonicalTemplateName ( TemplateName  Name) const

Retrieves the "canonical" template name that refers to a given template.

The canonical template name is the simplest expression that can be used to refer to a given template. For most templates, this expression is just the template declaration itself. For example, the template std::vector can be referred to via a variety of names---std::vector, ::std::vector, vector (if vector is in scope), etc.---but all of these names map down to the same TemplateDecl, which is used to form the canonical template name.

Dependent template names are more interesting. Here, the template name could be something like T::template apply or std::allocator<T>::template rebind, where the nested name specifier itself is dependent. In this case, the canonical template name uses the shortest form of the dependent nested-name-specifier, which itself contains all canonical types, values, and templates.

Definition at line 3276 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 DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), hasSameTemplateName(), isSameTemplateArg(), and clang::TemplateArgument::Profile().

QualType ASTContext::getCanonicalTemplateSpecializationType ( TemplateName  T,
const TemplateArgument Args,
unsigned  NumArgs 
) const
CanQualType clang::ASTContext::getCanonicalType ( QualType  T) const [inline]

getCanonicalType - Return the canonical (structural) type corresponding to the specified potentially non-canonical type. 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 1349 of file ASTContext.h.

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

Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnPropertyImplDecl(), clang::AddBuiltinAssignmentOperatorCandidates(), clang::Sema::AttachBaseSpecifiers(), BuildFieldReferenceExpr(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildReferenceType(), clang::BuildSimilarlyQualifiedPointerType(), BuildSingleCopyAssign(), clang::Sema::BuildStdInitializerList(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckConstructor(), clang::Sema::CheckDerivedToBaseConversion(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), clang::Sema::CodeCompleteConstructorInitializer(), clang::CollectVRQualifiers(), clang::CompareDerivedToBaseConversions(), clang::Sema::CompareMethodParamsInBaseAndSuper(), clang::CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), clang::CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeclareInheritedConstructors(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DiagnosePropertyMismatch(), clang::CodeGen::CodeGenFunction::EmitCall(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::ento::SValBuilder::evalCast(), FindOverriddenMethod(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), getAddrSpaceQualType(), getAtomicType(), getAttributedType(), getBlockPointerType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), getComplexType(), getConstantArrayType(), GetConversionType(), clang::CXXRecordDecl::getCopyConstructor(), getDecltypeType(), getDefaultedDefaultConstructorUnsafe(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), clang::CXXRecordDecl::getDestructor(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), clang::serialization::reader::ASTDeclContextNameLookupTrait::GetExternalKey(), getExtVectorType(), getFunctionNoProtoType(), getFunctionType(), getIncompleteArrayType(), getIntegerTypeOrder(), GetKeyForBase(), getLValueReferenceType(), getMemberPointerType(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getPackExpansionType(), getParenType(), getPointerType(), getRValueReferenceType(), getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), getTemplateSpecializationType(), getTypedefType(), getTypeInfo(), getTypeOfExprType(), getTypeOfType(), getVariableArrayType(), getVectorType(), hasSameType(), hasSameUnqualifiedType(), clang::ento::SValBuilder::haveSameType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitCatchParam(), isCheapEnoughToEvaluateUnconditionally(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), IsModifiable(), clang::CXXMethodDecl::isMoveAssignmentOperator(), isObjCReceiverType(), IsProvablyNotDerivedFrom(), isSameTemplateArg(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::IsStandardConversion(), IsStringInit(), clang::Expr::isUnusedResultAWarning(), clang::Sema::MarkDeclarationsReferencedInType(), MarkUsedTemplateParameters(), MatchesFriend(), clang::analyze_format_string::ArgTypeResult::matchesType(), matchTypes(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypes(), MightInstantiateTo(), clang::Sema::ProcessPropertyDecl(), clang::ASTReader::ReadDeclarationName(), ResolveOverloadedFunctionForReferenceBinding(), clang::CXXRecordDecl::setBases(), TryConstCast(), clang::TryListConversion(), clang::TryObjectArgumentInitialization(), clang::TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::TryUserDefinedConversion(), clang::CodeGen::CodeGenFunction::TypeOfSelfObject(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().

const Type* clang::ASTContext::getCanonicalType ( const Type T) const [inline]
QualType ASTContext::getCFConstantStringType ( ) const
uint64_t clang::ASTContext::getCharWidth ( ) const [inline]
FunctionDecl * ASTContext::getClassScopeSpecializationPattern ( const FunctionDecl FD)
QualType ASTContext::getComplexType ( QualType  T) const

getComplexType - Return the uniqued reference to the type for a complex number with the specified element type.

Definition at line 1471 of file ASTContext.cpp.

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

Referenced by DecodeTypeFromStr(), getComplexType(), handleIntToFloatConversion(), handleModeAttr(), handleOtherComplexFloatConversion(), InitBuiltinTypes(), and clang::ASTNodeImporter::VisitComplexType().

CanQualType clang::ASTContext::getComplexType ( CanQualType  T) const [inline]

Definition at line 656 of file ASTContext.h.

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

uint64_t ASTContext::getConstantArrayElementCount ( const ConstantArrayType CA) const

getConstantArrayElementCount - Returns number of constant array elements.

Definition at line 3563 of file ASTContext.cpp.

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

QualType ASTContext::getConstantArrayType ( QualType  EltTy,
const llvm::APInt &  ArySizeIn,
ArrayType::ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const
QualType clang::ASTContext::getConstType ( QualType  T) const [inline]

getConstType - Returns 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 647 of file ASTContext.h.

References clang::QualType::withConst().

QualType ASTContext::getCorrespondingUnsignedType ( QualType  T)
FunctionDecl* clang::ASTContext::getcudaConfigureCallDecl ( ) [inline]

Definition at line 686 of file ASTContext.h.

QualType clang::ASTContext::getCVRQualifiedType ( QualType  T,
unsigned  CVR 
) const [inline]

getCVRQualifiedType - Returns a type with additional const, volatile, or restrict qualifiers.

Definition at line 1133 of file ASTContext.h.

References clang::Qualifiers::fromCVRMask(), and getQualifiedType().

Referenced by clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), and clang::TryObjectArgumentInitialization().

CharUnits ASTContext::getDeclAlign ( const Decl D,
bool  RefAsPointee = false 
) const
AttrVec & ASTContext::getDeclAttrs ( const Decl D)

Retrieve the attributes for the given declaration.

Definition at line 503 of file ASTContext.cpp.

References Allocate().

Referenced by clang::Decl::getAttrs(), clang::Decl::setAttrs(), and clang::Decl::swapAttrs().

QualType ASTContext::getDecltypeType ( Expr e) const

getDecltypeType - C++0x decltype.

getDecltypeType - Unlike many "get<Type>" functions, we don't unique DecltypeType AST's. The only motivation to unique these nodes would be memory savings. Since decltype(t) is fairly uncommon, space shouldn't be an issue. This doesn't effect the type checker, since it operates on canonical types (which are always unique).

Definition at line 2950 of file ASTContext.cpp.

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

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

CallingConv ASTContext::getDefaultMethodCallConv ( )

Retrieves the default calling convention to use for C++ instance methods.

Definition at line 6739 of file ASTContext.cpp.

QualType ASTContext::getDependentNameType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
QualType  Canon = QualType() 
) const
QualType ASTContext::getDependentSizedArrayType ( QualType  elementType,
Expr numElements,
ArrayType::ArraySizeModifier  ASM,
unsigned  elementTypeQuals,
SourceRange  brackets 
) const

getDependentSizedArrayType - Returns a non-unique reference to the type for a dependently-sized array of the specified element type. FIXME: We will need these to be uniqued, or at least comparable, at some point.

getDependentSizedArrayType - Returns a non-unique reference to the type for a dependently-sized array of the specified element type.

Definition at line 1872 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

getDependentSizedExtVectorType - Returns 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 2038 of file ASTContext.cpp.

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

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

TemplateName ASTContext::getDependentTemplateName ( NestedNameSpecifier NNS,
const IdentifierInfo Name 
) const

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

Definition at line 5020 of file ASTContext.cpp.

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

Referenced by getDependentTemplateName(), clang::ASTImporter::Import(), and clang::ASTReader::ReadTemplateName().

TemplateName ASTContext::getDependentTemplateName ( NestedNameSpecifier NNS,
OverloadedOperatorKind  Operator 
) const

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

Definition at line 5054 of file ASTContext.cpp.

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

QualType ASTContext::getDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
const TemplateArgumentListInfo Args 
) const
QualType ASTContext::getDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
const IdentifierInfo Name,
unsigned  NumArgs,
const TemplateArgument Args 
) const
PartialDiagnostic::StorageAllocator& clang::ASTContext::getDiagAllocator ( ) [inline]
DiagnosticsEngine & ASTContext::getDiagnostics ( ) const
QualType ASTContext::getElaboratedType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
QualType  NamedType 
) const
QualType ASTContext::getEnumType ( const EnumDecl Decl) const

Definition at line 2289 of file ASTContext.cpp.

References clang::EnumDecl::getPreviousDecl(), and clang::TypeAlignment.

ExternalASTSource* clang::ASTContext::getExternalSource ( ) const [inline]
QualType ASTContext::getExtVectorType ( QualType  vecType,
unsigned  NumElts 
) const

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

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

Referenced by clang::Sema::BuildExtVectorType(), CheckExtVectorComponent(), and clang::ASTNodeImporter::VisitExtVectorType().

uint64_t ASTContext::getFieldOffset ( const ValueDecl FD) const
QualType clang::ASTContext::getFILEType ( ) const [inline]

Retrieve the C FILE type.

Definition at line 994 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

QualType ASTContext::getFloatingTypeOfSizeWithinDomain ( QualType  Size,
QualType  Domain 
) const

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

References DoubleComplexTy, DoubleRank, DoubleTy, FloatComplexTy, FloatRank, FloatTy, getFloatingRank(), HalfRank, LongDoubleComplexTy, LongDoubleRank, and LongDoubleTy.

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

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

References getFloatingRank().

Referenced by clang::StandardConversionSequence::getNarrowingKind(), handleComplexFloatToComplexFloatConverstion(), handleFloatConversion(), and handleOtherComplexFloatConversion().

const llvm::fltSemantics & ASTContext::getFloatTypeSemantics ( QualType  T) const
FullSourceLoc clang::ASTContext::getFullLoc ( SourceLocation  Loc) const [inline]
QualType ASTContext::getFunctionNoProtoType ( QualType  ResultTy,
const FunctionType::ExtInfo Info 
) const
QualType clang::ASTContext::getFunctionNoProtoType ( QualType  ResultTy) const [inline]

Definition at line 765 of file ASTContext.h.

References getFunctionNoProtoType().

QualType ASTContext::getFunctionType ( QualType  ResultTy,
const QualType ArgArray,
unsigned  NumArgs,
const FunctionProtoType::ExtProtoInfo EPI 
) const

getFunctionType - Return a normal function type with a typed argument list.

getFunctionType - Return a normal function type with a typed argument list. isVariadic indicates whether the argument list includes '...'.

Definition at line 2121 of file ASTContext.cpp.

References Allocate(), bool, clang::CC_Default, clang::CC_X86StdCall, clang::FunctionProtoType::ExtProtoInfo::ConsumedArguments, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_None, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpecType, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, getCanonicalCallConv(), getCanonicalParamType(), getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::QualType::isCanonical(), NumArgs, clang::FunctionProtoType::ExtProtoInfo::NumExceptions, clang::FunctionProtoType::Profile(), clang::TypeAlignment, and clang::FunctionType::ExtInfo::withCallingConv().

Referenced by clang::Sema::ActOnFinishDelayedMemberInitializers(), clang::Sema::AdjustDestructorExceptionSpec(), adjustFunctionType(), clang::Sema::BuildFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedCopyConstructor(), clang::Sema::CheckExplicitlyDefaultedDefaultConstructor(), clang::Sema::CheckExplicitlyDefaultedDestructor(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveConstructor(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeclareInheritedConstructors(), GetBuiltinType(), GetFullTypeForDeclarator(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), mergeFunctionTypes(), mergeObjCGCQualifiers(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTNodeImporter::VisitFunctionProtoType().

GVALinkage ASTContext::GetGVALinkageForFunction ( const FunctionDecl FD)
GVALinkage ASTContext::GetGVALinkageForVariable ( const VarDecl VD)
QualType ASTContext::getIncompleteArrayType ( QualType  EltTy,
ArrayType::ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const
QualType ASTContext::getInjectedClassNameType ( CXXRecordDecl Decl,
QualType  TST 
) const

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

Definition at line 2210 of file ASTContext.cpp.

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

Referenced by clang::ClassTemplatePartialSpecializationDecl::Create(), and clang::TemplateDeclInstantiator::VisitClassTemplateDecl().

Qualifiers::ObjCLifetime ASTContext::getInnerObjCOwnership ( QualType  T) const

Recurses in pointer/array types until it finds an objc retainable type and returns its ownership.

Definition at line 3741 of file ASTContext.cpp.

References getBaseElementType(), clang::QualType::getObjCLifetime(), clang::QualType::isNull(), and clang::Qualifiers::OCL_None.

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

MemberSpecializationInfo * ASTContext::getInstantiatedFromStaticDataMember ( const VarDecl Var)

If this variable is an instantiated static data member of a class template specialization, returns the templated static data member from which it was instantiated.

Definition at line 523 of file ASTContext.cpp.

References clang::VarDecl::isStaticDataMember().

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

FieldDecl * ASTContext::getInstantiatedFromUnnamedFieldDecl ( FieldDecl Field)

Definition at line 600 of file ASTContext.cpp.

Referenced by isInstantiationOf().

NamedDecl * ASTContext::getInstantiatedFromUsingDecl ( UsingDecl Inst)

If the given using decl is an instantiation of a (possibly unresolved) using decl from a template instantiation, return it.

Definition at line 564 of file ASTContext.cpp.

Referenced by isInstantiationOf().

UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst)

Definition at line 584 of file ASTContext.cpp.

Referenced by isInstantiationOf().

TypedefDecl * ASTContext::getInt128Decl ( ) const

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

Definition at line 358 of file ASTContext.cpp.

References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and Int128Ty.

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

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

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

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

Referenced by handleComplexIntConversion(), and handleIntegerConversion().

CanQualType ASTContext::getIntMaxType ( ) const

getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5).

getIntMaxType - Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.

Definition at line 3077 of file ASTContext.cpp.

References clang::TargetInfo::getIntMaxType().

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

unsigned ASTContext::getIntWidth ( QualType  T) const
QualType clang::ASTContext::getjmp_bufType ( ) const [inline]

Retrieve the C jmp_buf type.

Definition at line 1006 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

const CXXMethodDecl * ASTContext::getKeyFunction ( const CXXRecordDecl RD)

getKeyFunction - Get the key function for 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.

Definition at line 2274 of file RecordLayoutBuilder.cpp.

References clang::CXXRecordDecl::getDefinition().

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), DeclMustBeEmitted(), clang::Sema::DefineUsedVTables(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::CodeGen::CodeGenModule::setTypeVisibility(), and clang::CodeGen::CodeGenVTables::ShouldEmitVTableInThisTU().

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

Definition at line 400 of file ASTContext.h.

Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), AllowOverloadingOfFunction(), clang::arcmt::MigrationProcess::applyTransform(), BlockRequiresCopying(), buildBlockDescriptor(), CalculateHiddenNames(), clang::arcmt::trans::canApplyWeak(), clang::Decl::canBeWeakImported(), canDevirtualizeMemberFunctionCalls(), CastsAwayConstness(), CheckAggExprForMemSetUse(), clang::arcmt::checkForManualIssues(), CheckICE(), clang::VarDecl::checkInitIsICE(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::CodeGen::CodeGenFunction::CodeGenFunction(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeDeclRefDependence(), clang::PredefinedExpr::ComputeName(), CreateGlobalInitOrDestructFunction(), clang::ObjCMethodDecl::createImplicitParams(), CreateRecordDecl(), DeclIsConstantGlobal(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::Stmt::dumpPretty(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), EmitExprForReferenceBinding(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), EncodeBitField(), clang::Expr::EvaluateAsInitializer(), clang::Expr::EvaluateAsRValue(), clang::ASTMergeAction::ExecuteAction(), clang::arcmt::trans::findSemiAfterLocation(), clang::FormatASTNodeDiagnosticArgument(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateCode(), GenerateFixForUnusedDecl(), getASTRecordLayout(), clang::FunctionDecl::getBuiltinID(), GetDiagForGotoScopeDecl(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), GetGVALinkageForFunction(), GetGVALinkageForVariable(), clang::ento::CheckerContext::getLangOptions(), getLogicalOperationType(), getLVForClassMember(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getObjCGCAttrKind(), clang::Sema::getPrintingPolicy(), GetStaticDeclName(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::QualType::hasTrivialAssignment(), clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification(), clang::InitializedEntity::InitializeParameter(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::Expr::isCXX11ConstantExpr(), clang::QualType::isCXX11PODType(), clang::VarDecl::isExternC(), clang::FunctionDecl::isExternC(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::Expr::isNullPointerConstant(), isObjCReceiverType(), isOutOfScopePreviousDeclaration(), clang::QualType::isPODType(), clang::VarDecl::isThisDeclarationADefinition(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), clang::IsVectorConversion(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), MaybeAddSentinel(), clang::idx::ASTLocation::print(), PrintStats(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), setObjCGCLValueClass(), ShouldUseExternalRTTIDescriptor(), typesAreCompatible(), UnwrapSimilarPointerTypes(), UseVirtualCall(), clang::ASTNodeImporter::VisitBuiltinType(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitRecordDecl().

void ASTContext::getLegacyIntegralTypeEncoding ( QualType PointeeTy) const

getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always. For typedefs, we need to use 'i' or 'I' instead if encoding a struct field, or a pointer!

Definition at line 4333 of file ASTContext.cpp.

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

QualType clang::ASTContext::getLifetimeQualifiedType ( QualType  type,
Qualifiers::ObjCLifetime  lifetime 
) [inline]

getLifetimeQualifiedType - Returns a type with the given lifetime qualifier.

Definition at line 1160 of file ASTContext.h.

References clang::Qualifiers::addObjCLifetime(), clang::QualType::getObjCLifetime(), getQualifiedType(), and clang::Qualifiers::OCL_None.

QualType clang::ASTContext::getLogicalOperationType ( ) const [inline]

The result type of logical operations, '<', '>', '!=', etc.

Definition at line 1037 of file ASTContext.h.

References BoolTy, getLangOptions(), and IntTy.

Referenced by clang::ento::BasicValueFactory::getTruthValue().

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

getMemberPointerType - Return the uniqued reference to the type for a member pointer to the specified type in the specified class. The class 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 1635 of file ASTContext.cpp.

References getCanonicalType(), clang::QualType::isCanonical(), clang::Type::isCanonicalUnqualified(), clang::MemberPointerType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::BuildMemberPointerType(), CheckAddressOfOperand(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), GetTypeOfFunction(), clang::IsStandardConversion(), TryStaticMemberPointerUpcast(), and clang::ASTNodeImporter::VisitMemberPointerType().

DeclarationNameInfo ASTContext::getNameForTemplate ( TemplateName  Name,
SourceLocation  NameLoc 
) const
static ImportDecl* clang::ASTContext::getNextLocalImport ( ImportDecl Import) [inline, static]

Definition at line 492 of file ASTContext.h.

Referenced by clang::ASTContext::import_iterator::operator++().

TypeSourceInfo* clang::ASTContext::getNullTypeSourceInfo ( ) [inline]
TypedefDecl * ASTContext::getObjCClassDecl ( ) const
QualType clang::ASTContext::getObjCClassRedefinitionType ( ) const [inline]

Retrieve the type that 'Class' has been defined to, which may be different from the built-in 'Class' if 'Class' has been typedef'd.

Definition at line 955 of file ASTContext.h.

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

Referenced by ShouldTryAgainWithRedefinitionType().

QualType clang::ASTContext::getObjCClassType ( ) const [inline]

This setter/getter repreents the ObjC 'Class' type. It is setup lazily, by Sema. 'Class' is always a (typedef for a) pointer type, a pointer to a struct.

Definition at line 1115 of file ASTContext.h.

References getObjCClassDecl(), and getTypeDeclType().

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

QualType clang::ASTContext::getObjCConstantStringInterface ( ) const [inline]

Definition at line 936 of file ASTContext.h.

std::string ASTContext::getObjCEncodingForBlock ( const BlockExpr Expr) const
bool ASTContext::getObjCEncodingForFunctionDecl ( const FunctionDecl Decl,
std::string &  S 
)

getObjCEncodingForFunctionDecl - Returns the encoded type for this function. 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 4102 of file ASTContext.cpp.

References charUnitsToString(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::ParmVarDecl::getOriginalType(), clang::FunctionDecl::getResultType(), clang::ValueDecl::getType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), S, and clang::CharUnits::Zero().

bool ASTContext::getObjCEncodingForMethodDecl ( const ObjCMethodDecl Decl,
std::string &  S,
bool  Extended = false 
) const

getObjCEncodingForMethodDecl - Return the encoded type for this method declaration.

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

getObjCEncodingForMethodDecl - Return the encoded type for this method declaration.

Definition at line 4162 of file ASTContext.cpp.

References charUnitsToString(), clang::ObjCMethodDecl::getObjCDeclQualifier(), clang::ParmVarDecl::getObjCDeclQualifier(), getObjCEncodingTypeSize(), clang::ParmVarDecl::getOriginalType(), clang::ObjCMethodDecl::getResultType(), clang::ValueDecl::getType(), getTypeSizeInChars(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::ObjCMethodDecl::param_begin(), S, clang::ObjCMethodDecl::sel_param_end(), and VoidPtrTy.

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

References clang::ObjCPropertyDecl::Assign, Container, clang::ObjCPropertyDecl::Copy, clang::ObjCPropertyImplDecl::Dynamic, clang::Selector::getAsString(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getNameAsString(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyImplementation(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyDecl::getSetterKind(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_getter, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_setter, clang::ObjCImplDecl::propimpl_begin(), clang::ObjCImplDecl::propimpl_end(), clang::ObjCPropertyDecl::Retain, S, and clang::ObjCPropertyDecl::Weak.

void ASTContext::getObjCEncodingForType ( QualType  t,
std::string &  S,
const FieldDecl Field = 0 
) const

getObjCEncodingForType - Emit the ObjC type encoding for the given type into

  • S. If
  • NameFields is specified then record field names are also encoded.

Definition at line 4345 of file ASTContext.cpp.

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

void ASTContext::getObjCEncodingForTypeQualifier ( Decl::ObjCDeclQualifier  QT,
std::string &  S 
) const
CharUnits ASTContext::getObjCEncodingTypeSize ( QualType  type) const

getObjCEncodingTypeSize returns size of type for objective-c encoding purpose in characters.

getObjCEncodingTypeSize returns size of type for objective-c encoding purpose.

Definition at line 4032 of file ASTContext.cpp.

References getTypeSizeInChars(), IntTy, clang::CharUnits::isPositive(), VoidPtrTy, and clang::CharUnits::Zero().

Referenced by getObjCEncodingForBlock(), getObjCEncodingForFunctionDecl(), and getObjCEncodingForMethodDecl().

Qualifiers::GC ASTContext::getObjCGCAttrKind ( QualType  Ty) const

getObjCGCAttr - Returns one of GCNone, Weak or Strong objc's garbage collection attribute.

Definition at line 5151 of file ASTContext.cpp.

References clang::Qualifiers::GCNone, getLangOptions(), clang::QualType::getObjCGCAttr(), clang::PointerType::getPointeeType(), clang::LangOptions::NonGC, and clang::Qualifiers::Strong.

Referenced by clang::Expr::isOBJCGCCandidate(), and clang::CodeGen::LValue::MakeAddr().

QualType ASTContext::getObjCGCQualType ( QualType  T,
Qualifiers::GC  gcAttr 
) const

getObjCGCQualType - Returns the uniqued reference to the type for an objc gc qualified type. The retulting type has a union of the qualifiers from T and the gc attribute.

Definition at line 1422 of file ASTContext.cpp.

References clang::Qualifiers::addObjCGCAttr(), getCanonicalType(), clang::QualType::getObjCGCAttr(), getPointerType(), clang::Qualifiers::hasObjCGCAttr(), and clang::QualifierCollector::strip().

Referenced by clang::Sema::ActOnPropertyImplDecl(), handleObjCGCTypeAttr(), and mergeTypes().

TypedefDecl * ASTContext::getObjCIdDecl ( ) const

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

Definition at line 4910 of file ASTContext.cpp.

References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getObjCObjectPointerType(), getObjCObjectType(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and ObjCBuiltinIdTy.

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

QualType clang::ASTContext::getObjCIdRedefinitionType ( ) const [inline]

Retrieve the type that 'id' has been defined to, which may be different from the built-in 'id' if 'id' has been typedef'd.

Definition at line 942 of file ASTContext.h.

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

Referenced by ShouldTryAgainWithRedefinitionType().

QualType clang::ASTContext::getObjCIdType ( ) const [inline]
ObjCImplementationDecl * ASTContext::getObjCImplementation ( ObjCInterfaceDecl D)

Get the implementation of ObjCInterfaceDecl,or NULL if none exists.

Definition at line 1269 of file ASTContext.cpp.

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

ObjCCategoryImplDecl * ASTContext::getObjCImplementation ( ObjCCategoryDecl D)

Get the implementation of ObjCCategoryDecl, or NULL if none exists.

Definition at line 1277 of file ASTContext.cpp.

QualType clang::ASTContext::getObjCInstanceType ( ) [inline]

Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.

Definition at line 982 of file ASTContext.h.

References getObjCInstanceTypeDecl(), and getTypeDeclType().

Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::EmitRelatedResultTypeNote(), and stripObjCInstanceType().

TypedefDecl * ASTContext::getObjCInstanceTypeDecl ( )

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

Definition at line 4009 of file ASTContext.cpp.

References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getObjCIdType(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), and Idents.

Referenced by getObjCInstanceType().

QualType ASTContext::getObjCInterfaceType ( const ObjCInterfaceDecl Decl,
ObjCInterfaceDecl PrevDecl = 0 
) const
const ObjCMethodDecl* clang::ASTContext::getObjCMethodRedeclaration ( const ObjCMethodDecl MD) const [inline]

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

Definition at line 1693 of file ASTContext.h.

QualType ASTContext::getObjCObjectPointerType ( QualType  ObjectT) const
QualType ASTContext::getObjCObjectType ( QualType  Base,
ObjCProtocolDecl *const *  Protocols,
unsigned  NumProtocols 
) const
ObjCInterfaceDecl * ASTContext::getObjContainingInterface ( NamedDecl ND) const

Returns the objc interface that.

  • ND belongs to if it is a objc method/property/ivar etc. that is part of an interface, otherwise returns null.

Definition at line 1298 of file ASTContext.cpp.

References clang::Decl::getDeclContext().

ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl ( ) const

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

Definition at line 4950 of file ASTContext.cpp.

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

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

QualType clang::ASTContext::getObjCProtoType ( ) const [inline]

Retrieve the type of the Objective-C "Protocol" class.

Definition at line 1124 of file ASTContext.h.

References getObjCInterfaceType(), and getObjCProtocolDecl().

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

TypedefDecl * ASTContext::getObjCSelDecl ( ) const

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

Definition at line 4924 of file ASTContext.cpp.

References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getPointerType(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and ObjCBuiltinSelTy.

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

QualType clang::ASTContext::getObjCSelRedefinitionType ( ) const [inline]

Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd.

Definition at line 968 of file ASTContext.h.

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

QualType clang::ASTContext::getObjCSelType ( ) const [inline]
TemplateName ASTContext::getOverloadedTemplateName ( UnresolvedSetIterator  Begin,
UnresolvedSetIterator  End 
) const

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

Definition at line 4973 of file ASTContext.cpp.

References Allocate(), and clang::NamedDecl::getUnderlyingDecl().

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

QualType ASTContext::getPackExpansionType ( QualType  Pattern,
llvm::Optional< unsigned >  NumExpansions 
)
unsigned ASTContext::getParameterIndex ( const ParmVarDecl D) const

Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield.

Definition at line 6783 of file ASTContext.cpp.

QualType ASTContext::getParenType ( QualType  NamedType) const
QualType ASTContext::getPointerDiffType ( ) const
QualType ASTContext::getPointerType ( QualType  T) const

getPointerType - Return the uniqued reference to the type for a pointer to the specified type.

Definition at line 1499 of file ASTContext.cpp.

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

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), BuildByRefType(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildPointerType(), clang::BuildSimilarlyQualifiedPointerType(), clang::ento::StoreManager::CastRetrievedVal(), CastsAwayConstness(), CheckAddressOfOperand(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), clang::Sema::CheckConversionDeclarator(), CheckTemplateArgumentAddressOfObjectOrFunction(), computeBlockInfo(), DecodeTypeFromStr(), clang::Sema::DefineImplicitMoveAssignment(), Desugar(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), EmitFunctionDeclLValue(), clang::ento::SValBuilder::evalCast(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getAdjustedParameterType(), clang::analyze_printf::PrintfSpecifier::getArgType(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCFConstantStringType(), getDeclAlign(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionTextRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), getPointerType(), clang::analyze_format_string::ArgTypeResult::getRepresentativeType(), clang::ento::CallOrObjCMessage::getResultType(), GetThisType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getVariableArrayDecayedType(), handleCleanupAttr(), InitBuiltinTypes(), clang::IsStandardConversion(), mergeTypes(), ResolveOverloadForDeduction(), TryConstCast(), tryObjCWritebackConversion(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryToFixInvalidVariablyModifiedType(), clang::ento::ExprEngine::VisitCast(), and clang::ASTNodeImporter::VisitPointerType().

CanQualType clang::ASTContext::getPointerType ( CanQualType  T) const [inline]

Definition at line 663 of file ASTContext.h.

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

unsigned ASTContext::getPreferredTypeAlign ( const Type T) const

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

References clang::Type::getAs(), getTypeAlign(), getTypeSize(), and clang::Type::isSpecificBuiltinType().

Referenced by getDeclAlign().

clang::PrintingPolicy clang::ASTContext::getPrintingPolicy ( ) const [inline]
QualType ASTContext::getPromotedIntegerType ( QualType  Promotable) const

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

References getTypeSize(), IntTy, clang::QualType::isNull(), LongLongTy, LongTy, UnsignedIntTy, UnsignedLongLongTy, and UnsignedLongTy.

Referenced by clang::Sema::ActOnEnumBody(), GetFullTypeForDeclarator(), clang::analyze_format_string::ArgTypeResult::getRepresentativeType(), and clang::analyze_format_string::ArgTypeResult::matchesType().

TemplateName ASTContext::getQualifiedTemplateName ( NestedNameSpecifier NNS,
bool  TemplateKeyword,
TemplateDecl Template 
) const

Retrieve the template name that represents a qualified template name such as std::vector.

Definition at line 4997 of file ASTContext.cpp.

References clang::QualifiedTemplateName::Profile().

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

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

getQualifiedType - Returns a type with additional qualifiers.

Definition at line 1143 of file ASTContext.h.

References clang::Qualifiers::getFastQualifiers(), clang::Qualifiers::hasNonFastQualifiers(), clang::QualifierCollector::strip(), and clang::QualType::withFastQualifiers().

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

getQualifiedType - Returns a type with additional qualifiers.

Definition at line 1152 of file ASTContext.h.

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

QualType clang::ASTContext::getRawCFConstantStringType ( ) const [inline]

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

Definition at line 927 of file ASTContext.h.

References getTagDeclType().

QualType ASTContext::getRecordType ( const RecordDecl Decl) const
QualType clang::ASTContext::getRestrictType ( QualType  T) const [inline]

getRestrictType - Returns 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 630 of file ASTContext.h.

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

QualType ASTContext::getRValueReferenceType ( QualType  T) const
size_t ASTContext::getSideTableAllocatedMemory ( ) const

Return the total memory used for various side tables.

Definition at line 6762 of file ASTContext.cpp.

QualType clang::ASTContext::getsigjmp_bufType ( ) const [inline]

Retrieve the C sigjmp_buf type.

Definition at line 1018 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

QualType ASTContext::getSignatureParameterType ( QualType  T)

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

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

QualType ASTContext::getSignedWCharType ( ) const

getSignedWCharType - Return the type of "signed wchar_t". Used when in C++, as a GCC extension.

Definition at line 3088 of file ASTContext.cpp.

References WCharTy.

Referenced by ConvertDeclSpecToType().

CanQualType ASTContext::getSizeType ( ) const
SourceManager& clang::ASTContext::getSourceManager ( ) [inline]
const SourceManager& clang::ASTContext::getSourceManager ( ) const [inline]

Definition at line 380 of file ASTContext.h.

TemplateName ASTContext::getSubstTemplateTemplateParm ( TemplateTemplateParmDecl param,
TemplateName  replacement 
) const
TemplateName ASTContext::getSubstTemplateTemplateParmPack ( TemplateTemplateParmDecl Param,
const TemplateArgument ArgPack 
) const
QualType ASTContext::getSubstTemplateTypeParmPackType ( const TemplateTypeParmType Replaced,
const TemplateArgument ArgPack 
)
QualType ASTContext::getSubstTemplateTypeParmType ( const TemplateTypeParmType Replaced,
QualType  Replacement 
) const

Retrieve a substitution-result type.

Definition at line 2325 of file ASTContext.cpp.

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

QualType ASTContext::getTagDeclType ( const TagDecl Decl) const
unsigned clang::ASTContext::getTargetAddressSpace ( QualType  T) const [inline]
unsigned clang::ASTContext::getTargetAddressSpace ( Qualifiers  Q) const [inline]

Definition at line 1555 of file ASTContext.h.

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

unsigned clang::ASTContext::getTargetAddressSpace ( unsigned  AS) const [inline]

Definition at line 1559 of file ASTContext.h.

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

const TargetInfo& clang::ASTContext::getTargetInfo ( ) const [inline]
QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
const TemplateArgument Args,
unsigned  NumArgs,
QualType  Canon = QualType() 
) const
QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
const TemplateArgumentListInfo Args,
QualType  Canon = QualType() 
) const
TypeSourceInfo * ASTContext::getTemplateSpecializationTypeInfo ( TemplateName  T,
SourceLocation  TLoc,
const TemplateArgumentListInfo Args,
QualType  Canon = QualType() 
) const
QualType ASTContext::getTemplateTypeParmType ( unsigned  Depth,
unsigned  Index,
bool  ParameterPack,
TemplateTypeParmDecl ParmDecl = 0 
) 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 2385 of file ASTContext.cpp.

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

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

TranslationUnitDecl* clang::ASTContext::getTranslationUnitDecl ( ) const [inline]

Definition at line 538 of file ASTContext.h.

Referenced by clang::Sema::ActOnModuleImport(), clang::CallGraph::addTU(), clang::ASTImporter::ASTImporter(), clang::arcmt::trans::checkAPIUses(), 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(), clang::idx::DeclReferenceMap::DeclReferenceMap(), clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(), EvaluateBinaryTypeTrait(), clang::ASTMergeAction::ExecuteAction(), clang::idx::Program::FindEntities(), clang::Sema::GatherGlobalCodeCompletions(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::idx::EntityImpl::getDecl(), getInt128Decl(), getObjCClassDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCProtocolDecl(), getObjCSelDecl(), clang::Sema::getOrCreateStdNamespace(), getUInt128Decl(), clang::idx::Indexer::IndexAST(), clang::CompilerInstance::loadModule(), LookupVisibleDecls(), clang::arcmt::trans::makeAssignARCSafe(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), clang::arcmt::trans::rewriteAutoreleasePool(), clang::arcmt::trans::rewriteBlockObjCVariable(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::idx::SelectorMap::SelectorMap(), clang::Sema::SubstParmVarDecl(), traverseAST(), clang::arcmt::trans::GCAttrsTraverser::traverseTU(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), and clang::ASTNodeImporter::VisitTranslationUnitDecl().

TypeSourceInfo * ASTContext::getTrivialTypeSourceInfo ( QualType  T,
SourceLocation  Loc = SourceLocation() 
) const

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

Definition at line 1350 of file ASTContext.cpp.

References CreateTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), and clang::TypeLoc::initialize().

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnObjCBridgedCast(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::BuildClassMessageImplicit(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemInitializer(), BuildSingleCopyAssign(), clang::Sema::BuildStdInitializerList(), CastForMoving(), ConstructTransparentUnion(), clang::Sema::DeclareImplicitDestructor(), GetFullTypeForDeclarator(), getInt128Decl(), getObjCClassDecl(), getObjCIdDecl(), getObjCInstanceTypeDecl(), clang::Sema::getObjCMessageKind(), getObjCSelDecl(), clang::TemplateArgumentLoc::getPackExpansionPattern(), getTrivialTemplateArgumentLoc(), getUInt128Decl(), handleExtVectorTypeAttr(), handleModeAttr(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::Sema::ParseObjCEncodeExpression(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), RebuildDeclaratorInCurrentInstantiation(), translateTemplateArgument(), and clang::Sema::TryCaptureVar().

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

getTypeAlign - Return the ABI-specified alignment of a type, in bits. This method does not work on incomplete types.

Definition at line 1270 of file ASTContext.h.

References getTypeInfo().

Referenced by EmitVAArgFromMemory(), getPreferredTypeAlign(), getTypeAlignInChars(), getTypeInfo(), handlePackedAttr(), and handleTransparentUnionAttr().

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

Definition at line 1273 of file ASTContext.h.

References getTypeInfo().

CharUnits ASTContext::getTypeAlignInChars ( QualType  T) const
CharUnits ASTContext::getTypeAlignInChars ( const Type T) const

Definition at line 1143 of file ASTContext.cpp.

References getTypeAlign(), and toCharUnitsFromBits().

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

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

Definition at line 777 of file ASTContext.h.

Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnEnumBody(), clang::Sema::AddOverloadCandidate(), AddResultTypeChunk(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildMemInitializer(), CanDeclareSpecialMemberFunction(), CheckAddressOfOperand(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CodeCompleteObjCSuperMessage(), ConvertDeclSpecToType(), clang::CXXRecordDecl::Create(), clang::LambdaExpr::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::InitializationSequence::Diagnose(), DiagnoseBadAccess(), DumpCXXRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitNullConstantForBase(), FindBaseInitializer(), clang::Sema::FindInstantiatedDecl(), FindOverriddenMethod(), clang::FormatASTNodeDiagnosticArgument(), GenerateInjectedTemplateArgs(), clang::Sema::getAmbiguousPathsDisplayString(), clang::CXXRecordDecl::getCopyAssignmentOperator(), clang::CXXRecordDecl::getCopyConstructor(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), getDefaultedDefaultConstructorUnsafe(), clang::CXXRecordDecl::getDestructor(), getFILEType(), GetFullTypeForDeclarator(), getjmp_bufType(), getObjCClassType(), getObjCIdType(), getObjCInstanceType(), clang::Sema::getObjCMessageKind(), getObjCSelType(), getRequiredQualification(), getsigjmp_bufType(), getTagDeclType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getucontext_tType(), clang::ASTNodeImporter::ImportDefinition(), clang::Sema::InstantiateClass(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::IsStandardConversion(), clang::Expr::isTemporaryObject(), MatchesFriend(), MaybeAddImplicitObjectParameterType(), clang::InitializationSequence::Perform(), clang::Sema::PrintInstantiationStack(), clang::Sema::RequireCompleteDeclContext(), TryDiagnoseProtectedAccess(), clang::TryObjectArgumentInitialization(), TryStaticMemberPointerUpcast(), clang::CXXRecordDecl::viewInheritance(), and clang::ASTNodeImporter::VisitTypedefType().

QualType ASTContext::getTypedefType ( const TypedefNameDecl Decl,
QualType  Canonical = QualType() 
) const

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

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

Referenced by CheckExtVectorComponent().

std::pair< uint64_t, unsigned > ASTContext::getTypeInfo ( const Type T) const

getTypeInfo - Get the size and alignment of the specified complete type in bits.

getTypeSize - Return the size of the specified type, in bits. This method does not work on incomplete types.

FIXME: Pointers into different addr spaces could have different sizes and alignment requirements: getPointerInfo should take an AddrSpace, this should take a QualType, &c.

Definition at line 826 of file ASTContext.cpp.

References clang::TemplateSpecializationType::getAliasedType(), getASTObjCInterfaceLayout(), getASTRecordLayout(), clang::TargetInfo::getBoolAlign(), clang::TargetInfo::getBoolWidth(), getCanonicalType(), clang::TargetInfo::getChar16Align(), clang::TargetInfo::getChar16Width(), clang::TargetInfo::getChar32Align(), clang::TargetInfo::getChar32Width(), clang::TargetInfo::getCharAlign(), clang::TargetInfo::getCharWidth(), clang::TagType::getDecl(), clang::RecordType::getDecl(), clang::ObjCInterfaceType::getDecl(), clang::AutoType::getDeducedType(), clang::TargetInfo::getDoubleAlign(), clang::TargetInfo::getDoubleWidth(), clang::ArrayType::getElementType(), clang::VectorType::getElementType(), getElementType(), clang::TargetInfo::getFloatAlign(), clang::TargetInfo::getFloatWidth(), clang::TargetInfo::getHalfAlign(), clang::TargetInfo::getHalfWidth(), clang::TargetInfo::getIntAlign(), clang::TargetInfo::getIntWidth(), clang::TargetInfo::getLongAlign(), clang::TargetInfo::getLongDoubleAlign(), clang::TargetInfo::getLongDoubleWidth(), clang::TargetInfo::getLongLongAlign(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::Decl::getMaxAlignment(), clang::VectorType::getNumElements(), clang::TargetInfo::getPointerAlign(), getPointerDiffType(), clang::TargetInfo::getPointerWidth(), clang::TargetInfo::getShortAlign(), clang::TargetInfo::getShortWidth(), clang::ConstantArrayType::getSize(), getTargetAddressSpace(), getTypeAlign(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), clang::TargetInfo::getWCharAlign(), clang::TargetInfo::getWCharWidth(), clang::AutoType::isDeduced(), clang::Decl::isInvalidDecl(), clang::TemplateSpecializationType::isTypeAlias(), and toBits().

Referenced by clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), getTypeAlign(), getTypeInfo(), getTypeInfoInChars(), getTypeSize(), matchTypes(), and tryMatchRecordTypes().

std::pair<uint64_t, unsigned> clang::ASTContext::getTypeInfo ( QualType  T) const [inline]

Definition at line 1239 of file ASTContext.h.

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

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

Definition at line 815 of file ASTContext.cpp.

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

QualType ASTContext::getTypeOfExprType ( Expr tofExpr) const

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

QualType ASTContext::getTypeOfType ( QualType  tofType) const

getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType AST's. 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 effect the type checker, since it operates on canonical type's (which are always unique).

Definition at line 2906 of file ASTContext.cpp.

References getCanonicalType(), and clang::TypeAlignment.

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

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

Definition at line 596 of file ASTContext.h.

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

getTypeSize - Return the size of the specified type, in bits. This method does not work on incomplete types.

Definition at line 1245 of file ASTContext.h.

References getTypeInfo().

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::ento::SimpleConstraintManager::assumeSymRel(), BitsContainNoUserData(), clang::Sema::BuildArrayType(), BuildSingleCopyAssign(), canExpandIndirectArgument(), clang::Sema::CheckCompatibleReinterpretCast(), clang::CompareStandardConversionSequences(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::ento::BasicValueFactory::Convert(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), DiagnoseBadShiftValues(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitVAArgFromMemory(), FillInNullDataMemberPointers(), GetCFNumberSize(), getCharWidth(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), clang::ConstantArrayType::getMaxSizeBits(), clang::ento::BasicValueFactory::getMaxValue(), clang::ento::BasicValueFactory::getMinValue(), getNextLargerIntegralType(), clang::ConstantArrayType::getNumAddressingBits(), getPreferredTypeAlign(), getPromotedIntegerType(), clang::ento::BasicValueFactory::getTruthValue(), getTypeSizeInChars(), clang::ento::BasicValueFactory::getValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), HandleNeonVectorTypeAttr(), handleTransparentUnionAttr(), HandleVectorSizeAttr(), clang::Expr::IgnoreParenNoopCasts(), is32Or64BitBasicType(), isHomogeneousAggregate(), isIntegerLikeType(), isPromotableBitField(), isRecordWithSSEVectorType(), isSingleElementStruct(), clang::IsVectorConversion(), clang::InitializationSequence::Perform(), clang::ento::SubEngine::processSwitch(), RecoverCastedSymbol(), TryListConstructionSpecialCases(), TryReinterpretCast(), and clang::ento::ExprEngine::VisitOffsetOfExpr().

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

Definition at line 1248 of file ASTContext.h.

References getTypeInfo().

CharUnits ASTContext::getTypeSizeInChars ( QualType  T) const
CharUnits ASTContext::getTypeSizeInChars ( const Type T) const

Definition at line 1134 of file ASTContext.cpp.

References getTypeSize(), and toCharUnitsFromBits().

QualType clang::ASTContext::getucontext_tType ( ) const [inline]

Retrieve the C ucontext_t type.

Definition at line 1030 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

TypedefDecl * ASTContext::getUInt128Decl ( ) const

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

Definition at line 372 of file ASTContext.cpp.

References clang::TypedefDecl::Create(), clang::IdentifierTable::get(), getTranslationUnitDecl(), getTrivialTypeSourceInfo(), Idents, and UnsignedInt128Ty.

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

CanQualType ASTContext::getUIntMaxType ( ) const

getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5).

getUIntMaxType - Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.

Definition at line 3082 of file ASTContext.cpp.

References clang::TargetInfo::getUIntMaxType().

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

QualType ASTContext::getUnaryTransformType ( QualType  BaseType,
QualType  UnderlyingType,
UnaryTransformType::UTTKind  Kind 
) const

getUnaryTransformType - unary type transforms

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

Definition at line 2985 of file ASTContext.cpp.

References clang::TypeAlignment.

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

QualType ASTContext::getUnqualifiedArrayType ( QualType  T,
Qualifiers Quals 
)

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

References clang::Qualifiers::addConsistentQualifiers(), clang::Qualifiers::empty(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::DependentSizedArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitUnqualifiedType(), clang::Type::getUnqualifiedDesugaredType(), getVariableArrayType(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by CastsAwayConstness(), clang::CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), clang::CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::hasSimilarType(), haveSimilarTypes(), TryConstCast(), TryReferenceInitialization(), and TryReferenceListInitialization().

QualType ASTContext::getUnsignedWCharType ( ) const

getUnsignedWCharType - Return the type of "unsigned wchar_t". Used when in C++, as a GCC extension.

Definition at line 3095 of file ASTContext.cpp.

References UnsignedIntTy.

Referenced by ConvertDeclSpecToType().

QualType ASTContext::getVariableArrayDecayedType ( QualType  type) const
QualType ASTContext::getVariableArrayType ( QualType  EltTy,
Expr NumElts,
ArrayType::ArraySizeModifier  ASM,
unsigned  IndexTypeQuals,
SourceRange  Brackets 
) const
QualType ASTContext::getVectorType ( QualType  vecType,
unsigned  NumElts,
VectorType::VectorKind  VecKind 
) const

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

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

Referenced by DecodeTypeFromStr(), getCorrespondingUnsignedType(), HandleNeonVectorTypeAttr(), HandleVectorSizeAttr(), clang::Sema::SemaBuiltinShuffleVector(), and clang::ASTNodeImporter::VisitVectorType().

QualType clang::ASTContext::getVolatileType ( QualType  T) const [inline]

getVolatileType - Returns 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 637 of file ASTContext.h.

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

Referenced by clang::AddBuiltinAssignmentOperatorCandidates(), and DecodeTypeFromStr().

QualType clang::ASTContext::getWCharType ( ) const [inline]

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

References WCharTy.

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

bool ASTContext::hasSameTemplateName ( TemplateName  X,
TemplateName  Y 
)

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

Definition at line 3318 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]
bool clang::ASTContext::hasSameUnqualifiedType ( QualType  T1,
QualType  T2 
) const [inline]

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

Definition at line 1384 of file ASTContext.h.

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

Referenced by AddObjCKeyValueCompletions(), clang::Sema::AddOverloadCandidate(), AddSuperSendCompletion(), areCompatibleVectorTypes(), clang::Sema::BuildBaseInitializer(), clang::ento::StoreManager::CastRetrievedVal(), clang::Sema::CheckCompatibleReinterpretCast(), checkEnumComparison(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteConstructorInitializer(), clang::CompareDerivedToBaseConversions(), clang::CompareQualificationConversions(), diagnoseArithmeticOnTwoFunctionPointers(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), clang::Sema::EmitRelatedResultTypeNote(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), FindImplementableMethods(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CXXRecordDecl::getCopyAssignmentOperator(), getPreferredArgumentTypeForMessageSend(), getRangeOfTypeInNestedNameSpecifier(), hasSimilarParameters(), clang::hasSimilarType(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializationSequence::InitializationSequence(), IsAcceptableNonMemberOperatorCandidate(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::IsStandardConversion(), clang::Expr::isTemporaryObject(), clang::IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::IsVectorConversion(), clang::InitializationSequence::Perform(), clang::Sema::ProcessPropertyDecl(), clang::Sema::SemaBuiltinShuffleVector(), clang::TryImplicitConversion(), TryStaticMemberPointerUpcast(), and UnwrapSimilarPointerTypes().

void ASTContext::InitBuiltinTypes ( const TargetInfo Target)

Initialize built-in types.

This routine may only be invoked once for a given ASTContext object. It is normally invoked by the ASTContext constructor. However, the constructor can be asked to delay initialization, which places the burden of calling this function on the user of that object.

Parameters:
TargetThe target

Definition at line 392 of file ASTContext.cpp.

References ARCUnbridgedCastTy, BoolTy, BoundMemberTy, Char16Ty, Char32Ty, CharTy, createCXXABI(), DependentTy, DoubleComplexTy, DoubleTy, FloatComplexTy, FloatTy, getAddressSpaceMap(), getComplexType(), getPointerType(), HalfTy, Int128Ty, IntTy, clang::CanQual< T >::isNull(), clang::TargetInfo::isTypeSigned(), LongDoubleComplexTy, LongDoubleTy, LongLongTy, LongTy, NullPtrTy, ObjCBuiltinClassTy, ObjCBuiltinIdTy, ObjCBuiltinSelTy, OverloadTy, PseudoObjectTy, ShortTy, SignedCharTy, UnknownAnyTy, UnsignedCharTy, UnsignedInt128Ty, UnsignedIntTy, UnsignedLongLongTy, UnsignedLongTy, UnsignedShortTy, VoidPtrTy, VoidTy, and WCharTy.

Referenced by ASTContext().

bool ASTContext::isNearlyEmpty ( const CXXRecordDecl RD) const

Definition at line 6744 of file ASTContext.cpp.

bool clang::ASTContext::isObjCClassType ( QualType  T) const [inline]

Definition at line 1586 of file ASTContext.h.

References getObjCClassType().

bool clang::ASTContext::isObjCIdType ( QualType  T) const [inline]

Definition at line 1583 of file ASTContext.h.

References getObjCIdType().

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

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

Definition at line 1224 of file ASTContext.h.

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

bool clang::ASTContext::isObjCSelType ( QualType  T) const [inline]

Definition at line 1589 of file ASTContext.h.

References getObjCSelType().

QualType ASTContext::isPromotableBitField ( Expr E) const

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

References clang::Expr::getBitField(), clang::FieldDecl::getBitWidthValue(), clang::ValueDecl::getType(), getTypeSize(), IntTy, clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UnsignedIntTy.

bool clang::ASTContext::isSameCallConv ( CallingConv  lcc,
CallingConv  rcc 
) [inline]

Determines whether two calling conventions name the same calling convention.

Definition at line 1431 of file ASTContext.h.

References getCanonicalCallConv().

Referenced by mergeFunctionTypes().

bool ASTContext::isSentinelNullExpr ( const Expr E)
import_iterator clang::ASTContext::local_import_begin ( ) const [inline]

Definition at line 533 of file ASTContext.h.

import_iterator clang::ASTContext::local_import_end ( ) const [inline]

Definition at line 536 of file ASTContext.h.

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

MakeIntValue - Make an APSInt of the appropriate width and signedness for the given

  • Value and integer
  • Type.

Definition at line 1665 of file ASTContext.h.

References getIntWidth().

QualType ASTContext::mergeFunctionArgumentTypes ( QualType  lhs,
QualType  rhs,
bool  OfBlockPointer = false,
bool  Unqualified = false 
)

mergeFunctionArgumentTypes - merge two types which appear as function argument types

Definition at line 5687 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::mergeObjCGCQualifiers ( QualType  LHS,
QualType  RHS 
)
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 5666 of file ASTContext.cpp.

References clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::QualType::isNull(), and mergeTypes().

Referenced by mergeFunctionArgumentTypes().

QualType ASTContext::mergeTypes ( QualType  LHS,
QualType  RHS,
bool  OfBlockPointer = false,
bool  Unqualified = false,
bool  BlockReturnType = false 
)
bool ASTContext::NonBitfieldFollowsBitfield ( const FieldDecl FD,
const FieldDecl LastFD 
) const

NonBitfieldFollowsBitfield - return 'true" if 'FD' is not a bitfield which follows the bitfield 'LastFD'.

Definition at line 639 of file ASTContext.cpp.

References clang::FieldDecl::getBitWidthValue(), and clang::FieldDecl::isBitField().

bool ASTContext::ObjCQualifiedClassTypesAreCompatible ( QualType  lhs,
QualType  rhs 
)

ObjCQualifiedClassTypesAreCompatible - compare Class<p,...> and Class<p1, ...>.

Definition at line 5244 of file ASTContext.cpp.

References ProtocolCompatibleWithProtocol(), clang::ObjCObjectPointerType::qual_begin(), and clang::ObjCObjectPointerType::qual_end().

Referenced by canAssignObjCInterfaces().

bool ASTContext::ObjCQualifiedIdTypesAreCompatible ( QualType  lhs,
QualType  rhs,
bool  compare 
)
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin ( const CXXMethodDecl Method) const

Definition at line 652 of file ASTContext.cpp.

Referenced by clang::CXXMethodDecl::begin_overridden_methods().

ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end ( const CXXMethodDecl Method) const

Definition at line 662 of file ASTContext.cpp.

Referenced by clang::CXXMethodDecl::end_overridden_methods().

unsigned ASTContext::overridden_methods_size ( const CXXMethodDecl Method) const

Definition at line 672 of file ASTContext.cpp.

Referenced by clang::CXXMethodDecl::size_overridden_methods().

void ASTContext::PrintStats ( ) const
bool ASTContext::propertyTypesAreCompatible ( QualType  LHS,
QualType  RHS 
)

Definition at line 5655 of file ASTContext.cpp.

References typesAreCompatible().

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

bool ASTContext::ProtocolCompatibleWithProtocol ( ObjCProtocolDecl lProto,
ObjCProtocolDecl rProto 
) const
bool ASTContext::QualifiedIdConformsQualifiedId ( QualType  lhs,
QualType  rhs 
)

QualifiedIdConformsQualifiedId - compare id<p,...> with id<p1,...> return true if lhs's protocols conform to rhs's protocol; false otherwise.

Definition at line 5236 of file ASTContext.cpp.

References ObjCQualifiedIdTypesAreCompatible().

void clang::ASTContext::ResetObjCLayout ( const ObjCContainerDecl CD) [inline]

Definition at line 1630 of file ASTContext.h.

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

void clang::ASTContext::setASTMutationListener ( ASTMutationListener Listener) [inline]

Attach an AST mutation listener to the AST context.

The AST mutation listener provides the ability to track modifications to the abstract syntax tree entities committed after they were initially created.

Definition at line 587 of file ASTContext.h.

References Listener.

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

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

Set the copy inialization expression of a block var decl.

Definition at line 1321 of file ASTContext.cpp.

References clang::Decl::hasAttr().

void ASTContext::setBuiltinVaListType ( QualType  T)

Definition at line 4904 of file ASTContext.cpp.

References clang::QualType::isNull().

void ASTContext::setCFConstantStringType ( QualType  T)

Definition at line 3847 of file ASTContext.cpp.

References clang::RecordType::getDecl().

void ASTContext::setClassScopeSpecializationPattern ( FunctionDecl FD,
FunctionDecl Pattern 
)
void clang::ASTContext::setcudaConfigureCallDecl ( FunctionDecl FD) [inline]

Definition at line 683 of file ASTContext.h.

void ASTContext::setExternalSource ( OwningPtr< 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 295 of file ASTContext.cpp.

References ExternalSource.

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

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

Set the type for the C FILE type.

Definition at line 991 of file ASTContext.h.

void ASTContext::setInstantiatedFromStaticDataMember ( VarDecl Inst,
VarDecl Tmpl,
TemplateSpecializationKind  TSK,
SourceLocation  PointOfInstantiation = SourceLocation() 
)

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

Definition at line 534 of file ASTContext.cpp.

References clang::VarDecl::isStaticDataMember().

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

void ASTContext::setInstantiatedFromUnnamedFieldDecl ( FieldDecl Inst,
FieldDecl Tmpl 
)
void ASTContext::setInstantiatedFromUsingDecl ( UsingDecl Inst,
NamedDecl Pattern 
)

Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template.

Definition at line 574 of file ASTContext.cpp.

Referenced by clang::TemplateDeclInstantiator::VisitUsingDecl().

void ASTContext::setInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst,
UsingShadowDecl Pattern 
)

Definition at line 594 of file ASTContext.cpp.

Referenced by clang::TemplateDeclInstantiator::VisitUsingDecl().

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

Set the type for the C jmp_buf type.

Definition at line 1001 of file ASTContext.h.

void clang::ASTContext::setObjCClassRedefinitionType ( QualType  RedefType) [inline]

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

Definition at line 962 of file ASTContext.h.

void ASTContext::setObjCConstantStringInterface ( ObjCInterfaceDecl Decl)

Definition at line 4963 of file ASTContext.cpp.

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

void clang::ASTContext::setObjCIdRedefinitionType ( QualType  RedefType) [inline]

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

Definition at line 949 of file ASTContext.h.

void ASTContext::setObjCImplementation ( ObjCInterfaceDecl IFaceD,
ObjCImplementationDecl ImplD 
)
void ASTContext::setObjCImplementation ( ObjCCategoryDecl CatD,
ObjCCategoryImplDecl ImplD 
)

Set the implementation of ObjCCategoryDecl.

Definition at line 1292 of file ASTContext.cpp.

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

Definition at line 1702 of file ASTContext.h.

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

void clang::ASTContext::setObjCSelRedefinitionType ( QualType  RedefType) [inline]

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

Definition at line 976 of file ASTContext.h.

void clang::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.

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

Set the type for the C sigjmp_buf type.

Definition at line 1013 of file ASTContext.h.

void clang::ASTContext::setucontext_tDecl ( TypeDecl ucontext_tDecl) [inline]

Set the type for the C ucontext_t type.

Definition at line 1025 of file ASTContext.h.

int64_t ASTContext::toBits ( CharUnits  CharSize) const
CharUnits ASTContext::toCharUnitsFromBits ( int64_t  BitSize) const
type_iterator clang::ASTContext::types_begin ( ) [inline]

Definition at line 1654 of file ASTContext.h.

const_type_iterator clang::ASTContext::types_begin ( ) const [inline]

Definition at line 1656 of file ASTContext.h.

type_iterator clang::ASTContext::types_end ( ) [inline]

Definition at line 1655 of file ASTContext.h.

const_type_iterator clang::ASTContext::types_end ( ) const [inline]

Definition at line 1657 of file ASTContext.h.

bool ASTContext::typesAreBlockPointerCompatible ( QualType  LHS,
QualType  RHS 
)

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

References clang::frontend::CPlusPlus, getLangOptions(), hasSameType(), clang::QualType::isNull(), and mergeTypes().

Referenced by AreTypesCompatible(), checkConditionalPointerCompatibility(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Sema::CompareMethodParamsInBaseAndSuper(), EvaluateBinaryTypeTrait(), clang::IsStandardConversion(), IsStringInit(), and propertyTypesAreCompatible().

bool ASTContext::UnwrapSimilarPointerTypes ( QualType T1,
QualType T2 
)

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

References clang::MemberPointerType::getClass(), getLangOptions(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), and hasSameUnqualifiedType().

Referenced by clang::CompareQualificationConversions(), clang::hasSimilarType(), haveSimilarTypes(), and TryConstCast().

bool ASTContext::ZeroBitfieldFollowsBitfield ( const FieldDecl FD,
const FieldDecl LastFD 
) const

ZeroBitfieldFollowsBitfield - return 'true" if 'FD' is a zero-length bitfield which follows the bitfield 'LastFD'.

Definition at line 625 of file ASTContext.cpp.

References clang::FieldDecl::getBitWidthValue(), and clang::FieldDecl::isBitField().

bool ASTContext::ZeroBitfieldFollowsNonBitfield ( const FieldDecl FD,
const FieldDecl LastFD 
) const

ZeroBitfieldFollowsNonBitfield - return 'true" if 'FD' is a zero-length bitfield which follows the non-bitfield 'LastFD'.

Definition at line 619 of file ASTContext.cpp.

References clang::FieldDecl::getBitWidthValue(), and clang::FieldDecl::isBitField().

Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), and clang::FieldDecl::getFieldIndex().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Definition at line 358 of file ASTContext.h.

friend class ASTReader [friend]

Definition at line 359 of file ASTContext.h.

friend class ASTWriter [friend]

Definition at line 360 of file ASTContext.h.

friend class DeclarationNameTable [friend]

Definition at line 1872 of file ASTContext.h.

friend class DeclContext [friend]

Definition at line 1871 of file ASTContext.h.

friend class NestedNameSpecifier [friend]

Definition at line 139 of file ASTContext.h.


Member Data Documentation

Definition at line 556 of file ASTContext.h.

Referenced by InitBuiltinTypes().

Definition at line 560 of file ASTContext.h.

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

Definition at line 561 of file ASTContext.h.

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

Definition at line 553 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

Definition at line 370 of file ASTContext.h.

Referenced by getExternalSource(), PrintStats(), and setExternalSource().

Definition at line 553 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

Definition at line 552 of file ASTContext.h.

Referenced by ConvertDeclSpecToType(), and InitBuiltinTypes().

Definition at line 366 of file ASTContext.h.

Referenced by AddObjCKeyValueCompletions(), BuildByRefType(), BuildImplicitMemberInitializer(), BuildSingleCopyAssign(), clang::CodeGen::CGCXXABI::BuildThisParam(), clang::Sema::CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), clang::Sema::CodeCompleteObjCPassingType(), clang::Sema::CodeCompleteObjCSuperMessage(), clang::ObjCMethodDecl::createImplicitParams(), clang::Sema::CreatePropertyDecl(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringType(), clang::idx::EntityImpl::getDecl(), getDefaultSynthIvarName(), getInt128Decl(), clang::arcmt::trans::getNilString(), GetNullarySelector(), clang::GetNullarySelector(), getObjCClassDecl(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCIdDecl(), getObjCInstanceTypeDecl(), getObjCProtocolDecl(), getObjCSelDecl(), clang::Sema::getPrintingPolicy(), clang::idx::GlobalSelector::getSelector(), getUInt128Decl(), clang::GetUnarySelector(), handleIBOutletCollection(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), isMacroDefined(), isNSStringType(), KnownName(), LookupBuiltin(), MaybeAddSentinel(), shouldRunOnFunctionOrMethod(), transferARCOwnershipToDeclaratorChunk(), and clang::ento::ExprEngine::VisitObjCMessage().

Definition at line 548 of file ASTContext.h.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExceptionDeclarator(), clang::ento::ProgramState::assumeInBound(), BuildByRefType(), ConvertDeclSpecToType(), clang::AttributePool::createIntegerAttribute(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::ento::SValBuilder::evalEQ(), 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::SubEngine::getInitialState(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getLogicalOperationType(), getNeonEltType(), getNextLargerIntegralType(), getObjCEncodingTypeSize(), getPromotedIntegerType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), handleModeAttr(), InitBuiltinTypes(), initializeForBlockHeader(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isPromotableBitField(), clang::analyze_format_string::ArgTypeResult::matchesType(), clang::TemplateDeclInstantiator::VisitEnumDecl(), and clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl().

Definition at line 371 of file ASTContext.h.

Referenced by getASTMutationListener(), and setASTMutationListener().

Definition at line 553 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

Definition at line 554 of file ASTContext.h.

Referenced by InitBuiltinTypes().

The number of implicitly-declared copy assignment operators.

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

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

The number of implicitly-declared copy constructors.

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

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

The number of implicitly-declared default constructors.

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

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

The number of implicitly-declared destructors.

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

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

The number of implicitly-declared move assignment operators.

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

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

The number of implicitly-declared move constructors.

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

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

Definition at line 557 of file ASTContext.h.

Referenced by ConvertDeclSpecToType(), getObjCClassDecl(), and InitBuiltinTypes().

Definition at line 557 of file ASTContext.h.

Referenced by getObjCSelDecl(), and InitBuiltinTypes().

Definition at line 542 of file ASTContext.h.

Referenced by clang::Sema::ActOnFinishDelayedMemberInitializers(), clang::Sema::AdjustDestructorExceptionSpec(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitlyDefaultedCopyAssignment(), clang::Sema::CheckExplicitlyDefaultedCopyConstructor(), clang::Sema::CheckExplicitlyDefaultedDefaultConstructor(), clang::Sema::CheckExplicitlyDefaultedDestructor(), clang::Sema::CheckExplicitlyDefaultedMoveAssignment(), clang::Sema::CheckExplicitlyDefaultedMoveConstructor(), CheckOperatorDeleteDeclaration(), ConvertDeclSpecToType(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), DecodeTypeFromStr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructGetterCall(), emitStructSetterCall(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GetDeclSpecTypeForDeclarator(), clang::CodeGen::CodeGenTypes::getFunctionInfo(), InitBuiltinTypes(), and clang::Sema::ProcessPropertyDecl().


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