diff --git a/clang/lib/Edit/EditedSource.cpp b/clang/lib/Edit/EditedSource.cpp index a3386b2489b07..5e77b0141e8a0 100644 --- a/clang/lib/Edit/EditedSource.cpp +++ b/clang/lib/Edit/EditedSource.cpp @@ -430,7 +430,7 @@ void EditedSource::applyRewrites(EditsReceiver &receiver, if (offs == CurEnd) { StrVec += act.Text; CurLen += act.RemoveLen; - CurEnd.getWithOffset(act.RemoveLen); + CurEnd = CurEnd.getWithOffset(act.RemoveLen); continue; }