Lines Matching refs:Reader
85 ASTReader &Reader; member in clang::ASTDeclReader
176 static NamedDecl *getAnonymousDeclForMerging(ASTReader &Reader,
179 static void setAnonymousDeclForMerging(ASTReader &Reader, DeclContext *DC,
186 static CXXRecordDecl *getOrFakePrimaryClassDefinition(ASTReader &Reader,
216 ASTReader &Reader; member in clang::ASTDeclReader::FindExistingResult
224 FindExistingResult(ASTReader &Reader) : Reader(Reader) {} in FindExistingResult() argument
226 FindExistingResult(ASTReader &Reader, NamedDecl *New, NamedDecl *Existing, in FindExistingResult() argument
229 : Reader(Reader), New(New), Existing(Existing), AddResult(true), in FindExistingResult()
234 : Reader(Other.Reader), New(Other.New), Existing(Other.Existing), in FindExistingResult()
254 static DeclContext *getPrimaryContextForMerging(ASTReader &Reader,
259 ASTDeclReader(ASTReader &Reader, ASTRecordReader &Record, in ASTDeclReader() argument
262 : Reader(Reader), Record(Record), Loc(Loc), ThisDeclID(thisDeclID), in ASTDeclReader()
295 static void mergeInheritableAttributes(ASTReader &Reader, Decl *D,
299 static void attachPreviousDeclImpl(ASTReader &Reader,
302 static void attachPreviousDeclImpl(ASTReader &Reader, ...);
303 static void attachPreviousDecl(ASTReader &Reader, Decl *D, Decl *Previous,
528 Reader.DefinitionSource[FD] = in ReadFunctionDefinition()
530 Reader.getContext().getLangOpts().BuildingPCHWithObjectFile; in ReadFunctionDefinition()
538 Reader.PendingBodies[FD] = GetCurrentCursorOffset(); in ReadFunctionDefinition()
556 TD->setTypeForDecl(Reader.GetType(DeferredTypeID).getTypePtrOrNull()); in Visit()
562 cast<TypedefNameDecl>(Reader.GetDecl(NamedDeclForTagDecl)); in Visit()
565 ID->TypeForDecl = Reader.GetType(DeferredTypeID).getTypePtrOrNull(); in Visit()
607 Reader.addPendingDeclContextInfo(D, in VisitDecl()
610 D->setDeclContext(Reader.getContext().getTranslationUnitDecl()); in VisitDecl()
621 MergedSemaDC = getOrFakePrimaryClassDefinition(Reader, RD); in VisitDecl()
623 MergedSemaDC = Reader.MergedDeclContexts.lookup(SemaDC); in VisitDecl()
627 Reader.getContext()); in VisitDecl()
636 D->setAttrsImpl(Attrs, Reader.getContext()); in VisitDecl()
662 } else if (Reader.getContext().getLangOpts().ModulesLocalVisibility) { in VisitDecl()
665 } else if (Module *Owner = Reader.getSubmodule(SubmoduleID)) { in VisitDecl()
670 Reader.HiddenNamesMap[Owner].push_back(D); in VisitDecl()
768 auto *Info = new (Reader.getContext()) TagDecl::ExtInfo(); in VisitTagDecl()
806 if (ED->isCompleteDefinition() && Reader.getContext().getLangOpts().Modules) { in VisitEnumDecl()
807 EnumDecl *&OldDef = Reader.EnumDefinitions[ED->getCanonicalDecl()]; in VisitEnumDecl()
819 Reader.MergedDeclContexts.insert(std::make_pair(ED, OldDef)); in VisitEnumDecl()
821 Reader.mergeDefinitionVisibility(OldDef, ED); in VisitEnumDecl()
826 Reader.PendingEnumOdrMergeFailures[OldDef].push_back(ED); in VisitEnumDecl()
835 ED->setInstantiationOfMemberEnum(Reader.getContext(), InstED, TSK); in VisitEnumDecl()
870 RecordDecl *&OldDef = Reader.RecordDefinitions[Canon]; in VisitRecordDecl()
882 Reader.MergedDeclContexts.insert(std::make_pair(RD, OldDef)); in VisitRecordDecl()
884 Reader.mergeDefinitionVisibility(OldDef, RD); in VisitRecordDecl()
886 Reader.PendingRecordOdrMergeFailures[OldDef].push_back(RD); in VisitRecordDecl()
908 ECD->setInitVal(Reader.getContext(), Record.readAPSInt()); in VisitEnumConstantDecl()
916 auto *Info = new (Reader.getContext()) DeclaratorDecl::ExtInfo(); in VisitDeclaratorDecl()
924 : Reader.getContext().CreateTypeSourceInfo(TSIType)); in VisitDeclaratorDecl()
948 FD->setInstantiationOfMemberFunction(Reader.getContext(), InstFD, TSK); in VisitFunctionDecl()
968 ASTContext &C = Reader.getContext(); in VisitFunctionDecl()
1007 assert(Reader.getContext().getLangOpts().Modules && in VisitFunctionDecl()
1028 Reader.getContext(), Candidates, in VisitFunctionDecl()
1048 Reader.PendingDeducedFunctionTypes.push_back({FD, DeferredTypeID}); in VisitFunctionDecl()
1050 FD->setType(Reader.GetType(DeferredTypeID)); in VisitFunctionDecl()
1114 Reader.getContext(), Lookups, DeletedMessage)); in VisitFunctionDecl()
1151 FD->setParams(Reader.getContext(), Params); in VisitFunctionDecl()
1159 Reader.PendingBodies[MD] = GetCurrentCursorOffset(); in VisitObjCMethodDecl()
1174 Reader.getContext().setObjCMethodRedeclaration(MD, in VisitObjCMethodDecl()
1197 MD->setParamsAndSelLocs(Reader.getContext(), Params, SelLocs); in VisitObjCMethodDecl()
1233 return ObjCTypeParamList::create(Reader.getContext(), lAngleLoc, in ReadObjCTypeParamList()
1258 Reader.getContext()); in ReadObjCDefinitionData()
1267 Reader.getContext()); in ReadObjCDefinitionData()
1276 Reader.MergedDeclContexts.insert( in MergeDefinitionData()
1278 Reader.mergeDefinitionVisibility(DD.Definition, NewDD.Definition); in MergeDefinitionData()
1281 Reader.PendingObjCInterfaceOdrMergeFailures[DD.Definition].push_back( in MergeDefinitionData()
1313 Reader.PendingDefinitions.insert(ID); in VisitObjCInterfaceDecl()
1316 Reader.ObjCClassesLoaded.push_back(ID); in VisitObjCInterfaceDecl()
1349 Reader 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()
1376 ProtoLocs.data(), Reader.getContext()); in ReadObjCDefinitionData()
1387 Reader.MergedDeclContexts.insert( in MergeDefinitionData()
1389 Reader.mergeDefinitionVisibility(DD.Definition, NewDD.Definition); in MergeDefinitionData()
1392 Reader.PendingObjCProtocolOdrMergeFailures[DD.Definition].push_back( in MergeDefinitionData()
1419 Reader.PendingDefinitions.insert(PD); in VisitObjCProtocolDecl()
1438 Reader.CategoriesDeserialized.insert(CD); in VisitObjCCategoryDecl()
1452 Reader.getContext()); in VisitObjCCategoryDecl()
1458 Reader.getContext()); in VisitObjCCategoryDecl()
1538 Reader.getContext().setInstantiatedFromUnnamedFieldDecl(FD, Tmpl); in VisitFieldDecl()
1558 if (MSGuidDecl *Existing = Reader.getContext().MSGuidDecls.GetOrInsertNode(D)) in VisitMSGuidDecl()
1559 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitMSGuidDecl()
1569 Reader.getContext().UnnamedGlobalConstantDecls.GetOrInsertNode(D)) in VisitUnnamedGlobalConstantDecl()
1570 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitUnnamedGlobalConstantDecl()
1580 Reader.getContext().TemplateParamObjectDecls.GetOrInsertNode(D)) in VisitTemplateParamObjectDecl()
1581 Reader.getContext().setPrimaryMergedDecl(D, Existing->getCanonicalDecl()); in VisitTemplateParamObjectDecl()
1589 FD->Chaining = new (Reader.getContext())NamedDecl*[FD->ChainingSize]; in VisitIndirectFieldDecl()
1635 Reader.PendingDeducedVarTypes.push_back({VD, DeferredTypeID}); in VisitVarDeclImpl()
1637 VD->setType(Reader.GetType(DeferredTypeID)); in VisitVarDeclImpl()
1648 Reader.DefinitionSource[VD] = in VisitVarDeclImpl()
1650 Reader.getContext().getLangOpts().BuildingPCHWithObjectFile; in VisitVarDeclImpl()
1656 Reader.getContext().setBlockVarCopyInit(VD, CopyExpr, Record.readInt()); in VisitVarDeclImpl()
1678 Reader.getContext().setInstantiatedFromStaticDataMember(VD, Tmpl, TSK,POI); in VisitVarDeclImpl()
1696 Reader.getContext().addDestruction(&Eval->Evaluated); in ReadVarDeclInit()
1793 BD->setCaptures(Reader.getContext(), captures, capturesCXXThis); in VisitBlockDecl()
1850 auto *Anon = cast<NamespaceDecl>(Reader.GetDecl(AnonNamespace)); in VisitNamespaceDecl()
1883 Reader.getContext().setInstantiatedFromUsingDecl(D, Pattern); in VisitUsingDecl()
1894 Reader.getContext().setInstantiatedFromUsingEnumDecl(D, Pattern); in VisitUsingEnumDecl()
1915 Reader.getContext().setInstantiatedFromUsingShadowDecl(D, Pattern); in VisitUsingShadowDecl()
1978 Reader.DefinitionSource[D] = in ReadCXXDefinitionData()
1980 Reader.getContext().getLangOpts().BuildingPCHWithObjectFile; in ReadCXXDefinitionData()
2017 Reader.getContext().DeviceLambdaManglingNumbers[D] = DeviceManglingNumber; in ReadCXXDefinitionData()
2022 ToCapture = (Capture *)Reader.getContext().Allocate(sizeof(Capture) * in ReadCXXDefinitionData()
2024 Lambda.AddCaptureList(Reader.getContext(), ToCapture); in ReadCXXDefinitionData()
2061 Reader.MergedDeclContexts.insert(std::make_pair(MergeDD.Definition, in MergeDefinitionData()
2063 Reader.PendingDefinitions.erase(MergeDD.Definition); in MergeDefinitionData()
2065 Reader.mergeDefinitionVisibility(DD.Definition, MergeDD.Definition); in MergeDefinitionData()
2066 assert(!Reader.Lookups.contains(MergeDD.Definition) && in MergeDefinitionData()
2070 auto PFDI = Reader.PendingFakeDefinitionData.find(&DD); in MergeDefinitionData()
2071 if (PFDI != Reader.PendingFakeDefinitionData.end() && in MergeDefinitionData()
2132 Lambda1.AddCaptureList(Reader.getContext(), Lambda2.Captures.front()); in MergeDefinitionData()
2145 Reader.PendingOdrMergeFailures[DD.Definition].push_back( in MergeDefinitionData()
2153 ASTContext &C = Reader.getContext(); in ReadCXXRecordDefinition()
2190 Reader.PendingDefinitions.insert(D); in ReadCXXRecordDefinition()
2197 ASTContext &C = Reader.getContext(); in VisitCXXRecordDeclImpl()
2288 Reader.getContext().addOverriddenMethod(D, MD->getCanonicalDecl()); in VisitCXXMethodDecl()
2363 D->Params = new (Reader.getContext()) TemplateParameterList *[NumParams]; in VisitFriendTemplateDecl()
2409 CanonD->Common = CanonD->newCommon(Reader.getContext()); in VisitRedeclarableTemplateDecl()
2410 Reader.PendingDefinitions.insert(CanonD); in VisitRedeclarableTemplateDecl()
2448 Reader.getContext().getInjectedClassNameType( in VisitClassTemplateDecl()
2478 ASTContext &C = Reader.getContext(); in VisitClassTemplateSpecializationDeclImpl()
2583 ASTContext &C = Reader.getContext(); in VisitVarTemplateSpecializationDeclImpl()
2681 D->setDefaultArgument(Reader.getContext(), in VisitTemplateTypeParmDecl()
2703 D->setDefaultArgument(Reader.getContext(), in VisitNonTypeTemplateParmDecl()
2723 D->setDefaultArgument(Reader.getContext(), in VisitTemplateTemplateParmDecl()
2803 auto *FirstDecl = cast_or_null<T>(Reader.GetDecl(FirstDeclID)); in VisitRedeclarable()
2820 Reader.PendingDeclChains.push_back(std::make_pair(DAsT, RedeclOffset)); in VisitRedeclarable()
2831 if (!Reader.getContext().getLangOpts().Modules) in mergeRedeclarable()
2862 if (!Reader.getContext().getLangOpts().Modules) in mergeLambda()
2875 NamedDecl *&Slot = Reader.LambdaDeclarationsForMerging[{ in mergeLambda()
2923 Reader.PendingDefinitions.insert(DClass); in mergeTemplatePattern()
2967 Reader.KeyDecls[ExistingCanon].push_back(Redecl.getFirstID()); in mergeRedeclarable()
2989 if (!Reader.getContext().getLangOpts().Modules) in mergeMergeable()
2995 Reader.LETemporaryForMerging[std::make_pair( in mergeMergeable()
2998 Reader.getContext().setPrimaryMergedDecl(LETDecl, in mergeMergeable()
3011 if (!Reader.getContext().getLangOpts().Modules) in mergeMergeable()
3018 if (!Reader.getContext().getLangOpts().CPlusPlus && in mergeMergeable()
3024 Reader.getContext().setPrimaryMergedDecl(static_cast<T *>(D), in mergeMergeable()
3077 ASTRecordReader &Reader; member in __anon3c764c3a0511::AttrReader
3080 AttrReader(ASTRecordReader &Reader) : Reader(Reader) {} in AttrReader() argument
3083 return Reader.readInt(); in readInt()
3086 bool readBool() { return Reader.readBool(); } in readBool()
3089 return Reader.readSourceRange(); in readSourceRange()
3093 return Reader.readSourceLocation(); in readSourceLocation()
3096 Expr *readExpr() { return Reader.readExpr(); } in readExpr()
3098 Attr *readAttr() { return Reader.readAttr(); } in readAttr()
3101 return Reader.readString(); in readString()
3105 return Reader.readTypeSourceInfo(); in readTypeSourceInfo()
3109 return Reader.readIdentifier(); in readIdentifier()
3113 return Reader.readVersionTuple(); in readVersionTuple()
3116 OMPTraitInfo *readOMPTraitInfo() { return Reader.readOMPTraitInfo(); } in readOMPTraitInfo()
3118 template <typename T> T *readDeclAs() { return Reader.readDeclAs<T>(); } in readDeclAs()
3241 ASTDeclReader::getOrFakePrimaryClassDefinition(ASTReader &Reader, in getOrFakePrimaryClassDefinition() argument
3253 DD = new (Reader.getContext()) struct CXXRecordDecl::DefinitionData(RD); in getOrFakePrimaryClassDefinition()
3259 Reader.PendingFakeDefinitionData.insert( in getOrFakePrimaryClassDefinition()
3268 DeclContext *ASTDeclReader::getPrimaryContextForMerging(ASTReader &Reader, in getPrimaryContextForMerging() argument
3274 return getOrFakePrimaryClassDefinition(Reader, RD); in getPrimaryContextForMerging()
3298 Reader.ImportedTypedefNamesForLinkage.insert( in ~FindExistingResult()
3309 setAnonymousDeclForMerging(Reader, New->getLexicalDeclContext(), in ~FindExistingResult()
3312 !Reader.getContext().getLangOpts().CPlusPlus) { in ~FindExistingResult()
3313 if (Reader.getIdResolver().tryAddTopLevelDecl(New, Name)) in ~FindExistingResult()
3314 Reader.PendingFakeLookupResults[Name.getAsIdentifierInfo()] in ~FindExistingResult()
3316 } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) { in ~FindExistingResult()
3375 NamedDecl *ASTDeclReader::getAnonymousDeclForMerging(ASTReader &Reader, in getAnonymousDeclForMerging() argument
3383 auto &Previous = Reader.AnonymousDeclarationsForMerging[CanonDC]; in getAnonymousDeclForMerging()
3402 void ASTDeclReader::setAnonymousDeclForMerging(ASTReader &Reader, in setAnonymousDeclForMerging() argument
3407 auto &Previous = Reader.AnonymousDeclarationsForMerging[CanonDC]; in setAnonymousDeclForMerging()
3421 FindExistingResult Result(Reader, D, /*Existing=*/nullptr, in findExisting()
3427 ASTContext &C = Reader.getContext(); in findExisting()
3430 auto It = Reader.ImportedTypedefNamesForLinkage.find( in findExisting()
3432 if (It != Reader.ImportedTypedefNamesForLinkage.end()) in findExisting()
3434 return FindExistingResult(Reader, D, It->second, AnonymousDeclNumber, in findExisting()
3444 Reader, D->getLexicalDeclContext(), AnonymousDeclNumber)) in findExisting()
3446 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber, in findExisting()
3449 !Reader.getContext().getLangOpts().CPlusPlus) { in findExisting()
3450 IdentifierResolver &IdResolver = Reader.getIdResolver(); in findExisting()
3478 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber, in findExisting()
3481 } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) { in findExisting()
3486 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber, in findExisting()
3491 return FindExistingResult(Reader); in findExisting()
3502 auto MergedDCIt = Reader.MergedDeclContexts.find(D->getLexicalDeclContext()); in findExisting()
3503 if (MergedDCIt != Reader.MergedDeclContexts.end() && in findExisting()
3505 Reader.PendingOdrMergeChecks.push_back(D); in findExisting()
3507 return FindExistingResult(Reader, D, /*Existing=*/nullptr, in findExisting()
3537 void ASTDeclReader::mergeInheritableAttributes(ASTReader &Reader, Decl *D, in mergeInheritableAttributes() argument
3540 ASTContext &Context = Reader.getContext(); in mergeInheritableAttributes()
3558 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, in attachPreviousDeclImpl() argument
3568 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, in attachPreviousDeclImpl() argument
3582 Reader.mergeDefinitionVisibility(CurD, VD); in attachPreviousDeclImpl()
3596 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, in attachPreviousDeclImpl() argument
3635 Reader.PendingExceptionSpecUpdates.insert( in attachPreviousDeclImpl()
3643 Reader.PendingDeducedTypeUpdates.insert( in attachPreviousDeclImpl()
3651 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, ...) { in attachPreviousDeclImpl() argument
3691 static void checkMultipleDefinitionInNamedModules(ASTReader &Reader, Decl *D, in checkMultipleDefinitionInNamedModules() argument
3727 if (Reader.getContext().isInSameModule(M, D->getOwningModule())) in checkMultipleDefinitionInNamedModules()
3730 Reader.Diag(Previous->getLocation(), in checkMultipleDefinitionInNamedModules()
3733 Reader.Diag(D->getLocation(), diag::note_also_found); in checkMultipleDefinitionInNamedModules()
3736 void ASTDeclReader::attachPreviousDecl(ASTReader &Reader, Decl *D, in attachPreviousDecl() argument
3744 attachPreviousDeclImpl(Reader, cast<TYPE##Decl>(D), Previous, Canon); \ in attachPreviousDecl()
3749 checkMultipleDefinitionInNamedModules(Reader, D, Previous); in attachPreviousDecl()
3763 inheritDefaultTemplateArguments(Reader.getContext(), in attachPreviousDecl()
3770 mergeInheritableAttributes(Reader, D, Previous); in attachPreviousDecl()
3837 ASTDeclReader Reader(*this, Record, Loc, ID, DeclLoc); in ReadDeclRecord() local
4155 [&] { Reader.Visit(D); }); in ReadDeclRecord()
4160 std::pair<uint64_t, uint64_t> Offsets = Reader.VisitDeclContext(DC); in ReadDeclRecord()
4300 ASTDeclReader Reader(*this, Record, RecordLocation(F, Offset), ID, in loadDeclUpdateRecords() local
4302 Reader.UpdateDecl(D, PendingLazySpecializationIDs); in loadDeclUpdateRecords()
4397 ASTReader &Reader; member in __anon3c764c3a0b11::ObjCCategoriesVisitor
4413 if (Existing && Reader.getOwningModuleFile(Existing) != in add()
4414 Reader.getOwningModuleFile(Cat)) { in add()
4424 Reader.Diag(Cat->getLocation(), diag::warn_dup_category_def) in add()
4426 Reader.Diag(Existing->getLocation(), in add()
4445 ASTReader &Reader, ObjCInterfaceDecl *Interface, in ObjCCategoriesVisitor() argument
4448 : Reader(Reader), Interface(Interface), Deserialized(Deserialized), in ObjCCategoriesVisitor()
4470 Reader.mapGlobalIDToModuleFileGlobalID(M, InterfaceID); in operator ()()
4486 return Reader.isDeclIDFromModule(InterfaceID, M); in operator ()()
4494 add(Reader.ReadDeclAs<ObjCCategoryDecl>(M, M.ObjCCategories, Offset)); in operator ()()
4538 Reader.PendingAddedClassMembers.push_back({RD, MD}); in UpdateDecl()
4624 if (Reader.PendingBodies[FD]) { in UpdateDecl()
4649 !Reader.PendingFakeDefinitionData.count(OldDD)); in UpdateDecl()
4659 Reader.PendingFakeDefinitionData.erase(OldDD); in UpdateDecl()
4679 Reader.getContext(), TemplArgs); in UpdateDecl()
4700 D->setAttrsImpl(Attrs, Reader.getContext()); in UpdateDecl()
4729 FD->setType(Reader.getContext().getFunctionType( in UpdateDecl()
4735 Reader.PendingExceptionSpecUpdates.insert( in UpdateDecl()
4744 Reader.PendingDeducedTypeUpdates.insert( in UpdateDecl()
4751 D->markUsed(Reader.getContext()); in UpdateDecl()
4755 Reader.getContext().setManglingNumber(cast<NamedDecl>(D), in UpdateDecl()
4760 Reader.getContext().setStaticLocalNumber(cast<VarDecl>(D), in UpdateDecl()
4765 D->addAttr(OMPThreadPrivateDeclAttr::CreateImplicit(Reader.getContext(), in UpdateDecl()
4776 Reader.getContext(), AllocatorKind, Allocator, Alignment, SR)); in UpdateDecl()
4783 Module *Owner = SubmoduleID ? Reader.getSubmodule(SubmoduleID) : nullptr; in UpdateDecl()
4784 Reader.getContext().mergeDefinitionIntoModule(Exported, Owner); in UpdateDecl()
4785 Reader.PendingMergedDefinitionsToDeduplicate.insert(Exported); in UpdateDecl()
4796 Reader.getContext(), MapType, DevType, IndirectE, Indirect, Level, in UpdateDecl()