diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-14 22:01:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-14 22:01:53 +0000 |
commit | 055b395294d190a432e9d87bb665634636a1418a (patch) | |
tree | 774bfb5403aaab78b904e4455a9a05060c656a6a /lib/Edit/EditedSource.cpp | |
parent | 13ec9100ca6bc03b5ce8832e4a0fcb724d47bcb1 (diff) |
[objcmt] When rewriting to array/dictionary literals, add an explicit
cast to 'id' for any argument that requires it.
Part of rdar://11438360.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Edit/EditedSource.cpp')
-rw-r--r-- | lib/Edit/EditedSource.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Edit/EditedSource.cpp b/lib/Edit/EditedSource.cpp index 5b7fa4ad1b..b2a16635d0 100644 --- a/lib/Edit/EditedSource.cpp +++ b/lib/Edit/EditedSource.cpp @@ -100,8 +100,11 @@ bool EditedSource::commitInsertFromRange(SourceLocation OrigLoc, FileOffset B = I->first; FileOffset E = B.getWithOffset(FA.RemoveLen); + if (BeginOffs == B) + break; + if (BeginOffs < E) { - if (BeginOffs >= B) { + if (BeginOffs > B) { BeginOffs = E; ++I; } |