clang  3.9.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
clang::ASTContext Class Reference

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More...

#include <ASTContext.h>

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

Classes

class  DynTypedNodeList
 Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode. More...
 
class  RawCommentAndCacheFlags
 
struct  SectionInfo
 

Public Types

enum  GetBuiltinTypeError { GE_None, GE_Missing_stdio, GE_Missing_setjmp, GE_Missing_ucontext }
 
enum  InlineVariableDefinitionKind { InlineVariableDefinitionKind::None, InlineVariableDefinitionKind::Weak, InlineVariableDefinitionKind::WeakUnknown, InlineVariableDefinitionKind::Strong }
 
enum  PragmaSectionFlag : unsigned {
  PSF_None = 0, PSF_Read = 0x1, PSF_Write = 0x2, PSF_Execute = 0x4,
  PSF_Implicit = 0x8, PSF_Invalid = 0x80000000U
}
 
typedef llvm::PointerUnion
< VarTemplateDecl
*, MemberSpecializationInfo * > 
TemplateOrSpecializationInfo
 A type synonym for the TemplateOrInstantiation mapping. More...
 
typedef llvm::SmallVector
< ast_type_traits::DynTypedNode, 2 > 
ParentVector
 Contains parents of a node. More...
 
typedef llvm::DenseMap< const
void *, llvm::PointerUnion4
< const Decl *, const Stmt
*, ast_type_traits::DynTypedNode
*, ParentVector * > > 
ParentMapPointers
 Maps from a node to its parents. More...
 
typedef llvm::DenseMap
< ast_type_traits::DynTypedNode,
llvm::PointerUnion4< const
Decl *, const Stmt
*, ast_type_traits::DynTypedNode
*, ParentVector * > > 
ParentMapOtherNodes
 Parent map for nodes without pointer identity. More...
 
typedef
CXXMethodVector::const_iterator 
overridden_cxx_method_iterator
 
typedef llvm::iterator_range
< overridden_cxx_method_iterator
overridden_method_range
 
typedef llvm::iterator_range
< import_iterator > 
import_range
 

Public Member Functions

template<typename NodeT >
DynTypedNodeList getParents (const NodeT &Node)
 Returns the parents of the given node. More...
 
DynTypedNodeList getParents (const ast_type_traits::DynTypedNode &Node)
 
const clang::PrintingPolicygetPrintingPolicy () const
 
void setPrintingPolicy (const clang::PrintingPolicy &Policy)
 
SourceManagergetSourceManager ()
 
const SourceManagergetSourceManager () const
 
llvm::BumpPtrAllocator & getAllocator () const
 
void * Allocate (size_t Size, unsigned Align=8) const
 
template<typename T >
T * Allocate (size_t Num=1) const
 
void Deallocate (void *Ptr) const
 
size_t getASTAllocatedMemory () const
 Return the total amount of physical memory allocated for representing AST nodes and type information. More...
 
size_t getSideTableAllocatedMemory () const
 Return the total memory used for various side tables. More...
 
PartialDiagnostic::StorageAllocatorgetDiagAllocator ()
 
const TargetInfogetTargetInfo () const
 
const TargetInfogetAuxTargetInfo () const
 
QualType getIntTypeForBitwidth (unsigned DestWidth, unsigned Signed) const
 getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth, signed/unsigned. More...
 
QualType getRealTypeForBitwidth (unsigned DestWidth) const
 getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth. More...
 
bool AtomicUsesUnsupportedLibcall (const AtomicExpr *E) const
 
const LangOptionsgetLangOpts () const
 
const SanitizerBlacklistgetSanitizerBlacklist () const
 
DiagnosticsEnginegetDiagnostics () const
 
FullSourceLoc getFullLoc (SourceLocation Loc) const
 
RawCommentgetRawCommentForDeclNoCache (const Decl *D) const
 Return the documentation comment attached to a given declaration, without looking into cache. More...
 
RawCommentListgetRawCommentList ()
 
void addComment (const RawComment &RC)
 
const RawCommentgetRawCommentForAnyRedecl (const Decl *D, const Decl **OriginalDecl=nullptr) const
 Return the documentation comment attached to a given declaration. More...
 
comments::FullCommentgetCommentForDecl (const Decl *D, const Preprocessor *PP) const
 Return parsed documentation comment attached to a given declaration. More...
 
comments::FullCommentgetLocalCommentForDeclUncached (const Decl *D) const
 Return parsed documentation comment attached to a given declaration. More...
 
comments::FullCommentcloneFullComment (comments::FullComment *FC, const Decl *D) const
 
comments::CommandTraitsgetCommentCommandTraits () const
 
AttrVecgetDeclAttrs (const Decl *D)
 Retrieve the attributes for the given declaration. More...
 
void eraseDeclAttrs (const Decl *D)
 Erase the attributes corresponding to the given declaration. More...
 
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. More...
 
TemplateOrSpecializationInfo getTemplateOrSpecializationInfo (const VarDecl *Var)
 
FunctionDeclgetClassScopeSpecializationPattern (const FunctionDecl *FD)
 
void setClassScopeSpecializationPattern (FunctionDecl *FD, FunctionDecl *Pattern)
 
void setInstantiatedFromStaticDataMember (VarDecl *Inst, VarDecl *Tmpl, TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
 Note that the static data member Inst is an instantiation of the static data member template Tmpl of a class template. More...
 
void setTemplateOrSpecializationInfo (VarDecl *Inst, TemplateOrSpecializationInfo TSI)
 
NamedDeclgetInstantiatedFromUsingDecl (UsingDecl *Inst)
 If the given using decl Inst is an instantiation of a (possibly unresolved) using decl from a template instantiation, return it. More...
 
void setInstantiatedFromUsingDecl (UsingDecl *Inst, NamedDecl *Pattern)
 Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template. More...
 
void setInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst, UsingShadowDecl *Pattern)
 
UsingShadowDeclgetInstantiatedFromUsingShadowDecl (UsingShadowDecl *Inst)
 
FieldDeclgetInstantiatedFromUnnamedFieldDecl (FieldDecl *Field)
 
void setInstantiatedFromUnnamedFieldDecl (FieldDecl *Inst, FieldDecl *Tmpl)
 
overridden_cxx_method_iterator overridden_methods_begin (const CXXMethodDecl *Method) const
 
overridden_cxx_method_iterator overridden_methods_end (const CXXMethodDecl *Method) const
 
unsigned overridden_methods_size (const CXXMethodDecl *Method) const
 
overridden_method_range overridden_methods (const CXXMethodDecl *Method) const
 
void addOverriddenMethod (const CXXMethodDecl *Method, const CXXMethodDecl *Overridden)
 Note that the given C++ Method overrides the given Overridden method. More...
 
void getOverriddenMethods (const NamedDecl *Method, SmallVectorImpl< const NamedDecl * > &Overridden) const
 Return C++ or ObjC overridden methods for the given Method. More...
 
void addedLocalImportDecl (ImportDecl *Import)
 Notify the AST context that a new import declaration has been parsed or implicitly created within this translation unit. More...
 
import_range local_imports () const
 
DeclgetPrimaryMergedDecl (Decl *D)
 
void setPrimaryMergedDecl (Decl *D, Decl *Primary)
 
void mergeDefinitionIntoModule (NamedDecl *ND, Module *M, bool NotifyListeners=true)
 Note that the definition ND has been merged into module M, and should be visible whenever M is visible. More...
 
void deduplicateMergedDefinitonsFor (NamedDecl *ND)
 Clean up the merged definition list. More...
 
ArrayRef< Module * > getModulesWithMergedDefinition (NamedDecl *Def)
 Get the additional modules in which the definition Def has been merged. More...
 
TranslationUnitDeclgetTranslationUnitDecl () const
 
ExternCContextDeclgetExternCContextDecl () const
 
BuiltinTemplateDeclgetMakeIntegerSeqDecl () const
 
BuiltinTemplateDeclgetTypePackElementDecl () const
 
 ASTContext (LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins)
 
 ~ASTContext ()
 
void setExternalSource (IntrusiveRefCntPtr< ExternalASTSource > Source)
 Attach an external AST source to the AST context. More...
 
ExternalASTSourcegetExternalSource () const
 Retrieve a pointer to the external AST source associated with this AST context, if any. More...
 
void setASTMutationListener (ASTMutationListener *Listener)
 Attach an AST mutation listener to the AST context. More...
 
ASTMutationListenergetASTMutationListener () const
 Retrieve a pointer to the AST mutation listener associated with this AST context, if any. More...
 
void PrintStats () const
 
const SmallVectorImpl< Type * > & getTypes () const
 
BuiltinTemplateDeclbuildBuiltinTemplateDecl (BuiltinTemplateKind BTK, const IdentifierInfo *II) const
 
RecordDeclbuildImplicitRecord (StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const
 Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration. More...
 
TypedefDeclbuildImplicitTypedef (QualType T, StringRef Name) const
 Create a new implicit TU-level typedef declaration. More...
 
TypedefDeclgetInt128Decl () const
 Retrieve the declaration for the 128-bit signed integer type. More...
 
TypedefDeclgetUInt128Decl () const
 Retrieve the declaration for the 128-bit unsigned integer type. More...
 
QualType getAddrSpaceQualType (QualType T, unsigned AddressSpace) const
 Return the uniqued reference to the type for an address space qualified type with the specified type and address space. More...
 
QualType getObjCGCQualType (QualType T, Qualifiers::GC gcAttr) const
 Return the uniqued reference to the type for an Objective-C gc-qualified type. More...
 
QualType getRestrictType (QualType T) const
 Return the uniqued reference to the type for a restrict qualified type. More...
 
QualType getVolatileType (QualType T) const
 Return the uniqued reference to the type for a volatile qualified type. More...
 
QualType getConstType (QualType T) const
 Return the uniqued reference to the type for a const qualified type. More...
 
const FunctionTypeadjustFunctionType (const FunctionType *Fn, FunctionType::ExtInfo EInfo)
 Change the ExtInfo on a function type. More...
 
CanQualType getCanonicalFunctionResultType (QualType ResultType) const
 Adjust the given function result type. More...
 
void adjustDeducedFunctionResultType (FunctionDecl *FD, QualType ResultType)
 Change the result type of a function type once it is deduced. More...
 
void adjustExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI, bool AsWritten=false)
 Change the exception specification on a function once it is delay-parsed, instantiated, or computed. More...
 
QualType getComplexType (QualType T) const
 Return the uniqued reference to the type for a complex number with the specified element type. More...
 
CanQualType getComplexType (CanQualType T) const
 
QualType getPointerType (QualType T) const
 Return the uniqued reference to the type for a pointer to the specified type. More...
 
CanQualType getPointerType (CanQualType T) const
 
QualType getAdjustedType (QualType Orig, QualType New) const
 Return the uniqued reference to a type adjusted from the original type to a new type. More...
 
CanQualType getAdjustedType (CanQualType Orig, CanQualType New) const
 
QualType getDecayedType (QualType T) const
 Return the uniqued reference to the decayed version of the given type. More...
 
CanQualType getDecayedType (CanQualType T) const
 
QualType getAtomicType (QualType T) const
 Return the uniqued reference to the atomic type for the specified type. More...
 
QualType getBlockPointerType (QualType T) const
 Return the uniqued reference to the type for a block of the specified type. More...
 
QualType getBlockDescriptorType () const
 Gets the struct used to keep track of the descriptor for pointer to blocks. More...
 
QualType getPipeType (QualType T) const
 Return pipe type for the specified type. More...
 
QualType getBlockDescriptorExtendedType () const
 Gets the struct used to keep track of the extended descriptor for pointer to blocks. More...
 
void setcudaConfigureCallDecl (FunctionDecl *FD)
 
FunctionDeclgetcudaConfigureCallDecl ()
 
bool BlockRequiresCopying (QualType Ty, const VarDecl *D)
 Returns true iff we need copy/dispose helpers for the given type. More...
 
bool getByrefLifetime (QualType Ty, Qualifiers::ObjCLifetime &Lifetime, bool &HasByrefExtendedLayout) const
 Returns true, if given type has a known lifetime. More...
 
QualType getLValueReferenceType (QualType T, bool SpelledAsLValue=true) const
 Return the uniqued reference to the type for an lvalue reference to the specified type. More...
 
QualType getRValueReferenceType (QualType T) const
 Return the uniqued reference to the type for an rvalue reference to the specified type. More...
 
QualType getMemberPointerType (QualType T, const Type *Cls) const
 Return the uniqued reference to the type for a member pointer to the specified type in the specified class. More...
 
QualType getVariableArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a variable array of the specified element type. More...
 
