Lines Matching +full:msi +full:- +full:specifier
1 //===- ASTReaderDecl.cpp - Decl Deserialization ---------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
78 //===----------------------------------------------------------------------===//
80 //===----------------------------------------------------------------------===//
108 return LocalOffset ? Loc.Offset - LocalOffset : 0; in ReadLocalOffset()
272 ASTContext &C = D->getASTContext(); in AddLazySpecializations()
274 auto *&LazySpecializations = D->getCommonPtr()->LazySpecializations; in AddLazySpecializations()
322 Cat->NextClassCategory = Next; in setNextObjCCategory()
492 if (Current->isFirstDecl()) { in operator ++()
494 Current = Current->getMostRecentDecl(); in operator ++()
496 Current = Current->getPreviousDecl(); in operator ++()
523 return Loc.F->DeclsCursor.GetCurrentBitNo() + Loc.F->GlobalBitOffset; in GetCurrentCursorOffset()
529 Loc.F->Kind == ModuleKind::MK_MainFile || in ReadFunctionDefinition()
533 CD->setNumCtorInitializers(Record.readInt()); in ReadFunctionDefinition()
534 if (CD->getNumCtorInitializers()) in ReadFunctionDefinition()
535 CD->CtorInitializers = ReadGlobalOffset(); in ReadFunctionDefinition()
546 D->getCanonicalDecl()->Used |= IsDeclMarkedUsed; in Visit()
550 if (auto *TInfo = DD->getTypeSourceInfo()) in Visit()
551 Record.readTypeLoc(TInfo->getTypeLoc()); in Visit()
556 TD->setTypeForDecl(Reader.GetType(DeferredTypeID).getTypePtrOrNull()); in Visit()
561 cast<TagDecl>(D)->TypedefNameDeclOrQualifier = in Visit()
565 ID->TypeForDecl = Reader.GetType(DeferredTypeID).getTypePtrOrNull(); in Visit()
573 if (FD->hasInClassInitializer() && Record.readInt()) { in Visit()
574 FD->setLazyInClassInitializer(LazyDeclStmtPtr(GetCurrentCursorOffset())); in Visit()
583 D->setReferenced(DeclBits.getNextBit()); in VisitDecl()
584 D->Used = DeclBits.getNextBit(); in VisitDecl()
585 IsDeclMarkedUsed |= D->Used; in VisitDecl()
586 D->setAccess((AccessSpecifier)DeclBits.getNextBits(/*Width=*/2)); in VisitDecl()
587 D->setImplicit(DeclBits.getNextBit()); in VisitDecl()
590 D->setTopLevelDeclInObjCContainer(DeclBits.getNextBit()); in VisitDecl()
591 D->InvalidDecl = DeclBits.getNextBit(); in VisitDecl()
592 D->FromASTFile = true; in VisitDecl()
594 if (D->isTemplateParameter() || D->isTemplateParameterPack() || in VisitDecl()
610 D->setDeclContext(Reader.getContext().getTranslationUnitDecl()); in VisitDecl()
626 D->setDeclContextsImpl(MergedSemaDC ? MergedSemaDC : SemaDC, LexicalDC, in VisitDecl()
629 D->setLocation(ThisDeclLoc); in VisitDecl()
636 D->setAttrsImpl(Attrs, Reader.getContext()); in VisitDecl()
655 D->setModuleOwnershipKind(ModuleOwnership); in VisitDecl()
657 D->setOwningModuleID(SubmoduleID); in VisitDecl()
660 // Module-private declarations are never visible, so there is no work to in VisitDecl()
667 if (Owner->NameVisibility == Module::AllVisible) in VisitDecl()
668 D->setVisibleDespiteOwningModule(); in VisitDecl()
673 D->setModuleOwnershipKind(Decl::ModuleOwnershipKind::ModulePrivate); in VisitDecl()
679 D->setLocation(readSourceLocation()); in VisitPragmaCommentDecl()
680 D->CommentKind = (PragmaMSCommentKind)Record.readInt(); in VisitPragmaCommentDecl()
682 memcpy(D->getTrailingObjects<char>(), Arg.data(), Arg.size()); in VisitPragmaCommentDecl()
683 D->getTrailingObjects<char>()[Arg.size()] = '\0'; in VisitPragmaCommentDecl()
688 D->setLocation(readSourceLocation()); in VisitPragmaDetectMismatchDecl()
690 memcpy(D->getTrailingObjects<char>(), Name.data(), Name.size()); in VisitPragmaDetectMismatchDecl()
691 D->getTrailingObjects<char>()[Name.size()] = '\0'; in VisitPragmaDetectMismatchDecl()
693 D->ValueStart = Name.size() + 1; in VisitPragmaDetectMismatchDecl()
695 memcpy(D->getTrailingObjects<char>() + D->ValueStart, Value.data(), in VisitPragmaDetectMismatchDecl()
697 D->getTrailingObjects<char>()[D->ValueStart + Value.size()] = '\0'; in VisitPragmaDetectMismatchDecl()
706 ND->setDeclName(Record.readDeclarationName()); in VisitNamedDecl()
712 TD->setLocStart(readSourceLocation()); in VisitTypeDecl()
724 TD->setModedTypeSourceInfo(TInfo, modedT); in VisitTypedefNameDecl()
726 TD->setTypeSourceInfo(TInfo); in VisitTypedefNameDecl()
744 TD->setDescribedAliasTemplate(Template); in VisitTypeAliasDecl()
753 TD->IdentifierNamespace = Record.readInt(); in VisitTagDecl()
756 TD->setTagKind( in VisitTagDecl()
758 TD->setCompleteDefinition(TagDeclBits.getNextBit()); in VisitTagDecl()
759 TD->setEmbeddedInDeclarator(TagDeclBits.getNextBit()); in VisitTagDecl()
760 TD->setFreeStanding(TagDeclBits.getNextBit()); in VisitTagDecl()
761 TD->setCompleteDefinitionRequired(TagDeclBits.getNextBit()); in VisitTagDecl()
762 TD->setBraceRange(readSourceRange()); in VisitTagDecl()
770 TD->TypedefNameDeclOrQualifier = Info; in VisitTagDecl()
789 ED->setIntegerTypeSourceInfo(TI); in VisitEnumDecl()
791 ED->setIntegerType(Record.readType()); in VisitEnumDecl()
792 ED->setPromotionType(Record.readType()); in VisitEnumDecl()
795 ED->setNumPositiveBits(EnumDeclBits.getNextBits(/*Width=*/8)); in VisitEnumDecl()
796 ED->setNumNegativeBits(EnumDeclBits.getNextBits(/*Width=*/8)); in VisitEnumDecl()
797 ED->setScoped(EnumDeclBits.getNextBit()); in VisitEnumDecl()
798 ED->setScopedUsingClassTag(EnumDeclBits.getNextBit()); in VisitEnumDecl()
799 ED->setFixed(EnumDeclBits.getNextBit()); in VisitEnumDecl()
801 ED->setHasODRHash(true); in VisitEnumDecl()
802 ED->ODRHash = Record.readInt(); in VisitEnumDecl()
806 if (ED->isCompleteDefinition() && Reader.getContext().getLangOpts().Modules) { in VisitEnumDecl()
807 EnumDecl *&OldDef = Reader.EnumDefinitions[ED->getCanonicalDecl()]; in VisitEnumDecl()
811 for (auto *D : merged_redecls(ED->getCanonicalDecl())) { in VisitEnumDecl()
812 if (!D->isFromASTFile() && D->isCompleteDefinition()) { in VisitEnumDecl()
820 ED->demoteThisDefinitionToDeclaration(); in VisitEnumDecl()
825 OldDef->getODRHash() != ED->getODRHash()) in VisitEnumDecl()
835 ED->setInstantiationOfMemberEnum(Reader.getContext(), InstED, TSK); in VisitEnumDecl()
836 ED->getMemberSpecializationInfo()->setPointOfInstantiation(POI); in VisitEnumDecl()
845 RD->setHasFlexibleArrayMember(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
846 RD->setAnonymousStructOrUnion(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
847 RD->setHasObjectMember(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
848 RD->setHasVolatileMember(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
849 RD->setNonTrivialToPrimitiveDefaultInitialize(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
850 RD->setNonTrivialToPrimitiveCopy(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
851 RD->setNonTrivialToPrimitiveDestroy(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
852 RD->setHasNonTrivialToPrimitiveDefaultInitializeCUnion( in VisitRecordDeclImpl()
854 RD->setHasNonTrivialToPrimitiveDestructCUnion(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
855 RD->setHasNonTrivialToPrimitiveCopyCUnion(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
856 RD->setParamDestroyedInCallee(RecordDeclBits.getNextBit()); in VisitRecordDeclImpl()
857 RD->setArgPassingRestrictions( in VisitRecordDeclImpl()
864 RD->setODRHash(Record.readInt()); in VisitRecordDecl()
868 if (RD->isCompleteDefinition()) { in VisitRecordDecl()
869 RecordDecl *Canon = static_cast<RecordDecl *>(RD->getCanonicalDecl()); in VisitRecordDecl()
875 if (!D->isFromASTFile() && D->isCompleteDefinition()) { in VisitRecordDecl()
883 RD->demoteThisDefinitionToDeclaration(); in VisitRecordDecl()
885 if (OldDef->getODRHash() != RD->getODRHash()) in VisitRecordDecl()
901 VD->setType(Record.readType()); in VisitValueDecl()
907 ECD->setInitExpr(Record.readExpr()); in VisitEnumConstantDecl()
908 ECD->setInitVal(Reader.getContext(), Record.readAPSInt()); in VisitEnumConstantDecl()
914 DD->setInnerLocStart(readSourceLocation()); in VisitDeclaratorDecl()
918 Info->TrailingRequiresClause = Record.readExpr(); in VisitDeclaratorDecl()
919 DD->DeclInfo = Info; in VisitDeclaratorDecl()
922 DD->setTypeSourceInfo( in VisitDeclaratorDecl()
936 FD->setInstantiatedFromDecl(readDeclAs<FunctionDecl>()); in VisitFunctionDecl()
940 Template->init(FD); in VisitFunctionDecl()
941 FD->setDescribedFunctionTemplate(Template); in VisitFunctionDecl()
948 FD->setInstantiationOfMemberFunction(Reader.getContext(), InstFD, TSK); in VisitFunctionDecl()
949 FD->getMemberSpecializationInfo()->setPointOfInstantiation(POI); in VisitFunctionDecl()
979 MSInfo->setPointOfInstantiation(POI); in VisitFunctionDecl()
987 FD->TemplateOrSpecialization = FTInfo; in VisitFunctionDecl()
989 if (FD->isCanonicalDecl()) { // if canonical add to template's set. in VisitFunctionDecl()
1001 FunctionTemplateDecl::Common *CommonPtr = CanonTemplate->getCommonPtr(); in VisitFunctionDecl()
1003 CommonPtr->Specializations.FindNodeOrInsertPos(ID, InsertPos); in VisitFunctionDecl()
1005 CommonPtr->Specializations.InsertNode(FTInfo, InsertPos); in VisitFunctionDecl()
1009 Existing = ExistingInfo->getFunction(); in VisitFunctionDecl()
1018 while (NumCandidates--) in VisitFunctionDecl()
1027 FD->setDependentTemplateSpecialization( in VisitFunctionDecl()
1040 if (FD->getTypeSourceInfo() && FD->getTypeSourceInfo() in VisitFunctionDecl()
1041 ->getType() in VisitFunctionDecl()
1042 ->castAs<FunctionType>() in VisitFunctionDecl()
1043 ->getReturnType() in VisitFunctionDecl()
1044 ->getContainedAutoType()) { in VisitFunctionDecl()
1047 FD->setType(FD->getTypeSourceInfo()->getType()); in VisitFunctionDecl()
1050 FD->setType(Reader.GetType(DeferredTypeID)); in VisitFunctionDecl()
1054 FD->DNLoc = Record.readDeclarationNameLoc(FD->getDeclName()); in VisitFunctionDecl()
1055 FD->IdentifierNamespace = Record.readInt(); in VisitFunctionDecl()
1061 FD->setCachedLinkage((Linkage)FunctionDeclBits.getNextBits(/*Width=*/3)); in VisitFunctionDecl()
1062 FD->setStorageClass((StorageClass)FunctionDeclBits.getNextBits(/*Width=*/3)); in VisitFunctionDecl()
1063 FD->setInlineSpecified(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1064 FD->setImplicitlyInline(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1065 FD->setHasSkippedBody(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1066 FD->setVirtualAsWritten(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1071 FD->setHasInheritedPrototype(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1072 FD->setHasWrittenPrototype(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1073 FD->setDeletedAsWritten(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1074 FD->setTrivial(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1075 FD->setTrivialForCall(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1076 FD->setDefaulted(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1077 FD->setExplicitlyDefaulted(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1078 FD->setIneligibleOrNotSelected(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1079 FD->setConstexprKind( in VisitFunctionDecl()
1081 FD->setHasImplicitReturnZero(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1082 FD->setIsMultiVersion(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1083 FD->setLateTemplateParsed(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1084 FD->setFriendConstraintRefersToEnclosingTemplate( in VisitFunctionDecl()
1086 FD->setUsesSEHTry(FunctionDeclBits.getNextBit()); in VisitFunctionDecl()
1088 FD->EndRangeLoc = readSourceLocation(); in VisitFunctionDecl()
1089 if (FD->isExplicitlyDefaulted()) in VisitFunctionDecl()
1090 FD->setDefaultLoc(readSourceLocation()); in VisitFunctionDecl()
1092 FD->ODRHash = Record.readInt(); in VisitFunctionDecl()
1093 FD->setHasODRHash(true); in VisitFunctionDecl()
1095 if (FD->isDefaulted() || FD->isDeletedAsWritten()) { in VisitFunctionDecl()
1112 FD->setDefaultedOrDeletedInfo( in VisitFunctionDecl()
1120 else if (auto Kind = FD->getTemplatedKind(); in VisitFunctionDecl()
1133 [](FunctionDecl *FD) { return FD->getDescribedFunctionTemplate(); }); in VisitFunctionDecl()
1136 return FD->getTemplateSpecializationInfo()->getTemplate(); in VisitFunctionDecl()
1143 FD->setIsPureVirtual(Pure); in VisitFunctionDecl()
1151 FD->setParams(Reader.getContext(), Params); in VisitFunctionDecl()
1157 // Load the body on-demand. Most clients won't care, because method in VisitObjCMethodDecl()
1161 MD->setSelfDecl(readDeclAs<ImplicitParamDecl>()); in VisitObjCMethodDecl()
1162 MD->setCmdDecl(readDeclAs<ImplicitParamDecl>()); in VisitObjCMethodDecl()
1163 MD->setInstanceMethod(Record.readInt()); in VisitObjCMethodDecl()
1164 MD->setVariadic(Record.readInt()); in VisitObjCMethodDecl()
1165 MD->setPropertyAccessor(Record.readInt()); in VisitObjCMethodDecl()
1166 MD->setSynthesizedAccessorStub(Record.readInt()); in VisitObjCMethodDecl()
1167 MD->setDefined(Record.readInt()); in VisitObjCMethodDecl()
1168 MD->setOverriding(Record.readInt()); in VisitObjCMethodDecl()
1169 MD->setHasSkippedBody(Record.readInt()); in VisitObjCMethodDecl()
1171 MD->setIsRedeclaration(Record.readInt()); in VisitObjCMethodDecl()
1172 MD->setHasRedeclaration(Record.readInt()); in VisitObjCMethodDecl()
1173 if (MD->hasRedeclaration()) in VisitObjCMethodDecl()
1177 MD->setDeclImplementation( in VisitObjCMethodDecl()
1179 MD->setObjCDeclQualifier((Decl::ObjCDeclQualifier)Record.readInt()); in VisitObjCMethodDecl()
1180 MD->setRelatedResultType(Record.readInt()); in VisitObjCMethodDecl()
1181 MD->setReturnType(Record.readType()); in VisitObjCMethodDecl()
1182 MD->setReturnTypeSourceInfo(readTypeSourceInfo()); in VisitObjCMethodDecl()
1183 MD->DeclEndLoc = readSourceLocation(); in VisitObjCMethodDecl()
1190 MD->setSelLocsKind((SelectorLocationsKind)Record.readInt()); in VisitObjCMethodDecl()
1197 MD->setParamsAndSelLocs(Reader.getContext(), Params, SelLocs); in VisitObjCMethodDecl()
1203 D->Variance = Record.readInt(); in VisitObjCTypeParamDecl()
1204 D->Index = Record.readInt(); in VisitObjCTypeParamDecl()
1205 D->VarianceLoc = readSourceLocation(); in VisitObjCTypeParamDecl()
1206 D->ColonLoc = readSourceLocation(); in VisitObjCTypeParamDecl()
1211 CD->setAtStartLoc(readSourceLocation()); in VisitObjCContainerDecl()
1212 CD->setAtEndRange(readSourceRange()); in VisitObjCContainerDecl()
1272 struct ObjCInterfaceDecl::DefinitionData &DD = D->data(); in MergeDefinitionData()
1280 if (D->getODRHash() != NewDD.ODRHash) in MergeDefinitionData()
1291 ID->TypeParamList = ReadObjCTypeParamList(); in VisitObjCInterfaceDecl()
1294 ID->allocateDefinitionData(); in VisitObjCInterfaceDecl()
1296 ReadObjCDefinitionData(ID->data()); in VisitObjCInterfaceDecl()
1297 ObjCInterfaceDecl *Canon = ID->getCanonicalDecl(); in VisitObjCInterfaceDecl()
1298 if (Canon->Data.getPointer()) { in VisitObjCInterfaceDecl()
1301 MergeDefinitionData(Canon, std::move(ID->data())); in VisitObjCInterfaceDecl()
1302 ID->Data = Canon->Data; in VisitObjCInterfaceDecl()
1306 ID->getCanonicalDecl()->Data = ID->Data; in VisitObjCInterfaceDecl()
1309 ID->setIvarList(nullptr); in VisitObjCInterfaceDecl()
1315 // Note that we've loaded this Objective-C class. in VisitObjCInterfaceDecl()
1318 ID->Data = ID->getCanonicalDecl()->Data; in VisitObjCInterfaceDecl()
1324 IVD->setAccessControl((ObjCIvarDecl::AccessControl)Record.readInt()); in VisitObjCIvarDecl()
1326 IVD->setNextIvar(nullptr); in VisitObjCIvarDecl()
1328 IVD->setSynthesize(synth); in VisitObjCIvarDecl()
1331 if (IVD->isInvalidDecl()) in VisitObjCIvarDecl()
1336 if (isa<ObjCInterfaceDecl>(IVD->getDeclContext())) in VisitObjCIvarDecl()
1339 IVD->getContainingInterface()->getCanonicalDecl(); in VisitObjCIvarDecl()
1340 IdentifierInfo *II = IVD->getIdentifier(); in VisitObjCIvarDecl()
1341 ObjCIvarDecl *PrevIvar = CanonIntf->lookupInstanceVariable(II); in VisitObjCIvarDecl()
1343 auto *ParentExt = dyn_cast<ObjCCategoryDecl>(IVD->getDeclContext()); in VisitObjCIvarDecl()
1345 dyn_cast<ObjCCategoryDecl>(PrevIvar->getDeclContext()); in VisitObjCIvarDecl()
1357 Reader.Diag(IVD->getLocation(), diag::err_duplicate_ivar_declaration) in VisitObjCIvarDecl()
1359 Reader.Diag(PrevIvar->getLocation(), diag::note_previous_definition); in VisitObjCIvarDecl()
1383 struct ObjCProtocolDecl::DefinitionData &DD = D->data(); in MergeDefinitionData()
1391 if (D->getODRHash() != NewDD.ODRHash) in MergeDefinitionData()
1403 PD->allocateDefinitionData(); in VisitObjCProtocolDecl()
1405 ReadObjCDefinitionData(PD->data()); in VisitObjCProtocolDecl()
1407 ObjCProtocolDecl *Canon = PD->getCanonicalDecl(); in VisitObjCProtocolDecl()
1408 if (Canon->Data.getPointer()) { in VisitObjCProtocolDecl()
1411 MergeDefinitionData(Canon, std::move(PD->data())); in VisitObjCProtocolDecl()
1412 PD->Data = Canon->Data; in VisitObjCProtocolDecl()
1416 PD->getCanonicalDecl()->Data = PD->Data; in VisitObjCProtocolDecl()
1421 PD->Data = PD->getCanonicalDecl()->Data; in VisitObjCProtocolDecl()
1431 CD->setCategoryNameLoc(readSourceLocation()); in VisitObjCCategoryDecl()
1432 CD->setIvarLBraceLoc(readSourceLocation()); in VisitObjCCategoryDecl()
1433 CD->setIvarRBraceLoc(readSourceLocation()); in VisitObjCCategoryDecl()
1440 CD->ClassInterface = readDeclAs<ObjCInterfaceDecl>(); in VisitObjCCategoryDecl()
1441 CD->TypeParamList = ReadObjCTypeParamList(); in VisitObjCCategoryDecl()
1451 CD->setProtocolList(ProtoRefs.data(), NumProtoRefs, ProtoLocs.data(), in VisitObjCCategoryDecl()
1455 if (NumProtoRefs > 0 && CD->ClassInterface && CD->IsClassExtension()) in VisitObjCCategoryDecl()
1456 CD->ClassInterface->mergeClassExtensionProtocolList( in VisitObjCCategoryDecl()
1463 CAD->setClassInterface(readDeclAs<ObjCInterfaceDecl>()); in VisitObjCCompatibleAliasDecl()
1468 D->setAtLoc(readSourceLocation()); in VisitObjCPropertyDecl()
1469 D->setLParenLoc(readSourceLocation()); in VisitObjCPropertyDecl()
1472 D->setType(T, TSI); in VisitObjCPropertyDecl()
1473 D->setPropertyAttributes((ObjCPropertyAttribute::Kind)Record.readInt()); in VisitObjCPropertyDecl()
1474 D->setPropertyAttributesAsWritten( in VisitObjCPropertyDecl()
1476 D->setPropertyImplementation( in VisitObjCPropertyDecl()
1480 D->setGetterName(GetterName.getObjCSelector(), GetterLoc); in VisitObjCPropertyDecl()
1483 D->setSetterName(SetterName.getObjCSelector(), SetterLoc); in VisitObjCPropertyDecl()
1484 D->setGetterMethodDecl(readDeclAs<ObjCMethodDecl>()); in VisitObjCPropertyDecl()
1485 D->setSetterMethodDecl(readDeclAs<ObjCMethodDecl>()); in VisitObjCPropertyDecl()
1486 D->setPropertyIvarDecl(readDeclAs<ObjCIvarDecl>()); in VisitObjCPropertyDecl()
1491 D->setClassInterface(readDeclAs<ObjCInterfaceDecl>()); in VisitObjCImplDecl()
1496 D->CategoryNameLoc = readSourceLocation(); in VisitObjCCategoryImplDecl()
1501 D->setSuperClass(readDeclAs<ObjCInterfaceDecl>()); in VisitObjCImplementationDecl()
1502 D->SuperLoc = readSourceLocation(); in VisitObjCImplementationDecl()
1503 D->setIvarLBraceLoc(readSourceLocation()); in VisitObjCImplementationDecl()
1504 D->setIvarRBraceLoc(readSourceLocation()); in VisitObjCImplementationDecl()
1505 D->setHasNonZeroConstructors(Record.readInt()); in VisitObjCImplementationDecl()
1506 D->setHasDestructors(Record.readInt()); in VisitObjCImplementationDecl()
1507 D->NumIvarInitializers = Record.readInt(); in VisitObjCImplementationDecl()
1508 if (D->NumIvarInitializers) in VisitObjCImplementationDecl()
1509 D->IvarInitializers = ReadGlobalOffset(); in VisitObjCImplementationDecl()
1514 D->setAtLoc(readSourceLocation()); in VisitObjCPropertyImplDecl()
1515 D->setPropertyDecl(readDeclAs<ObjCPropertyDecl>()); in VisitObjCPropertyImplDecl()
1516 D->PropertyIvarDecl = readDeclAs<ObjCIvarDecl>(); in VisitObjCPropertyImplDecl()
1517 D->IvarLoc = readSourceLocation(); in VisitObjCPropertyImplDecl()
1518 D->setGetterMethodDecl(readDeclAs<ObjCMethodDecl>()); in VisitObjCPropertyImplDecl()
1519 D->setSetterMethodDecl(readDeclAs<ObjCMethodDecl>()); in VisitObjCPropertyImplDecl()
1520 D->setGetterCXXConstructor(Record.readExpr()); in VisitObjCPropertyImplDecl()
1521 D->setSetterCXXAssignment(Record.readExpr()); in VisitObjCPropertyImplDecl()
1526 FD->Mutable = Record.readInt(); in VisitFieldDecl()
1529 FD->StorageKind = Bits >> 1; in VisitFieldDecl()
1530 if (FD->StorageKind == FieldDecl::ISK_CapturedVLAType) in VisitFieldDecl()
1531 FD->CapturedVLAType = in VisitFieldDecl()
1534 FD->setBitWidth(Record.readExpr()); in VisitFieldDecl()
1536 if (!FD->getDeclName()) { in VisitFieldDecl()
1545 PD->GetterId = Record.readIdentifier(); in VisitMSPropertyDecl()
1546 PD->SetterId = Record.readIdentifier(); in VisitMSPropertyDecl()
1551 D->PartVal.Part1 = Record.readInt(); in VisitMSGuidDecl()
1552 D->PartVal.Part2 = Record.readInt(); in VisitMSGuidDecl()
1553 D->PartVal.Part3 = Record.readInt(); in VisitMSGuidDecl()
1554 for (auto &C : D->PartVal.Part4And5) in VisitMSGuidDecl()
1559 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitMSGuidDecl()
1565 D->Value = Record.readAPValue(); in VisitUnnamedGlobalConstantDecl()
1570 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitUnnamedGlobalConstantDecl()
1575 D->Value = Record.readAPValue(); in VisitTemplateParamObjectDecl()
1581 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitTemplateParamObjectDecl()
1587 FD->ChainingSize = Record.readInt(); in VisitIndirectFieldDecl()
1588 assert(FD->ChainingSize >= 2 && "Anonymous chaining must be >= 2"); in VisitIndirectFieldDecl()
1589 FD->Chaining = new (Reader.getContext())NamedDecl*[FD->ChainingSize]; in VisitIndirectFieldDecl()
1591 for (unsigned I = 0; I != FD->ChainingSize; ++I) in VisitIndirectFieldDecl()
1592 FD->Chaining[I] = readDeclAs<NamedDecl>(); in VisitIndirectFieldDecl()
1604 VD->VarDeclBits.SClass = (StorageClass)VarDeclBits.getNextBits(/*Width=*/3); in VisitVarDeclImpl()
1605 VD->VarDeclBits.TSCSpec = VarDeclBits.getNextBits(/*Width=*/2); in VisitVarDeclImpl()
1606 VD->VarDeclBits.InitStyle = VarDeclBits.getNextBits(/*Width=*/2); in VisitVarDeclImpl()
1607 VD->VarDeclBits.ARCPseudoStrong = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1610 VD->NonParmVarDeclBits.IsThisDeclarationADemotedDefinition = in VisitVarDeclImpl()
1612 VD->NonParmVarDeclBits.ExceptionVar = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1613 VD->NonParmVarDeclBits.NRVOVariable = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1614 VD->NonParmVarDeclBits.CXXForRangeDecl = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1616 VD->NonParmVarDeclBits.IsInline = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1617 VD->NonParmVarDeclBits.IsInlineSpecified = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1618 VD->NonParmVarDeclBits.IsConstexpr = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1619 VD->NonParmVarDeclBits.IsInitCapture = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1620 VD->NonParmVarDeclBits.PreviousDeclInSameBlockScope = in VisitVarDeclImpl()
1623 VD->NonParmVarDeclBits.EscapingByref = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1625 VD->NonParmVarDeclBits.ImplicitParamKind = in VisitVarDeclImpl()
1628 VD->NonParmVarDeclBits.ObjCForDecl = VarDeclBits.getNextBit(); in VisitVarDeclImpl()
1637 VD->setType(Reader.GetType(DeferredTypeID)); in VisitVarDeclImpl()
1640 VD->setCachedLinkage(VarLinkage); in VisitVarDeclImpl()
1643 if (VD->getStorageClass() == SC_Extern && VarLinkage != Linkage::None && in VisitVarDeclImpl()
1644 VD->getLexicalDeclContext()->isFunctionOrMethod()) in VisitVarDeclImpl()
1645 VD->setLocalExternDecl(); in VisitVarDeclImpl()
1649 Loc.F->Kind == ModuleKind::MK_MainFile || in VisitVarDeclImpl()
1653 if (VD->hasAttr<BlocksAttr>()) { in VisitVarDeclImpl()
1672 VD->setDescribedVarTemplate(readDeclAs<VarTemplateDecl>()); in VisitVarDeclImpl()
1689 EvaluatedStmt *Eval = VD->ensureEvaluatedStmt(); in ReadVarDeclInit()
1690 Eval->HasConstantInitialization = (Val & 2) != 0; in ReadVarDeclInit()
1691 Eval->HasConstantDestruction = (Val & 4) != 0; in ReadVarDeclInit()
1692 Eval->WasEvaluated = (Val & 8) != 0; in ReadVarDeclInit()
1693 if (Eval->WasEvaluated) { in ReadVarDeclInit()
1694 Eval->Evaluated = Record.readAPValue(); in ReadVarDeclInit()
1695 if (Eval->Evaluated.needsCleanup()) in ReadVarDeclInit()
1696 Reader.getContext().addDestruction(&Eval->Evaluated); in ReadVarDeclInit()
1702 Eval->Value = GetCurrentCursorOffset(); in ReadVarDeclInit()
1720 PD->setObjCMethodScopeInfo(scopeIndex); in VisitParmVarDecl()
1721 PD->ParmVarDeclBits.ScopeDepthOrObjCQuals = declQualifier; in VisitParmVarDecl()
1723 PD->setScopeInfo(scopeDepth, scopeIndex); in VisitParmVarDecl()
1725 PD->ParmVarDeclBits.IsKNRPromoted = ParmVarDeclBits.getNextBit(); in VisitParmVarDecl()
1727 PD->ParmVarDeclBits.HasInheritedDefaultArg = ParmVarDeclBits.getNextBit(); in VisitParmVarDecl()
1729 PD->setUninstantiatedDefaultArg(Record.readExpr()); in VisitParmVarDecl()
1732 PD->ExplicitObjectParameterIntroducerLoc = Record.readSourceLocation(); in VisitParmVarDecl()
1740 auto **BDs = DD->getTrailingObjects<BindingDecl *>(); in VisitDecompositionDecl()
1741 for (unsigned I = 0; I != DD->NumBindings; ++I) { in VisitDecompositionDecl()
1743 BDs[I]->setDecomposedDecl(DD); in VisitDecompositionDecl()
1749 BD->Binding = Record.readExpr(); in VisitBindingDecl()
1754 AD->setAsmString(cast<StringLiteral>(Record.readExpr())); in VisitFileScopeAsmDecl()
1755 AD->setRParenLoc(readSourceLocation()); in VisitFileScopeAsmDecl()
1760 D->Statement = Record.readStmt(); in VisitTopLevelStmtDecl()
1765 BD->setBody(cast_or_null<CompoundStmt>(Record.readStmt())); in VisitBlockDecl()
1766 BD->setSignatureAsWritten(readTypeSourceInfo()); in VisitBlockDecl()
1772 BD->setParams(Params); in VisitBlockDecl()
1774 BD->setIsVariadic(Record.readInt()); in VisitBlockDecl()
1775 BD->setBlockMissingReturnType(Record.readInt()); in VisitBlockDecl()
1776 BD->setIsConversionFromLambda(Record.readInt()); in VisitBlockDecl()
1777 BD->setDoesNotEscape(Record.readInt()); in VisitBlockDecl()
1778 BD->setCanAvoidCopyToHeap(Record.readInt()); in VisitBlockDecl()
1793 BD->setCaptures(Reader.getContext(), captures, capturesCXXThis); in VisitBlockDecl()
1799 CD->setNothrow(Record.readInt() != 0); in VisitCapturedDecl()
1801 for (unsigned I = 0; I < CD->NumParams; ++I) { in VisitCapturedDecl()
1803 CD->setParam(I, readDeclAs<ImplicitParamDecl>()); in VisitCapturedDecl()
1805 CD->setContextParam(I, readDeclAs<ImplicitParamDecl>()); in VisitCapturedDecl()
1811 D->setLanguage(static_cast<LinkageSpecLanguageIDs>(Record.readInt())); in VisitLinkageSpecDecl()
1812 D->setExternLoc(readSourceLocation()); in VisitLinkageSpecDecl()
1813 D->setRBraceLoc(readSourceLocation()); in VisitLinkageSpecDecl()
1818 D->RBraceLoc = readSourceLocation(); in VisitExportDecl()
1823 D->setLocStart(readSourceLocation()); in VisitLabelDecl()
1831 D->setInline(NamespaceDeclBits.getNextBit()); in VisitNamespaceDecl()
1832 D->setNested(NamespaceDeclBits.getNextBit()); in VisitNamespaceDecl()
1833 D->LocStart = readSourceLocation(); in VisitNamespaceDecl()
1834 D->RBraceLoc = readSourceLocation(); in VisitNamespaceDecl()
1852 D->setAnonymousNamespace(Anon); in VisitNamespaceDecl()
1859 D->IsCBuffer = Record.readBool(); in VisitHLSLBufferDecl()
1860 D->KwLoc = readSourceLocation(); in VisitHLSLBufferDecl()
1861 D->LBraceLoc = readSourceLocation(); in VisitHLSLBufferDecl()
1862 D->RBraceLoc = readSourceLocation(); in VisitHLSLBufferDecl()
1868 D->NamespaceLoc = readSourceLocation(); in VisitNamespaceAliasDecl()
1869 D->IdentLoc = readSourceLocation(); in VisitNamespaceAliasDecl()
1870 D->QualifierLoc = Record.readNestedNameSpecifierLoc(); in VisitNamespaceAliasDecl()
1871 D->Namespace = readDeclAs<NamedDecl>(); in VisitNamespaceAliasDecl()
1877 D->setUsingLoc(readSourceLocation()); in VisitUsingDecl()
1878 D->QualifierLoc = Record.readNestedNameSpecifierLoc(); in VisitUsingDecl()
1879 D->DNLoc = Record.readDeclarationNameLoc(D->getDeclName()); in VisitUsingDecl()
1880 D->FirstUsingShadow.setPointer(readDeclAs<UsingShadowDecl>()); in VisitUsingDecl()
1881 D->setTypename(Record.readInt()); in VisitUsingDecl()
1889 D->setUsingLoc(readSourceLocation()); in VisitUsingEnumDecl()
1890 D->setEnumLoc(readSourceLocation()); in VisitUsingEnumDecl()
1891 D->setEnumType(Record.readTypeSourceInfo()); in VisitUsingEnumDecl()
1892 D->FirstUsingShadow.setPointer(readDeclAs<UsingShadowDecl>()); in VisitUsingEnumDecl()
1900 D->InstantiatedFrom = readDeclAs<NamedDecl>(); in VisitUsingPackDecl()
1901 auto **Expansions = D->getTrailingObjects<NamedDecl *>(); in VisitUsingPackDecl()
1902 for (unsigned I = 0; I != D->NumExpansions; ++I) in VisitUsingPackDecl()
1910 D->Underlying = readDeclAs<NamedDecl>(); in VisitUsingShadowDecl()
1911 D->IdentifierNamespace = Record.readInt(); in VisitUsingShadowDecl()
1912 D->UsingOrNextShadow = readDeclAs<NamedDecl>(); in VisitUsingShadowDecl()
1922 D->NominatedBaseClassShadowDecl = readDeclAs<ConstructorUsingShadowDecl>(); in VisitConstructorUsingShadowDecl()
1923 D->ConstructedBaseClassShadowDecl = readDeclAs<ConstructorUsingShadowDecl>(); in VisitConstructorUsingShadowDecl()
1924 D->IsVirtual = Record.readInt(); in VisitConstructorUsingShadowDecl()
1929 D->UsingLoc = readSourceLocation(); in VisitUsingDirectiveDecl()
1930 D->NamespaceLoc = readSourceLocation(); in VisitUsingDirectiveDecl()
1931 D->QualifierLoc = Record.readNestedNameSpecifierLoc(); in VisitUsingDirectiveDecl()
1932 D->NominatedNamespace = readDeclAs<NamedDecl>(); in VisitUsingDirectiveDecl()
1933 D->CommonAncestor = readDeclAs<DeclContext>(); in VisitUsingDirectiveDecl()
1938 D->setUsingLoc(readSourceLocation()); in VisitUnresolvedUsingValueDecl()
1939 D->QualifierLoc = Record.readNestedNameSpecifierLoc(); in VisitUnresolvedUsingValueDecl()
1940 D->DNLoc = Record.readDeclarationNameLoc(D->getDeclName()); in VisitUnresolvedUsingValueDecl()
1941 D->EllipsisLoc = readSourceLocation(); in VisitUnresolvedUsingValueDecl()
1948 D->TypenameLocation = readSourceLocation(); in VisitUnresolvedUsingTypenameDecl()
1949 D->QualifierLoc = Record.readNestedNameSpecifierLoc(); in VisitUnresolvedUsingTypenameDecl()
1950 D->EllipsisLoc = readSourceLocation(); in VisitUnresolvedUsingTypenameDecl()
1979 Loc.F->Kind == ModuleKind::MK_MainFile || in ReadCXXDefinitionData()
1991 "given lambda context for non-lambda"); in ReadCXXDefinitionData()
2055 assert(D->DefinitionData && in MergeDefinitionData()
2056 "merging class definition into non-definition"); in MergeDefinitionData()
2057 auto &DD = *D->DefinitionData; in MergeDefinitionData()
2064 MergeDD.Definition->setCompleteDefinition(false); in MergeDefinitionData()
2072 PFDI->second == ASTReader::PendingFakeDefinitionKind::Fake) { in MergeDefinitionData()
2076 PFDI->second = ASTReader::PendingFakeDefinitionKind::FakeLoaded; in MergeDefinitionData()
2140 if (D->getODRHash() != MergeDD.ODRHash) { in MergeDefinitionData()
2166 CXXRecordDecl *Canon = D->getCanonicalDecl(); in ReadCXXRecordDefinition()
2170 if (!Canon->DefinitionData) in ReadCXXRecordDefinition()
2171 Canon->DefinitionData = DD; in ReadCXXRecordDefinition()
2172 D->DefinitionData = Canon->DefinitionData; in ReadCXXRecordDefinition()
2178 if (Canon->DefinitionData != DD) { in ReadCXXRecordDefinition()
2184 D->setCompleteDefinition(true); in ReadCXXRecordDefinition()
2218 D->TemplateOrInstantiation = Template; in VisitCXXRecordDeclImpl()
2219 if (!Template->getTemplatedDecl()) { in VisitCXXRecordDeclImpl()
2234 MemberSpecializationInfo *MSI = new (C) MemberSpecializationInfo(RD, TSK); in VisitCXXRecordDeclImpl() local
2235 MSI->setPointOfInstantiation(POI); in VisitCXXRecordDeclImpl()
2236 D->TemplateOrInstantiation = MSI; in VisitCXXRecordDeclImpl()
2255 D->DefinitionData = D->getCanonicalDecl()->DefinitionData; in VisitCXXRecordDeclImpl()
2261 if (KeyFn.isValid() && D->isCompleteDefinition()) in VisitCXXRecordDeclImpl()
2272 D->setExplicitSpecifier(Record.readExplicitSpec()); in VisitCXXDeductionGuideDecl()
2273 D->Ctor = readDeclAs<CXXConstructorDecl>(); in VisitCXXDeductionGuideDecl()
2275 D->setDeductionCandidateKind( in VisitCXXDeductionGuideDecl()
2283 if (D->isCanonicalDecl()) { in VisitCXXMethodDecl()
2284 while (NumOverridenMethods--) { in VisitCXXMethodDecl()
2288 Reader.getContext().addOverriddenMethod(D, MD->getCanonicalDecl()); in VisitCXXMethodDecl()
2300 D->setExplicitSpecifier(Record.readExplicitSpec()); in VisitCXXConstructorDecl()
2301 if (D->isInheritingConstructor()) { in VisitCXXConstructorDecl()
2304 *D->getTrailingObjects<InheritedConstructor>() = in VisitCXXConstructorDecl()
2315 CXXDestructorDecl *Canon = D->getCanonicalDecl(); in VisitCXXDestructorDecl()
2318 if (!Canon->OperatorDelete) { in VisitCXXDestructorDecl()
2319 Canon->OperatorDelete = OperatorDelete; in VisitCXXDestructorDecl()
2320 Canon->OperatorDeleteThisArg = ThisArg; in VisitCXXDestructorDecl()
2326 D->setExplicitSpecifier(Record.readExplicitSpec()); in VisitCXXConversionDecl()
2332 D->ImportedModule = readModule(); in VisitImportDecl()
2333 D->setImportComplete(Record.readInt()); in VisitImportDecl()
2334 auto *StoredLocs = D->getTrailingObjects<SourceLocation>(); in VisitImportDecl()
2342 D->setColonLoc(readSourceLocation()); in VisitAccessSpecDecl()
2348 D->Friend = readDeclAs<NamedDecl>(); in VisitFriendDecl()
2350 D->Friend = readTypeSourceInfo(); in VisitFriendDecl()
2351 for (unsigned i = 0; i != D->NumTPLists; ++i) in VisitFriendDecl()
2352 D->getTrailingObjects<TemplateParameterList *>()[i] = in VisitFriendDecl()
2354 D->NextFriend = readDeclID().getRawValue(); in VisitFriendDecl()
2355 D->UnsupportedFriend = (Record.readInt() != 0); in VisitFriendDecl()
2356 D->FriendLoc = readSourceLocation(); in VisitFriendDecl()
2362 D->NumParams = NumParams; in VisitFriendTemplateDecl()
2363 D->Params = new (Reader.getContext()) TemplateParameterList *[NumParams]; in VisitFriendTemplateDecl()
2365 D->Params[i] = Record.readTemplateParameterList(); in VisitFriendTemplateDecl()
2367 D->Friend = readDeclAs<NamedDecl>(); in VisitFriendTemplateDecl()
2369 D->Friend = readTypeSourceInfo(); in VisitFriendTemplateDecl()
2370 D->FriendLoc = readSourceLocation(); in VisitFriendTemplateDecl()
2376 assert(!D->TemplateParams && "TemplateParams already set!"); in VisitTemplateDecl()
2377 D->TemplateParams = Record.readTemplateParameterList(); in VisitTemplateDecl()
2378 D->init(readDeclAs<NamedDecl>()); in VisitTemplateDecl()
2383 D->ConstraintExpr = Record.readExpr(); in VisitConceptDecl()
2390 // don't have to re-read it here. in VisitImplicitConceptSpecializationDecl()
2393 for (unsigned I = 0; I < D->NumTemplateArgs; ++I) in VisitImplicitConceptSpecializationDecl()
2395 D->setTemplateArguments(Args); in VisitImplicitConceptSpecializationDecl()
2407 RedeclarableTemplateDecl *CanonD = D->getCanonicalDecl(); in VisitRedeclarableTemplateDecl()
2408 if (!CanonD->Common) { in VisitRedeclarableTemplateDecl()
2409 CanonD->Common = CanonD->newCommon(Reader.getContext()); in VisitRedeclarableTemplateDecl()
2412 D->Common = CanonD->Common; in VisitRedeclarableTemplateDecl()
2418 assert(RTD->getKind() == D->getKind() && in VisitRedeclarableTemplateDecl()
2420 D->setInstantiatedFromMemberTemplate(RTD); in VisitRedeclarableTemplateDecl()
2422 D->setMemberSpecialization(); in VisitRedeclarableTemplateDecl()
2427 D->IdentifierNamespace = Record.readInt(); in VisitRedeclarableTemplateDecl()
2444 if (D->getTemplatedDecl()->TemplateOrInstantiation) { in VisitClassTemplateDecl()
2449 D->getTemplatedDecl(), D->getInjectedClassNameSpecialization()); in VisitClassTemplateDecl()
2481 D->SpecializedTemplate = CTD; in VisitClassTemplateSpecializationDeclImpl()
2490 PS->PartialSpecialization in VisitClassTemplateSpecializationDeclImpl()
2492 PS->TemplateArgs = ArgList; in VisitClassTemplateSpecializationDeclImpl()
2493 D->SpecializedTemplate = PS; in VisitClassTemplateSpecializationDeclImpl()
2499 D->TemplateArgs = TemplateArgumentList::CreateCopy(C, TemplArgs); in VisitClassTemplateSpecializationDeclImpl()
2500 D->PointOfInstantiation = readSourceLocation(); in VisitClassTemplateSpecializationDeclImpl()
2501 D->SpecializationKind = (TemplateSpecializationKind)Record.readInt(); in VisitClassTemplateSpecializationDeclImpl()
2506 if (D->isCanonicalDecl()) { // It's kept in the folding set. in VisitClassTemplateSpecializationDeclImpl()
2510 CanonSpec = CanonPattern->getCommonPtr()->PartialSpecializations in VisitClassTemplateSpecializationDeclImpl()
2514 CanonPattern->getCommonPtr()->Specializations.GetOrInsertNode(D); in VisitClassTemplateSpecializationDeclImpl()
2522 if (auto *DDD = D->DefinitionData) { in VisitClassTemplateSpecializationDeclImpl()
2523 if (CanonSpec->DefinitionData) in VisitClassTemplateSpecializationDeclImpl()
2526 CanonSpec->DefinitionData = D->DefinitionData; in VisitClassTemplateSpecializationDeclImpl()
2528 D->DefinitionData = CanonSpec->DefinitionData; in VisitClassTemplateSpecializationDeclImpl()
2536 ExplicitInfo->ExternKeywordLoc = readSourceLocation(); in VisitClassTemplateSpecializationDeclImpl()
2537 ExplicitInfo->TemplateKeywordLoc = readSourceLocation(); in VisitClassTemplateSpecializationDeclImpl()
2538 D->ExplicitInfo = ExplicitInfo; in VisitClassTemplateSpecializationDeclImpl()
2542 D->setTemplateArgsAsWritten(Record.readASTTemplateArgumentListInfo()); in VisitClassTemplateSpecializationDeclImpl()
2552 D->TemplateParams = Params; in VisitClassTemplatePartialSpecializationDecl()
2558 D->InstantiatedFromMember.setPointer( in VisitClassTemplatePartialSpecializationDecl()
2560 D->InstantiatedFromMember.setInt(Record.readInt()); in VisitClassTemplatePartialSpecializationDecl()
2586 D->SpecializedTemplate = VTD; in VisitVarTemplateSpecializationDeclImpl()
2595 PS->PartialSpecialization = in VisitVarTemplateSpecializationDeclImpl()
2597 PS->TemplateArgs = ArgList; in VisitVarTemplateSpecializationDeclImpl()
2598 D->SpecializedTemplate = PS; in VisitVarTemplateSpecializationDeclImpl()
2605 ExplicitInfo->ExternKeywordLoc = readSourceLocation(); in VisitVarTemplateSpecializationDeclImpl()
2606 ExplicitInfo->TemplateKeywordLoc = readSourceLocation(); in VisitVarTemplateSpecializationDeclImpl()
2607 D->ExplicitInfo = ExplicitInfo; in VisitVarTemplateSpecializationDeclImpl()
2611 D->setTemplateArgsAsWritten(Record.readASTTemplateArgumentListInfo()); in VisitVarTemplateSpecializationDeclImpl()
2615 D->TemplateArgs = TemplateArgumentList::CreateCopy(C, TemplArgs); in VisitVarTemplateSpecializationDeclImpl()
2616 D->PointOfInstantiation = readSourceLocation(); in VisitVarTemplateSpecializationDeclImpl()
2617 D->SpecializationKind = (TemplateSpecializationKind)Record.readInt(); in VisitVarTemplateSpecializationDeclImpl()
2618 D->IsCompleteDefinition = Record.readInt(); in VisitVarTemplateSpecializationDeclImpl()
2625 if (D->isCanonicalDecl()) { // It's kept in the folding set. in VisitVarTemplateSpecializationDeclImpl()
2628 CanonSpec = CanonPattern->getCommonPtr() in VisitVarTemplateSpecializationDeclImpl()
2629 ->PartialSpecializations.GetOrInsertNode(Partial); in VisitVarTemplateSpecializationDeclImpl()
2632 CanonPattern->getCommonPtr()->Specializations.GetOrInsertNode(D); in VisitVarTemplateSpecializationDeclImpl()
2651 D->TemplateParams = Params; in VisitVarTemplatePartialSpecializationDecl()
2657 D->InstantiatedFromMember.setPointer( in VisitVarTemplatePartialSpecializationDecl()
2659 D->InstantiatedFromMember.setInt(Record.readInt()); in VisitVarTemplatePartialSpecializationDecl()
2666 D->setDeclaredWithTypename(Record.readInt()); in VisitTemplateTypeParmDecl()
2669 if (TypeConstraintInitialized && D->hasTypeConstraint()) { in VisitTemplateTypeParmDecl()
2675 D->setTypeConstraint(CR, ImmediatelyDeclaredConstraint); in VisitTemplateTypeParmDecl()
2676 if ((D->ExpandedParameterPack = Record.readInt())) in VisitTemplateTypeParmDecl()
2677 D->NumExpanded = Record.readInt(); in VisitTemplateTypeParmDecl()
2681 D->setDefaultArgument(Reader.getContext(), in VisitTemplateTypeParmDecl()
2688 D->setDepth(Record.readInt()); in VisitNonTypeTemplateParmDecl()
2689 D->setPosition(Record.readInt()); in VisitNonTypeTemplateParmDecl()
2690 if (D->hasPlaceholderTypeConstraint()) in VisitNonTypeTemplateParmDecl()
2691 D->setPlaceholderTypeConstraint(Record.readExpr()); in VisitNonTypeTemplateParmDecl()
2692 if (D->isExpandedParameterPack()) { in VisitNonTypeTemplateParmDecl()
2694 D->getTrailingObjects<std::pair<QualType, TypeSourceInfo *>>(); in VisitNonTypeTemplateParmDecl()
2695 for (unsigned I = 0, N = D->getNumExpansionTypes(); I != N; ++I) { in VisitNonTypeTemplateParmDecl()
2701 D->ParameterPack = Record.readInt(); in VisitNonTypeTemplateParmDecl()
2703 D->setDefaultArgument(Reader.getContext(), in VisitNonTypeTemplateParmDecl()
2710 D->setDeclaredWithTypename(Record.readBool()); in VisitTemplateTemplateParmDecl()
2712 D->setDepth(Record.readInt()); in VisitTemplateTemplateParmDecl()
2713 D->setPosition(Record.readInt()); in VisitTemplateTemplateParmDecl()
2714 if (D->isExpandedParameterPack()) { in VisitTemplateTemplateParmDecl()
2715 auto **Data = D->getTrailingObjects<TemplateParameterList *>(); in VisitTemplateTemplateParmDecl()
2716 for (unsigned I = 0, N = D->getNumExpansionTemplateParameters(); in VisitTemplateTemplateParmDecl()
2721 D->ParameterPack = Record.readInt(); in VisitTemplateTemplateParmDecl()
2723 D->setDefaultArgument(Reader.getContext(), in VisitTemplateTemplateParmDecl()
2735 D->AssertExprAndFailed.setPointer(Record.readExpr()); in VisitStaticAssertDecl()
2736 D->AssertExprAndFailed.setInt(Record.readInt()); in VisitStaticAssertDecl()
2737 D->Message = cast_or_null<StringLiteral>(Record.readExpr()); in VisitStaticAssertDecl()
2738 D->RParenLoc = readSourceLocation(); in VisitStaticAssertDecl()
2748 D->ExtendingDecl = readDeclAs<ValueDecl>(); in VisitLifetimeExtendedTemporaryDecl()
2749 D->ExprWithTemporary = Record.readStmt(); in VisitLifetimeExtendedTemporaryDecl()
2751 D->Value = new (D->getASTContext()) APValue(Record.readAPValue()); in VisitLifetimeExtendedTemporaryDecl()
2752 D->getASTContext().addDestruction(D->Value); in VisitLifetimeExtendedTemporaryDecl()
2754 D->ManglingNumber = Record.readInt(); in VisitLifetimeExtendedTemporaryDecl()
2793 for (unsigned I = 0; I != N - 1; ++I) in VisitRedeclarable()
2809 D->RedeclLink = Redeclarable<T>::PreviousDeclLink(FirstDecl); in VisitRedeclarable()
2810 D->First = FirstDecl->getCanonicalDecl(); in VisitRedeclarable()
2835 if (!DBase->isFirstDecl()) in mergeRedeclarable()
2866 if (!D->isFirstDecl()) in mergeLambda()
2876 Context->getCanonicalDecl(), IndexInContext}]; in mergeLambda()
2889 D->Common = D->getCanonicalDecl()->Common; in mergeRedeclarableTemplate()
2905 auto *DPattern = D->getTemplatedDecl(); in mergeTemplatePattern()
2906 auto *ExistingPattern = Existing->getTemplatedDecl(); in mergeTemplatePattern()
2909 DPattern->getCanonicalDecl()->getGlobalID(), IsKeyDecl); in mergeTemplatePattern()
2915 cast<CXXRecordDecl>(ExistingPattern)->getCanonicalDecl(); in mergeTemplatePattern()
2916 if (auto *DDD = DClass->DefinitionData) { in mergeTemplatePattern()
2917 if (ExistingClass->DefinitionData) { in mergeTemplatePattern()
2920 ExistingClass->DefinitionData = DClass->DefinitionData; in mergeTemplatePattern()
2926 DClass->DefinitionData = ExistingClass->DefinitionData; in mergeTemplatePattern()
2948 T *ExistingCanon = Existing->getCanonicalDecl(); in mergeRedeclarable()
2949 T *DCanon = D->getCanonicalDecl(); in mergeRedeclarable()
2954 D->RedeclLink = Redeclarable<T>::PreviousDeclLink(ExistingCanon); in mergeRedeclarable()
2955 D->First = ExistingCanon; in mergeRedeclarable()
2956 ExistingCanon->Used |= D->Used; in mergeRedeclarable()
2957 D->Used = false; in mergeRedeclarable()
2971 /// ODR-like semantics for C/ObjC allow us to merge tag types and a structural
2996 LETDecl->getExtendingDecl(), LETDecl->getManglingNumber())]; in mergeMergeable()
2999 LookupResult->getCanonicalDecl()); in mergeMergeable()
3014 // ODR-based merging is performed in C++ and in some cases (tag types) in C. in mergeMergeable()
3015 // Note that C identically-named things in different translation units are in mergeMergeable()
3016 // not redeclarations, but may still have compatible types, where ODR-like in mergeMergeable()
3025 Existing->getCanonicalDecl()); in mergeMergeable()
3029 Record.readOMPChildren(D->Data); in VisitOMPThreadPrivateDecl()
3034 Record.readOMPChildren(D->Data); in VisitOMPAllocateDecl()
3039 Record.readOMPChildren(D->Data); in VisitOMPRequiresDecl()
3045 D->setLocation(readSourceLocation()); in VisitOMPDeclareReductionDecl()
3048 D->setCombinerData(In, Out); in VisitOMPDeclareReductionDecl()
3050 D->setCombiner(Combiner); in VisitOMPDeclareReductionDecl()
3053 D->setInitializerData(Orig, Priv); in VisitOMPDeclareReductionDecl()
3056 D->setInitializer(Init, IK); in VisitOMPDeclareReductionDecl()
3057 D->PrevDeclInScope = readDeclID().getRawValue(); in VisitOMPDeclareReductionDecl()
3061 Record.readOMPChildren(D->Data); in VisitOMPDeclareMapperDecl()
3063 D->VarName = Record.readDeclarationName(); in VisitOMPDeclareMapperDecl()
3064 D->PrevDeclInScope = readDeclID().getRawValue(); in VisitOMPDeclareMapperDecl()
3071 //===----------------------------------------------------------------------===//
3073 //===----------------------------------------------------------------------===//
3129 // Kind is stored as a 1-based integer because 0 is used to indicate a null in readAttr()
3131 auto Kind = static_cast<attr::Kind>(V - 1); in readAttr()
3164 //===----------------------------------------------------------------------===//
3166 //===----------------------------------------------------------------------===//
3183 /// code generation, e.g., inline function definitions, Objective-C
3192 auto *M = D->getImportedOwningModule(); in isConsumerInterestedIn()
3193 if (M && M->Kind == Module::ModuleMapModule && in isConsumerInterestedIn()
3203 return !D->getDeclContext()->isFunctionOrMethod(); in isConsumerInterestedIn()
3205 return Var->isFileVarDecl() && in isConsumerInterestedIn()
3206 (Var->isThisDeclarationADefinition() == VarDecl::Definition || in isConsumerInterestedIn()
3209 return Func->doesThisDeclarationHaveABody() || PendingBodies.count(D); in isConsumerInterestedIn()
3211 if (auto *ES = D->getASTContext().getExternalSource()) in isConsumerInterestedIn()
3212 if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) in isConsumerInterestedIn()
3224 const DeclOffset &DOffs = M->DeclOffsets[LocalDeclIndex]; in DeclCursorForID()
3226 return RecordLocation(M, DOffs.getBitOffset(M->DeclsBlockStartOffset)); in DeclCursorForID()
3233 return RecordLocation(I->second, GlobalOffset - I->second->GlobalBitOffset); in getLocalBitOffset()
3244 auto *DD = RD->DefinitionData; in getOrFakePrimaryClassDefinition()
3246 DD = RD->getCanonicalDecl()->DefinitionData; in getOrFakePrimaryClassDefinition()
3254 RD->setCompleteDefinition(true); in getOrFakePrimaryClassDefinition()
3255 RD->DefinitionData = DD; in getOrFakePrimaryClassDefinition()
3256 RD->getCanonicalDecl()->DefinitionData = DD; in getOrFakePrimaryClassDefinition()
3263 return DD->Definition; in getOrFakePrimaryClassDefinition()
3271 return ND->getFirstDecl(); in getPrimaryContextForMerging()
3277 return RD->getDefinition(); in getPrimaryContextForMerging()
3280 return ED->getDefinition(); in getPrimaryContextForMerging()
3283 return OID->getDefinition(); in getPrimaryContextForMerging()
3286 // we're in clang-repl so we still need to get the primary context. in getPrimaryContextForMerging()
3288 return TU->getPrimaryContext(); in getPrimaryContextForMerging()
3297 DeclContext *DC = New->getDeclContext()->getRedeclContext(); in ~FindExistingResult()
3306 DeclarationName Name = New->getDeclName(); in ~FindExistingResult()
3307 DeclContext *DC = New->getDeclContext()->getRedeclContext(); in ~FindExistingResult()
3309 setAnonymousDeclForMerging(Reader, New->getLexicalDeclContext(), in ~FindExistingResult()
3311 } else if (DC->isTranslationUnit() && in ~FindExistingResult()
3319 MergeDC->makeDeclVisibleInContextImpl(New, /*Internal*/true); in ~FindExistingResult()
3334 if (Found->isFromASTFile()) in getDeclForMerging()
3338 return TND->getAnonDeclWithTypedefName(/*AnyRedecl*/true); in getDeclForMerging()
3350 auto *DD = RD->getCanonicalDecl()->DefinitionData; in getPrimaryDCForAnonymousDecl()
3351 return DD ? DD->Definition : nullptr; in getPrimaryDCForAnonymousDecl()
3353 return OID->getCanonicalDecl()->getDefinition(); in getPrimaryDCForAnonymousDecl()
3361 if (FD->isThisDeclarationADefinition()) in getPrimaryDCForAnonymousDecl()
3364 if (MD->isThisDeclarationADefinition()) in getPrimaryDCForAnonymousDecl()
3367 if (RD->isThisDeclarationADefinition()) in getPrimaryDCForAnonymousDecl()
3378 // If the lexical context has been merged, look into the now-canonical in getAnonymousDeclForMerging()
3380 auto *CanonDC = cast<Decl>(DC)->getCanonicalDecl(); in getAnonymousDeclForMerging()
3390 if (PrimaryDC && !cast<Decl>(PrimaryDC)->isFromASTFile()) { in getAnonymousDeclForMerging()
3393 Previous.push_back(cast<NamedDecl>(ND->getCanonicalDecl())); in getAnonymousDeclForMerging()
3395 Previous[Number] = cast<NamedDecl>(ND->getCanonicalDecl()); in getAnonymousDeclForMerging()
3405 auto *CanonDC = cast<Decl>(DC)->getCanonicalDecl(); in setAnonymousDeclForMerging()
3416 : D->getDeclName(); in findExisting()
3428 DeclContext *DC = D->getDeclContext()->getRedeclContext(); in findExisting()
3433 if (C.isSameEntity(It->second, D)) in findExisting()
3434 return FindExistingResult(Reader, D, It->second, AnonymousDeclNumber, in findExisting()
3444 Reader, D->getLexicalDeclContext(), AnonymousDeclNumber)) in findExisting()
3448 } else if (DC->isTranslationUnit() && in findExisting()
3452 // Temporarily consider the identifier to be up-to-date. We don't want to in findExisting()
3461 WasOutToDate = II->isOutOfDate(); in findExisting()
3463 II->setOutOfDate(false); in findExisting()
3469 II->setOutOfDate(true); in findExisting()
3482 DeclContext::lookup_result R = MergeDC->noload_lookup(Name); in findExisting()
3502 auto MergedDCIt = Reader.MergedDeclContexts.find(D->getLexicalDeclContext()); in findExisting()
3504 !shouldSkipCheckingODR(D) && MergedDCIt->second == D->getDeclContext()) in findExisting()
3513 return D->RedeclLink.getLatestNotUpdated(); in getMostRecentDeclImpl()
3517 llvm_unreachable("getMostRecentDecl on non-redeclarable declaration"); in getMostRecentDeclImpl()
3523 switch (D->getKind()) { in getMostRecentDecl()
3534 return ASTDeclReader::getMostRecentDecl(D->getCanonicalDecl()); in getMostRecentExistingDecl()
3541 const auto *IA = Previous->getAttr<MSInheritanceAttr>(); in mergeInheritableAttributes()
3543 if (IA && !D->hasAttr<MSInheritanceAttr>()) { in mergeInheritableAttributes()
3544 NewAttr = cast<InheritableAttr>(IA->clone(Context)); in mergeInheritableAttributes()
3545 NewAttr->setInherited(true); in mergeInheritableAttributes()
3546 D->addAttr(NewAttr); in mergeInheritableAttributes()
3549 const auto *AA = Previous->getAttr<AvailabilityAttr>(); in mergeInheritableAttributes()
3550 if (AA && !D->hasAttr<AvailabilityAttr>()) { in mergeInheritableAttributes()
3551 NewAttr = AA->clone(Context); in mergeInheritableAttributes()
3552 NewAttr->setInherited(true); in mergeInheritableAttributes()
3553 D->addAttr(NewAttr); in mergeInheritableAttributes()
3561 D->RedeclLink.setPrevious(cast<DeclT>(Previous)); in attachPreviousDeclImpl()
3562 D->First = cast<DeclT>(Previous)->First; in attachPreviousDeclImpl()
3573 D->RedeclLink.setPrevious(PrevVD); in attachPreviousDeclImpl()
3574 D->First = PrevVD->First; in attachPreviousDeclImpl()
3579 if (VD->isThisDeclarationADefinition() == VarDecl::Definition) { in attachPreviousDeclImpl()
3580 for (VarDecl *CurD = PrevVD; CurD; CurD = CurD->getPreviousDecl()) { in attachPreviousDeclImpl()
3581 if (CurD->isThisDeclarationADefinition() == VarDecl::Definition) { in attachPreviousDeclImpl()
3583 VD->demoteThisDefinitionToDeclaration(); in attachPreviousDeclImpl()
3591 auto *DT = T->getContainedDeducedType(); in isUndeducedReturnType()
3592 return DT && !DT->isDeduced(); in isUndeducedReturnType()
3602 FD->RedeclLink.setPrevious(PrevFD); in attachPreviousDeclImpl()
3603 FD->First = PrevFD->First; in attachPreviousDeclImpl()
3607 if (PrevFD->isInlined() != FD->isInlined()) { in attachPreviousDeclImpl()
3623 FD->setImplicitlyInline(true); in attachPreviousDeclImpl()
3626 auto *FPT = FD->getType()->getAs<FunctionProtoType>(); in attachPreviousDeclImpl()
3627 auto *PrevFPT = PrevFD->getType()->getAs<FunctionProtoType>(); in attachPreviousDeclImpl()
3631 bool IsUnresolved = isUnresolvedExceptionSpec(FPT->getExceptionSpecType()); in attachPreviousDeclImpl()
3633 isUnresolvedExceptionSpec(PrevFPT->getExceptionSpecType()); in attachPreviousDeclImpl()
3640 bool IsUndeduced = isUndeducedReturnType(FPT->getReturnType()); in attachPreviousDeclImpl()
3641 bool WasUndeduced = isUndeducedReturnType(PrevFPT->getReturnType()); in attachPreviousDeclImpl()
3645 (IsUndeduced ? PrevFPT : FPT)->getReturnType()}); in attachPreviousDeclImpl()
3652 llvm_unreachable("attachPreviousDecl on non-redeclarable declaration"); in attachPreviousDeclImpl()
3661 if (!From->hasDefaultArgument()) in inheritDefaultTemplateArgument()
3663 To->setInheritedDefaultArgument(Context, From); in inheritDefaultTemplateArgument()
3670 auto *FromTP = From->getTemplateParameters(); in inheritDefaultTemplateArguments()
3671 auto *ToTP = To->getTemplateParameters(); in inheritDefaultTemplateArguments()
3672 assert(FromTP->size() == ToTP->size() && "merged mismatched templates?"); in inheritDefaultTemplateArguments()
3674 for (unsigned I = 0, N = FromTP->size(); I != N; ++I) { in inheritDefaultTemplateArguments()
3675 NamedDecl *FromParam = FromTP->getParam(I); in inheritDefaultTemplateArguments()
3676 NamedDecl *ToParam = ToTP->getParam(I); in inheritDefaultTemplateArguments()
3690 // the program is ill-formed;
3693 Module *M = Previous->getOwningModule(); in checkMultipleDefinitionInNamedModules()
3696 if (!M || !M->isNamedModule()) in checkMultipleDefinitionInNamedModules()
3701 if (Previous->isImplicit()) in checkMultipleDefinitionInNamedModules()
3716 VTSD && !VTSD->isExplicitSpecialization()) in checkMultipleDefinitionInNamedModules()
3719 CTSD && !CTSD->isExplicitSpecialization()) in checkMultipleDefinitionInNamedModules()
3722 if (auto *FTSI = Func->getTemplateSpecializationInfo(); in checkMultipleDefinitionInNamedModules()
3723 FTSI && !FTSI->isExplicitSpecialization()) in checkMultipleDefinitionInNamedModules()
3727 if (Reader.getContext().isInSameModule(M, D->getOwningModule())) in checkMultipleDefinitionInNamedModules()
3730 Reader.Diag(Previous->getLocation(), in checkMultipleDefinitionInNamedModules()
3732 << cast<NamedDecl>(Previous) << M->Name; in checkMultipleDefinitionInNamedModules()
3733 Reader.Diag(D->getLocation(), diag::note_also_found); in checkMultipleDefinitionInNamedModules()
3740 switch (D->getKind()) { in attachPreviousDecl()
3756 D->IdentifierNamespace |= in attachPreviousDecl()
3757 Previous->IdentifierNamespace & in attachPreviousDecl()
3775 D->RedeclLink.setLatest(cast<DeclT>(Latest)); in attachLatestDeclImpl()
3779 llvm_unreachable("attachLatestDecl on non-redeclarable declaration"); in attachLatestDeclImpl()
3785 switch (D->getKind()) { in attachLatestDecl()
3797 D->RedeclLink.markIncomplete(); in markIncompleteDeclChainImpl()
3801 llvm_unreachable("markIncompleteDeclChain on non-redeclarable declaration"); in markIncompleteDeclChainImpl()
3805 switch (D->getKind()) { in markIncompleteDeclChain()
3819 llvm::BitstreamCursor &DeclsCursor = Loc.F->DeclsCursor; in ReadDeclRecord()
3854 llvm_unreachable("Record cannot be de-serialized with readDeclRecord"); in ReadDeclRecord()
4079 Error("attempt to read a C++ base-specifier record as a declaration"); in ReadDeclRecord()
4151 D->setDeclContext(Context.getTranslationUnitDecl()); in ReadDeclRecord()
4168 Offsets = Iter->second; in ReadDeclRecord()
4187 if (Class->isThisDeclarationADefinition() || in ReadDeclRecord()
4210 // Ensure that we've loaded all potentially-interesting declarations in PassInterestingDeclsToConsumer()
4237 VD && VD->isFileVarDecl() && !VD->isExternallyVisible()) in PassInterestingDeclsToConsumer()
4238 VD->getInit(); in PassInterestingDeclsToConsumer()
4249 assert(!RD->shouldEmitInExternalSource()); in PassInterestingDeclsToConsumer()
4267 auto UpdateOffsets = std::move(UpdI->second); in loadDeclUpdateRecords()
4278 llvm::BitstreamCursor &Cursor = F->DeclsCursor; in loadDeclUpdateRecords()
4327 auto VisibleUpdates = std::move(I->second); in loadDeclUpdateRecords()
4330 auto *DC = cast<DeclContext>(D)->getPrimaryContext(); in loadDeclUpdateRecords()
4335 DC->setHasExternalVisibleStorage(true); in loadDeclUpdateRecords()
4341 Decl *CanonDecl = FirstLocal->getCanonicalDecl(); in loadPendingDeclChain()
4358 llvm::BitstreamCursor &Cursor = M->DeclsCursor; in loadPendingDeclChain()
4381 // we should instead generate one loop per kind and dispatch up-front? in loadPendingDeclChain()
4384 unsigned Idx = N - I - 1; in loadPendingDeclChain()
4411 if (Cat->getDeclName()) { in add()
4412 ObjCCategoryDecl *&Existing = NameCategoryMap[Cat->getDeclName()]; in add()
4417 Cat->getASTContext(), Existing->getASTContext(), in add()
4424 Reader.Diag(Cat->getLocation(), diag::warn_dup_category_def) in add()
4425 << Interface->getDeclName() << Cat->getDeclName(); in add()
4426 Reader.Diag(Existing->getLocation(), in add()
4439 Interface->setCategoryListRaw(Cat); in add()
4450 // Populate the name -> category map with the set of known categories. in ObjCCategoriesVisitor()
4451 for (auto *Cat : Interface->known_categories()) { in ObjCCategoriesVisitor()
4452 if (Cat->getDeclName()) in ObjCCategoriesVisitor()
4453 NameCategoryMap[Cat->getDeclName()] = Cat; in ObjCCategoriesVisitor()
4482 LocalID != Result->getDefinitionID()) { in operator ()()
4490 unsigned Offset = Result->Offset; in operator ()()
4515 auto *MostRecent = D->getMostRecentDecl(); in forAllLaterRedecls()
4518 Redecl = Redecl->getPreviousDecl()) in forAllLaterRedecls()
4524 Redecl = Redecl->getPreviousDecl()) in forAllLaterRedecls()
4555 TU->setAnonymousNamespace(Anon); in UpdateDecl()
4557 cast<NamespaceDecl>(D)->setAnonymousNamespace(Anon); in UpdateDecl()
4564 VD->NonParmVarDeclBits.IsInline = Record.readInt(); in UpdateDecl()
4565 VD->NonParmVarDeclBits.IsInlineSpecified = Record.readInt(); in UpdateDecl()
4573 VTSD->setPointOfInstantiation(POI); in UpdateDecl()
4575 MemberSpecializationInfo *MSInfo = VD->getMemberSpecializationInfo(); in UpdateDecl()
4577 MSInfo->setPointOfInstantiation(POI); in UpdateDecl()
4580 if (auto *FTSInfo = FD->TemplateOrSpecialization in UpdateDecl()
4582 FTSInfo->setPointOfInstantiation(POI); in UpdateDecl()
4584 FD->TemplateOrSpecialization.get<MemberSpecializationInfo *>() in UpdateDecl()
4585 ->setPointOfInstantiation(POI); in UpdateDecl()
4600 if (Param->hasUninstantiatedDefaultArg()) in UpdateDecl()
4601 Param->setDefaultArg(DefaultArg); in UpdateDecl()
4611 if (FD->hasInClassInitializer() && !FD->hasNonNullInClassInitializer()) { in UpdateDecl()
4613 FD->setInClassInitializer(DefaultInit); in UpdateDecl()
4617 FD->removeInClassInitializer(); in UpdateDecl()
4635 FD->setImplicitlyInline(); in UpdateDecl()
4638 FD->setInnerLocStart(readSourceLocation()); in UpdateDecl()
4646 auto *OldDD = RD->getCanonicalDecl()->DefinitionData; in UpdateDecl()
4648 OldDD && (OldDD->Definition != RD || in UpdateDecl()
4650 RD->setParamDestroyedInCallee(Record.readInt()); in UpdateDecl()
4651 RD->setArgPassingRestrictions( in UpdateDecl()
4665 RD->getMemberSpecializationInfo()) { in UpdateDecl()
4666 MSInfo->setTemplateSpecializationKind(TSK); in UpdateDecl()
4667 MSInfo->setPointOfInstantiation(POI); in UpdateDecl()
4670 Spec->setTemplateSpecializationKind(TSK); in UpdateDecl()
4671 Spec->setPointOfInstantiation(POI); in UpdateDecl()
4683 if (!Spec->getSpecializedTemplateOrPartial() in UpdateDecl()
4685 Spec->setInstantiationOf(PartialSpec, TemplArgList); in UpdateDecl()
4689 RD->setTagKind(static_cast<TagTypeKind>(Record.readInt())); in UpdateDecl()
4690 RD->setLocation(readSourceLocation()); in UpdateDecl()
4691 RD->setLocStart(readSourceLocation()); in UpdateDecl()
4692 RD->setBraceRange(readSourceRange()); in UpdateDecl()
4699 if (!D->hasAttrs()) in UpdateDecl()
4700 D->setAttrsImpl(Attrs, Reader.getContext()); in UpdateDecl()
4709 auto *First = cast<CXXDestructorDecl>(D->getCanonicalDecl()); in UpdateDecl()
4712 if (!First->OperatorDelete) { in UpdateDecl()
4713 First->OperatorDelete = Del; in UpdateDecl()
4714 First->OperatorDeleteThisArg = ThisArg; in UpdateDecl()
4725 auto *FPT = FD->getType()->castAs<FunctionProtoType>(); in UpdateDecl()
4728 if (isUnresolvedExceptionSpec(FPT->getExceptionSpecType())) { in UpdateDecl()
4729 FD->setType(Reader.getContext().getFunctionType( in UpdateDecl()
4730 FPT->getReturnType(), FPT->getParamTypes(), in UpdateDecl()
4731 FPT->getExtProtoInfo().withExceptionSpec(ESI))); in UpdateDecl()
4736 std::make_pair(FD->getCanonicalDecl(), FD)); in UpdateDecl()
4745 {FD->getCanonicalDecl(), DeducedResultType}); in UpdateDecl()
4751 D->markUsed(Reader.getContext()); in UpdateDecl()
4765 D->addAttr(OMPThreadPrivateDeclAttr::CreateImplicit(Reader.getContext(), in UpdateDecl()
4775 D->addAttr(OMPAllocateDeclAttr::CreateImplicit( in UpdateDecl()
4795 D->addAttr(OMPDeclareTargetDeclAttr::CreateImplicit( in UpdateDecl()
4805 D->addAttr(Attrs[0]); in UpdateDecl()