Skip to content

Commit b892631

Browse files
committed
Delay marking pending incomplete decl chains until the end of finishPendingActions.
1 parent 110b891 commit b892631

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

clang/lib/Serialization/ASTReader.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9807,12 +9807,12 @@ void ASTReader::visitTopLevelModuleMaps(
98079807
}
98089808

98099809
void ASTReader::finishPendingActions() {
9810-
while (
9811-
!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() ||
9812-
!PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() ||
9813-
!PendingDeclChains.empty() || !PendingMacroIDs.empty() ||
9814-
!PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() ||
9815-
!PendingObjCExtensionIvarRedeclarations.empty()) {
9810+
while (!PendingIdentifierInfos.empty() ||
9811+
!PendingDeducedFunctionTypes.empty() ||
9812+
!PendingDeducedVarTypes.empty() || !PendingDeclChains.empty() ||
9813+
!PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() ||
9814+
!PendingUpdateRecords.empty() ||
9815+
!PendingObjCExtensionIvarRedeclarations.empty()) {
98169816
// If any identifiers with corresponding top-level declarations have
98179817
// been loaded, load those declarations now.
98189818
using TopLevelDeclsMap =
@@ -9860,13 +9860,6 @@ void ASTReader::finishPendingActions() {
98609860
}
98619861
PendingDeducedVarTypes.clear();
98629862

9863-
// For each decl chain that we wanted to complete while deserializing, mark
9864-
// it as "still needs to be completed".
9865-
for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {
9866-
markIncompleteDeclChain(PendingIncompleteDeclChains[I]);
9867-
}
9868-
PendingIncompleteDeclChains.clear();
9869-
98709863
// Load pending declaration chains.
98719864
for (unsigned I = 0; I != PendingDeclChains.size(); ++I)
98729865
loadPendingDeclChain(PendingDeclChains[I].first,
@@ -10117,6 +10110,13 @@ void ASTReader::finishPendingActions() {
1011710110
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
1011810111
getContext().deduplicateMergedDefinitonsFor(ND);
1011910112
PendingMergedDefinitionsToDeduplicate.clear();
10113+
10114+
// For each decl chain that we wanted to complete while deserializing, mark
10115+
// it as "still needs to be completed".
10116+
for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {
10117+
markIncompleteDeclChain(PendingIncompleteDeclChains[I]);
10118+
}
10119+
PendingIncompleteDeclChains.clear();
1012010120
}
1012110121

1012210122
void ASTReader::diagnoseOdrViolations() {

0 commit comments

Comments
 (0)