QualType getDependentSizedArrayType (QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
 Return a non-unique reference to the type for a dependently-sized array of the specified element type. More...
 
QualType getIncompleteArrayType (QualType EltTy, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return a unique reference to the type for an incomplete array of the specified element type. More...
 
QualType getConstantArrayType (QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals) const
 Return the unique reference to the type for a constant array of the specified element type. More...
 
QualType getVariableArrayDecayedType (QualType Ty) const
 Returns a vla type where known sizes are replaced with [*]. More...
 
QualType getVectorType (QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const
 Return the unique reference to a vector type of the specified element type and size. More...
 
QualType getExtVectorType (QualType VectorType, unsigned NumElts) const
 Return the unique reference to an extended vector type of the specified element type and size. More...
 
QualType getDependentSizedExtVectorType (QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc) const
 
QualType getFunctionNoProtoType (QualType ResultTy, const FunctionType::ExtInfo &Info) const
 Return a K&R style C function type like 'int()'. More...
 
QualType getFunctionNoProtoType (QualType ResultTy) const
 
QualType getFunctionType (QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
 Return a normal function type with a typed argument list. More...
 
QualType getTypeDeclType (const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
 Return the unique reference to the type for the specified type declaration. More...
 
QualType getTypedefType (const TypedefNameDecl *Decl, QualType Canon=QualType()) const
 Return the unique reference to the type for the specified typedef-name decl. More...
 
QualType getRecordType (const RecordDecl *Decl) const
 
QualType getEnumType (const EnumDecl *Decl) const
 
QualType getInjectedClassNameType (CXXRecordDecl *Decl, QualType TST) const
 getInjectedClassNameType - Return the unique reference to the injected class name type for the specified templated declaration. More...
 
QualType getAttributedType (AttributedType::Kind attrKind, QualType modifiedType, QualType equivalentType)
 
QualType getSubstTemplateTypeParmType (const TemplateTypeParmType *Replaced, QualType Replacement) const
 Retrieve a substitution-result type. More...
 
QualType getSubstTemplateTypeParmPackType (const TemplateTypeParmType *Replaced, const TemplateArgument &ArgPack)
 Retrieve a. More...
 
QualType getTemplateTypeParmType (unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *ParmDecl=nullptr) const
 Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name. More...
 
QualType getTemplateSpecializationType (TemplateName T, ArrayRef< TemplateArgument > Args, QualType Canon=QualType()) const
 
QualType getCanonicalTemplateSpecializationType (TemplateName T, ArrayRef< TemplateArgument > Args) const
 
QualType getTemplateSpecializationType (TemplateName T, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const
 
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, ArrayRef< TemplateArgument > Args) const
 
QualType getPackExpansionType (QualType Pattern, Optional< unsigned > NumExpansions)
 
QualType getObjCInterfaceType (const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const
 getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl. More...
 
QualType getObjCObjectType (QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const
 Legacy interface: cannot provide type arguments or __kindof. More...
 
QualType getObjCObjectType (QualType Base, ArrayRef< QualType > typeArgs, ArrayRef< ObjCProtocolDecl * > protocols, bool isKindOf) const
 
bool ObjCObjectAdoptsQTypeProtocols (QualType QT, ObjCInterfaceDecl *Decl)
 ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in QT's qualified-id protocol list. More...
 
bool QIdProtocolsAdoptObjCObjectProtocols (QualType QT, ObjCInterfaceDecl *IDecl)
 QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in QT's qualified-id protocol list adopt all protocols in IDecl's list of protocols. More...
 
QualType getObjCObjectPointerType (QualType OIT) const
 Return a ObjCObjectPointerType type for the given ObjCObjectType. More...
 
QualType getTypeOfExprType (Expr *e) const
 GCC extension. More...
 
QualType getTypeOfType (QualType t) const
 getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes. More...
 
QualType getDecltypeType (Expr *e, QualType UnderlyingType) const
 C++11 decltype. More...
 
QualType getUnaryTransformType (QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
 Unary type transforms. More...
 
QualType getAutoType (QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent) const
 C++11 deduced auto type. More...
 
QualType getAutoDeductType () const
 C++11 deduction pattern for 'auto' type. More...
 
QualType getAutoRRefDeductType () const
 C++11 deduction pattern for 'auto &&' type. More...
 
QualType getTagDeclType (const TagDecl *Decl) const
 Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl. More...
 
CanQualType getSizeType () const
 Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>. More...
 
CanQualType getIntMaxType () const
 Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>. More...
 
CanQualType getUIntMaxType () const
 Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>. More...
 
QualType getWCharType () const
 Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension). More...
 
QualType getWideCharType () const
 Return the type of wide characters. More...
 
QualType getSignedWCharType () const
 Return the type of "signed wchar_t". More...
 
QualType getUnsignedWCharType () const
 Return the type of "unsigned wchar_t". More...
 
QualType getWIntType () const
 In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target. More...
 
QualType getIntPtrType () const
 Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target. More...
 
QualType getUIntPtrType () const
 Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target. More...
 
QualType getPointerDiffType () const
 Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>. More...
 
QualType getProcessIDType () const
 Return the unique type for "pid_t" defined in <sys/types.h>. More...
 
QualType getCFConstantStringType () const
 Return the C structure type used to represent constant CFStrings. More...
 
QualType getObjCSuperType () const
 Returns the C struct type for objc_super. More...
 
void setObjCSuperType (QualType ST)
 
QualType getRawCFConstantStringType () const
 Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built. More...
 
void setCFConstantStringType (QualType T)
 
TypedefDeclgetCFConstantStringDecl () const
 
RecordDeclgetCFConstantStringTagDecl () const
 
void setObjCConstantStringInterface (ObjCInterfaceDecl *Decl)
 
QualType getObjCConstantStringInterface () const
 
QualType getObjCNSStringType () const
 
void setObjCNSStringType (QualType T)
 
QualType getObjCIdRedefinitionType () const
 Retrieve the type that id has been defined to, which may be different from the built-in id if id has been typedef'd. More...
 
void setObjCIdRedefinitionType (QualType RedefType)
 Set the user-written type that redefines id. More...
 
QualType getObjCClassRedefinitionType () const
 Retrieve the type that Class has been defined to, which may be different from the built-in Class if Class has been typedef'd. More...
 
void setObjCClassRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'. More...
 
QualType getObjCSelRedefinitionType () const
 Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if 'SEL' has been typedef'd. More...
 
void setObjCSelRedefinitionType (QualType RedefType)
 Set the user-written type that redefines 'SEL'. More...
 
IdentifierInfogetNSObjectName ()
 Retrieve the identifier 'NSObject'. More...
 
IdentifierInfogetNSCopyingName ()
 Retrieve the identifier 'NSCopying'. More...
 
IdentifierInfogetBoolName () const
 Retrieve the identifier 'bool'. More...
 
IdentifierInfogetMakeIntegerSeqName () const
 
IdentifierInfogetTypePackElementName () const
 
QualType getObjCInstanceType ()
 Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;. More...
 
TypedefDeclgetObjCInstanceTypeDecl ()
 Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type. More...
 
void setFILEDecl (TypeDecl *FILEDecl)
 Set the type for the C FILE type. More...
 
QualType getFILEType () const
 Retrieve the C FILE type. More...
 
void setjmp_bufDecl (TypeDecl *jmp_bufDecl)
 Set the type for the C jmp_buf type. More...
 
QualType getjmp_bufType () const
 Retrieve the C jmp_buf type. More...
 
void setsigjmp_bufDecl (TypeDecl *sigjmp_bufDecl)
 Set the type for the C sigjmp_buf type. More...
 
QualType getsigjmp_bufType () const
 Retrieve the C sigjmp_buf type. More...
 
void setucontext_tDecl (TypeDecl *ucontext_tDecl)
 Set the type for the C ucontext_t type. More...
 
QualType getucontext_tType () const
 Retrieve the C ucontext_t type. More...
 
QualType getLogicalOperationType () const
 The result type of logical operations, '<', '>', '!=', etc. More...
 
void getObjCEncodingForType (QualType T, std::string &S, const FieldDecl *Field=nullptr, QualType *NotEncodedT=nullptr) const
 Emit the Objective-CC type encoding for the given type T into S. More...
 
void getObjCEncodingForPropertyType (QualType T, std::string &S) const
 Emit the Objective-C property type encoding for the given type T into S. More...
 
void getLegacyIntegralTypeEncoding (QualType &t) const
 getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l' or 'L' , but not always. More...
 
void getObjCEncodingForTypeQualifier (Decl::ObjCDeclQualifier QT, std::string &S) const
 Put the string version of the type qualifiers QT into S. More...
 
bool getObjCEncodingForFunctionDecl (const FunctionDecl *Decl, std::string &S)
 Emit the encoded type for the function Decl into S. More...
 
bool getObjCEncodingForMethodDecl (const ObjCMethodDecl *Decl, std::string &S, bool Extended=false) const
 Emit the encoded type for the method declaration Decl into S. More...
 
std::string getObjCEncodingForBlock (const BlockExpr *blockExpr) const
 Return the encoded type for this block declaration. More...
 
void getObjCEncodingForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container, std::string &S) const
 getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration. More...
 
bool ProtocolCompatibleWithProtocol (ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
 ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'. More...
 
ObjCPropertyImplDeclgetObjCPropertyImplDeclForPropertyDecl (const ObjCPropertyDecl *PD, const Decl *Container) const
 
CharUnits getObjCEncodingTypeSize (QualType T) const
 Return the size of type T for Objective-C encoding purpose, in characters. More...
 
TypedefDeclgetObjCIdDecl () const
 Retrieve the typedef corresponding to the predefined id type in Objective-C. More...
 
QualType getObjCIdType () const
 Represents the Objective-CC id type. More...
 
TypedefDeclgetObjCSelDecl () const
 Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C. More...
 
QualType getObjCSelType () const
 Retrieve the type that corresponds to the predefined Objective-C 'SEL' type. More...
 
TypedefDeclgetObjCClassDecl () const
 Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type. More...
 
QualType getObjCClassType () const
 Represents the Objective-C Class type. More...
 
ObjCInterfaceDeclgetObjCProtocolDecl () const
 Retrieve the Objective-C class declaration corresponding to the predefined Protocol class. More...
 
TypedefDeclgetBOOLDecl () const
 Retrieve declaration of 'BOOL' typedef. More...
 
void setBOOLDecl (TypedefDecl *TD)
 Save declaration of 'BOOL' typedef. More...
 
QualType getBOOLType () const
 type of 'BOOL' type. More...
 
QualType getObjCProtoType () const
 Retrieve the type of the Objective-C Protocol class. More...
 
TypedefDeclgetBuiltinVaListDecl () const
 Retrieve the C type declaration corresponding to the predefined __builtin_va_list type. More...
 
QualType getBuiltinVaListType () const
 Retrieve the type of the __builtin_va_list type. More...
 
DeclgetVaListTagDecl () const
 Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets. More...
 
TypedefDeclgetBuiltinMSVaListDecl () const
 Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type. More...
 
QualType getBuiltinMSVaListType () const
 Retrieve the type of the __builtin_ms_va_list type. More...
 
QualType getCVRQualifiedType (QualType T, unsigned CVR) const
 Return a type with additional const, volatile, or restrict qualifiers. More...
 
QualType getQualifiedType (SplitQualType split) const
 Un-split a SplitQualType. More...
 
QualType getQualifiedType (QualType T, Qualifiers Qs) const
 Return a type with additional qualifiers. More...
 
QualType getQualifiedType (const Type *T, Qualifiers Qs) const
 Return a type with additional qualifiers. More...
 
QualType getLifetimeQualifiedType (QualType type, Qualifiers::ObjCLifetime lifetime)
 Return a type with the given lifetime qualifier. More...
 
QualType getUnqualifiedObjCPointerType (QualType type) const
 getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed. More...
 
DeclarationNameInfo getNameForTemplate (TemplateName Name, SourceLocation NameLoc) const
 
TemplateName getOverloadedTemplateName (UnresolvedSetIterator Begin, UnresolvedSetIterator End) const
 Retrieve the template name that corresponds to a non-empty lookup. More...
 
TemplateName getQualifiedTemplateName (NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *Template) const
 Retrieve the template name that represents a qualified template name such as std::vector. More...
 
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, const IdentifierInfo *Name) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template apply. More...
 
TemplateName getDependentTemplateName (NestedNameSpecifier *NNS, OverloadedOperatorKind Operator) const
 Retrieve the template name that represents a dependent template name such as MetaFun::template operator+. More...
 
TemplateName getSubstTemplateTemplateParm (TemplateTemplateParmDecl *param, TemplateName replacement) const
 
TemplateName getSubstTemplateTemplateParmPack (TemplateTemplateParmDecl *Param, const TemplateArgument &ArgPack) const
 
QualType GetBuiltinType (unsigned ID, GetBuiltinTypeError &Error, unsigned *IntegerConstantArgs=nullptr) const
 Return the type for the specified builtin. More...
 
Qualifiers::GC getObjCGCAttrKind (QualType Ty) const
 Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes. More...
 
bool areCompatibleVectorTypes (QualType FirstVec, QualType SecondVec)
 Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type. More...
 
const llvm::fltSemantics & getFloatTypeSemantics (QualType T) const
 Return the APFloat 'semantics' for the specified scalar floating point type. More...
 
TypeInfo getTypeInfo (const Type *T) const
 Get the size and alignment of the specified complete type in bits. More...
 
TypeInfo getTypeInfo (QualType T) const
 
unsigned getOpenMPDefaultSimdAlign (QualType T) const
 Get default simd alignment of the specified complete type in bits. More...
 
uint64_t getTypeSize (QualType T) const
 Return the size of the specified (complete) type T, in bits. More...
 
uint64_t getTypeSize (const Type *T) const
 
uint64_t getCharWidth () const
 Return the size of the character type, in bits. More...
 
CharUnits toCharUnitsFromBits (int64_t BitSize) const
 Convert a size in bits to a size in characters. More...
 
int64_t toBits (CharUnits CharSize) const
 Convert a size in characters to a size in bits. More...
 
CharUnits getTypeSizeInChars (QualType T) const
 Return the size of the specified (complete) type T, in characters. More...
 
CharUnits getTypeSizeInChars (const Type *T) const
 
unsigned getTypeAlign (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in bits. More...
 
unsigned getTypeAlign (const Type *T) const
 
CharUnits getTypeAlignInChars (QualType T) const
 Return the ABI-specified alignment of a (complete) type T, in characters. More...
 
CharUnits getTypeAlignInChars (const Type *T) const
 
std::pair< CharUnits, CharUnitsgetTypeInfoDataSizeInChars (QualType T) const
 
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (const Type *T) const
 
std::pair< CharUnits, CharUnitsgetTypeInfoInChars (QualType T) const
 
bool isAlignmentRequired (const Type *T) const
 Determine if the alignment the type has was required using an alignment attribute. More...
 
bool isAlignmentRequired (QualType T) const
 
unsigned getPreferredTypeAlign (const Type *T) const
 Return the "preferred" alignment of the specified type T for the current target, in bits. More...
 
unsigned getTargetDefaultAlignForAttributeAligned (void) const
 Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified. More...
 
unsigned getAlignOfGlobalVar (QualType T) const
 Return the alignment in bits that should be given to a global variable with type T. More...
 
CharUnits getAlignOfGlobalVarInChars (QualType T) const
 Return the alignment in characters that should be given to a global variable with type T. More...
 
CharUnits getDeclAlign (const Decl *D, bool ForAlignof=false) const
 Return a conservative estimate of the alignment of the specified decl D. More...
 
const ASTRecordLayoutgetASTRecordLayout (const RecordDecl *D) const
 Get or compute information about the layout of the specified record (struct/union/class) D, which indicates its size and field position information. More...
 
const ASTRecordLayoutgetASTObjCInterfaceLayout (const ObjCInterfaceDecl *D) const
 Get or compute information about the layout of the specified Objective-C interface. More...
 
void DumpRecordLayout (const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const
 
const ASTRecordLayoutgetASTObjCImplementationLayout (const ObjCImplementationDecl *D) const
 Get or compute information about the layout of the specified Objective-C implementation. More...
 
const CXXMethodDeclgetCurrentKeyFunction (const CXXRecordDecl *RD)
 Get our current best idea for the key function of the given record decl, or NULL if there isn't one. More...
 
void setNonKeyFunction (const CXXMethodDecl *method)
 Observe that the given method cannot be a key function. More...
 
CharUnits getOffsetOfBaseWithVBPtr (const CXXRecordDecl *RD) const
 Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero. More...
 
uint64_t getFieldOffset (const ValueDecl *FD) const
 Get the offset of a FieldDecl or IndirectFieldDecl, in bits. More...
 
bool isNearlyEmpty (const CXXRecordDecl *RD) const
 
VTableContextBasegetVTableContext ()
 
MangleContextcreateMangleContext ()
 
void DeepCollectObjCIvars (const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl< const ObjCIvarDecl * > &Ivars) const
 DeepCollectObjCIvars - This routine first collects all declared, but not synthesized, ivars in super class and then collects all ivars, including those synthesized for current class. More...
 
unsigned CountNonClassIvars (const ObjCInterfaceDecl *OI) const
 
void CollectInheritedProtocols (const Decl *CDecl, llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &Protocols)
 CollectInheritedProtocols - Collect all protocols in current class and those inherited by it. More...
 
CanQualType getCanonicalType (QualType T) const
 Return the canonical (structural) type corresponding to the specified potentially non-canonical type T. More...
 
const TypegetCanonicalType (const Type *T) const
 
CanQualType getCanonicalParamType (QualType T) const
 Return the canonical parameter type corresponding to the specific potentially non-canonical one. More...
 
bool hasSameType (QualType T1, QualType T2) const
 Determine whether the given types T1 and T2 are equivalent. More...
 
bool hasSameType (const Type *T1, const Type *T2) const
 
QualType getUnqualifiedArrayType (QualType T, Qualifiers &Quals)
 Return this type as a completely-unqualified array type, capturing the qualifiers in Quals. More...
 
bool hasSameUnqualifiedType (QualType T1, QualType T2) const
 Determine whether the given types are equivalent after cvr-qualifiers have been removed. More...
 
bool hasSameNullabilityTypeQualifier (QualType SubT, QualType SuperT, bool IsParam) const
 
bool ObjCMethodsAreEqual (const ObjCMethodDecl *MethodDecl, const ObjCMethodDecl *MethodImp)
 
bool UnwrapSimilarPointerTypes (QualType &T1, QualType &T2)
 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. More...
 
NestedNameSpecifiergetCanonicalNestedNameSpecifier (NestedNameSpecifier *NNS) const
 Retrieves the "canonical" nested name specifier for a given nested name specifier. More...
 
CallingConv getDefaultCallingConvention (bool isVariadic, bool IsCXXMethod) const
 Retrieves the default calling convention for the current target. More...
 
TemplateName getCanonicalTemplateName (TemplateName Name) const
 Retrieves the "canonical" template name that refers to a given template. More...
 
bool hasSameTemplateName (TemplateName X, TemplateName Y)
 Determine whether the given template names refer to the same template. More...
 
TemplateArgument getCanonicalTemplateArgument (const TemplateArgument &Arg) const
 Retrieve the "canonical" template argument. More...
 
const ArrayTypegetAsArrayType (QualType T) const
 Type Query functions. More...
 
const ConstantArrayTypegetAsConstantArrayType (QualType T) const
 
const VariableArrayTypegetAsVariableArrayType (QualType T) const
 
const IncompleteArrayTypegetAsIncompleteArrayType (QualType T) const
 
const DependentSizedArrayTypegetAsDependentSizedArrayType (QualType T) const
 
QualType getBaseElementType (const ArrayType *VAT) const
 Return the innermost element type of an array type. More...
 
QualType getBaseElementType (QualType QT) const
 Return the innermost element type of a type (which needn't actually be an array type). More...
 
uint64_t getConstantArrayElementCount (const ConstantArrayType *CA) const
 Return number of constant array elements. More...
 
QualType getAdjustedParameterType (QualType T) const
 Perform adjustment on the parameter type of a function. More...
 
QualType getSignatureParameterType (QualType T) const
 Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and function types and removing top-level cv-qualifiers. More...
 
QualType getExceptionObjectType (QualType T) const
 
QualType getArrayDecayedType (QualType T) const
 Return the properly qualified result of decaying the specified array type to a pointer. More...
 
QualType getPromotedIntegerType (QualType PromotableType) const
 Return the type that PromotableType will promote to: C99 6.3.1.1p2, assuming that PromotableType is a promotable integer type. More...
 
Qualifiers::ObjCLifetime getInnerObjCOwnership (QualType T) const
 Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownership. More...
 
QualType isPromotableBitField (Expr *E) const
 Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensions). More...
 
int getIntegerTypeOrder (QualType LHS, QualType RHS) const
 Return the highest ranked integer type, see C99 6.3.1.8p1. More...
 
int getFloatingTypeOrder (QualType LHS, QualType RHS) const
 Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e. More...
 
QualType getFloatingTypeOfSizeWithinDomain (QualType typeSize, QualType typeDomain) const
 Return a real floating point or a complex type (based on typeDomain/typeSize). More...
 
unsigned getTargetAddressSpace (QualType T) const
 
unsigned getTargetAddressSpace (Qualifiers Q) const
 
unsigned getTargetAddressSpace (unsigned AS) const
 
bool addressSpaceMapManglingFor (unsigned AS) const
 
bool typesAreCompatible (QualType T1, QualType T2, bool CompareUnqualified=false)
 Compatibility predicates used to check assignment expressions. More...
 
bool propertyTypesAreCompatible (QualType, QualType)
 
bool typesAreBlockPointerCompatible (QualType, QualType)
 
bool isObjCIdType (QualType T) const
 
bool isObjCClassType (QualType T) const
 
bool isObjCSelType (QualType T) const
 
bool ObjCQualifiedIdTypesAreCompatible (QualType LHS, QualType RHS, bool ForCompare)
 ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType. More...
 
bool ObjCQualifiedClassTypesAreCompatible (QualType LHS, QualType RHS)
 ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>. More...
 
bool canAssignObjCInterfaces (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
 canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from RHS to LHS. More...
 
bool canAssignObjCInterfaces (const ObjCObjectType *LHS, const ObjCObjectType *RHS)
 
bool canAssignObjCInterfacesInBlockPointer (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, bool BlockReturnType)
 canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safety for objective-c pointers used to pass/return arguments in block literals. More...
 
bool areComparableObjCPointerTypes (QualType LHS, QualType RHS)
 
QualType areCommonBaseCompatible (const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
 
bool canBindObjCObjectType (QualType To, QualType From)
 
QualType mergeTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false, bool BlockReturnType=false)
 
QualType mergeFunctionTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
 
QualType mergeFunctionParameterTypes (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
 mergeFunctionParameterTypes - merge two types which appear as function parameter types More...
 
QualType mergeTransparentUnionType (QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
 mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with SubType, return the merged type, else return QualType() More...
 
QualType mergeObjCGCQualifiers (QualType, QualType)
 mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and returns the merged version; including for function return types. More...
 
bool doFunctionTypesMatchOnExtParameterInfos (const FunctionProtoType *FromFunctionType, const FunctionProtoType *ToFunctionType)
 
void ResetObjCLayout (const ObjCContainerDecl *CD)
 
unsigned getIntWidth (QualType T) const
 
QualType getCorrespondingUnsignedType (QualType T) const
 
llvm::APSInt MakeIntValue (uint64_t Value, QualType Type) const
 Make an APSInt of the appropriate width and signedness for the given Value and integer Type. More...
 
bool isSentinelNullExpr (const Expr *E)
 
ObjCImplementationDeclgetObjCImplementation (ObjCInterfaceDecl *D)
 Get the implementation of the ObjCInterfaceDecl D, or NULL if none exists. More...
 
ObjCCategoryImplDeclgetObjCImplementation (ObjCCategoryDecl *D)
 Get the implementation of the ObjCCategoryDecl D, or NULL if none exists. More...
 
bool AnyObjCImplementation ()
 Return true if there is at least one @implementation in the TU. More...
 
void setObjCImplementation (ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD)
 Set the implementation of ObjCInterfaceDecl. More...
 
void setObjCImplementation (ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD)
 Set the implementation of ObjCCategoryDecl. More...
 
const ObjCMethodDeclgetObjCMethodRedeclaration (const ObjCMethodDecl *MD) const
 Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists. More...
 
void setObjCMethodRedeclaration (const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
 
const ObjCInterfaceDeclgetObjContainingInterface (const NamedDecl *ND) const
 Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc. More...
 
void setBlockVarCopyInits (VarDecl *VD, Expr *Init)
 Set the copy inialization expression of a block var decl. More...
 
ExprgetBlockVarCopyInits (const VarDecl *VD)
 Get the copy initialization expression of the VarDecl VD, or NULL if none exists. More...
 
TypeSourceInfoCreateTypeSourceInfo (QualType T, unsigned Size=0) const
 Allocate an uninitialized TypeSourceInfo. More...
 
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. More...
 
void AddDeallocation (void(*Callback)(void *), void *Data)
 Add a deallocation callback that will be invoked when the ASTContext is destroyed. More...
 
GVALinkage GetGVALinkageForFunction (const FunctionDecl *FD) const
 
GVALinkage GetGVALinkageForVariable (const VarDecl *VD)
 
bool DeclMustBeEmitted (const Decl *D)
 Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is only relevant for function or file scoped var definitions. More...
 
const CXXConstructorDeclgetCopyConstructorForExceptionObject (CXXRecordDecl *RD)
 
void addCopyConstructorForExceptionObject (CXXRecordDecl *RD, CXXConstructorDecl *CD)
 
void addDefaultArgExprForConstructor (const CXXConstructorDecl *CD, unsigned ParmIdx, Expr *DAE)
 
ExprgetDefaultArgExprForConstructor (const CXXConstructorDecl *CD, unsigned ParmIdx)
 
void addTypedefNameForUnnamedTagDecl (TagDecl *TD, TypedefNameDecl *TND)
 
TypedefNameDeclgetTypedefNameForUnnamedTagDecl (const TagDecl *TD)
 
void addDeclaratorForUnnamedTagDecl (TagDecl *TD, DeclaratorDecl *DD)
 
DeclaratorDeclgetDeclaratorForUnnamedTagDecl (const TagDecl *TD)
 
void setManglingNumber (const NamedDecl *ND, unsigned Number)
 
unsigned getManglingNumber (const NamedDecl *ND) const
 
void setStaticLocalNumber (const VarDecl *VD, unsigned Number)
 
unsigned getStaticLocalNumber (const VarDecl *VD) const
 
MangleNumberingContextgetManglingNumberContext (const DeclContext *DC)
 Retrieve the context for computing mangling numbers in the given DeclContext. More...
 
MangleNumberingContextcreateMangleNumberingContext () const
 
void setParameterIndex (const ParmVarDecl *D, unsigned index)
 Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the normal bitfield. More...
 
unsigned getParameterIndex (const ParmVarDecl *D) const
 Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of the normal bitfield. More...
 
APValuegetMaterializedTemporaryValue (const MaterializeTemporaryExpr *E, bool MayCreate)
 Get the storage for the constant value of a materialized temporary of static storage duration. More...
 
void InitBuiltinTypes (const TargetInfo &Target, const TargetInfo *AuxTarget=nullptr)
 Initialize built-in types. More...
 
void getObjCEncodingForMethodParameter (Decl::ObjCDeclQualifier QT, QualType T, std::string &S, bool Extended) const
 getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return type. More...
 
bool isMSStaticDataMemberInlineDefinition (const VarDecl *VD) const
 Returns true if this is an inline-initialized static data member which is treated as a definition for MSVC compatibility. More...
 
InlineVariableDefinitionKind getInlineVariableDefinitionKind (const VarDecl *VD) const
 Determine whether a definition of this inline variable should be treated as a weak or strong definition. More...
 

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

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

Friends

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

Detailed Description

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file.

Definition at line 92 of file ASTContext.h.

Member Typedef Documentation

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

Definition at line 856 of file ASTContext.h.

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

Definition at line 820 of file ASTContext.h.

Definition at line 829 of file ASTContext.h.

typedef llvm::DenseMap< ast_type_traits::DynTypedNode, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > clang::ASTContext::ParentMapOtherNodes

Parent map for nodes without pointer identity.

We store a full DynTypedNode for all keys.

Definition at line 483 of file ASTContext.h.

typedef llvm::DenseMap<const void *, llvm::PointerUnion4<const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector *> > clang::ASTContext::ParentMapPointers

Maps from a node to its parents.

This is used for nodes that have pointer identity only, which are more common and we can save space by only storing a unique pointer to them.

Definition at line 475 of file ASTContext.h.

Contains parents of a node.

Definition at line 467 of file ASTContext.h.

A type synonym for the TemplateOrInstantiation mapping.

Definition at line 318 of file ASTContext.h.

Member Enumeration Documentation

Enumerator
GE_None 

No error.

GE_Missing_stdio 

Missing a type from <stdio.h>

GE_Missing_setjmp 

Missing a type from <setjmp.h>

GE_Missing_ucontext 

Missing a type from <ucontext.h>

Definition at line 1756 of file ASTContext.h.

Enumerator
None 

Not an inline variable.

Weak 

Weak definition of inline variable.

WeakUnknown 

Weak for now, might become strong later in this TU.

Strong 

Strong definition.

Definition at line 2532 of file ASTContext.h.

Enumerator
PSF_None 
PSF_Read 
PSF_Write 
PSF_Execute 
PSF_Implicit 
PSF_Invalid 

Definition at line 2579 of file ASTContext.h.

Constructor & Destructor Documentation

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

Definition at line 729 of file ASTContext.cpp.

References clang::TranslationUnitDecl::Create().

ASTContext::~ASTContext ( )

Definition at line 755 of file ASTContext.cpp.

References E, and I.

Member Function Documentation

void clang::ASTContext::addComment ( const RawComment RC)
inline
void ASTContext::addCopyConstructorForExceptionObject ( CXXRecordDecl RD,
CXXConstructorDecl CD 
)
void ASTContext::AddDeallocation ( void(*)(void *)  Callback,
void *  Data 
)

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

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

Definition at line 812 of file ASTContext.cpp.

References Callback.

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

void ASTContext::addDeclaratorForUnnamedTagDecl ( TagDecl TD,
DeclaratorDecl DD 
)

Definition at line 8833 of file ASTContext.cpp.

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

void ASTContext::addDefaultArgExprForConstructor ( const CXXConstructorDecl CD,
unsigned  ParmIdx,
Expr DAE 
)
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 1321 of file ASTContext.cpp.

void ASTContext::addOverriddenMethod ( const CXXMethodDecl Method,
const CXXMethodDecl Overridden 
)

Note that the given C++ Method overrides the given Overridden method.

Definition at line 1295 of file ASTContext.cpp.

bool clang::ASTContext::addressSpaceMapManglingFor ( unsigned  AS) const
inline

Definition at line 2215 of file ASTContext.h.

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

void ASTContext::addTypedefNameForUnnamedTagDecl ( TagDecl TD,
TypedefNameDecl TND 
)

Definition at line 8823 of file ASTContext.cpp.

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

void ASTContext::adjustDeducedFunctionResultType ( FunctionDecl FD,
QualType  ResultType 
)
void ASTContext::adjustExceptionSpec ( FunctionDecl FD,
const FunctionProtoType::ExceptionSpecInfo ESI,
bool  AsWritten = false 
)
const FunctionType * ASTContext::adjustFunctionType ( const FunctionType Fn,
FunctionType::ExtInfo  EInfo 
)
void* clang::ASTContext::Allocate ( size_t  Size,
unsigned  Align = 8 
) const
inline

Definition at line 568 of file ASTContext.h.

Referenced by Allocate(), clang::DeclGroup::Create(), clang::TemplateParameterList::Create(), clang::CXXTryStmt::Create(), clang::ObjCArrayLiteral::Create(), clang::ObjCAtTryStmt::Create(), clang::CXXStaticCastExpr::Create(), clang::OMPParallelDirective::Create(), clang::ObjCDictionaryLiteral::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::DependentFunctionTemplateSpecializationInfo::Create(), clang::ASTTemplateArgumentListInfo::Create(), clang::ObjCTypeParamList::create(), clang::OMPSimdDirective::Create(), clang::AttributedStmt::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::DeclRefExpr::Create(), clang::OMPSectionsDirective::Create(), clang::OMPSectionDirective::Create(), clang::OMPSingleDirective::Create(), clang::OMPMasterDirective::Create(), clang::OMPPrivateClause::Create(), clang::OMPCriticalDirective::Create(), clang::OMPParallelForDirective::Create(), clang::OMPFirstprivateClause::Create(), clang::CXXFunctionalCastExpr::Create(), clang::OMPParallelForSimdDirective::Create(), clang::OMPParallelSectionsDirective::Create(), clang::StringLiteral::Create(), clang::OMPLastprivateClause::Create(), clang::OMPTaskDirective::Create(), clang::LambdaExpr::Create(), clang::OMPTaskyieldDirective::Create(), clang::OMPSharedClause::Create(), clang::OMPBarrierDirective::Create(), clang::OMPTaskwaitDirective::Create(), clang::OMPTaskgroupDirective::Create(), clang::OMPFlushDirective::Create(), clang::OMPReductionClause::Create(), clang::OMPOrderedDirective::Create(), clang::OffsetOfExpr::Create(), clang::OMPAtomicDirective::Create(), clang::CXXCtorInitializer::Create(), clang::OMPTargetDirective::Create(), clang::CapturedStmt::Create(), clang::OMPTargetDataDirective::Create(), OMPAlignedClause::Create(), clang::OMPTargetEnterDataDirective::Create(), clang::OMPTargetExitDataDirective::Create(), clang::OMPTargetParallelDirective::Create(), clang::TypeTraitExpr::Create(), OMPCopyinClause::Create(), clang::OMPTargetParallelForDirective::Create(), clang::MemberExpr::Create(), clang::OMPTeamsDirective::Create(), OMPCopyprivateClause::Create(), clang::OMPCancellationPointDirective::Create(), clang::OMPCancelDirective::Create(), OMPFlushClause::Create(), clang::OMPTaskLoopDirective::Create(), OMPDependClause::Create(), clang::OMPTaskLoopSimdDirective::Create(), clang::UnresolvedLookupExpr::Create(), clang::OMPDistributeDirective::Create(), clang::ImplicitCastExpr::Create(), clang::OMPTargetUpdateDirective::Create(), clang::DependentScopeDeclRefExpr::Create(), clang::CStyleCastExpr::Create(), clang::OMPDistributeParallelForDirective::Create(), clang::OMPDistributeParallelForSimdDirective::Create(), clang::ExprWithCleanups::Create(), clang::OMPDistributeSimdDirective::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::OMPTargetParallelForSimdDirective::Create(), clang::CXXDependentScopeMemberExpr::Create(), OMPMapClause::Create(), clang::UnresolvedMemberExpr::Create(), clang::SizeOfPackExpr::Create(), clang::FunctionParmPackExpr::Create(), OMPToClause::Create(), clang::DesignatedInitExpr::Create(), OMPFromClause::Create(), OMPUseDevicePtrClause::Create(), OMPIsDevicePtrClause::Create(), clang::PseudoObjectExpr::Create(), clang::TemplateArgumentList::CreateCopy(), clang::LambdaExpr::CreateDeserialized(), clang::CapturedStmt::CreateDeserialized(), clang::TypeTraitExpr::CreateDeserialized(), clang::SizeOfPackExpr::CreateDeserialized(), clang::ObjCArrayLiteral::CreateEmpty(), clang::ObjCAtTryStmt::CreateEmpty(), clang::CXXStaticCastExpr::CreateEmpty(), clang::OMPParallelDirective::CreateEmpty(), clang::ObjCDictionaryLiteral::CreateEmpty(), clang::CXXDynamicCastExpr::CreateEmpty(), clang::CXXReinterpretCastExpr::CreateEmpty(), clang::OMPSimdDirective::CreateEmpty(), clang::AttributedStmt::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::DeclRefExpr::CreateEmpty(), clang::OMPSectionsDirective::CreateEmpty(), clang::OMPSectionDirective::CreateEmpty(), clang::OMPSingleDirective::CreateEmpty(), clang::OMPMasterDirective::CreateEmpty(), clang::OMPPrivateClause::CreateEmpty(), clang::OMPCriticalDirective::CreateEmpty(), clang::OMPFirstprivateClause::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), clang::CXXFunctionalCastExpr::CreateEmpty(), clang::OMPParallelForSimdDirective::CreateEmpty(), clang::OMPParallelSectionsDirective::CreateEmpty(), clang::StringLiteral::CreateEmpty(), clang::OMPLastprivateClause::CreateEmpty(), clang::OMPTaskDirective::CreateEmpty(), clang::OMPTaskyieldDirective::CreateEmpty(), clang::OMPSharedClause::CreateEmpty(), clang::OMPBarrierDirective::CreateEmpty(), clang::OMPTaskwaitDirective::CreateEmpty(), clang::OMPTaskgroupDirective::CreateEmpty(), clang::OMPFlushDirective::CreateEmpty(), clang::OMPReductionClause::CreateEmpty(), clang::OMPOrderedDirective::CreateEmpty(), clang::OffsetOfExpr::CreateEmpty(), clang::OMPAtomicDirective::CreateEmpty(), clang::OMPTargetDirective::CreateEmpty(), clang::OMPTargetDataDirective::CreateEmpty(), OMPAlignedClause::CreateEmpty(), clang::OMPTargetEnterDataDirective::CreateEmpty(), clang::OMPTargetExitDataDirective::CreateEmpty(), clang::OMPTargetParallelDirective::CreateEmpty(), OMPCopyinClause::CreateEmpty(), clang::OMPTargetParallelForDirective::CreateEmpty(), clang::OMPTeamsDirective::CreateEmpty(), OMPCopyprivateClause::CreateEmpty(), clang::OMPCancellationPointDirective::CreateEmpty(), clang::OMPCancelDirective::CreateEmpty(), OMPFlushClause::CreateEmpty(), clang::OMPTaskLoopDirective::CreateEmpty(), OMPDependClause::CreateEmpty(), clang::OMPTaskLoopSimdDirective::CreateEmpty(), clang::UnresolvedLookupExpr::CreateEmpty(), clang::OMPDistributeDirective::CreateEmpty(), clang::ImplicitCastExpr::CreateEmpty(), clang::OMPTargetUpdateDirective::CreateEmpty(), clang::DependentScopeDeclRefExpr::CreateEmpty(), clang::CStyleCastExpr::CreateEmpty(), clang::OMPDistributeParallelForDirective::CreateEmpty(), clang::OMPDistributeParallelForSimdDirective::CreateEmpty(), clang::OMPDistributeSimdDirective::CreateEmpty(), clang::CXXUnresolvedConstructExpr::CreateEmpty(), clang::OMPTargetParallelForSimdDirective::CreateEmpty(), clang::CXXDependentScopeMemberExpr::CreateEmpty(), OMPMapClause::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), clang::FunctionParmPackExpr::CreateEmpty(), OMPToClause::CreateEmpty(), clang::DesignatedInitExpr::CreateEmpty(), OMPFromClause::CreateEmpty(), OMPUseDevicePtrClause::CreateEmpty(), OMPIsDevicePtrClause::CreateEmpty(), getCanonicalTemplateSpecializationType(), getDeclAttrs(), getDependentTemplateSpecializationType(), clang::ASTReader::GetExternalCXXBaseSpecifiers(), getFunctionType(), getObjCInterfaceType(), getObjCObjectPointerType(), getObjCObjectType(), getOverloadedTemplateName(), getTemplateSpecializationType(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::OverloadExpr::initializeResults(), clang::OverloadExpr::OverloadExpr(), clang::Sema::SaveNestedNameSpecifierAnnotation(), and clang::TemplateArgument::TemplateArgument().

template<typename T >
T* clang::ASTContext::Allocate ( size_t  Num = 1) const
inline

Definition at line 571 of file ASTContext.h.

References Allocate().

bool clang::ASTContext::AnyObjCImplementation ( )
inline

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

Definition at line 2326 of file ASTContext.h.

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

QualType ASTContext::areCommonBaseCompatible ( const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT 
)
bool ASTContext::areComparableObjCPointerTypes ( QualType  LHS,
QualType  RHS 
)

Definition at line 7365 of file ASTContext.cpp.

References canAssignObjCInterfaces(), and clang::Type::getAs().

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

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

Return true if the given vector types are of the same unqualified type or if they are equivalent to the same GCC vector type.

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

Definition at line 6759 of file ASTContext.cpp.

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

Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckVectorOperands(), clang::Sema::IsPointerConversion(), and IsVectorConversion().

bool ASTContext::AtomicUsesUnsupportedLibcall ( const AtomicExpr E) const
bool ASTContext::BlockRequiresCopying ( QualType  Ty,
const VarDecl D 
)
BuiltinTemplateDecl * ASTContext::buildBuiltinTemplateDecl ( BuiltinTemplateKind  BTK,
const IdentifierInfo II 
) const
RecordDecl * ASTContext::buildImplicitRecord ( StringRef  Name,
RecordDecl::TagKind  TK = TTK_Struct 
) const
TypedefDecl * ASTContext::buildImplicitTypedef ( QualType  T,
StringRef  Name 
) 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 6993 of file ASTContext.cpp.

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

Referenced by mergeTypes().

bool ASTContext::canBindObjCObjectType ( QualType  To,
QualType  From 
)
comments::FullComment * ASTContext::cloneFullComment ( comments::FullComment FC,
const Decl D 
) const
void ASTContext::CollectInheritedProtocols ( const Decl CDecl,
llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &  Protocols 
)

CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.

Definition at line 1971 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::getSuperClass().

Referenced by clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), canAssignObjCInterfaces(), getIntersectionOfProtocols(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().

unsigned ASTContext::CountNonClassIvars ( const ObjCInterfaceDecl OI) const
MangleContext * ASTContext::createMangleContext ( )
MangleNumberingContext * ASTContext::createMangleNumberingContext ( ) const
TypeSourceInfo * ASTContext::CreateTypeSourceInfo ( QualType  T,
unsigned  Size = 0 
) const

Allocate an uninitialized TypeSourceInfo.

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

Parameters
Tthe type that will be the basis for type source info. This type should refer to how the declarator was written in source code, not to what type semantic analysis resolved the declarator to.
Sizethe size of the type info to create, or 0 if the size should be calculated based on the type.

Definition at line 2111 of file ASTContext.cpp.

References clang::TypeLoc::getFullDataSizeForType().

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

void clang::ASTContext::Deallocate ( void *  Ptr) const
inline
bool ASTContext::DeclMustBeEmitted ( const Decl D)
void ASTContext::deduplicateMergedDefinitonsFor ( NamedDecl ND)

Clean up the merged definition list.

Call this if you might have added duplicates into the list.

Definition at line 892 of file ASTContext.cpp.

void ASTContext::DeepCollectObjCIvars ( const ObjCInterfaceDecl OI,
bool  leafClass,
SmallVectorImpl< const ObjCIvarDecl * > &  Ivars 
) const

DeepCollectObjCIvars - This routine first collects all declared, but not synthesized, ivars in super class and then collects all ivars, including those synthesized for current class.

This routine is used for implementation of current class when all ivars, declared and synthesized are known.

Definition at line 1953 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::ObjCIvarDecl::getNextIvar(), clang::ObjCInterfaceDecl::getSuperClass(), I, and clang::ObjCInterfaceDecl::ivars().

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

bool ASTContext::doFunctionTypesMatchOnExtParameterInfos ( const FunctionProtoType FromFunctionType,
const FunctionProtoType ToFunctionType 
)
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 1144 of file ASTContext.cpp.

QualType ASTContext::getAddrSpaceQualType ( QualType  T,
unsigned  AddressSpace 
) const

Return the uniqued reference to the type for an address space qualified type with the specified type and address space.

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

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

Referenced by clang::Sema::ActOnStringLiteral(), checkConditionalPointerCompatibility(), DecodeTypeFromStr(), HandleAddressSpaceTypeAttribute(), and rewriteBuiltinFunctionDecl().

QualType ASTContext::getAdjustedParameterType ( QualType  T) const

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

References getDecayedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().

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

QualType ASTContext::getAdjustedType ( QualType  Orig,
QualType  New 
) const

Return the uniqued reference to a type adjusted from the original type to a new type.

Definition at line 2371 of file ASTContext.cpp.

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

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

CanQualType clang::ASTContext::getAdjustedType ( CanQualType  Orig,
CanQualType  New 
) const
inline

Definition at line 1066 of file ASTContext.h.

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

unsigned ASTContext::getAlignOfGlobalVar ( QualType  T) const

Return the alignment in bits that should be given to a global variable with type T.

getAlignOfGlobalVar - Return the alignment in bits that should be given to a global variable of the specified type.

Definition at line 1927 of file ASTContext.cpp.

References getTargetInfo(), getTypeAlign(), and max().

Referenced by getAlignOfGlobalVarInChars().

CharUnits ASTContext::getAlignOfGlobalVarInChars ( QualType  T) const

Return the alignment in characters that should be given to a global variable with type T.

getAlignOfGlobalVarInChars - Return the alignment in characters that should be given to a global variable of the specified type.

Definition at line 1933 of file ASTContext.cpp.

References getAlignOfGlobalVar(), and toCharUnitsFromBits().

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

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

Definition at line 564 of file ASTContext.h.

Referenced by clang::RawComment::parse().

QualType ASTContext::getArrayDecayedType ( QualType  Ty) const

Return the properly qualified result of decaying the specified array type to a pointer.

getArrayDecayedType - Return the properly qualified result of decaying the specified array type to a pointer.

This operation is non-trivial when handling typedefs etc. The canonical type of T must be an array type, this returns a pointer to a properly qualified element of the array.

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

This operation is non-trivial when handling typedefs etc. The canonical type of "T" must be an array type, this returns a pointer to a properly qualified element of the array.

See C99 6.7.5.3p7 and C99 6.3.2.1p3.

Definition at line 4582 of file ASTContext.cpp.

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

Referenced by clang::Sema::ActOnStringLiteral(), AdjustFunctionParmAndArgTypesForDeduction(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::CreateBuiltinArraySubscriptExpr(), DecodeTypeFromStr(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DiagnoseAssignmentResult(), doRewriteToUTF8StringBoxedExpressionHelper(), GetBuiltinType(), getCanonicalParamType(), getDecayedType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), IsStandardConversion(), and clang::Sema::PerformImplicitConversion().

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

References clang::Qualifiers::empty(), clang::VariableArrayType::getBracketsRange(), clang::QualType::getCanonicalType(), getConstantArrayType(), getDependentSizedArrayType(), clang::ArrayType::getElementType(), getIncompleteArrayType(), clang::ArrayType::getIndexTypeCVRQualifiers(), getQualifiedType(), clang::ConstantArrayType::getSize(), clang::VariableArrayType::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::QualType::getSplitDesugaredType(), getVariableArrayType(), clang::QualType::hasLocalQualifiers(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::CheckAllocatedType(), checkFormatStringExpr(), clang::Sema::CheckStaticArrayArgument(), CheckUnaryTypeTraitTypeCompleteness(), DeduceFromInitializerList(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArrayStarInParamType(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::emitDestroy(), emitPartialArrayDestroy(), EvaluateArrayTypeTrait(), fillInlineAsmTypeInfo(), getArrayDecayedType(), getAsConstantArrayType(), getAsDependentSizedArrayType(), getAsIncompleteArrayType(), getAsVariableArrayType(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), handleInitPriorityAttr(), clang::InitializationSequence::InitializeFrom(), isDesignatorAtObjectEnd(), isSafeToConvert(), isSameEntity(), IsStringInit(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), makeZeroElementRegion(), mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), clang::APValue::printPretty(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), 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 2123 of file ASTContext.h.

References getAsArrayType().

Referenced by DeduceFromInitializerList(), and 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 578 of file ASTContext.h.

ASTMutationListener* clang::ASTContext::getASTMutationListener ( ) const
inline
const ASTRecordLayout & ASTContext::getASTObjCImplementationLayout ( const ObjCImplementationDecl D) const

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

This may differ from the interface if synthesized ivars are present.

Definition at line 2138 of file ASTContext.cpp.

References clang::ObjCImplDecl::getClassInterface().

Referenced by LookupFieldBitOffset().

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

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

Definition at line 2133 of file ASTContext.cpp.

Referenced by LookupFieldBitOffset().

const ASTRecordLayout & ASTContext::getASTRecordLayout ( const RecordDecl D) const

Get or compute information about the layout of the specified record (struct/union/class) D, which indicates its size and field position information.

getASTRecordLayout - Get or compute information about the layout of the specified record (struct/union/class), which indicates its size and field position information.

Definition at line 2923 of file RecordLayoutBuilder.cpp.

References Builder, clang::ExternalASTSource::CompleteType(), DumpRecordLayout(), clang::CharUnits::fromQuantity(), clang::RecordDecl::getDefinition(), getExternalSource(), getLangOpts(), getTargetInfo(), clang::DeclContext::hasExternalLexicalStorage(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), isMsLayout(), and mustSkipTailPadding().

Referenced by AddIndirectPrimaryBases(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), clang::CodeGen::CGCXXABI::buildThisParam(), classifyType(), computeFullPathsForVFTables(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), computeOffsetHint(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), DumpRecordLayout(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), EmitNullBaseClassInitialization(), EncodeBitField(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), getClassAtVTableLocation(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getDeclAlign(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), getFieldOffset(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), getOffsetOfBaseWithVBPtr(), getOffsetOfFullPath(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), isDesignatorAtObjectEnd(), isIntegerLikeType(), clang::Sema::LookupInlineAsmField(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().

const VariableArrayType* clang::ASTContext::getAsVariableArrayType ( QualType  T) const
inline
QualType ASTContext::getAtomicType ( QualType  T) const

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

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

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

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

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

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

Definition at line 4100 of file ASTContext.cpp.

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

Referenced by clang::Sema::ActOnCXXForRangeStmt(), and clang::ASTReader::GetType().

QualType ASTContext::getAutoType ( QualType  DeducedType,
AutoTypeKeyword  Keyword,
bool  IsDependent 
) const

C++11 deduced auto type.

getAutoType - Return the uniqued reference to the 'auto' type which has been deduced to the given type, or to the canonical undeduced 'auto' type, or the canonical deduced-but-dependent 'auto' type.

Definition at line 4040 of file ASTContext.cpp.

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

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

const TargetInfo* clang::ASTContext::getAuxTargetInfo ( ) const
inline
QualType ASTContext::getBaseElementType ( const ArrayType VAT) const

Return the innermost element type of an array type.

For example, will return "int" for int[m][n]

Definition at line 4596 of file ASTContext.cpp.

References clang::ArrayType::getElementType().

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildArrayType(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), BuildImplicitMemberInitializer(), CheckAggExprForMemSetUse(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckNontrivialField(), checkTrivialClassMembers(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), clang::Sema::ComputeInheritingCtorExceptionSpec(), defaultedSpecialMemberIsConstexpr(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenModule::EmitConstantInit(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), getDeclAlign(), clang::CFGImplicitDtor::getDestructorDecl(), getInnerObjCOwnership(), handleInitPriorityAttr(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::Sema::isAbstractType(), clang::QualType::isCXX98PODType(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::Sema::RequireLiteralType(), clang::Sema::RequireNonAbstractType(), clang::Sema::SetIvarInitializers(), TryDefaultInitialization(), and TryValueInitialization().

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

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

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

Referenced by clang::Sema::ActOnBlockStmtExpr(), addBlockPointerConversion(), clang::Sema::BuildBlockPointerType(), checkConditionalPointerCompatibility(), clang::ento::MemRegionManager::getVarRegion(), mergeTypes(), and clang::ASTNodeImporter::VisitBlockPointerType().

Expr * ASTContext::getBlockVarCopyInits ( const VarDecl VD)

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

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

Definition at line 2094 of file ASTContext.cpp.

References I.

Referenced by BlockRequiresCopying(), and clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction().

TypedefDecl* clang::ASTContext::getBOOLDecl ( ) const
inline

Retrieve declaration of 'BOOL' typedef.

Definition at line 1644 of file ASTContext.h.

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

IdentifierInfo* clang::ASTContext::getBoolName ( ) const
inline

Retrieve the identifier 'bool'.

Definition at line 1469 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

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

QualType clang::ASTContext::getBOOLType ( ) const
inline

type of 'BOOL' type.

Definition at line 1654 of file ASTContext.h.

References getBOOLDecl(), and getTypeDeclType().

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

TypedefDecl * ASTContext::getBuiltinMSVaListDecl ( ) const

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

Definition at line 6516 of file ASTContext.cpp.

References CreateMSVaListDecl().

Referenced by getBuiltinMSVaListType(), getPredefinedDecl(), and clang::Sema::Initialize().

QualType clang::ASTContext::getBuiltinMSVaListType ( ) const
inline

Retrieve the type of the __builtin_ms_va_list type.

Definition at line 1682 of file ASTContext.h.

References getBuiltinMSVaListDecl(), and getTypeDeclType().

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

QualType ASTContext::GetBuiltinType ( unsigned  ID,
GetBuiltinTypeError Error,
unsigned IntegerConstantArgs = nullptr 
) const
TypedefDecl * ASTContext::getBuiltinVaListDecl ( ) const

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

Definition at line 6498 of file ASTContext.cpp.

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

Referenced by getBuiltinVaListType(), getPredefinedDecl(), getVaListTagDecl(), and clang::Sema::Initialize().

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

Retrieve the type of the __builtin_va_list type.

Definition at line 1668 of file ASTContext.h.

References getBuiltinVaListDecl(), and getTypeDeclType().

Referenced by clang::Sema::BuildVAArgExpr(), DecodeTypeFromStr(), and Desugar().

bool ASTContext::getByrefLifetime ( QualType  Ty,
Qualifiers::ObjCLifetime Lifetime,
bool HasByrefExtendedLayout 
) const

Returns true, if given type has a known lifetime.

HasByrefExtendedLayout is set to false in this case. If HasByrefExtendedLayout returns true, byref variable has extended lifetime.

Definition at line 5078 of file ASTContext.cpp.

References getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::LangOptions::NonGC, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_None.

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

CanQualType ASTContext::getCanonicalFunctionResultType ( QualType  ResultType) const
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 4438 of file ASTContext.cpp.

References clang::NestedNameSpecifier::Create(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsType(), getCanonicalType(), clang::NestedNameSpecifier::getKind(), clang::NamespaceAliasDecl::getNamespace(), clang::NamespaceDecl::getOriginalNamespace(), clang::NestedNameSpecifier::getPrefix(), clang::QualType::getTypePtr(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

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

CanQualType ASTContext::getCanonicalParamType ( QualType  T) const
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 4337 of file ASTContext.cpp.

References clang::TemplateName::DependentTemplate, clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), getCanonicalTemplateArgument(), clang::TemplateName::getKind(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::SubstTemplateTemplateParmStorage::getReplacement(), getSubstTemplateTemplateParmPack(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::CheckTemplateIdType(), DeduceTemplateArguments(), getCanonicalTemplateArgument(), getCanonicalTemplateSpecializationType(), clang::Sema::getMoreSpecializedPartialSpecialization(), hasSameTemplateName(), isSameTemplateArg(), and clang::TemplateArgument::Profile().

QualType ASTContext::getCanonicalTemplateSpecializationType ( TemplateName  T,
ArrayRef< TemplateArgument Args 
) const
CanQualType clang::ASTContext::getCanonicalType ( QualType  T) const
inline

Return the canonical (structural) type corresponding to the specified potentially non-canonical type T.

The non-canonical version of a type may have many "decorated" versions of types. Decorators can include typedefs, 'typeof' operators, etc. The returned type is guaranteed to be free of any of these, allowing two canonical types to be compared for exact equality with a simple pointer comparison.

Definition at line 1966 of file ASTContext.h.

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

Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCXXMemberReference(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), clang::Sema::AddConversionCandidate(), addFunctionPointerConversion(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildDeclaratorGroup(), buildDeclareReductionRef(), BuildFieldReferenceExpr(), clang::Sema::BuildReferenceType(), BuildSimilarlyQualifiedPointerType(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), clang::Sema::BuildUsingDeclaration(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckConstructor(), clang::Sema::CheckDerivedToBaseConversion(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCMethodOverrides(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CodeCompleteConstructorInitializer(), CollectVRQualifiers(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadConversion(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnosePropertyMismatch(), DiagnosePropertyMismatchDeclInProtocols(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::ento::SValBuilder::evalCast(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getAddrSpaceQualType(), getAdjustedType(), getAtomicType(), getAttributedType(), getBlockPointerType(), getCanonicalFunctionResultType(), getCanonicalNestedNameSpecifier(), getCanonicalParamType(), getCanonicalTemplateArgument(), getComplexType(), getConstantArrayType(), GetConversionType(), getDecayedType(), getDecltypeType(), getDependentSizedArrayType(), getDependentSizedExtVectorType(), clang::CXXRecordDecl::getDestructor(), getElaboratedType(), clang::ento::MemRegionManager::getElementRegion(), getExtVectorType(), getIncompleteArrayType(), getIntegerTypeOrder(), GetKeyForBase(), getLValueReferenceType(), getMemberPointerType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCGCQualType(), getObjCObjectPointerType(), getObjCObjectType(), getPackExpansionType(), getParenType(), getPipeType(), getPointerType(), getRValueReferenceType(), getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTagInfo(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), clang::Sema::getTemplateInstantiationArgs(), getTemplateSpecializationType(), getTypedefType(), getTypeOfExprType(), getTypeOfType(), getUnaryTransformType(), getVariableArrayType(), getVectorType(), clang::Sema::HandlePropertyInClassExtension(), hasSameType(), hasSameUnqualifiedType(), clang::ento::SValBuilder::haveSameType(), clang::Sema::ImpCastExprToType(), clang::ASTImporter::Import(), InitCatchParam(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), IsModifiable(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Sema::IsNoReturnConversion(), clang::Sema::isObjCPointerConversion(), isObjCReceiverType(), clang::Sema::IsOverload(), clang::Sema::IsQualificationConversion(), clang::Sema::isSameOrCompatibleFunctionType(), isSameTemplateArg(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), IsStandardConversion(), IsStringInit(), clang::Expr::isUnusedResultAWarning(), clang::Sema::LookupConstructors(), clang::Sema::LookupSpecialMember(), clang::Sema::MarkDeclarationsReferencedInType(), MarkUsedTemplateParameters(), clang::analyze_format_string::ArgType::matchesType(), matchTypes(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), mergeTypes(), MightInstantiateTo(), NoteIndirectBases(), OpenCLArithmeticConversions(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::ProcessPropertyDecl(), clang::ASTReader::ReadDeclarationName(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::LookupResult::resolveKind(), ResolveOverloadedFunctionForReferenceBinding(), rewriteToObjCProperty(), clang::CXXRecordDecl::setBases(), TryConstCast(), TryListConversion(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryUserDefinedConversion(), clang::CodeGen::CodeGenFunction::TypeOfSelfObject(), clang::Sema::UsualArithmeticConversions(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().

const Type* clang::ASTContext::getCanonicalType ( const Type T) const
inline
TypedefDecl * ASTContext::getCFConstantStringDecl ( ) const
RecordDecl * ASTContext::getCFConstantStringTagDecl ( ) const

Definition at line 4935 of file ASTContext.cpp.

References getCFConstantStringDecl().

Referenced by getPredefinedDecl().

QualType ASTContext::getCFConstantStringType ( ) const

Return the C structure type used to represent constant CFStrings.

Definition at line 4942 of file ASTContext.cpp.

References getCFConstantStringDecl(), and getTypedefType().

Referenced by DecodeTypeFromStr(), and clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString().

uint64_t clang::ASTContext::getCharWidth ( ) const
inline
FunctionDecl * ASTContext::getClassScopeSpecializationPattern ( const FunctionDecl FD)

Definition at line 1188 of file ASTContext.cpp.

comments::CommandTraits& clang::ASTContext::getCommentCommandTraits ( ) const
inline
comments::FullComment * ASTContext::getCommentForDecl ( const Decl D,
const Preprocessor PP 
) const

Return parsed documentation comment attached to a given declaration.

Returns NULL if no comment is attached.

Parameters
PPthe Preprocessor used with this TU. Could be NULL if preprocessor is not available.

Definition at line 441 of file ASTContext.cpp.

References addRedeclaredMethods(), clang::AS_public, cloneFullComment(), clang::ObjCMethodDecl::findPropertyDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), getOverriddenMethods(), getRawCommentForAnyRedecl(), I, clang::QualType::isNull(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::RawComment::parse(), and ParsedComments.

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

QualType ASTContext::getComplexType ( QualType  T) const

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

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

Definition at line 2317 of file ASTContext.cpp.

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

Referenced by clang::Sema::AddModeAttr(), DecodeTypeFromStr(), getComplexType(), handleComplexFloatConversion(), handleIntToFloatConversion(), InitBuiltinTypes(), and clang::ASTNodeImporter::VisitComplexType().

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

Definition at line 1052 of file ASTContext.h.

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

uint64_t ASTContext::getConstantArrayElementCount ( const ConstantArrayType CA) const

Return number of constant array elements.

getConstantArrayElementCount - Returns number of constant array elements.

Definition at line 4616 of file ASTContext.cpp.

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

Referenced by clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().

QualType ASTContext::getConstantArrayType ( QualType  EltTy,
const llvm::APInt &  ArySizeIn,
ArrayType::ArraySizeModifier  ASM,
unsigned  IndexTypeQuals 
) const

Return the unique reference to the type for a constant array of the specified element type.

getConstantArrayType - Return the unique reference to the type for an array of the specified element type.

Definition at line 2572 of file ASTContext.cpp.

References getCanonicalType(), clang::TargetInfo::getPointerWidth(), getQualifiedType(), getTargetAddressSpace(), clang::QualType::hasLocalQualifiers(), ID, clang::QualType::isCanonical(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::ConstantArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.

Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPredefinedExpr(), CheckStringInit(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), getAsArrayType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), mergeTypes(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), TryInitializerListConstruction(), TryToFixInvalidVariablyModifiedType(), and clang::ASTNodeImporter::VisitConstantArrayType().

QualType clang::ASTContext::getConstType ( QualType  T) const
inline

Return the uniqued reference to the type for a const qualified type.

The resulting type has a union of the qualifiers from T and const.

It can be reasonably expected that this will always be equivalent to calling T.withConst().

Definition at line 1031 of file ASTContext.h.

References clang::QualType::withConst().

Referenced by makeLaunchBoundsArgExpr().

const CXXConstructorDecl * ASTContext::getCopyConstructorForExceptionObject ( CXXRecordDecl RD)

Definition at line 8799 of file ASTContext.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl().

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

Definition at line 1101 of file ASTContext.h.

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

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

Get our current best idea for the key function of the given record decl, or NULL if there isn't one.

The key function is, according to the Itanium C++ ABI section 5.2.3: ...the first non-pure virtual function that is not inline at the point of class definition.

Other ABIs use the same idea. However, the ARM C++ ABI ignores virtual functions that are defined 'inline', which means that the result of this computation can change.

Definition at line 3010 of file RecordLayoutBuilder.cpp.

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

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

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

Return the uniqued reference to the decayed version of the given type.

Can only be called on array and function types which decay to pointer types.

Definition at line 2392 of file ASTContext.cpp.

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

Referenced by clang::Sema::CheckNonTypeTemplateParameterType(), getAdjustedParameterType(), getDecayedType(), and getExceptionObjectType().

CanQualType clang::ASTContext::getDecayedType ( CanQualType  T) const
inline

Definition at line 1075 of file ASTContext.h.

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

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

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

Precondition
D must not be a bitfield type, as bitfields do not have a valid alignment.

If ForAlignof, references are treated like their underlying type and large arrays don't get any special treatment. If not ForAlignof it computes the value expected by CodeGen: references are treated like pointers and large arrays get extra alignment.

Definition at line 1353 of file ASTContext.cpp.

References clang::ASTRecordLayout::getAlignment(), clang::Type::getAs(), getAsArrayType(), getASTRecordLayout(), getBaseElementType(), clang::TargetInfo::getCharWidth(), clang::ASTRecordLayout::getFieldOffset(), clang::TargetInfo::getLargeArrayAlign(), clang::TargetInfo::getLargeArrayMinWidth(), clang::TargetInfo::getMinGlobalAlign(), clang::Type::getPointeeType(), getPointerType(), getPreferredTypeAlign(), getTargetInfo(), clang::QualType::getTypePtr(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), max(), min(), toBits(), and toCharUnitsFromBits().

Referenced by computeBlockInfo(), emitAddrOfVarFromArray(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::Sema::FinalizeDeclaration(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::Sema::isCopyElisionCandidate().

DeclaratorDecl * ASTContext::getDeclaratorForUnnamedTagDecl ( const TagDecl TD)

Definition at line 8838 of file ASTContext.cpp.

AttrVec & ASTContext::getDeclAttrs ( const Decl D)

Retrieve the attributes for the given declaration.

Definition at line 1133 of file ASTContext.cpp.

References Allocate(), and clang::Result.

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

C++11 decltype.

Unlike many "get<Type>" functions, we don't unique DecltypeType nodes.

This would never be helpful, since each such type has its own expression, and would not give a significant memory saving, since there is an Expr tree under each such type.

Definition at line 3971 of file ASTContext.cpp.

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

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

Expr * ASTContext::getDefaultArgExprForConstructor ( const CXXConstructorDecl CD,
unsigned  ParmIdx 
)
CallingConv ASTContext::getDefaultCallingConvention ( bool  isVariadic,
bool  IsCXXMethod 
) const
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

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

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

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

Definition at line 2779 of file ASTContext.cpp.

References getCanonicalType(), getQualifiedType(), clang::DependentSizedArrayType::getSizeExpr(), ID, clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::DependentSizedArrayType::Profile(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.

Referenced by clang::Sema::BuildArrayType(), getAsArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and clang::InitializationSequence::Perform().

QualType ASTContext::getDependentSizedExtVectorType ( QualType  VectorType,
Expr SizeExpr,
SourceLocation  AttrLoc 
) const
Precondition
Return a non-unique reference to the type for a dependently-sized vector of the specified element type.

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

Definition at line 2946 of file ASTContext.cpp.

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

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

TemplateName ASTContext::getDependentTemplateName ( NestedNameSpecifier NNS,
const IdentifierInfo Name 
) const
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 6617 of file ASTContext.cpp.

References getCanonicalNestedNameSpecifier(), getDependentTemplateName(), ID, 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,
ArrayRef< TemplateArgument Args 
) const
PartialDiagnostic::StorageAllocator& clang::ASTContext::getDiagAllocator ( )
inline

Definition at line 584 of file ASTContext.h.

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

DiagnosticsEngine & ASTContext::getDiagnostics ( ) const
QualType ASTContext::getElaboratedType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifier NNS,
QualType  NamedType 
) const
QualType ASTContext::getEnumType ( const EnumDecl Decl) const
QualType ASTContext::getExceptionObjectType ( QualType  T) const
ExternalASTSource* clang::ASTContext::getExternalSource ( ) const
inline
ExternCContextDecl * ASTContext::getExternCContextDecl ( ) const
QualType ASTContext::getExtVectorType ( QualType  vecType,
unsigned  NumElts 
) const

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

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

Precondition
VectorType must be a built-in type.

VectorType must be a built-in type.

Definition at line 2917 of file ASTContext.cpp.

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

Referenced by clang::Sema::BuildExtVectorType(), CheckExtVectorComponent(), checkOpenCLVectorShift(), DecodeTypeFromStr(), clang::Sema::GetSignedVectorType(), OpenCLConvertScalarsToVectors(), and clang::ASTNodeImporter::VisitExtVectorType().

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

Retrieve the C FILE type.

Definition at line 1501 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

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

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

getFloatingTypeOfSizeWithinDomain - Returns a real floating point or a complex type (based on typeDomain/typeSize).

Parameters
typeDomaina real floating point or complex type.
typeSizea real floating point or complex type.

'typeDomain' is a real floating point or complex type. 'typeSize' is a real floating point or complex type.

Definition at line 4647 of file ASTContext.cpp.

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

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

Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e.

getFloatingTypeOrder - Compare the rank of the two specified floating point types, ignoring the domain of the type (i.e.

'double' == '_Complex double').

If LHS > RHS, returns 1. If LHS == RHS, returns 0. If LHS < RHS, return -1.

'double' == '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.

Definition at line 4675 of file ASTContext.cpp.

References getFloatingRank().

Referenced by clang::StandardConversionSequence::getNarrowingKind(), handleComplexFloatConversion(), handleFloatConversion(), tryVectorConvertAndSplat(), and unsupportedTypeConversion().

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

References getFunctionNoProtoType().

QualType ASTContext::getFunctionType ( QualType  ResultTy,
ArrayRef< QualType Args,
const FunctionProtoType::ExtProtoInfo EPI 
) const

Return a normal function type with a typed argument list.

Definition at line 3043 of file ASTContext.cpp.

References Allocate(), clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_None, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, getCanonicalFunctionResultType(), getCanonicalParamType(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, ID, isCanonicalResultType(), clang::NumArgs, clang::FunctionProtoType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStartOfLambdaDefinition(), addBlockPointerConversion(), addFunctionPointerConversion(), adjustDeducedFunctionResultType(), clang::Sema::AdjustDestructorExceptionSpec(), adjustFunctionType(), adjustFunctionTypeForInstantiation(), clang::Sema::BuildFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), Desugar(), clang::Sema::FindAllocationFunctions(), clang::Sema::findInheritingConstructor(), GetBuiltinType(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), clang::Sema::MergeFunctionDecl(), mergeFunctionTypes(), mergeObjCGCQualifiers(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::startLambdaDefinition(), clang::QualType::substObjCTypeArgs(), clang::ASTDeclReader::UpdateDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitFunctionProtoType().

GVALinkage ASTContext::GetGVALinkageForFunction ( const FunctionDecl FD) const
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 3169 of file ASTContext.cpp.

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

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

ASTContext::InlineVariableDefinitionKind ASTContext::getInlineVariableDefinitionKind ( const VarDecl VD) const

Determine whether a definition of this inline variable should be treated as a weak or strong definition.

For compatibility with C++14 and before, for a constexpr static data member, if there is an out-of-line declaration of the member, we may promote it from weak to strong.

Definition at line 5143 of file ASTContext.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::isInline(), clang::VarDecl::isStaticDataMember(), None, clang::Redeclarable< decl_type >::redecls(), Strong, Weak, and WeakUnknown.

Referenced by basicGVALinkageForVariable(), and clang::CodeGen::CodeGenModule::EmitGlobal().

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

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

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

Definition at line 4814 of file ASTContext.cpp.

References clang::Type::getAs(), getBaseElementType(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::Type::isArrayType(), clang::QualType::isNull(), and clang::Qualifiers::OCL_None.

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

MemberSpecializationInfo * ASTContext::getInstantiatedFromStaticDataMember ( const VarDecl Var)

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

Definition at line 1154 of file ASTContext.cpp.

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

FieldDecl * ASTContext::getInstantiatedFromUnnamedFieldDecl ( FieldDecl Field)

Definition at line 1243 of file ASTContext.cpp.

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

NamedDecl * ASTContext::getInstantiatedFromUsingDecl ( UsingDecl Inst)

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

Definition at line 1207 of file ASTContext.cpp.

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

UsingShadowDecl * ASTContext::getInstantiatedFromUsingShadowDecl ( UsingShadowDecl Inst)
TypedefDecl * ASTContext::getInt128Decl ( ) const

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

Definition at line 964 of file ASTContext.cpp.

References buildImplicitTypedef(), and Int128Ty.

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

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

Return the highest ranked integer type, see C99 6.3.1.8p1.

getIntegerTypeOrder - Returns the highest ranked integer type: C99 6.3.1.8p1.

If LHS > RHS, returns 1. If LHS == RHS, returns 0. If LHS < RHS, return -1.

If LHS > RHS, return 1. If LHS == RHS, return 0. If LHS < RHS, return -1.

Definition at line 4842 of file ASTContext.cpp.

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

Referenced by handleIntegerConversion(), and tryVectorConvertAndSplat().

CanQualType ASTContext::getIntMaxType ( ) const

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

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

Definition at line 4124 of file ASTContext.cpp.

References clang::TargetInfo::getIntMaxType().

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

QualType ASTContext::getIntPtrType ( ) const

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

Definition at line 4147 of file ASTContext.cpp.

References clang::TargetInfo::getIntPtrType().

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

QualType ASTContext::getIntTypeForBitwidth ( unsigned  DestWidth,
unsigned  Signed 
) const
unsigned ASTContext::getIntWidth ( QualType  T) const
QualType clang::ASTContext::getjmp_bufType ( ) const
inline

Retrieve the C jmp_buf type.

Definition at line 1513 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

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

Definition at line 604 of file ASTContext.h.

Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), adjustGVALinkageForAttributes(), AllowOverloadingOfFunction(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), basicGVALinkageForFunction(), buildBlockDescriptor(), buildImplicitRecord(), CalculateHiddenNames(), clang::arcmt::trans::canApplyWeak(), CastsAwayConstness(), CheckAvailability(), CheckForIncompatibleAttributes(), clang::arcmt::checkForManualIssues(), CheckICE(), clang::Sema::CheckLogicalOperands(), ClassifyBinaryOp(), ClassifyConditional(), ClassifyDecl(), ClassifyInternal(), ClassifyMemberExpr(), ClassifyUnnamed(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeBlockInfo(), computeDeclRefDependence(), computeKeyFunction(), clang::PredefinedExpr::ComputeName(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXRecordDecl::Create(), clang::ObjCInterfaceDecl::Create(), clang::ObjCProtocolDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinUnaryOp(), clang::ObjCInterfaceDecl::CreateDeserialized(), clang::ObjCProtocolDecl::CreateDeserialized(), clang::EnumDecl::CreateDeserialized(), clang::RecordDecl::CreateDeserialized(), DiagnoseSwitchLabelsFallthrough(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), clang::LocationContext::dumpStack(), clang::CodeGen::CodeGenModule::EmitConstantValue(), EncodeBitField(), clang::Expr::EvaluateAsInitializer(), clang::ASTMergeAction::ExecuteAction(), FastEvaluateAsRValue(), clang::Sema::FindAllocationFunctions(), clang::arcmt::trans::findSemiAfterLocation(), clang::FormatASTNodeDiagnosticArgument(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), clang::ASTReader::get(), getASTRecordLayout(), getAttrForPlatform(), clang::FunctionDecl::getBuiltinID(), getByrefLifetime(), getCallingConvMangling(), clang::ento::SValBuilder::getConditionType(), getDeclLanguageLinkage(), GetDiagForGotoScopeDecl(), GetGCAttrTypeForType(), clang::ento::CheckerContext::getLangOpts(), clang::ASTWriter::getLangOpts(), getLiteralInfo(), clang::CodeGen::CodeGenModule::getLLVMLinkageForDeclarator(), getLogicalOperationType(), getLVForLocalDecl(), clang::StandardConversionSequence::getNarrowingKind(), clang::QualType::getNonLValueExprType(), getNSArrayObjects(), clang::NSAPI::GetNSIntegralKind(), getObjCEncodingForBlock(), getObjCGCAttrKind(), clang::Sema::getPrintingPolicy(), clang::ObjCMethodDecl::getSelfType(), clang::tooling::fixit::internal::getText(), getTypeInfoDataSizeInChars(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::Sema::handleTagNumbering(), clang::InitializedEntity::InitializeParameter(), clang::Sema::isAcceptableNestedNameSpecifier(), isARCNilInitializedLocal(), clang::Expr::isCXX11ConstantExpr(), clang::QualType::isCXX11PODType(), clang::QualType::isCXX98PODType(), clang::ASTReader::isGlobalIndexUnavailable(), clang::FunctionDecl::isInlineDefinitionExternallyVisible(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralType(), isInterestingIdentifier(), clang::Sema::isLaxVectorConversion(), clang::Type::isLiteralType(), clang::FunctionDecl::isMain(), IsModifiable(), clang::RecordDecl::isMsStruct(), clang::Expr::isNullPointerConstant(), isObjCReceiverType(), isOutOfScopePreviousDeclaration(), clang::QualType::isPODType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::VarDecl::isThisDeclarationADefinition(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::Expr::isUnusedResultAWarning(), clang::VarDecl::isUsableInConstantExpressions(), IsWideCharCompatible(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::ASTReader::loadGlobalIndex(), LocPropertyAttribute(), mayInlineDecl(), clang::RecordDecl::mayInsertExtraPadding(), mergeDefinitionIntoModule(), clang::ASTDeclReader::mergeDefinitionVisibility(), mergeTypes(), PrintStats(), clang::ASTReader::ReadAST(), clang::ASTReader::ReadComments(), clang::CodeGen::CodeGenModule::Release(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::edit::rewriteToObjCLiteralSyntax(), clang::CXXRecordDecl::setBases(), setObjCGCLValueClass(), shouldNotRewriteImmediateMessageArgs(), ShouldUseExternalRTTIDescriptor(), typesAreCompatible(), UnwrapSimilarPointerTypes(), clang::ASTDeclReader::UpdateDecl(), 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 5453 of file ASTContext.cpp.

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

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

Return a type with the given lifetime qualifier.

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

Definition at line 1716 of file ASTContext.h.

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

Referenced by clang::Sema::BuildCXXNew(), clang::Sema::CheckParameter(), and clang::Sema::inferObjCARCLifetime().

comments::FullComment * ASTContext::getLocalCommentForDeclUncached ( const Decl D) const

Return parsed documentation comment attached to a given declaration.

Returns NULL if no comment is attached. Does not look at any redeclarations of the declaration.

Definition at line 436 of file ASTContext.cpp.

References getRawCommentForDeclNoCache(), and clang::RawComment::parse().

QualType clang::ASTContext::getLogicalOperationType ( ) const
inline
QualType ASTContext::getLValueReferenceType ( QualType  T,
bool  SpelledAsLValue = true 
) const
BuiltinTemplateDecl * ASTContext::getMakeIntegerSeqDecl ( ) const
IdentifierInfo* clang::ASTContext::getMakeIntegerSeqName ( ) const
inline

Definition at line 1475 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by getMakeIntegerSeqDecl(), and LookupBuiltin().

unsigned ASTContext::getManglingNumber ( const NamedDecl ND) const
MangleNumberingContext & ASTContext::getManglingNumberContext ( const DeclContext DC)

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

Definition at line 8786 of file ASTContext.cpp.

References createMangleNumberingContext().

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

APValue * ASTContext::getMaterializedTemporaryValue ( const MaterializeTemporaryExpr E,
bool  MayCreate 
)

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

Definition at line 8854 of file ASTContext.cpp.

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

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

QualType ASTContext::getMemberPointerType ( QualType  T,
const Type Cls 
) const

Return the uniqued reference to the type for a member pointer to the specified type in the specified class.

getMemberPointerType - Return the uniqued reference to the type for a member pointer to the specified type, in the specified class.

The class Cls is a Type because it could be a dependent name.

Definition at line 2541 of file ASTContext.cpp.

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

Referenced by clang::Sema::BuildMemberPointerType(), clang::Sema::CheckAddressOfOperand(), decomposeTypeForEH(), clang::CodeGen::CGCXXABI::EmitMemberFunctionPointer(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), GetTypeOfFunction(), clang::Sema::IsMemberPointerConversion(), IsStandardConversion(), TryStaticMemberPointerUpcast(), and clang::ASTNodeImporter::VisitMemberPointerType().

ArrayRef<Module*> clang::ASTContext::getModulesWithMergedDefinition ( NamedDecl Def)
inline

Get the additional modules in which the definition Def has been merged.

Definition at line 879 of file ASTContext.h.

References clang::None.

Referenced by clang::Sema::diagnoseMissingImport(), clang::Sema::hasVisibleDeclarationSlow(), hasVisibleDefaultArgument(), clang::Sema::hasVisibleMemberSpecialization(), and clang::Sema::hasVisibleMergedDefinition().

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

Definition at line 852 of file ASTContext.h.

IdentifierInfo* clang::ASTContext::getNSCopyingName ( )
inline

Retrieve the identifier 'NSCopying'.

Definition at line 1460 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by clang::Type::isBlockCompatibleObjCPointerType().

IdentifierInfo* clang::ASTContext::getNSObjectName ( )
inline

Retrieve the identifier 'NSObject'.

Definition at line 1451 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by clang::Type::isBlockCompatibleObjCPointerType().

TypedefDecl * ASTContext::getObjCClassDecl ( ) const

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

Definition at line 6140 of file ASTContext.cpp.

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

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

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

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

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

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

Represents the Objective-C Class type.

This is set up lazily, by Sema. Class is always a (typedef for a) pointer type, a pointer to a struct.

Definition at line 1635 of file ASTContext.h.

References getObjCClassDecl(), and getTypeDeclType().

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

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

Definition at line 1398 of file ASTContext.h.

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

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

Emit the encoded type for the function Decl into S.

This is in the same format as Objective-C method encodings.

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

Definition at line 5226 of file ASTContext.cpp.

References charUnitsToString(), clang::Type::getCanonicalTypeInternal(), getObjCEncodingForType(), getObjCEncodingTypeSize(), clang::FunctionDecl::getReturnType(), clang::Type::isFunctionType(), clang::CharUnits::isPositive(), clang::CharUnits::isZero(), clang::FunctionDecl::parameters(), S, and clang::CharUnits::Zero().

bool ASTContext::getObjCEncodingForMethodDecl ( const ObjCMethodDecl Decl,
std::string &  S,
bool  Extended = false 
) const
void ASTContext::getObjCEncodingForMethodParameter ( Decl::ObjCDeclQualifier  QT,
QualType  T,
std::string &  S,
bool  Extended 
) const

getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return type.

If Extended, include class names and block object types.

Definition at line 5267 of file ASTContext.cpp.

References getObjCEncodingForTypeQualifier().

Referenced by getObjCEncodingForBlock(), and getObjCEncodingForMethodDecl().

void ASTContext::getObjCEncodingForPropertyDecl ( const ObjCPropertyDecl PD,
const Decl Container,
std::string &  S 
) const

getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.

getObjCEncodingForPropertyDecl - Return the encoded type for this property declaration.

If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties.

If non-NULL, Container must be either an ObjCCategoryImplDecl or ObjCImplementationDecl; it should only be NULL when getting encodings for protocol properties. Property attributes are stored as a comma-delimited C string. The simple attributes readonly and bycopy are encoded as single characters. The parametrized attributes, getter=name, setter=name, and ivar=name, are encoded as single characters, followed by an identifier. Property types are also encoded as a parametrized attribute. The characters used to encode these attributes are defined by the following enumeration:

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

References clang::ObjCPropertyDecl::Assign, clang::ObjCPropertyDecl::Copy, clang::ObjCPropertyImplDecl::Dynamic, clang::Selector::getAsString(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getNameAsString(), getObjCEncodingForPropertyType(), getObjCPropertyImplDeclForPropertyDecl(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyDecl::getSetterKind(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_getter, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_setter, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::ObjCPropertyDecl::Retain, S, and clang::ObjCPropertyDecl::Weak.

void ASTContext::getObjCEncodingForPropertyType ( QualType  T,
std::string &  S 
) const

Emit the Objective-C property type encoding for the given type T into S.

Definition at line 5477 of file ASTContext.cpp.

Referenced by getObjCEncodingForPropertyDecl().

void ASTContext::getObjCEncodingForType ( QualType  T,
std::string &  S,
const FieldDecl Field = nullptr,
QualType NotEncodedT = nullptr 
) const

Emit the Objective-CC type encoding for the given type T into S.

If Field is specified then record field names are also encoded.

Definition at line 5465 of file ASTContext.cpp.

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

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

Put the string version of the type qualifiers QT into S.

Definition at line 6107 of file ASTContext.cpp.

Referenced by getObjCEncodingForMethodParameter().

CharUnits ASTContext::getObjCEncodingTypeSize ( QualType  type) const

Return the size of type T for Objective-C encoding purpose, in characters.

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

Definition at line 5120 of file ASTContext.cpp.

References getTypeSizeInChars(), IntTy, clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::CharUnits::isPositive(), max(), VoidPtrTy, and clang::CharUnits::Zero().

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

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

Return the uniqued reference to the type for an Objective-C gc-qualified type.

The retulting type has a union of the qualifiers from T and the gc attribute.

Definition at line 2197 of file ASTContext.cpp.

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

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

TypedefDecl * ASTContext::getObjCIdDecl ( ) const

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

Definition at line 6123 of file ASTContext.cpp.

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

Referenced by getObjCIdType(), getPredefinedDecl(), 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 1412 of file ASTContext.h.

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

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

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

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

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

Definition at line 2037 of file ASTContext.cpp.

References I.

ObjCCategoryImplDecl * ASTContext::getObjCImplementation ( ObjCCategoryDecl D)

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

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

Definition at line 2045 of file ASTContext.cpp.

References I.

QualType clang::ASTContext::getObjCInstanceType ( )
inline
TypedefDecl * ASTContext::getObjCInstanceTypeDecl ( )

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

Definition at line 5101 of file ASTContext.cpp.

References buildImplicitTypedef(), and getObjCIdType().

Referenced by getObjCInstanceType(), and getPredefinedDecl().

QualType ASTContext::getObjCInterfaceType ( const ObjCInterfaceDecl Decl,
ObjCInterfaceDecl PrevDecl = nullptr 
) const
const ObjCMethodDecl * ASTContext::getObjCMethodRedeclaration ( const ObjCMethodDecl MD) const

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

Definition at line 2067 of file ASTContext.cpp.

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

QualType clang::ASTContext::getObjCNSStringType ( ) const
inline

Definition at line 1402 of file ASTContext.h.

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

QualType ASTContext::getObjCObjectPointerType ( QualType  ObjectT) const

Return a ObjCObjectPointerType type for the given ObjCObjectType.

getObjCObjectPointerType - Return a ObjCObjectPointerType type for the given object type.

Definition at line 3869 of file ASTContext.cpp.

References Allocate(), getCanonicalType(), ID, clang::QualType::isCanonical(), clang::ObjCObjectPointerType::Profile(), and clang::TypeAlignment.

Referenced by clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnFields(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnSuperMessage(), applyObjCProtocolQualifiers(), areCommonBaseCompatible(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildReturnStmt(), BuildSimilarlyQualifiedPointerType(), canBindObjCObjectType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::checkObjCKindOfType(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CreatePropertyDecl(), Desugar(), getBaseMessageSendResultType(), GetFullTypeForDeclarator(), clang::ento::TypedValueRegion::getLocationType(), getMostInformativeDerivedClassImpl(), getNSNumberFactoryMethod(), getObjCClassDecl(), getObjCIdDecl(), GetReturnType(), clang::ObjCMethodDecl::getSelfType(), clang::ObjCObjectPointerType::getSuperClassType(), clang::Sema::ParseObjCProtocolExpression(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), and clang::ASTNodeImporter::VisitObjCObjectPointerType().

QualType ASTContext::getObjCObjectType ( QualType  Base,
ObjCProtocolDecl *const *  Protocols,
unsigned  NumProtocols 
) const
QualType ASTContext::getObjCObjectType ( QualType  Base,
ArrayRef< QualType typeArgs,
ArrayRef< ObjCProtocolDecl * >  protocols,
bool  isKindOf 
) const
const ObjCInterfaceDecl * ASTContext::getObjContainingInterface ( const NamedDecl ND) const

Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc.

that is part of an interface, otherwise returns null.

Definition at line 2077 of file ASTContext.cpp.

References ID.

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

ObjCPropertyImplDecl * ASTContext::getObjCPropertyImplDeclForPropertyDecl ( const ObjCPropertyDecl PD,
const Decl Container 
) const

Definition at line 5337 of file ASTContext.cpp.

References clang::ObjCImplDecl::property_impls().

Referenced by getObjCEncodingForPropertyDecl().

ObjCInterfaceDecl * ASTContext::getObjCProtocolDecl ( ) const

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

Definition at line 6149 of file ASTContext.cpp.

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

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

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

Retrieve the type of the Objective-C Protocol class.

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

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

Referenced by getObjCSelType(), getPredefinedDecl(), 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 1438 of file ASTContext.h.

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

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

QualType clang::ASTContext::getObjCSelType ( ) const
inline
QualType ASTContext::getObjCSuperType ( ) const

Returns the C struct type for objc_super.

Definition at line 4946 of file ASTContext.cpp.

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

Referenced by DecodeTypeFromStr().

CharUnits ASTContext::getOffsetOfBaseWithVBPtr ( const CXXRecordDecl RD) const

Loading virtual member pointers using the virtual inheritance model always results in an adjustment using the vbtable even if the index is zero.

This is usually OK because the first slot in the vbtable points backwards to the top of the MDC. However, the MDC might be reusing a vbptr from an nv-base. In this case, the first slot in the vbtable points to the start of the nv-base which introduced the vbptr and not the MDC. Modify the NonVirtualBaseAdjustment to account for this.

Definition at line 1937 of file ASTContext.cpp.

References getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getBaseSharingVBPtr(), and clang::CharUnits::Zero().

unsigned ASTContext::getOpenMPDefaultSimdAlign ( QualType  T) const

Get default simd alignment of the specified complete type in bits.

Definition at line 1846 of file ASTContext.cpp.

References clang::TargetInfo::getSimdDefaultAlign(), getTargetInfo(), and clang::Type::isSpecificBuiltinType().

Referenced by emitAlignedClause(), and clang::CodeGen::emitDeclareSimdFunction().

TemplateName ASTContext::getOverloadedTemplateName ( UnresolvedSetIterator  Begin,
UnresolvedSetIterator  End 
) const

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

Definition at line 6533 of file ASTContext.cpp.

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

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

void ASTContext::getOverriddenMethods ( const NamedDecl Method,
SmallVectorImpl< const NamedDecl * > &  Overridden 
) const

Return C++ or ObjC overridden methods for the given Method.

An ObjC method is considered to override any method in the class's base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.

Definition at line 1301 of file ASTContext.cpp.

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

Referenced by getCommentForDecl().

QualType ASTContext::getPackExpansionType ( QualType  Pattern,
Optional< unsigned NumExpansions 
)
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 8846 of file ASTContext.cpp.

References I.

template<typename NodeT >
DynTypedNodeList clang::ASTContext::getParents ( const NodeT &  Node)
inline

Returns the parents of the given node.

Note that this will lazily compute the parents of all nodes and store them for later retrieval. Thus, the first call is O(n) in the number of AST nodes.

Caveats and FIXMEs: Calculating the parent map over all AST nodes will need to load the full AST. This can be undesirable in the case where the full AST is expensive to create (for example, when using precompiled header preambles). Thus, there are good opportunities for optimization here. One idea is to walk the given node downwards, looking for references to declaration contexts - once a declaration context is found, compute the parent map for the declaration context; if that can satisfy the request, loading the whole AST can be avoided. Note that this is made more complex by statements in templates having multiple parents - those problems can be solved by building closure over the templated parts of the AST, which also avoids touching large parts of the AST. Additionally, we will want to add an interface to already give a hint where to search for the parents, for example when looking at a statement inside a certain function.

'NodeT' can be one of Decl, Stmt, Type, TypeLoc, NestedNameSpecifier or NestedNameSpecifierLoc.

Definition at line 547 of file ASTContext.h.

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

ASTContext::DynTypedNodeList ASTContext::getParents ( const ast_type_traits::DynTypedNode Node)
QualType ASTContext::getParenType ( QualType  NamedType) const
QualType ASTContext::getPipeType ( QualType  T) const

Return pipe type for the specified type.

Definition at line 3129 of file ASTContext.cpp.

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

Referenced by clang::Sema::BuildPipeType(), and mergeTypes().

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

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

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

Definition at line 2345 of file ASTContext.cpp.

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

Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::AddConversionCandidate(), AddDirectArgument(), addFunctionPointerConversion(), adjustCVQualifiersForCXXThisWithinLambda(), AdjustFunctionParmAndArgTypesForDeduction(), buildCaptureDecl(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPointerType(), clang::Sema::BuildResolvedCallExpr(), BuildSimilarlyQualifiedPointerType(), clang::Sema::CallExprUnaryConversions(), captureThis(), clang::ento::StoreManager::CastRetrievedVal(), CastsAwayConstness(), castValueFromUintptr(), clang::Sema::CheckAddressOfOperand(), checkConditionalBlockPointerCompatibility(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckMain(), checkOpenCLPipePacketType(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::ento::SValBuilder::conjureSymbolVal(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), CreateCharPtrNamedVaListDecl(), CreateFunctionRefExpr(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DeclareGlobalNewDelete(), DecodeTypeFromStr(), decomposeTypeForEH(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultFunctionArrayConversion(), Desugar(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), EmitFunctionDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::ento::SValBuilder::evalCast(), evaluateCDTSize(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::Sema::FixOverloadedFunctionReference(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::analyze_printf::PrintfSpecifier::getArgType(), getArrayDecayedType(), getBlockDescriptorExtendedType(), getCanonicalParamType(), getCFConstantStringDecl(), clang::Sema::getCurrentThisType(), clang::ento::SValBuilder::getCXXThis(), getDecayedType(), getDeclAlign(), clang::TypeName::getFullyQualifiedType(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::TypedValueRegion::getLocationType(), clang::ento::FunctionCodeRegion::getLocationType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCGCQualType(), getObjCSelDecl(), getPointerType(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), GetThisType(), clang::CXXMethodDecl::getThisType(), GetTypeOfFunction(), getVariableArrayDecayedType(), handleCleanupAttr(), InitBuiltinTypes(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), IsStandardConversion(), mergeTypes(), NoteSurrogateCandidate(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), recordFixedType(), ResolveOverloadForDeduction(), rewriteBuiltinFunctionDecl(), SemaBuiltinCallWithStaticChain(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), TryConstCast(), tryObjCWritebackConversion(), TryReinterpretCast(), clang::ConversionFixItGenerator::tryToFixConversion(), TryToFixInvalidVariablyModifiedType(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitDeclStmt(), and clang::ASTNodeImporter::VisitPointerType().

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

Definition at line 1059 of file ASTContext.h.

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

unsigned ASTContext::getPreferredTypeAlign ( const Type T) const

Return the "preferred" alignment of the specified type T for the current target, in bits.

getPreferredTypeAlign - Return the "preferred" alignment of the specified type for the current target in bits.

This can be different than the ABI alignment in cases where it is beneficial for performance to overalign a data type.

Definition at line 1889 of file ASTContext.cpp.

References clang::TypeInfo::Align, clang::TypeInfo::AlignIsRequired, clang::TargetInfo::allowsLargerPreferedTypeAlignment(), clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), getPointerDiffType(), getTypeInfo(), clang::QualType::getTypePtr(), getTypeSize(), clang::Type::isMemberPointerType(), clang::Type::isSpecificBuiltinType(), and max().

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

Decl* clang::ASTContext::getPrimaryMergedDecl ( Decl D)
inline

Definition at line 861 of file ASTContext.h.

References clang::Result.

const clang::PrintingPolicy& clang::ASTContext::getPrintingPolicy ( ) const
inline
QualType ASTContext::getProcessIDType ( ) const

Return the unique type for "pid_t" defined in <sys/types.h>.

We need this to compute the correct type for vfork().

Definition at line 4163 of file ASTContext.cpp.

References clang::TargetInfo::getProcessIDType().

Referenced by DecodeTypeFromStr().

QualType ASTContext::getPromotedIntegerType ( QualType  Promotable) const

Return the type that PromotableType will promote to: C99 6.3.1.1p2, assuming that PromotableType is a promotable integer type.

getPromotedIntegerType - Returns the type that Promotable will promote to: C99 6.3.1.1p2, assuming that Promotable is a promotable integer type.

Definition at line 4771 of file ASTContext.cpp.

References clang::Type::getAs(), getIntWidth(), getTypeSize(), IntTy, clang::QualType::isNull(), clang::Type::isPromotableIntegerType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), LongLongTy, LongTy, UnsignedIntTy, UnsignedLongLongTy, and UnsignedLongTy.

Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAdditionOperands(), GetFullTypeForDeclarator(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().

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

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

Definition at line 6557 of file ASTContext.cpp.

References ID, and clang::QualifiedTemplateName::Profile().

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

QualType clang::ASTContext::getQualifiedType ( SplitQualType  split) const
inline

Un-split a SplitQualType.

Definition at line 1693 of file ASTContext.h.

References clang::SplitQualType::Quals, and clang::SplitQualType::Ty.

Referenced by clang::Sema::ActOnPropertyImplDecl(), AddImplicitObjectParameterType(), AdoptQualifiers(), clang::QualifierCollector::apply(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildFieldReferenceExpr(), BuildImplicitBaseInitializer(), clang::Sema::BuildQualifiedType(), BuildSimilarlyQualifiedPointerType(), CastsAwayConstness(), checkARCPropertyImpl(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), CheckOriginalCallArgDeduction(), clang::Sema::CheckTemplateTypeArgument(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getArrayDecayedType(), getAsArrayType(), getBaseElementType(), getCanonicalFunctionResultType(), getConstantArrayType(), getCVRQualifiedType(), getDependentSizedArrayType(), clang::TypeName::getFullyQualifiedType(), getIncompleteArrayType(), getLifetimeQualifiedType(), clang::ObjCMethodDecl::getSelfType(), clang::CXXMethodDecl::getThisType(), getUnqualifiedObjCPointerType(), getVariableArrayDecayedType(), getVariableArrayType(), handleObjCOwnershipTypeAttr(), clang::ASTImporter::Import(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::Sema::isObjCWritebackConversion(), rewriteToObjCProperty(), SemaOpenCLBuiltinToAddr(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), transferARCOwnershipToDeclSpec(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and UnwrapTypeForDebugInfo().

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

Return a type with additional qualifiers.

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

References getTypedefType().

const RawComment * ASTContext::getRawCommentForAnyRedecl ( const Decl D,
const Decl **  OriginalDecl = nullptr 
) const
RawComment * ASTContext::getRawCommentForDeclNoCache ( const Decl D) const
RawCommentList& clang::ASTContext::getRawCommentList ( )
inline

Definition at line 692 of file ASTContext.h.

References Comments.

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

QualType ASTContext::getRealTypeForBitwidth ( unsigned  DestWidth) const

getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.

Returns empty type if there is no appropriate target types.

Definition at line 8747 of file ASTContext.cpp.

References clang::TargetInfo::Double, DoubleTy, clang::TargetInfo::Float, clang::TargetInfo::Float128, Float128Ty, FloatTy, clang::TargetInfo::getRealTypeByWidth(), getTargetInfo(), clang::TargetInfo::LongDouble, LongDoubleTy, and clang::TargetInfo::NoFloat.

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

QualType ASTContext::getRecordType ( const RecordDecl Decl) const

Definition at line 3233 of file ASTContext.cpp.

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

Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckCompletedCXXClass(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CGDebugInfo::completeClassData(), clang::CodeGen::CGDebugInfo::completeRequiredType(), clang::CodeGen::CGDebugInfo::completeTemplateDefinition(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateOverloadedBinOp(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DiagnoseNontrivial(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), evaluateCDTSize(), findUntaggedStructOrUnionIndex(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::CodeGen::CodeGenFunction::InitCapturedStruct(), IsCXXRecordForMappable(), clang::Sema::LookupInSuper(), clang::APValue::printPretty(), recordFixedType(), recoverFromTypeInKnownDependentBase(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), and clang::Sema::SpecialMemberIsTrivial().

QualType clang::ASTContext::getRestrictType ( QualType  T) const
inline

Return the uniqued reference to the type for a restrict qualified type.

The resulting type has a union of the qualifiers from T and restrict.

Definition at line 1011 of file ASTContext.h.

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

QualType ASTContext::getRValueReferenceType ( QualType  T) const
const SanitizerBlacklist& clang::ASTContext::getSanitizerBlacklist ( ) const
inline
size_t ASTContext::getSideTableAllocatedMemory ( ) const

Return the total memory used for various side tables.

Definition at line 8714 of file ASTContext.cpp.

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

Retrieve the C sigjmp_buf type.

Definition at line 1525 of file ASTContext.h.

References getTypeDeclType().

Referenced by DecodeTypeFromStr().

QualType ASTContext::getSignatureParameterType ( QualType  T) const

Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and function types and removing top-level cv-qualifiers.

Definition at line 4557 of file ASTContext.cpp.

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

QualType ASTContext::getSignedWCharType ( ) const

Return the type of "signed wchar_t".

getSignedWCharType - Return the type of "signed wchar_t".

Used when in C++, as a GCC extension.

Definition at line 4135 of file ASTContext.cpp.

References WCharTy.

Referenced by ConvertDeclSpecToType().

CanQualType ASTContext::getSizeType ( ) const

Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.

getSizeType - Return the unique type for "size_t" (C99 7.17), the result of the sizeof operator (C99 6.5.3.4p4).

The sizeof operator requires this (C99 6.5.3.4p4).

The value is target dependent and needs to agree with the definition in <stddef.h>.

Definition at line 4119 of file ASTContext.cpp.

References clang::TargetInfo::getSizeType().

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStringLiteral(), appendParameterTypes(), clang::Sema::BuildArrayType(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNew(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), BuildImplicitMemberInitializer(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), captureVariablyModifiedType(), clang::Sema::CheckLiteralOperatorDeclaration(), CheckOperatorNewDeclaration(), clang::SizeOfPackExpr::Create(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), createTypePackElementParameterList(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::DeclareGlobalNewDelete(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::ento::SymbolExtent::getType(), clang::Sema::Initialize(), isNonPlacementDeallocationFunction(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CXXMethodDecl::isUsualDeallocationFunction(), performLambdaVarCaptureInitialization(), and TryInitializerListConstruction().

SourceManager& clang::ASTContext::getSourceManager ( )
inline

Definition at line 561 of file ASTContext.h.

Referenced by clang::Sema::ActOnAtEnd(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::arcmt::MigrationProcess::applyTransform(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), checkAllAtProps(), clang::Sema::CheckEquivalentExceptionSpec(), clang::arcmt::checkForManualIssues(), clang::index::CommentToXMLConverter::convertCommentToXML(), clang::comments::Comment::dump(), clang::arcmt::trans::MigrationContext::dumpGCAttrs(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(), clang::CodeGen::emitUpdateLocation(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateFixForUnusedDecl(), getAsmSrcLocInfo(), clang::BackendConsumer::getBestLocationFromDebugLoc(), getLiteralInfo(), clang::ento::AnalysisManager::getSourceManager(), getTargetEntryUniqueInfo(), clang::tooling::fixit::internal::getText(), clang::BackendConsumer::HandleInlineFunctionDefinition(), clang::BackendConsumer::HandleTagDeclDefinition(), clang::BackendConsumer::HandleTopLevelDecl(), clang::ASTImporter::Import(), clang::index::IndexingContext::importedModule(), clang::BackendConsumer::InlineAsmDiagHandler2(), isEmptyARCMTMacroStatement(), isForbiddenTypeAllowed(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), LocPropertyAttribute(), clang::Sema::makeUnavailableInSystemHeader(), mayInlineDecl(), clang::Sema::MergeTypedefNameDecl(), clang::RawComment::parse(), clang::ASTWriter::PreparePathForOutput(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::CodeGen::CGDebugInfo::setLocation(), clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody(), and clang::ento::ExprEngine::ViewGraph().

const SourceManager& clang::ASTContext::getSourceManager ( ) const
inline

Definition at line 562 of file ASTContext.h.

unsigned ASTContext::getStaticLocalNumber ( const VarDecl VD) const

Definition at line 8780 of file ASTContext.cpp.

References I.

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

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

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

QualType ASTContext::getTagDeclType ( const TagDecl Decl) const

Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.

getTagDeclType - Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.

Definition at line 4109 of file ASTContext.cpp.

References getTypeDeclType().

Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnTag(), BuildImplicitMemberInitializer(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckConstructor(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::InitializationSequence::Diagnose(), EmitCapturedFieldLValue(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getCFConstantStringDecl(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), getObjCSuperType(), GetThisType(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), isSafeToConvert(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), LookupPredefedObjCSuperType(), clang::Sema::LookupSpecialMember(), mergeAlignedAttrs(), clang::Sema::PerformImplicitConversion(), clang::Sema::setTagNameForLinkagePurposes(), clang::CodeGen::CodeGenTypes::UpdateCompletedType(), clang::ASTNodeImporter::VisitEnumType(), and clang::ASTNodeImporter::VisitRecordType().

unsigned clang::ASTContext::getTargetAddressSpace ( QualType  T) const
inline
unsigned clang::ASTContext::getTargetAddressSpace ( Qualifiers  Q) const
inline

Definition at line 2204 of file ASTContext.h.

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

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

Definition at line 2208 of file ASTContext.h.

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

unsigned ASTContext::getTargetDefaultAlignForAttributeAligned ( void  ) const

Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.

getTargetDefaultAlignForAttributeAligned - Return the default alignment for attribute((aligned)) on this target, to be used if no alignment value is specified.

Definition at line 1921 of file ASTContext.cpp.

References clang::TargetInfo::getDefaultAlignForAttributeAligned(), and getTargetInfo().

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

Definition at line 588 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishCXXNonNestedClass(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCAvailabilityCheckExpr(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnPragmaOptionsAlign(), clang::Sema::ActOnSEHTryBlock(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), clang::Sema::adjustMemberFunctionCC(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), AtomicUsesUnsupportedLibcall(), basicGVALinkageForFunction(), basicGVALinkageForVariable(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildVAArgExpr(), clang::arcmt::trans::canApplyWeak(), clang::Sema::CheckAddressOfOperand(), CheckAvailability(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCallingConvAttr(), clang::Sema::checkClassLevelDLLAttribute(), clang::Sema::CheckCXXThrowOperand(), checkDLLAttributeRedeclaration(), clang::Sema::CheckEnumConstant(), CheckFormatString(), clang::Sema::CheckMain(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CheckRegparmAttr(), clang::Sema::checkSectionName(), clang::CodeGen::CodeGenModule::CodeGenModule(), computeKeyFunction(), ConvertDeclSpecToType(), clang::CodeGen::CreateItaniumCXXABI(), DeclMustBeEmitted(), DecodeTypeFromStr(), clang::Sema::DefaultLvalueConversion(), emitOMPAtomicRMW(), clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata(), clang::Sema::FinalizeDeclaration(), clang::Sema::FindAllocationFunctions(), clang::DeclSpec::Finish(), clang::Sema::FixOverloadedFunctionReference(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::Sema::FormatStringHasSArg(), getAlignOfGlobalVar(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getASTRecordLayout(), getAttrForPlatform(), clang::FunctionDecl::getBuiltinID(), getCallingConvMangling(), getCCForDeclaratorChunk(), getConstantArrayInfoInChars(), getCurrentKeyFunction(), getDeclAlign(), getDefaultCallingConvention(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), getIntTypeForBitwidth(), clang::Sema::getLocationOfStringLiteralByte(), clang::CodeGen::swiftcall::getMaximumVoluntaryIntegerSize(), getObjCEncodingForPrimitiveKind(), getOpenMPDefaultSimdAlign(), getRealTypeForBitwidth(), getTargetDefaultAlignForAttributeAligned(), handleAliasAttr(), handleAnyX86InterruptAttr(), handleAvailabilityAttr(), handleDeclspecThreadAttr(), handleDLLAttr(), handleIFuncAttr(), handleInterruptAttr(), HandleNeonVectorTypeAttr(), handleSectionAttr(), clang::BackendConsumer::HandleTranslationUnit(), handleVisibilityAttr(), handleWeakImportAttr(), clang::Sema::Initialize(), clang::Sema::InstantiateClassMembers(), isArc4RandomAvailable(), clang::Type::isIncompleteType(), clang::CodeGen::swiftcall::isLegalIntegerType(), clang::FunctionDecl::isMSExternInline(), isMsLayout(), isMSStaticDataMemberInlineDefinition(), clang::FunctionDecl::isMSVCRTEntryPoint(), isPermittedNeonBaseType(), isVarDeclStrongDefinition(), clang::MangleContext::mangleName(), clang::Sema::MarkVTableUsed(), parseModeAttrArg(), clang::Sema::PerformImplicitConversion(), ProcessDeclAttribute(), clang::CodeGen::CodeGenModule::Release(), roundUpSizeToCharAlignment(), SemaBuiltinCpuSupports(), clang::StringLiteral::setString(), TryEvaluateBuiltinNaN(), TryReinterpretCast(), TryStaticMemberPointerUpcast(), and clang::Sema::VerifyBitField().

ASTContext::TemplateOrSpecializationInfo ASTContext::getTemplateOrSpecializationInfo ( const VarDecl Var)

Definition at line 1161 of file ASTContext.cpp.

Referenced by getInstantiatedFromStaticDataMember().

QualType ASTContext::getTemplateSpecializationType ( TemplateName  T,
ArrayRef< TemplateArgument Args,
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 TTPDecl = nullptr 
) const

Retrieve the template type parameter type for a template parameter or parameter pack with the given depth, index, and (optionally) name.

Definition at line 3339 of file ASTContext.cpp.

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

Referenced by clang::TemplateTypeParmDecl::Create(), and clang::ASTNodeImporter::VisitTemplateTypeParmType().

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

Definition at line 886 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnModuleInclude(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPragmaDetectMismatch(), clang::Sema::ActOnPragmaMSComment(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTranslationUnitScope(), clang::Sema::ActOnTypeParameter(), addFunctionPointerConversion(), clang::ASTImporter::ASTImporter(), buildImplicitRecord(), buildImplicitTypedef(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildPredefinedExpr(), clang::arcmt::trans::checkAPIUses(), checkGlobalOrExternCConflict(), cleanupDeallocOrFinalize(), clang::Sema::CodeCompleteNamespaceDecl(), clang::Sema::CodeCompleteObjCImplementationDecl(), clang::Sema::CodeCompleteObjCInterfaceCategory(), clang::Sema::CodeCompleteObjCInterfaceDecl(), clang::Sema::CodeCompleteObjCProtocolDecl(), clang::Sema::CodeCompleteObjCProtocolReferences(), clang::Sema::CodeCompleteObjCSuperclass(), clang::Sema::computeDeclContext(), configureBlocksRuntimeObject(), ConvertDeclSpecToType(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::createImplicitModuleImportForErrorRecovery(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DeclareGlobalAllocationFunction(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindUsualDeallocationFunction(), clang::Sema::GatherGlobalCodeCompletions(), GCRewriteFinalize(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getExternCContextDecl(), getObjCProtocolDecl(), clang::Sema::getOrCreateStdNamespace(), getParents(), getPredefinedDecl(), clang::Sema::ImplicitlyDefineFunction(), clang::ASTReader::InitializeContext(), clang::Sema::LazilyCreateBuiltin(), LookupObjCInterfaceDeclForLiteral(), clang::Sema::LookupVisibleDecls(), LookupVisibleDecls(), clang::arcmt::trans::makeAssignARCSafe(), clang::ast_matchers::MatchFinder::matchAST(), clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize(), clang::arcmt::trans::removeRetainReleaseDeallocFinalize(), clang::arcmt::trans::removeZeroOutPropsInDeallocFinalize(), clang::arcmt::trans::rewriteAutoreleasePool(), rewriteBuiltinFunctionDecl(), clang::arcmt::trans::rewriteUnbridgedCasts(), clang::arcmt::trans::rewriteUnusedInitDelegate(), clang::Sema::SubstParmVarDecl(), traverseAST(), clang::arcmt::trans::GCAttrsTraverser::traverseTU(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), and clang::ASTNodeImporter::VisitTranslationUnitDecl().

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

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

Definition at line 2125 of file ASTContext.cpp.

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

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnArrayTypeTrait(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBuiltinOffsetOf(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnCompoundLiteral(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnObjCBridgedCast(), clang::Sema::ActOnObjCInstanceType(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStringLiteral(), clang::Sema::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTypeTrait(), addAsFieldToClosureType(), addBlockPointerConversion(), addFieldToRecordDecl(), addFunctionPointerConversion(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildClassMessageImplicit(), clang::Sema::BuildEmptyCXXFoldExpr(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), buildImplicitTypedef(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildParmVarDeclForTypedef(), buildPostUpdate(), clang::Sema::BuildPseudoDestructorExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildStdInitializerList(), buildVarDecl(), captureInCapturedRegion(), captureThis(), CastForMoving(), checkCoroutineContext(), checkTypeParamListConsistency(), ConstructTransparentUnion(), clang::Sema::createLambdaInitCaptureVarDecl(), createMakeIntegerSeqParameterList(), clang::Sema::CreatePropertyDecl(), createTypePackElementParameterList(), clang::Sema::DefineInheritingConstructor(), clang::Sema::findInheritingConstructor(), clang::Sema::getDestructorName(), GetFullTypeForDeclarator(), clang::Sema::getInheritingConstructorName(), clang::Sema::getObjCMessageKind(), clang::Sema::getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), clang::Sema::HandleField(), handleIBOutletCollection(), clang::Sema::HandleMSProperty(), clang::ASTImporter::Import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ObjCObjectTypeLoc::initializeLocal(), clang::TypeOfTypeLoc::initializeLocal(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), lookupPromiseType(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::Sema::ParseObjCEncodeExpression(), clang::Sema::ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), performLambdaVarCaptureInitialization(), RebuildDeclaratorInCurrentInstantiation(), translateTemplateArgument(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().

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

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

Definition at line 1834 of file ASTContext.h.

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

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

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

Definition at line 1835 of file ASTContext.h.

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

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

Definition at line 1881 of file ASTContext.cpp.

References getTypeAlign(), and toCharUnitsFromBits().

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

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

Definition at line 1199 of file ASTContext.h.

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnSuperClassOfClassInterface(), AddImplicitObjectParameterType(), clang::Sema::AddOverloadCandidate(), AddResultTypeChunk(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildMicrosoftCAnonymousStruct(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTypenameType(), clang::Sema::ClassifyName(), clang::Sema::CodeCompleteObjCSuperMessage(), ConvertDeclSpecToType(), clang::CXXRecordDecl::Create(), clang::LambdaExpr::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), clang::CXXRecordDecl::CreateLambda(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::deduceClosureReturnType(), clang::InitializationSequence::Diagnose(), DiagnoseBadAccess(), clang::Sema::diagnoseQualifiedDeclaration(), DiagnoseUninstantiableTemplate(), DumpRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), FindBaseInitializer(), clang::Sema::FindInstantiatedDecl(), clang::Sema::FixOverloadedFunctionReference(), clang::FormatASTNodeDiagnosticArgument(), GenerateInjectedTemplateArgs(), clang::Sema::getAmbiguousPathsDisplayString(), getBOOLType(), getBuiltinMSVaListType(), getBuiltinVaListType(), clang::Sema::getCurrentThisType(), GetDeclSpecTypeForDeclarator(), clang::getDeclUsageType(), clang::CXXRecordDecl::getDestructor(), clang::Sema::getDestructorName(), getFILEType(), GetFullTypeForDeclarator(), getjmp_bufType(), clang::Sema::GetNameFromUnqualifiedId(), getObjCClassType(), getObjCIdType(), getObjCInstanceType(), clang::Sema::getObjCMessageKind(), getObjCSelType(), getRequiredQualification(), getsigjmp_bufType(), getTagDeclType(), clang::CXXMethodDecl::getThisType(), clang::Sema::getTypeName(), GetTypeOfFunction(), getucontext_tType(), clang::ASTNodeImporter::ImportDefinition(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::isAcceptableNestedNameSpecifier(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Sema::isIncompatibleTypedef(), clang::CXXMethodDecl::isMoveAssignmentOperator(), IsStandardConversion(), clang::Expr::isTemporaryObject(), clang::Sema::LookupConstructors(), lookupPromiseType(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::InitializationSequence::Perform(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrintInstantiationStack(), clang::Sema::RequireCompleteDeclContext(), ShouldDiagnoseSwitchCaseNotInEnum(), TryDiagnoseProtectedAccess(), TryObjectArgumentInitialization(), TryStaticMemberPointerUpcast(), clang::CXXRecordDecl::viewInheritance(), clang::ASTNodeImporter::VisitRecordDecl(), and clang::ASTNodeImporter::VisitTypedefType().

TypedefNameDecl * ASTContext::getTypedefNameForUnnamedTagDecl ( const TagDecl TD)

Definition at line 8829 of file ASTContext.cpp.

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

Return the unique reference to the type for the specified typedef-name decl.

getTypedefType - Return the unique reference to the type for the specified typedef name decl.

Definition at line 3220 of file ASTContext.cpp.

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

Referenced by CheckExtVectorComponent(), CreatePowerABIBuiltinVaListDecl(), getCFConstantStringType(), and getRawCFConstantStringType().

TypeInfo ASTContext::getTypeInfo ( const Type T) const
TypeInfo clang::ASTContext::getTypeInfo ( QualType  T) const
inline

Definition at line 1807 of file ASTContext.h.

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

Referenced by getTypeInfo().

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

Definition at line 1495 of file ASTContext.cpp.

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

QualType ASTContext::getTypeOfExprType ( Expr tofExpr) const

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

References getCanonicalType(), clang::Expr::getType(), ID, 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 nodes.

The only motivation to unique these nodes would be memory savings. Since typeof(t) is fairly uncommon, space shouldn't be an issue. This doesn't affect the type checker, since it operates on canonical types (which are always unique).

Definition at line 3960 of file ASTContext.cpp.

References getCanonicalType(), and clang::TypeAlignment.

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

BuiltinTemplateDecl * ASTContext::getTypePackElementDecl ( ) const
IdentifierInfo* clang::ASTContext::getTypePackElementName ( ) const
inline

Definition at line 1481 of file ASTContext.h.

References clang::IdentifierTable::get(), and Idents.

Referenced by getTypePackElementDecl(), and LookupBuiltin().

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

Definition at line 961 of file ASTContext.h.

Referenced by clang::TypoCorrectionConsumer::addNamespaces().

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

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

Definition at line 1813 of file ASTContext.h.

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

Referenced by clang::Sema::ActOnAsTypeExpr(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddModeAttr(), clang::Sema::areLaxCompatibleVectorTypes(), BitsContainNoUserData(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), buildMemcpyForAssignmentOp(), buildSingleCopyAssignRecursively(), clang::Sema::CheckCompatibleReinterpretCast(), checkIntToPointerCast(), CheckOpenMPLoop(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckVectorOperands(), checkVectorResult(), CompareStandardConversionSequences(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), create_dispatch_once(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseBadShiftValues(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), emitOMPAtomicRMW(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitReplacement(), EmitX86_64VAArgFromMemory(), evaluateCDTSize(), clang::ento::BasicValueFactory::getAPSIntType(), clang::ento::MemRegion::getAsOffset(), getBestAbsFunction(), GetCFNumberSize(), getCharWidth(), getIntWidth(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), clang::ConstantArrayType::getMaxSizeBits(), getNextLargerIntegralType(), clang::ConstantArrayType::getNumAddressingBits(), getPreferredTypeAlign(), getPromotedIntegerType(), getRangeForType(), clang::Sema::GetSignedVectorType(), clang::ento::BasicValueFactory::getTruthValue(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), handleAnyX86InterruptAttr(), HandleNeonVectorTypeAttr(), handleTransparentUnionAttr(), HandleVectorSizeAttr(), clang::Expr::IgnoreParenNoopCasts(), is32Or64BitBasicType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isPromotableBitField(), isSingleElementStruct(), isSSEVectorType(), clang::CodeGen::CodeGenFunction::LValueIsSuitableForInlineAtomic(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), clang::MangleContext::mangleName(), mergeEnumWithInteger(), OpenCLConvertScalarsToVectors(), clang::ento::ExprEngine::processSwitch(), RecoverCastedSymbol(), rewriteToNumericBoxedExpression(), TryInitializerListConstruction(), TryReinterpretCast(), clang::Sema::VerifyBitField(), and clang::ento::ExprEngine::VisitOffsetOfExpr().

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

Definition at line 1814 of file ASTContext.h.

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

CharUnits ASTContext::getTypeSizeInChars ( QualType  T) const

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

getTypeSizeInChars - Return the size of the specified type, in characters.

This method does not work on incomplete types.

Definition at line 1869 of file ASTContext.cpp.

References getTypeInfoInChars().

Referenced by clang::Sema::ActOnFields(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), AtomicUsesUnsupportedLibcall(), buildMemcpyForAssignmentOp(), clang::Sema::BuildPredefinedExpr(), clang::ento::StoreManager::castRegion(), CheckAggExprForMemSetUse(), checkOpenCLEnqueueLocalSizeArgs(), clang::Sema::CheckSubtractionOperands(), computeBlockInfo(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::CodeGen::CodeGenFunction::emitAddrOfImagComponent(), EmitAggMemberInitializer(), EmitArrayDelete(), emitArraySubscriptGEP(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitCXXNewAllocSize(), EmitDeclInvariant(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPointerArithmetic(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), evenFlexibleArraySize(), fillInlineAsmTypeInfo(), forConstantArrayExpansion(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ento::TypedValueRegion::getExtent(), clang::ConstantArrayType::getNumAddressingBits(), GetNumNonZeroBytesInInit(), getObjCEncodingForBlock(), getObjCEncodingForMethodDecl(), getObjCEncodingTypeSize(), getTypeExpansion(), isOnePastTheEndOfCompleteObject(), clang::APValue::printPretty(), and clang::CodeGen::CodeGenModule::Release().

CharUnits ASTContext::getTypeSizeInChars ( const Type T) const

Definition at line 1872 of file ASTContext.cpp.

References getTypeInfoInChars().

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

Retrieve the C ucontext_t type.

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

References buildImplicitTypedef(), and UnsignedInt128Ty.

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

CanQualType ASTContext::getUIntMaxType ( ) const

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

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

Definition at line 4129 of file ASTContext.cpp.

References clang::TargetInfo::getUIntMaxType().

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

QualType ASTContext::getUIntPtrType ( ) const

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

Definition at line 4151 of file ASTContext.cpp.

References getCorrespondingUnsignedType(), and getIntPtrType().

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

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

Unary type transforms.

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

Definition at line 4002 of file ASTContext.cpp.

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

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

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

Return this type as a completely-unqualified array type, capturing the qualifiers in Quals.

This will remove the minimal amount of sugaring from the types, similar to the behavior of QualType::getUnqualifiedType().

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

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

Referenced by clang::Sema::BuildCXXTypeId(), CastsAwayConstness(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), CompareStandardConversionSequences(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), hasSimilarType(), shouldBeModeledWithNoOp(), TryConstCast(), TryReferenceInitialization(), and TryReferenceListInitialization().

QualType clang::ASTContext::getUnqualifiedObjCPointerType ( QualType  type) const
inline

getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier removed.

Definition at line 1728 of file ASTContext.h.

References getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasObjCLifetime(), clang::Type::isObjCObjectPointerType(), and clang::Qualifiers::removeObjCLifetime().

QualType ASTContext::getUnsignedWCharType ( ) const

Return the type of "unsigned wchar_t".

getUnsignedWCharType - Return the type of "unsigned wchar_t".

Used when in C++, as a GCC extension.

Definition at line 4142 of file ASTContext.cpp.

References UnsignedIntTy.

Referenced by ConvertDeclSpecToType().

Decl * ASTContext::getVaListTagDecl ( ) const

Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help define the __builtin_va_list type for some targets.

Definition at line 6507 of file ASTContext.cpp.

References getBuiltinVaListDecl(), and VaListTagDecl.

Referenced by getPredefinedDecl().

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

Return a non-unique reference to the type for a variable array of the specified element type.

getVariableArrayType - Returns a non-unique reference to the type for a variable array of the specified element type.

Definition at line 2751 of file ASTContext.cpp.

References getCanonicalType(), getQualifiedType(), clang::QualType::hasLocalQualifiers(), clang::QualType::isCanonical(), clang::SplitQualType::Quals, clang::CanQual< T >::split(), clang::SplitQualType::Ty, and clang::TypeAlignment.

Referenced by clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::BuildArrayType(), getAsArrayType(), getUnqualifiedArrayType(), getVariableArrayDecayedType(), and clang::ASTNodeImporter::VisitVariableArrayType().

QualType ASTContext::getVectorType ( QualType  vecType,
unsigned  NumElts,
VectorType::VectorKind  VecKind 
) const

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

getVectorType - Return the unique reference to a vector type of the specified element type and size.

Precondition
VectorType must be a built-in type.

VectorType must be a built-in type.

Definition at line 2885 of file ASTContext.cpp.

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

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

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

Return the uniqued reference to the type for a volatile qualified type.

The resulting type has a union of the qualifiers from T and volatile.

Definition at line 1020 of file ASTContext.h.

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

Referenced by AddBuiltinAssignmentOperatorCandidates(), and DecodeTypeFromStr().

VTableContextBase * ASTContext::getVTableContext ( )
QualType clang::ASTContext::getWCharType ( ) const
inline

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

Definition at line 1341 of file ASTContext.h.

References WCharTy.

QualType clang::ASTContext::getWideCharType ( ) const
inline
QualType clang::ASTContext::getWIntType ( ) const
inline

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

Definition at line 1360 of file ASTContext.h.

References WIntTy.

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

bool clang::ASTContext::hasSameNullabilityTypeQualifier ( QualType  SubT,
QualType  SuperT,
bool  IsParam 
) const
inline
bool ASTContext::hasSameTemplateName ( TemplateName  X,
TemplateName  Y 
)

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

Definition at line 4379 of file ASTContext.cpp.

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

Referenced by checkDeducedTemplateArguments(), and DeduceTemplateArguments().

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

Determine whether the given types T1 and T2 are equivalent.

Definition at line 1982 of file ASTContext.h.

References getCanonicalType().

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnVariableDeclarator(), AddResultTypeChunk(), adjustBlockReturnsToEnum(), areCompatibleVectorTypes(), BuildCounterInit(), BuildCounterUpdate(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXTypeId(), buildDeclareReductionRef(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), castToBase(), clang::Sema::CheckARCMethodDecl(), clang::Sema::CheckAssignmentConstraints(), checkConditionalPointerCompatibility(), checkDeducedTemplateArguments(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckImplementationIvars(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMain(), clang::Sema::CheckMemberSpecialization(), checkOpenCLPipePacketType(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckTemplateArgument(), checkTypeParamListConsistency(), clang::Sema::CheckVectorOperands(), ClassImplementsAllMethodsAndProperties(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), compareStandardConversionSubsets(), clang::Sema::computeDeclContext(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArguments(), clang::Sema::DeduceTemplateArguments(), DiagnoseBadDeduction(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::diagnoseQualifiedDeclaration(), diagnoseVarDeclTypeMismatch(), EvaluateBinaryTypeTrait(), filterNonConflictingPreviousTypedefDecls(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::ClassTemplateDecl::findPartialSpecialization(), findUntaggedStructOrUnionIndex(), clang::Sema::FixOverloadedFunctionReference(), clang::Sema::FunctionParamTypesAreEqual(), getBestAbsFunction(), clang::Sema::HandleFunctionTypeMismatch(), clang::Sema::HandlePropertyInClassExtension(), handleVecTypeHint(), hasCompatibleArrayTypes(), hasSimilarParameters(), clang::Sema::IsBlockPointerConversion(), IsEquivalentForUsingDecl(), clang::Sema::isEquivalentInternalLinkageDeclaration(), clang::Sema::isIncompatibleTypedef(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSameEntity(), isSameTemplateArg(), IsStandardConversion(), clang::ASTImporter::IsStructurallyEquivalent(), loadToBegin(), MatchTemplateParameterKind(), mergeEnumWithInteger(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::MergeVarDeclTypes(), ObjCMethodsAreEqual(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::Sema::PrepareScalarCast(), rewriteToNumberLiteral(), sameObjCTypeArgs(), clang::Sema::setTagNameForLinkagePurposes(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), and typesAreCompatible().

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

Definition at line 1986 of file ASTContext.h.

References getCanonicalType().

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

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

Referenced by clang::Sema::ActOnExplicitInstantiation(), AddObjCKeyValueCompletions(), clang::Sema::AddOverloadCandidate(), AddSuperSendCompletion(), areCompatibleVectorTypes(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildPseudoDestructorExpr(), clang::ento::StoreManager::CastRetrievedVal(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), checkEnumComparison(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckMain(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMoveOnConstruction(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CodeCompleteConstructorInitializer(), CompareDerivedToBaseConversions(), CompareQualificationConversions(), createObjCPropertyGetter(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArgumentsByTypeMatch(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAssignmentEnum(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitBinaryAtomicPost(), clang::Sema::EmitRelatedResultTypeNote(), clang::Sema::EmitRelatedResultTypeNoteForReturn(), EvaluateBinaryTypeTrait(), FindBaseInitializer(), FindImplementableMethods(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::Sema::getDestructorName(), clang::Sema::getDestructorType(), getExistingLazyBinding(), getParamType(), getPreferredArgumentTypeForMessageSend(), getRangeOfTypeInNestedNameSpecifier(), hasSimilarParameters(), hasSimilarType(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), isAllowableExplicitConversion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Sema::isCopyElisionCandidate(), isFirstArgumentCompatibleWithType(), clang::Sema::IsIntegralPromotion(), clang::Sema::IsMemberPointerConversion(), clang::Sema::isMicrosoftMissingTypename(), clang::CXXMethodDecl::isMoveAssignmentOperator(), isNonPlacementDeallocationFunction(), clang::Sema::IsNoReturnConversion(), isNullPointerValueTemplateArgument(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsPointerConversion(), clang::Sema::IsQualificationConversion(), IsStandardConversion(), clang::Expr::isTemporaryObject(), IsUserDefinedConversion(), clang::CXXMethodDecl::isUsualDeallocationFunction(), IsVectorConversion(), clang::Sema::LookupLiteralOperator(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::ProcessPropertyDecl(), clang::Sema::SemaBuiltinShuffleVector(), ShouldDiagnoseSwitchCaseNotInEnum(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryStaticMemberPointerUpcast(), and UnwrapSimilarPointerTypes().

void ASTContext::InitBuiltinTypes ( const TargetInfo Target,
const TargetInfo AuxTarget = nullptr 
)
bool ASTContext::isAlignmentRequired ( const Type T) const

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

Definition at line 1499 of file ASTContext.cpp.

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

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

bool ASTContext::isAlignmentRequired ( QualType  T) const

Definition at line 1503 of file ASTContext.cpp.

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

bool ASTContext::isMSStaticDataMemberInlineDefinition ( const VarDecl VD) const
bool ASTContext::isNearlyEmpty ( const CXXRecordDecl RD) const

Definition at line 8680 of file ASTContext.cpp.

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

Definition at line 2241 of file ASTContext.h.

References getObjCClassType().

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

Definition at line 2238 of file ASTContext.h.

References getObjCIdType().

Referenced by maybeAdjustInterfaceForSubscriptingCheck().

static bool clang::ASTContext::isObjCNSObjectType ( QualType  Ty)
inlinestatic

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

Definition at line 1793 of file ASTContext.h.

References clang::Type::isObjCNSObjectType().

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

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

Definition at line 2244 of file ASTContext.h.

References getObjCSelType().

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

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

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

Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().

bool ASTContext::isSentinelNullExpr ( const Expr E)
import_range clang::ASTContext::local_imports ( ) const
inline

Definition at line 857 of file ASTContext.h.

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

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

Definition at line 2305 of file ASTContext.h.

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

void ASTContext::mergeDefinitionIntoModule ( NamedDecl ND,
Module M,
bool  NotifyListeners = true 
)

Note that the definition ND has been merged into module M, and should be visible whenever M is visible.

Definition at line 880 of file ASTContext.cpp.

References getASTMutationListener(), getLangOpts(), Listener, clang::ASTMutationListener::RedefinedHiddenDefinition(), and clang::NamedDecl::setHidden().

Referenced by clang::Sema::makeMergedDefinitionVisible(), clang::ASTDeclReader::mergeDefinitionVisibility(), and clang::ASTDeclReader::UpdateDecl().

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

mergeFunctionParameterTypes - merge two types which appear as function parameter types

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

References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), I, clang::QualType::isNull(), and mergeTypes().

Referenced by mergeFunctionParameterTypes().

QualType ASTContext::mergeTypes ( QualType  LHS,
QualType  RHS,
bool  OfBlockPointer = false,
bool  Unqualified = false,
bool  BlockReturnType = false 
)
bool ASTContext::ObjCMethodsAreEqual ( const ObjCMethodDecl MethodDecl,
const ObjCMethodDecl MethodImp 
)
bool ASTContext::ObjCObjectAdoptsQTypeProtocols ( QualType  QT,
ObjCInterfaceDecl IC 
)

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

Definition at line 3804 of file ASTContext.cpp.

References clang::ObjCInterfaceDecl::ClassImplementsProtocol(), clang::Type::getAs(), and clang::Type::isObjCQualifiedIdType().

Referenced by CheckObjCBridgeNSCast().

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

ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.

Definition at line 6801 of file ASTContext.cpp.

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

Referenced by canAssignObjCInterfaces().

bool ASTContext::ObjCQualifiedIdTypesAreCompatible ( QualType  lhs,
QualType  rhs,
bool  compare 
)
ASTContext::overridden_method_range ASTContext::overridden_methods ( const CXXMethodDecl Method) const

Definition at line 1290 of file ASTContext.cpp.

References overridden_methods_begin(), and overridden_methods_end().

ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin ( const CXXMethodDecl Method) const
ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_end ( const CXXMethodDecl Method) const
unsigned ASTContext::overridden_methods_size ( const CXXMethodDecl Method) const

Definition at line 1281 of file ASTContext.cpp.

References clang::CXXMethodDecl::getCanonicalDecl().

void ASTContext::PrintStats ( ) const
bool ASTContext::propertyTypesAreCompatible ( QualType  LHS,
QualType  RHS 
)
bool ASTContext::ProtocolCompatibleWithProtocol ( ObjCProtocolDecl lProto,
ObjCProtocolDecl rProto 
) const

ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto'.

Definition at line 6789 of file ASTContext.cpp.

References clang::declaresSameEntity(), and clang::ObjCProtocolDecl::protocols().

Referenced by clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), ObjCQualifiedClassTypesAreCompatible(), ObjCQualifiedIdTypesAreCompatible(), and QIdProtocolsAdoptObjCObjectProtocols().

bool ASTContext::QIdProtocolsAdoptObjCObjectProtocols ( QualType  QT,
ObjCInterfaceDecl IDecl 
)

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

Definition at line 3823 of file ASTContext.cpp.

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

Referenced by CheckObjCBridgeCFCast().

void ASTContext::ResetObjCLayout ( const ObjCContainerDecl CD)

Definition at line 7949 of file ASTContext.cpp.

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

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

References Listener.

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

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

Set the copy inialization expression of a block var decl.

Definition at line 2104 of file ASTContext.cpp.

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

void clang::ASTContext::setBOOLDecl ( TypedefDecl TD)
inline

Save declaration of 'BOOL' typedef.

Definition at line 1649 of file ASTContext.h.

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

void ASTContext::setCFConstantStringType ( QualType  T)
void ASTContext::setClassScopeSpecializationPattern ( FunctionDecl FD,
FunctionDecl Pattern 
)

Definition at line 1199 of file ASTContext.cpp.

void clang::ASTContext::setcudaConfigureCallDecl ( FunctionDecl FD)
inline
void ASTContext::setExternalSource ( IntrusiveRefCntPtr< ExternalASTSource Source)

Attach an external AST source to the AST context.

The external AST source provides the ability to load parts of the abstract syntax tree as needed from some external storage, e.g., a precompiled header.

Definition at line 817 of file ASTContext.cpp.

References ExternalSource.

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

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

Set the type for the C FILE type.

Definition at line 1498 of file ASTContext.h.

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

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

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

Definition at line 1171 of file ASTContext.cpp.

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

void ASTContext::setInstantiatedFromUnnamedFieldDecl ( FieldDecl Inst,
FieldDecl Tmpl 
)

Definition at line 1252 of file ASTContext.cpp.

References clang::NamedDecl::getDeclName().

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

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

Definition at line 1237 of file ASTContext.cpp.

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

Set the type for the C jmp_buf type.

Definition at line 1508 of file ASTContext.h.

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

void ASTContext::setManglingNumber ( const NamedDecl ND,
unsigned  Number 
)
void ASTContext::setNonKeyFunction ( const CXXMethodDecl method)

Observe that the given method cannot be a key function.

Checks the key-function cache for the method's class and clears it if matches the given declaration.

This is used in ABIs where out-of-line definitions marked inline are not considered to be key functions.

Parameters
methodshould be the declaration from the class definition

Definition at line 3033 of file RecordLayoutBuilder.cpp.

References clang::LazyOffsetPtr< T, OffsT, Get >::get(), getExternalSource(), clang::Redeclarable< decl_type >::getFirstDecl(), and clang::CXXMethodDecl::getParent().

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

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

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

Definition at line 1432 of file ASTContext.h.

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

void ASTContext::setObjCConstantStringInterface ( ObjCInterfaceDecl Decl)
void clang::ASTContext::setObjCIdRedefinitionType ( QualType  RedefType)
inline

Set the user-written type that redefines id.

Definition at line 1419 of file ASTContext.h.

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

void ASTContext::setObjCImplementation ( ObjCInterfaceDecl IFaceD,
ObjCImplementationDecl ImplD 
)

Set the implementation of ObjCInterfaceDecl.

Definition at line 2054 of file ASTContext.cpp.

Referenced by clang::ObjCImplDecl::setClassInterface().

void ASTContext::setObjCImplementation ( ObjCCategoryDecl CatD,
ObjCCategoryImplDecl ImplD 
)

Set the implementation of ObjCCategoryDecl.

Definition at line 2060 of file ASTContext.cpp.

void ASTContext::setObjCMethodRedeclaration ( const ObjCMethodDecl MD,
const ObjCMethodDecl Redecl 
)

Definition at line 2071 of file ASTContext.cpp.

References getObjCMethodRedeclaration().

void clang::ASTContext::setObjCNSStringType ( QualType  T)
inline

Definition at line 1406 of file ASTContext.h.

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

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

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

Definition at line 1446 of file ASTContext.h.

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

void clang::ASTContext::setObjCSuperType ( QualType  ST)
inline

Definition at line 1383 of file ASTContext.h.

Referenced by LookupPredefedObjCSuperType().

void ASTContext::setParameterIndex ( const ParmVarDecl D,
unsigned  index 
)

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

Definition at line 8842 of file ASTContext.cpp.

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

Definition at line 865 of file ASTContext.h.

void clang::ASTContext::setPrintingPolicy ( const clang::PrintingPolicy Policy)
inline

Definition at line 557 of file ASTContext.h.

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

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

Set the type for the C sigjmp_buf type.

Definition at line 1520 of file ASTContext.h.

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

void ASTContext::setStaticLocalNumber ( const VarDecl VD,
unsigned  Number 
)
void ASTContext::setTemplateOrSpecializationInfo ( VarDecl Inst,
TemplateOrSpecializationInfo  TSI 
)

Definition at line 1181 of file ASTContext.cpp.

Referenced by setInstantiatedFromStaticDataMember().

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

Set the type for the C ucontext_t type.

Definition at line 1532 of file ASTContext.h.

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

int64_t ASTContext::toBits ( CharUnits  CharSize) const
CharUnits ASTContext::toCharUnitsFromBits ( int64_t  BitSize) const
bool ASTContext::typesAreBlockPointerCompatible ( QualType  LHS,
QualType  RHS 
)
bool ASTContext::typesAreCompatible ( QualType  LHS,
QualType  RHS,
bool  CompareUnqualified = false 
)
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 4253 of file ASTContext.cpp.

References clang::Type::getAs(), clang::MemberPointerType::getClass(), getLangOpts(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), and hasSameUnqualifiedType().

Referenced by CompareQualificationConversions(), hasSimilarType(), clang::Sema::IsQualificationConversion(), shouldBeModeledWithNoOp(), and TryConstCast().

Friends And Related Function Documentation

friend class ASTDeclReader
friend

Definition at line 449 of file ASTContext.h.

friend class ASTReader
friend

Definition at line 450 of file ASTContext.h.

friend class ASTWriter
friend

Definition at line 451 of file ASTContext.h.

friend class CXXRecordDecl
friend

Definition at line 452 of file ASTContext.h.

friend class DeclarationNameTable
friend

Definition at line 2569 of file ASTContext.h.

friend class DeclContext
friend

Definition at line 2568 of file ASTContext.h.

friend class NestedNameSpecifier
friend

Definition at line 152 of file ASTContext.h.

Member Data Documentation

CanQualType clang::ASTContext::ARCUnbridgedCastTy
QualType clang::ASTContext::AutoDeductTy
mutable

Definition at line 922 of file ASTContext.h.

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

QualType clang::ASTContext::AutoRRefDeductTy
mutable

Definition at line 923 of file ASTContext.h.

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

CanQualType clang::ASTContext::BoolTy
CanQualType clang::ASTContext::BoundMemberTy
CanQualType clang::ASTContext::BuiltinFnTy
Builtin::Context& clang::ASTContext::BuiltinInfo
CanQualType clang::ASTContext::Char16Ty
CanQualType clang::ASTContext::Char32Ty
CanQualType clang::ASTContext::CharTy
RawCommentList clang::ASTContext::Comments

All comments in this translation unit.

Definition at line 617 of file ASTContext.h.

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

bool clang::ASTContext::CommentsLoaded
mutable

True if comments are already loaded from ExternalASTSource.

Definition at line 620 of file ASTContext.h.

Referenced by getRawCommentForDeclNoCache().

DeclarationNameTable clang::ASTContext::DeclarationNames
mutable

Definition at line 462 of file ASTContext.h.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToObjectOfClassType(), BuildCookedLiteralOperatorCall(), clang::Sema::BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckDestructor(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CodeCompleteCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::CXXRecordDecl::getDestructor(), getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), hasMember(), HasNoThrowOperator(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), clang::Sema::LookupConstructors(), clang::Sema::LookupOverloadedOperatorName(), clang::Sema::LookupSpecialMember(), parseOpenMPReductionId(), clang::ASTReader::ReadDeclarationName(), clang::Sema::ShouldDeleteSpecialMember(), clang::Sema::startLambdaDefinition(), and threadSafetyCheckIsSmartPointer().

CanQualType clang::ASTContext::DependentTy

Definition at line 909 of file ASTContext.h.

Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnChooseExpr(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), AddResultTypeChunk(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCoawaitExpr(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXFoldExpr(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::buildOverloadedCallSet(), clang::Sema::BuildPredefinedExpr(), clang::Sema::CheckAddressOfOperand(), checkCoroutineContext(), clang::Sema::CheckEnumConstant(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), clang::Sema::CheckPackExpansion(), clang::Sema::checkPseudoObjectAssignment(), clang::Sema::checkPseudoObjectIncDec(), CheckRealImagOperand(), ConvertDeclSpecToType(), clang::DependentScopeDeclRefExpr::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), GenerateInjectedTemplateArgs(), getDecltypeForExpr(), clang::ASTReader::GetType(), InitBuiltinTypes(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeVarDeclTypes(), clang::OverloadExpr::OverloadExpr(), and clang::Sema::startLambdaDefinition().

CanQualType clang::ASTContext::DoubleComplexTy

Definition at line 906 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

CanQualType clang::ASTContext::DoubleTy
IntrusiveRefCntPtr<ExternalASTSource> clang::ASTContext::ExternalSource
CanQualType clang::ASTContext::Float128ComplexTy

Definition at line 907 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

CanQualType clang::ASTContext::Float128Ty
CanQualType clang::ASTContext::FloatComplexTy

Definition at line 906 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

CanQualType clang::ASTContext::FloatTy
CanQualType clang::ASTContext::HalfTy
IdentifierTable& clang::ASTContext::Idents

Definition at line 459 of file ASTContext.h.

Referenced by clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnInstanceMessage(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnObjCBoolLiteral(), clang::Sema::ActOnStringLiteral(), addFunctionPointerConversion(), clang::Sema::addImplicitTypedef(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), buildCapture(), BuildImplicitMemberInitializer(), buildImplicitRecord(), buildImplicitTypedef(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildObjCStringLiteral(), buildSingleCopyAssignRecursively(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Sema::CheckFunctionDeclaration(), CheckKeyForObjCARCConversion(), clang::Sema::CheckObjCForCollectionOperand(), CheckProtocolMethodDefs(), cleanupDeallocOrFinalize(), configureBlocksRuntimeObject(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateBuiltinBinOp(), clang::ObjCMethodDecl::createImplicitParams(), CreatePowerABIBuiltinVaListDecl(), clang::Sema::CreatePropertyDecl(), CreateSystemZBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), CXXRecordMembersNamed(), clang::Sema::DefaultLvalueConversion(), DiagnoseDirectIsaAccess(), clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), emitReplacement(), GCRewriteFinalize(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), getBlockDescriptorExtendedType(), getBlockDescriptorType(), getBoolName(), getCFConstantStringDecl(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::Sema::getFloat128Identifier(), clang::ento::getKeywordSelectorImpl(), getMakeIntegerSeqName(), clang::NSAPI::getNSArraySelector(), clang::NSAPI::getNSClassId(), getNSCopyingName(), clang::NSAPI::getNSDictionarySelector(), getNSNumberFactoryMethod(), clang::NSAPI::getNSNumberLiteralSelector(), getNSObjectName(), clang::NSAPI::getNSSetSelector(), clang::NSAPI::getNSStringSelector(), clang::GetNullarySelector(), getObjCProtocolDecl(), clang::Sema::getSuperIdentifier(), getTypePackElementName(), clang::GetUnarySelector(), handleAvailabilityAttr(), handleFormatAttr(), handleIBOutletCollection(), hasMember(), clang::ASTImporter::Import(), clang::Sema::Initialize(), isCFStringType(), clang::Sema::isKnownName(), isMacroDefined(), clang::NSAPI::isMacroDefined(), isNSStringType(), IsValidIdentifier(), clang::Sema::LookupInlineAsmField(), clang::Sema::LookupInlineAsmVarDeclField(), clang::Sema::LookupInObjCMethod(), LookupPredefedObjCSuperType(), mergeDeclAttribute(), clang::ObjCNoReturn::ObjCNoReturn(), performLambdaVarCaptureInitialization(), PropertyMemoryAttribute(), shouldRunOnFunctionOrMethod(), and transferARCOwnershipToDeclaratorChunk().

CanQualType clang::ASTContext::Int128Ty
CanQualType clang::ASTContext::IntTy

Definition at line 901 of file ASTContext.h.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnCharacterConstant(), clang::Sema::ActOnEnumBody(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnGNUNullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnLastBitfield(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnTag(), clang::Sema::AddModeAttr(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::ento::ProgramState::assumeInBound(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMain(), clang::Sema::CheckPlaceholderExpr(), ConvertDeclSpecToType(), create_dispatch_once(), CreateAArch64ABIBuiltinVaListDecl(), clang::Sema::CreateOverloadedUnaryOp(), CreatePNaClABIBuiltinVaListDecl(), DecodeTypeFromStr(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EnterSEHTryStmt(), evaluateCDTSize(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::analyze_format_string::OptionalAmount::getArgType(), clang::analyze_printf::PrintfSpecifier::getArgType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), getCFConstantStringDecl(), GetCFNumberSize(), clang::ento::SValBuilder::getConditionType(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getGuardAcquireFn(), clang::ento::BasicValueFactory::getIntValue(), getLegacyIntegralTypeEncoding(), getLogicalOperationType(), getNeonEltType(), getNextLargerIntegralType(), getObjCEncodingTypeSize(), getPromotedIntegerType(), clang::Sema::GetSignedVectorType(), clang::CodeGen::CodeGenTBAA::getTBAAInfo(), clang::ASTReader::GetType(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), InitBuiltinTypes(), clang::Sema::Initialize(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::IsIntegralPromotion(), isOverflowingIntegerType(), isPromotableBitField(), makeLaunchBoundsArgExpr(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::prepareVectorSplat(), rewriteToNumericBoxedExpression(), and shouldNotPrintDirectly().

ASTMutationListener* clang::ASTContext::Listener
CanQualType clang::ASTContext::LongDoubleComplexTy

Definition at line 906 of file ASTContext.h.

Referenced by getFloatingTypeOfSizeWithinDomain(), and InitBuiltinTypes().

CanQualType clang::ASTContext::LongDoubleTy
CanQualType clang::ASTContext::LongLongTy
CanQualType clang::ASTContext::LongTy
CanQualType clang::ASTContext::NullPtrTy
unsigned ASTContext::NumImplicitCopyAssignmentOperators
static

The number of implicitly-declared copy assignment operators.

Definition at line 2467 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitCopyAssignmentOperatorsDeclared
static

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

Definition at line 2471 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitCopyConstructors
static

The number of implicitly-declared copy constructors.

Definition at line 2453 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitCopyConstructorsDeclared
static

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

Definition at line 2457 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitDefaultConstructors
static

The number of implicitly-declared default constructors.

Definition at line 2446 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitDefaultConstructorsDeclared
static

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

Definition at line 2450 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitDestructors
static

The number of implicitly-declared destructors.

Definition at line 2481 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitDestructorsDeclared
static

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

Definition at line 2485 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitMoveAssignmentOperators
static

The number of implicitly-declared move assignment operators.

Definition at line 2474 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitMoveAssignmentOperatorsDeclared
static

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

Definition at line 2478 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitMoveConstructors
static

The number of implicitly-declared move constructors.

Definition at line 2460 of file ASTContext.h.

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

unsigned ASTContext::NumImplicitMoveConstructorsDeclared
static

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

Definition at line 2464 of file ASTContext.h.

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

CanQualType clang::ASTContext::ObjCBuiltinBoolTy

Definition at line 913 of file ASTContext.h.

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

CanQualType clang::ASTContext::ObjCBuiltinClassTy

Definition at line 912 of file ASTContext.h.

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

CanQualType clang::ASTContext::ObjCBuiltinIdTy
CanQualType clang::ASTContext::ObjCBuiltinSelTy

Definition at line 912 of file ASTContext.h.

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

CanQualType clang::ASTContext::OCLClkEventTy
CanQualType clang::ASTContext::OCLEventTy
CanQualType clang::ASTContext::OCLNDRangeTy
CanQualType clang::ASTContext::OCLQueueTy
CanQualType clang::ASTContext::OCLReserveIDTy
CanQualType clang::ASTContext::OCLSamplerTy
CanQualType clang::ASTContext::OMPArraySectionTy
CanQualType clang::ASTContext::OverloadTy
llvm::DenseMap<const Decl *, comments::FullComment *> clang::ASTContext::ParsedComments
mutable

Mapping from declarations to parsed comments attached to any redeclaration.

Definition at line 685 of file ASTContext.h.

Referenced by getCommentForDecl().

CanQualType clang::ASTContext::PseudoObjectTy
llvm::DenseMap<const Decl *, RawCommentAndCacheFlags> clang::ASTContext::RedeclComments
mutable

Mapping from declarations to comments attached to any redeclaration.

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

Definition at line 681 of file ASTContext.h.

Referenced by getRawCommentForAnyRedecl().

llvm::StringMap<SectionInfo> clang::ASTContext::SectionInfos

Definition at line 2601 of file ASTContext.h.

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

SelectorTable& clang::ASTContext::Selectors
CanQualType clang::ASTContext::ShortTy
CanQualType clang::ASTContext::SignedCharTy
CanQualType clang::ASTContext::UnknownAnyTy
CanQualType clang::ASTContext::UnsignedCharTy
CanQualType clang::ASTContext::UnsignedInt128Ty
CanQualType clang::ASTContext::UnsignedIntTy
CanQualType clang::ASTContext::UnsignedLongLongTy
CanQualType clang::ASTContext::UnsignedLongTy
CanQualType clang::ASTContext::UnsignedShortTy
Decl* clang::ASTContext::VaListTagDecl
mutable
CanQualType clang::ASTContext::VoidPtrTy

Definition at line 908 of file ASTContext.h.

Referenced by clang::Sema::ActOnOpenMPRegionStart(), AddDirectArgument(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::ento::SimpleConstraintManager::assume(), buildBlockDescriptor(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), clang::Sema::BuildObjCBoxedExpr(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), clang::Sema::DiagnoseUnusedExprResult(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), getBlockDescriptorExtendedType(), clang::ento::BasicValueFactory::getIntWithPtrWidth(), getObjCEncodingForBlock(), getObjCEncodingForMethodDecl(), getObjCEncodingTypeSize(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::ento::BasicValueFactory::getZeroWithPtrWidth(), InitBuiltinTypes(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::CodeGen::CodeGenFunction::StartThunk().

CanQualType clang::ASTContext::VoidTy

Definition at line 893 of file ASTContext.h.

Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCallExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnIndirectGotoStmt(), clang::Sema::ActOnInitList(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnStmtExpr(), clang::Sema::AdjustDestructorExceptionSpec(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXThrow(), clang::Sema::BuildEmptyCXXFoldExpr(), buildPostUpdate(), clang::Sema::BuildReturnStmt(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckARCMethodDecl(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckOperatorDeleteDeclaration(), ConvertDeclSpecToType(), clang::DesignatedInitExpr::Create(), clang::PseudoObjectExpr::Create(), create_dispatch_once(), create_dispatch_sync(), CreateAAPCSABIBuiltinVaListDecl(), CreateAArch64ABIBuiltinVaListDecl(), clang::CodeGen::CodeGenFunction::createAtExitStub(), CreatePowerABIBuiltinVaListDecl(), CreateSystemZBuiltinVaListDecl(), CreateVoidPtrBuiltinVaListDecl(), CreateX86_64ABIBuiltinVaListDecl(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveConstructor(), DecodeTypeFromStr(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructGetterCall(), emitStructSetterCall(), clang::Sema::FindAllocationFunctions(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CallExpr::getCallReturnType(), GetDeclSpecTypeForDeclarator(), clang::ASTReader::GetType(), clang::ento::MemRegionManager::getVarRegion(), clang::Sema::IgnoredValueConversions(), InitBuiltinTypes(), clang::Sema::MaybeCreateStmtWithCleanups(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushCapturedRegionScope(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), and clang::ento::ExprEngine::Visit().

CanQualType clang::ASTContext::WCharTy
CanQualType clang::ASTContext::WideCharTy
CanQualType clang::ASTContext::WIntTy

Definition at line 898 of file ASTContext.h.

Referenced by getWIntType(), and InitBuiltinTypes().


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