summaryrefslogtreecommitdiffstats
path: root/lib/Edit/EditedSource.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /lib/Edit/EditedSource.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'lib/Edit/EditedSource.cpp')
-rw-r--r--lib/Edit/EditedSource.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Edit/EditedSource.cpp b/lib/Edit/EditedSource.cpp
index 5b7fa4a..b2a1663 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;
}
OpenPOWER on IntegriCloud