From e4d90e14841e1e2d94701f65ad3f23a223fdaaca Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Fri, 31 Aug 2012 17:28:09 +0000 Subject: [PATCH] Fixed invalid iterators. Since the iterator is invalidated after the erase() call, we need to replace it with the new one returned. This was triggering an assert under MSVC 2012 and making all the ARCMT/ tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163007 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ARCMigrate/ARCMT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp index 14e13ba58c..9c4c2f2df6 100644 --- a/lib/ARCMigrate/ARCMT.cpp +++ b/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; } -- 2.50.1