llvm-project/clang/lib/Tooling
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
..
Core Supports adding insertion around non-insertion replacements. 2016-09-14 13:04:51 +00:00
ArgumentsAdjusters.cpp Make ArgumentAdjuster aware of the current file being processed. 2015-11-05 02:19:53 +00:00
CMakeLists.txt clangTooling: Update libdeps: LLVMOptions, since r280118. 2016-08-31 00:46:32 +00:00
CommonOptionsParser.cpp Apply some suggestions from clang-tidy's performance-unnecessary-value-param. 2016-06-15 14:20:56 +00:00
CompilationDatabase.cpp Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
FileMatchTrie.cpp Tooling: Hide implementation details 2015-03-09 15:03:26 +00:00
FixIt.cpp [tooling] FixItHint Tooling refactoring 2016-05-11 14:31:39 +00:00
JSONCompilationDatabase.cpp Fix json compilation database syntax on non-Windows. 2016-08-18 19:42:00 +00:00
Refactoring.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
RefactoringCallbacks.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
Tooling.cpp Fix memory leak by storing returned pointer in std::unique_ptr 2016-08-30 21:12:48 +00:00