Skip to content

Revert "[C++20][Modules][Serialization] Delay marking pending incompl… #127136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10188,12 +10188,12 @@ void ASTReader::visitTopLevelModuleMaps(
}

void ASTReader::finishPendingActions() {
while (!PendingIdentifierInfos.empty() ||
!PendingDeducedFunctionTypes.empty() ||
!PendingDeducedVarTypes.empty() || !PendingDeclChains.empty() ||
!PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() ||
!PendingUpdateRecords.empty() ||
!PendingObjCExtensionIvarRedeclarations.empty()) {
while (
!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() ||
!PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() ||
!PendingDeclChains.empty() || !PendingMacroIDs.empty() ||
!PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() ||
!PendingObjCExtensionIvarRedeclarations.empty()) {
// If any identifiers with corresponding top-level declarations have
// been loaded, load those declarations now.
using TopLevelDeclsMap =
Expand Down Expand Up @@ -10241,6 +10241,13 @@ void ASTReader::finishPendingActions() {
}
PendingDeducedVarTypes.clear();

// For each decl chain that we wanted to complete while deserializing, mark
// it as "still needs to be completed".
for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {
markIncompleteDeclChain(PendingIncompleteDeclChains[I]);
}
PendingIncompleteDeclChains.clear();

// Load pending declaration chains.
for (unsigned I = 0; I != PendingDeclChains.size(); ++I)
loadPendingDeclChain(PendingDeclChains[I].first,
Expand Down Expand Up @@ -10478,12 +10485,6 @@ void ASTReader::finishPendingActions() {
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
getContext().deduplicateMergedDefinitonsFor(ND);
PendingMergedDefinitionsToDeduplicate.clear();

// For each decl chain that we wanted to complete while deserializing, mark
// it as "still needs to be completed".
for (Decl *D : PendingIncompleteDeclChains)
markIncompleteDeclChain(D);
PendingIncompleteDeclChains.clear();
}

void ASTReader::diagnoseOdrViolations() {
Expand Down
93 changes: 0 additions & 93 deletions clang/test/Modules/pr121245.cpp

This file was deleted.