================ @@ -10792,47 +10822,54 @@ void ASTReader::FinishedDeserializing() { --NumCurrentElementsDeserializing; if (NumCurrentElementsDeserializing == 0) { - // Propagate exception specification and deduced type updates along - // redeclaration chains. - // - // We do this now rather than in finishPendingActions because we want to - // be able to walk the complete redeclaration chains of the updated decls. - while (!PendingExceptionSpecUpdates.empty() || - !PendingDeducedTypeUpdates.empty() || - !PendingUndeducedFunctionDecls.empty()) { - auto ESUpdates = std::move(PendingExceptionSpecUpdates); - PendingExceptionSpecUpdates.clear(); - for (auto Update : ESUpdates) { - ProcessingUpdatesRAIIObj ProcessingUpdates(*this); - auto *FPT = Update.second->getType()->castAs<FunctionProtoType>(); - auto ESI = FPT->getExtProtoInfo().ExceptionSpec; - if (auto *Listener = getContext().getASTMutationListener()) - Listener->ResolvedExceptionSpec(cast<FunctionDecl>(Update.second)); - for (auto *Redecl : Update.second->redecls()) - getContext().adjustExceptionSpec(cast<FunctionDecl>(Redecl), ESI); - } + { + // Guard variable to avoid recursively entering the process of passing + // decls to consumer. + SaveAndRestore GuardPassingDeclsToConsumer(CanPassDeclsToConsumer, false); ---------------- mpark wrote:
Addressed in https://github.com/llvm/llvm-project/pull/131746 https://github.com/llvm/llvm-project/pull/129982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits