]> granicus.if.org Git - clang/commitdiff
Fixed invalid iterators. Since the iterator is invalidated after the erase() call...
authorJoao Matos <ripzonetriton@gmail.com>
Fri, 31 Aug 2012 17:28:09 +0000 (17:28 +0000)
committerJoao Matos <ripzonetriton@gmail.com>
Fri, 31 Aug 2012 17:28:09 +0000 (17:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163007 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ARCMigrate/ARCMT.cpp

index 14e13ba58cfa0743f2925059bd9cf25edea59a2f..9c4c2f2df68455c2a0d31cfc0c9f0f761231c708 100644 (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;
     }