@@ -10186,12 +10186,12 @@ void ASTReader::visitTopLevelModuleMaps(
1018610186}
1018710187
1018810188void ASTReader::finishPendingActions () {
10189- while (!PendingIdentifierInfos. empty () ||
10190- !PendingDeducedFunctionTypes.empty () ||
10191- !PendingDeducedVarTypes.empty () || !PendingDeclChains .empty () ||
10192- !PendingMacroIDs .empty () || !PendingDeclContextInfos .empty () ||
10193- !PendingUpdateRecords.empty () ||
10194- !PendingObjCExtensionIvarRedeclarations.empty ()) {
10189+ while (
10190+ !PendingIdentifierInfos. empty () || !PendingDeducedFunctionTypes.empty () ||
10191+ !PendingDeducedVarTypes.empty () || !PendingIncompleteDeclChains .empty () ||
10192+ !PendingDeclChains .empty () || !PendingMacroIDs .empty () ||
10193+ !PendingDeclContextInfos. empty () || !PendingUpdateRecords.empty () ||
10194+ !PendingObjCExtensionIvarRedeclarations.empty ()) {
1019510195 // If any identifiers with corresponding top-level declarations have
1019610196 // been loaded, load those declarations now.
1019710197 using TopLevelDeclsMap =
@@ -10239,6 +10239,13 @@ void ASTReader::finishPendingActions() {
1023910239 }
1024010240 PendingDeducedVarTypes.clear ();
1024110241
10242+ // For each decl chain that we wanted to complete while deserializing, mark
10243+ // it as "still needs to be completed".
10244+ for (unsigned I = 0 ; I != PendingIncompleteDeclChains.size (); ++I) {
10245+ markIncompleteDeclChain (PendingIncompleteDeclChains[I]);
10246+ }
10247+ PendingIncompleteDeclChains.clear ();
10248+
1024210249 // Load pending declaration chains.
1024310250 for (unsigned I = 0 ; I != PendingDeclChains.size (); ++I)
1024410251 loadPendingDeclChain (PendingDeclChains[I].first ,
@@ -10476,12 +10483,6 @@ void ASTReader::finishPendingActions() {
1047610483 for (auto *ND : PendingMergedDefinitionsToDeduplicate)
1047710484 getContext ().deduplicateMergedDefinitonsFor (ND);
1047810485 PendingMergedDefinitionsToDeduplicate.clear ();
10479-
10480- // For each decl chain that we wanted to complete while deserializing, mark
10481- // it as "still needs to be completed".
10482- for (Decl *D : PendingIncompleteDeclChains)
10483- markIncompleteDeclChain (D);
10484- PendingIncompleteDeclChains.clear ();
1048510486}
1048610487
1048710488void ASTReader::diagnoseOdrViolations () {
0 commit comments