Skip to content

Commit 9d9bb53

Browse files
committed
[incrParse] Fix issue that did not report the first reparsed character as reparsed
1 parent 63becb5 commit 9d9bb53

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/swift-syntax-test/swift-syntax-test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ struct ByteBasedSourceRange {
248248

249249
SourceRange toSourceRange(SourceManager &SourceMgr, unsigned BufferID) {
250250
auto StartLoc = SourceMgr.getLocForOffset(BufferID, Start);
251-
// SourceRange includes the last offset, we don't. So subtract 1
252-
auto EndLoc = SourceMgr.getLocForOffset(BufferID, End - 1);
251+
auto EndLoc = SourceMgr.getLocForOffset(BufferID, End);
253252
return SourceRange(StartLoc, EndLoc);
254253
}
255254
};

0 commit comments

Comments
 (0)