llvm-project/clang/lib/Tooling/Core
Eric Liu ac73ea34a4 Supports adding insertion around non-insertion replacements.
Summary:
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.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D24515

llvm-svn: 281457
2016-09-14 13:04:51 +00:00
..
CMakeLists.txt Add Tooling functionality to get a name for a QualType that can be used to name 2016-02-09 21:04:04 +00:00
Lookup.cpp [Tooling] skip anonymous namespaces when checking if typeLoc references a type decl from a different canonical namespace. 2016-07-26 14:53:05 +00:00
QualTypeNames.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
Replacement.cpp Supports adding insertion around non-insertion replacements. 2016-09-14 13:04:51 +00:00