Home | History | Annotate | Download | only in AST

Lines Matching refs:ASTContext

1 //===--- ASTContext.cpp - Context to hold long-lived AST nodes ------------===//
10 // This file implements the ASTContext interface.
14 #include "clang/AST/ASTContext.h"
42 unsigned ASTContext::NumImplicitDefaultConstructors;
43 unsigned ASTContext::NumImplicitDefaultConstructorsDeclared;
44 unsigned ASTContext::NumImplicitCopyConstructors;
45 unsigned ASTContext::NumImplicitCopyConstructorsDeclared;
46 unsigned ASTContext::NumImplicitMoveConstructors;
47 unsigned ASTContext::NumImplicitMoveConstructorsDeclared;
48 unsigned ASTContext::NumImplicitCopyAssignmentOperators;
49 unsigned ASTContext::NumImplicitCopyAssignmentOperatorsDeclared;
50 unsigned ASTContext::NumImplicitMoveAssignmentOperators;
51 unsigned ASTContext::NumImplicitMoveAssignmentOperatorsDeclared;
52 unsigned ASTContext::NumImplicitDestructors;
53 unsigned ASTContext::NumImplicitDestructorsDeclared;
59 RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
295 const RawComment *ASTContext::getRawCommentForAnyRedecl(
388 comments::FullComment *ASTContext::cloneFullComment(comments::FullComment *FC,
402 comments::FullComment *ASTContext::getCommentForDecl(
463 ASTContext::CanonicalTemplateTemplateParm::Profile(llvm::FoldingSetNodeID &ID,
503 ASTContext::getCanonicalTemplateTemplateParmDecl(
593 CXXABI *ASTContext::createCXXABI(const TargetInfo &T) {
628 ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
665 assert(t && "No target supplied for ASTContext initialization");
670 ASTContext::~ASTContext() {
701 void ASTContext::AddDeallocation(void (*Callback)(void*), void *Data) {
706 ASTContext::setExternalSource(OwningPtr<ExternalASTSource> &Source) {
710 void ASTContext::PrintStats() const {
769 TypedefDecl *ASTContext::getInt128Decl() const {
772 Int128Decl = TypedefDecl::Create(const_cast<ASTContext &>(*this),
783 TypedefDecl *ASTContext::getUInt128Decl() const {
786 UInt128Decl = TypedefDecl::Create(const_cast<ASTContext &>(*this),
797 void ASTContext::InitBuiltinType(CanQualType &R, BuiltinType::Kind K) {
803 void ASTContext::InitBuiltinTypes(const TargetInfo &Target) {
934 DiagnosticsEngine &ASTContext::getDiagnostics() const {
938 AttrVec& ASTContext::getDeclAttrs(const Decl *D) {
949 void ASTContext::eraseDeclAttrs(const Decl *D) {
958 ASTContext::getInstantiatedFromStaticDataMember(const VarDecl *Var) {
969 ASTContext::setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl,
980 FunctionDecl *ASTContext::getClassScopeSpecializationPattern(
991 void ASTContext::setClassScopeSpecializationPattern(FunctionDecl *FD,
999 ASTContext::getInstantiatedFromUsingDecl(UsingDecl *UUD) {
1009 ASTContext::setInstantiatedFromUsingDecl(UsingDecl *Inst, NamedDecl *Pattern) {
1019 ASTContext::getInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst) {
1029 ASTContext::setInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst,
1035 FieldDecl *ASTContext::getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field) {
1044 void ASTContext::setInstantiatedFromUnnamedFieldDecl(FieldDecl *Inst,
1054 bool ASTContext::ZeroBitfieldFollowsNonBitfield(const FieldDecl *FD,
1060 bool ASTContext::ZeroBitfieldFollowsBitfield(const FieldDecl *FD,
1067 bool ASTContext::BitfieldFollowsBitfield(const FieldDecl *FD,
1074 bool ASTContext::NonBitfieldFollowsBitfield(const FieldDecl *FD,
1080 bool ASTContext::BitfieldFollowsNonBitfield(const FieldDecl *FD,
1086 ASTContext::overridden_cxx_method_iterator
1087 ASTContext::overridden_methods_begin(const CXXMethodDecl *Method) const {
1096 ASTContext::overridden_cxx_method_iterator
1097 ASTContext::overridden_methods_end(const CXXMethodDecl *Method) const {
1107 ASTContext::overridden_methods_size(const CXXMethodDecl *Method) const {
1116 void ASTContext::addOverriddenMethod(const CXXMethodDecl *Method,
1122 void ASTContext::getOverriddenMethods(
1142 void ASTContext::addedLocalImportDecl(ImportDecl *Import) {
1161 const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
1178 CharUnits ASTContext::getDeclAlign(const Decl *D, bool RefAsPointee) const {
1268 ASTContext::getTypeInfoDataSizeInChars(QualType T) const {
1285 ASTContext
1292 ASTContext::getTypeInfoInChars(QualType T) const {
1296 std::pair<uint64_t, unsigned> ASTContext::getTypeInfo(const Type *T) const {
1313 ASTContext::getTypeInfoImpl(const Type *T) const {
1631 CharUnits ASTContext::toCharUnitsFromBits(int64_t BitSize) const {
1636 int64_t ASTContext::toBits(CharUnits CharSize) const {
1642 CharUnits ASTContext::getTypeSizeInChars(QualType T) const {
1645 CharUnits ASTContext::getTypeSizeInChars(const Type *T) const {
1651 CharUnits ASTContext::getTypeAlignInChars(QualType T) const {
1654 CharUnits ASTContext::getTypeAlignInChars(const Type *T) const {
1662 unsigned ASTContext::getPreferredTypeAlign(const Type *T) const {
1682 void ASTContext::DeepCollectObjCIvars(const ObjCInterfaceDecl *OI,
1701 void ASTContext::CollectInheritedProtocols(const Decl *CDecl,
1751 unsigned ASTContext::CountNonClassIvars(const ObjCInterfaceDecl *OI) const {
1769 bool ASTContext::isSentinelNullExpr(const Expr *E) {
1788 ObjCImplementationDecl *ASTContext::getObjCImplementation(ObjCInterfaceDecl *D) {
1796 ObjCCategoryImplDecl *ASTContext::getObjCImplementation(ObjCCategoryDecl *D) {
1805 void ASTContext::setObjCImplementation(ObjCInterfaceDecl *IFaceD,
1811 void ASTContext::setObjCImplementation(ObjCCategoryDecl *CatD,
1817 const ObjCInterfaceDecl *ASTContext::getObjContainingInterface(
1834 Expr *ASTContext::getBlockVarCopyInits(const VarDecl*VD) {
1844 void ASTContext::setBlockVarCopyInits(VarDecl*VD, Expr* Init) {
1851 TypeSourceInfo *ASTContext::CreateTypeSourceInfo(QualType T,
1865 TypeSourceInfo *ASTContext::getTrivialTypeSourceInfo(QualType T,
1868 DI->getTypeLoc().initialize(const_cast<ASTContext &>(*this), L);
1873 ASTContext::getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) const {
1878 ASTContext::getASTObjCImplementationLayout(
1888 ASTContext::getExtQualType(const Type *baseType, Qualifiers quals) const {
1918 ASTContext::getAddrSpaceQualType(QualType T, unsigned AddressSpace) const {
1937 QualType ASTContext::getObjCGCQualType(QualType T,
1965 const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T,
1988 QualType ASTContext::getComplexType(QualType T) const {
2016 QualType ASTContext::getPointerType(QualType T) const {
2044 QualType ASTContext::getBlockPointerType(QualType T) const {
2077 ASTContext::getLValueReferenceType(QualType T, bool SpelledAsLValue) const {
2117 QualType ASTContext::getRValueReferenceType(QualType T) const {
2152 QualType ASTContext::getMemberPointerType(QualType T, const Type *Cls) const {
2183 QualType ASTContext::getConstantArrayType(QualType EltTy,
2230 QualType ASTContext::getVariableArrayDecayedType(QualType type) const {
2361 QualType ASTContext::getVariableArrayType(QualType EltTy,
2389 QualType ASTContext::getDependentSizedArrayType(QualType elementType,
2456 QualType ASTContext::getIncompleteArrayType(QualType elementType,
2494 QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts,
2526 ASTContext::getExtVectorType(QualType vecType, unsigned NumElts) const {
2555 ASTContext::getDependentSizedExtVectorType(QualType vecType,
2599 ASTContext::getFunctionNoProtoType(QualType ResultTy,
2645 ASTContext::getFunctionType(QualType ResultTy, ArrayRef<QualType> ArgArray,
2750 QualType ASTContext::getInjectedClassNameType(CXXRecordDecl *Decl,
2770 QualType ASTContext::getTypeDeclTypeSlow(const TypeDecl *Decl) const {
2803 ASTContext::getTypedefType(const TypedefNameDecl *Decl,
2816 QualType ASTContext::getRecordType(const RecordDecl *Decl) const {
2829 QualType ASTContext::getEnumType(const EnumDecl *Decl) const {
2842 QualType ASTContext::getAttributedType(AttributedType::Kind attrKind,
2865 ASTContext::getSubstTemplateTypeParmType(const TemplateTypeParmType *Parm,
2887 QualType ASTContext::getSubstTemplateTypeParmPackType(
2925 QualType ASTContext::getTemplateTypeParmType(unsigned Depth, unsigned Index,
2956 ASTContext::getTemplateSpecializationTypeInfo(TemplateName Name,
2977 ASTContext::getTemplateSpecializationType(TemplateName Template,
3006 ASTContext::getTemplateSpecializationType(TemplateName Template,
3048 ASTContext::getCanonicalTemplateSpecializationType(TemplateName Template,
3093 ASTContext::getElaboratedType(ElaboratedTypeKeyword Keyword,
3119 ASTContext::getParenType(QualType InnerType) const {
3142 QualType ASTContext::getDependentNameType(ElaboratedTypeKeyword Keyword,
3174 ASTContext::getDependentTemplateSpecializationType(
3189 ASTContext::getDependentTemplateSpecializationType(
3241 QualType ASTContext::getPackExpansionType(QualType Pattern,
3312 QualType ASTContext::getObjCObjectType(QualType BaseType,
3362 QualType ASTContext::getObjCObjectPointerType(QualType ObjectT) const {
3392 QualType ASTContext::getObjCInterfaceType(const ObjCInterfaceDecl *Decl,
3419 QualType ASTContext::getTypeOfExprType(Expr *tofExpr) const {
3453 QualType ASTContext::getTypeOfType(QualType tofType) const {
3466 QualType ASTContext::getDecltypeType(Expr *e, QualType UnderlyingType) const {
3501 QualType ASTContext::getUnaryTransformType(QualType BaseType,
3515 QualType ASTContext::getAutoType(QualType DeducedType) const {
3534 QualType ASTContext::getAtomicType(QualType T) const {
3561 QualType ASTContext::getAutoDeductType() const {
3569 QualType ASTContext::getAutoRRefDeductType() const {
3578 QualType ASTContext::getTagDeclType(const TagDecl *Decl) const {
3588 CanQualType ASTContext::getSizeType() const {
3593 CanQualType ASTContext::getIntMaxType() const {
3598 CanQualType ASTContext::getUIntMaxType() const {
3604 QualType ASTContext::getSignedWCharType() const {
3611 QualType ASTContext::getUnsignedWCharType() const {
3616 QualType ASTContext::getIntPtrType() const {
3620 QualType ASTContext::getUIntPtrType() const {
3626 QualType ASTContext::getPointerDiffType() const {
3632 QualType ASTContext::getProcessIDType() const {
3640 CanQualType ASTContext::getCanonicalParamType(QualType T) const {
3658 QualType ASTContext::getUnqualifiedArrayType(QualType type,
3722 bool ASTContext::UnwrapSimilarPointerTypes(QualType &T1, QualType &T2) {
3757 ASTContext::getNameForTemplate(TemplateName Name,
3806 TemplateName ASTContext::getCanonicalTemplateName(TemplateName Name) const {
3848 bool ASTContext::hasSameTemplateName(TemplateName X, TemplateName Y) {
3855 ASTContext::getCanonicalTemplateArgument(const TemplateArgument &Arg) const {
3907 ASTContext::getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const {
3962 const ArrayType *ASTContext::getAsArrayType(QualType T) const {
4020 QualType ASTContext::getAdjustedParameterType(QualType T) const {
4039 QualType ASTContext::getSignatureParameterType(QualType T) const {
4051 QualType ASTContext::getArrayDecayedType(QualType Ty) const {
4065 QualType ASTContext::getBaseElementType(const ArrayType *array) const {
4069 QualType ASTContext::getBaseElementType(QualType type) const {
4085 ASTContext::getConstantArrayElementCount(const ConstantArrayType *CA) const {
4115 QualType ASTContext::getFloatingTypeOfSizeWithinDomain(QualType Size,
4141 int ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const {
4155 unsigned ASTContext::getIntegerRank(const Type *T) const {
4190 QualType ASTContext::isPromotableBitField(Expr *E) const {
4221 QualType ASTContext::getPromotedIntegerType(QualType Promotable) const {
4264 Qualifiers::ObjCLifetime ASTContext::getInnerObjCOwnership(QualType T) const {
4284 int ASTContext::getIntegerTypeOrder(QualType LHS, QualType RHS) const {
4323 CreateRecordDecl(const ASTContext &Ctx, RecordDecl::TagKind TK,
4333 QualType ASTContext::getCFConstantStringType() const {
4370 QualType ASTContext::getObjCSuperType() const {
4380 void ASTContext::setCFConstantStringType(QualType T) {
4386 QualType ASTContext::getBlockDescriptorType() const {
4425 QualType ASTContext::getBlockDescriptorExtendedType() const {
4471 bool ASTContext::BlockRequiresCopying(QualType Ty,
4509 bool ASTContext::getByrefLifetime(QualType Ty,
4532 TypedefDecl *ASTContext::getObjCInstanceTypeDecl() {
4555 CharUnits ASTContext::getObjCEncodingTypeSize(QualType type) const {
4577 std::string ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr) const {
4637 bool ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl,
4681 void ASTContext::getObjCEncodingForMethodParameter(Decl::ObjCDeclQualifier QT,
4697 bool ASTContext::getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl,
4775 void ASTContext::getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD,
4868 void ASTContext::getLegacyIntegralTypeEncoding (QualType &PointeeTy) const {
4880 void ASTContext::getObjCEncodingForType(QualType T, std::string& S,
4890 static char getObjCEncodingForPrimitiveKind(const ASTContext *C,
4948 static char ObjCEncodingForEnumType(const ASTContext *C, const EnumType *ET) {
4960 static void EncodeBitField(const ASTContext *Ctx, std::string& S,
4994 void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
5351 void ASTContext::getObjCEncodingForStructureImpl(RecordDecl *RDecl,
5484 void ASTContext::getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT,
5500 TypedefDecl *ASTContext::getObjCIdDecl() const {
5505 ObjCIdDecl = TypedefDecl::Create(const_cast<ASTContext &>(*this),
5514 TypedefDecl *ASTContext::getObjCSelDecl() const {
5518 ObjCSelDecl = TypedefDecl::Create(const_cast<ASTContext &>(*this),
5526 TypedefDecl *ASTContext::getObjCClassDecl() const {
5531 ObjCClassDecl = TypedefDecl::Create(const_cast<ASTContext &>(*this),
5540 ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl() const {
5557 static TypedefDecl *CreateCharPtrBuiltinVaListDecl(const ASTContext *Context) {
5564 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5572 static TypedefDecl *CreateVoidPtrBuiltinVaListDecl(const ASTContext *Context) {
5579 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5588 CreateAArch64ABIBuiltinVaListDecl(const ASTContext *Context) {
5593 NS = NamespaceDecl::Create(const_cast<ASTContext &>(*Context),
5639 FieldDecl *Field = FieldDecl::Create(const_cast<ASTContext &>(*Context),
5657 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5666 static TypedefDecl *CreatePowerABIBuiltinVaListDecl(const ASTContext *Context) {
5718 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5734 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5744 CreateX86_64ABIBuiltinVaListDecl(const ASTContext *Context) {
5774 FieldDecl *Field = FieldDecl::Create(const_cast<ASTContext &>(*Context),
5792 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5808 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5817 static TypedefDecl *CreatePNaClABIBuiltinVaListDecl(const ASTContext *Context) {
5824 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5834 CreateAAPCSABIBuiltinVaListDecl(const ASTContext *Context) {
5839 NS = NamespaceDecl::Create(const_cast<ASTContext &>(*Context),
5862 FieldDecl *Field = FieldDecl::Create(const_cast<ASTContext &>(*Context),
5883 = TypedefDecl::Create(const_cast<ASTContext &>(*Context),
5892 static TypedefDecl *CreateVaListDecl(const ASTContext *Context,
5914 TypedefDecl *ASTContext::getBuiltinVaListDecl() const {
5921 QualType ASTContext::getVaListTagType() const {
5930 void ASTContext::setObjCConstantStringInterface(ObjCInterfaceDecl *Decl) {
5940 ASTContext::getOverloadedTemplateName(UnresolvedSetIterator Begin,
5964 ASTContext::getQualifiedTemplateName(NestedNameSpecifier *NNS,
5988 ASTContext::getDependentTemplateName(NestedNameSpecifier *NNS,
6024 ASTContext::getDependentTemplateName(NestedNameSpecifier *NNS,
6059 ASTContext::getSubstTemplateTemplateParm(TemplateTemplateParmDecl *param,
6077 ASTContext::getSubstTemplateTemplateParmPack(TemplateTemplateParmDecl *Param,
6079 ASTContext &Self = const_cast<ASTContext &>(*this);
6100 CanQualType ASTContext::getFromTargetType(unsigned Type) const {
6123 Qualifiers::GC ASTContext::getObjCGCAttrKind(QualType Ty) const {
6164 bool ASTContext::areCompatibleVectorTypes(QualType FirstVec,
6194 ASTContext::ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto,
6208 bool ASTContext::QualifiedIdConformsQualifiedId(QualType lhs, QualType rhs) {
6216 bool ASTContext::ObjCQualifiedClassTypesAreCompatible(QualType lhs,
6242 bool ASTContext::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs,
6378 bool ASTContext::canAssignObjCInterfaces(const ObjCObjectPointerType *LHSOPT,
6409 bool ASTContext::canAssignObjCInterfacesInBlockPointer(
6445 void getIntersectionOfProtocols(ASTContext &Context,
6490 QualType ASTContext::areCommonBaseCompatible(
6517 bool ASTContext::canAssignObjCInterfaces(const ObjCObjectType *LHS,
6597 bool ASTContext::areComparableObjCPointerTypes(QualType LHS, QualType RHS) {
6609 bool ASTContext::canBindObjCObjectType(QualType To, QualType From) {
6619 bool ASTContext::typesAreCompatible(QualType LHS, QualType RHS,
6627 bool ASTContext::propertyTypesAreCompatible(QualType LHS, QualType RHS) {
6631 bool ASTContext::typesAreBlockPointerCompatible(QualType LHS, QualType RHS) {
6638 QualType ASTContext::mergeTransparentUnionType(QualType T, QualType SubType,
6659 QualType ASTContext::mergeFunctionArgumentTypes(QualType lhs, QualType rhs,
6678 QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs,
6847 QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
7124 bool ASTContext::FunctionTypesMatchOnNSConsumedAttrs(
7147 QualType ASTContext::mergeObjCGCQualifiers(QualType LHS, QualType RHS) {
7226 unsigned ASTContext::getIntWidth(QualType T) const {
7235 QualType ASTContext::getCorrespondingUnsignedType(QualType T) const {
7283 static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
7284 ASTContext::GetBuiltinTypeError &Error,
7448 Error = ASTContext::GE_Missing_stdio;
7459 Error = ASTContext::GE_Missing_setjmp;
7468 Error = ASTContext::GE_Missing_ucontext;
7518 QualType ASTContext::GetBuiltinType(unsigned Id,
7570 GVALinkage ASTContext::GetGVALinkageForFunction(const FunctionDecl *FD) {
7623 GVALinkage ASTContext::GetGVALinkageForVariable(const VarDecl *VD) {
7660 bool ASTContext::DeclMustBeEmitted(const Decl *D) {
7730 CallingConv ASTContext::getDefaultCXXMethodCallConv(bool isVariadic) {
7735 CallingConv ASTContext::getCanonicalCallConv(CallingConv CC) const {
7742 bool ASTContext::isNearlyEmpty(const CXXRecordDecl *RD) const {
7747 MangleContext *ASTContext::createMangleContext() {
7762 size_t ASTContext::getSideTableAllocatedMemory() const {
7779 void ASTContext::addUnnamedTag(const TagDecl *Tag) {
7790 int ASTContext::getUnnamedTagManglingNumber(const TagDecl *Tag) const {
7796 unsigned ASTContext::getLambdaManglingNumber(CXXMethodDecl *CallOperator) {
7803 void ASTContext::setParameterIndex(const ParmVarDecl *D, unsigned int index) {
7807 unsigned ASTContext::getParameterIndex(const ParmVarDecl *D) const {