]> granicus.if.org Git - clang/commit
Fix calculation of shifted cursor/code positions. Specifically support
authorDaniel Jasper <djasper@google.com>
Mon, 23 Nov 2015 08:33:48 +0000 (08:33 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 23 Nov 2015 08:33:48 +0000 (08:33 +0000)
commitc7652b708852cfb7091791085b6836115ea8c69b
tree54401692374dd1b519aa2df67bf4567790617c8e
parent55de488d205b13b9aba4757d28474022be14ab25
Fix calculation of shifted cursor/code positions. Specifically support
the case where a specific range is replaced by new text. Previously,
the calculation would shift any position from within a replaced region
to the first character after the region. This is undersirable, e.g. for
clang-format's include sorting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253859 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Tooling/Core/Replacement.cpp
unittests/Tooling/RefactoringTest.cpp