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.

llvm-svn: 163007
This commit is contained in:
Joao Matos 2012-08-31 17:28:09 +00:00
parent 318f77749e
commit 0e167f7368
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ bool CapturedDiagList::clearDiagnostic(ArrayRef<unsigned> 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;
}