[modules] Fix an iterator invalidation bug found by the modules selfhost bot.
llvm-svn: 233007
This commit is contained in:
parent
96cedb52b3
commit
7226f2a497
|
@ -8618,10 +8618,14 @@ void ASTReader::FinishedDeserializing() {
|
|||
|
||||
if (NumCurrentElementsDeserializing == 0) {
|
||||
// Propagate exception specification updates along redeclaration chains.
|
||||
for (auto Update : PendingExceptionSpecUpdates) {
|
||||
auto *FPT = Update.second->getType()->castAs<FunctionProtoType>();
|
||||
SemaObj->UpdateExceptionSpec(Update.second,
|
||||
FPT->getExtProtoInfo().ExceptionSpec);
|
||||
while (!PendingExceptionSpecUpdates.empty()) {
|
||||
auto Updates = std::move(PendingExceptionSpecUpdates);
|
||||
PendingExceptionSpecUpdates.clear();
|
||||
for (auto Update : Updates) {
|
||||
auto *FPT = Update.second->getType()->castAs<FunctionProtoType>();
|
||||
SemaObj->UpdateExceptionSpec(Update.second,
|
||||
FPT->getExtProtoInfo().ExceptionSpec);
|
||||
}
|
||||
}
|
||||
|
||||
diagnoseOdrViolations();
|
||||
|
|
Loading…
Reference in New Issue