[PATCH] D24515: Supports adding insertion around non-insertion replacements.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 10:08:38 PDT 2016
ioeric created this revision.
ioeric added reviewers: djasper, klimek.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Extend `tooling::Replacements::add()` to support adding order-independent replacements.
Two replacements are considered order-independent if one of the following conditions is true:
- They do not overlap. (This is already supported.)
- One replacement is insertion, and the other is a replacement with
length > 0, and the insertion is adjecent to but not contained in the
other replacement. In this case, the replacement should always change
the original code instead of the inserted text.
https://reviews.llvm.org/D24515
Files:
include/clang/Tooling/Core/Replacement.h
lib/Tooling/Core/Replacement.cpp
unittests/Tooling/RefactoringTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24515.71192.patch
Type: text/x-patch
Size: 10187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160913/56c1bf9c/attachment.bin>
More information about the cfe-commits
mailing list