fix an inconsistency computing offsets that caused a crash on rewrite-nest.m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Rewrite/Rewriter.cpp b/lib/Rewrite/Rewriter.cpp
index 4f54102..bea7c00 100644
--- a/lib/Rewrite/Rewriter.cpp
+++ b/lib/Rewrite/Rewriter.cpp
@@ -52,7 +52,7 @@
/// operation.
void RewriteBuffer::ReplaceText(unsigned OrigOffset, unsigned OrigLength,
const char *NewStr, unsigned NewLength) {
- unsigned RealOffset = getMappedOffset(OrigOffset, true);
+ unsigned RealOffset = getMappedOffset(OrigOffset, false);
Buffer.erase(RealOffset, OrigLength);
Buffer.insert(RealOffset, NewStr, NewStr+NewLength);
if (OrigLength != NewLength)