aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoao Matos <ripzonetriton@gmail.com>2012-08-31 17:28:09 +0000
committerJoao Matos <ripzonetriton@gmail.com>2012-08-31 17:28:09 +0000
commite4d90e14841e1e2d94701f65ad3f23a223fdaaca (patch)
treeaa338d0c461c9c1837b4a00bcb94a903267a3419
parentde5277fc555551857602bd7a7e5e616274e2d4a6 (diff)
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
-rw-r--r--lib/ARCMigrate/ARCMT.cpp2
1 files changed, 1 insertions, 1 deletions
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<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;
}