diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp index 14e13ba58cfa..9c4c2f2df684 100644 --- a/clang/lib/ARCMigrate/ARCMT.cpp +++ b/clang/lib/ARCMigrate/ARCMT.cpp @@ -42,7 +42,7 @@ bool CapturedDiagList::clearDiagnostic(ArrayRef IDs, while (I != List.end() && I->getLevel() == DiagnosticsEngine::Note) ++I; // Clear the diagnostic and any notes following it. - List.erase(eraseS, I); + I = List.erase(eraseS, I); continue; }