-
- Downloads
Merge conflicting replacements when they are order-independent.
Summary: Now two replacements are considered order-independent if applying them in either order produces the same result. These include (but not restricted to) replacements that: - don't overlap (being directly adjacent is fine) and - are overlapping deletions. - are insertions at the same offset and applying them in either order has the same effect, i.e. X + Y = Y + X if one inserts text X and the other inserts text Y. Discussion about this design can be found in D24717 Reviewers: djasper, klimek Subscribers: omtcyfz, cfe-commits Differential Revision: https://reviews.llvm.org/D24800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282577 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Tooling/Core/Replacement.h 34 additions, 3 deletionsinclude/clang/Tooling/Core/Replacement.h
- lib/Tooling/Core/Replacement.cpp 99 additions, 8 deletionslib/Tooling/Core/Replacement.cpp
- unittests/Tooling/RefactoringTest.cpp 180 additions, 12 deletionsunittests/Tooling/RefactoringTest.cpp
Loading
Please register or sign in to comment