llvm-project/clang/lib/Tooling/Refactoring
Yitzhak Mandelbaum db24ef509e [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.
Summary: Every change triggered by a rewrite rule is anchored at a particular
location in the source code.  This patch refines how that location is chosen and
defines it as an explicit function so it can be shared by other Transformer
implementations.

This patch was inspired by a bug found by a clang tidy, wherein two changes were
anchored at the same location (the expansion loc of the macro) resulting in the
discarding of the second change.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373093
2019-09-27 15:26:04 +00:00
..
Extract [Tooling] Added DeclStmtClass to ExtractionSemicolonPolicy 2019-08-14 13:37:39 +00:00
Rename [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
ASTSelection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTSelectionRequirements.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
AtomicChange.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [libTooling] Introduce new library of source-code builders. 2019-09-23 12:40:10 +00:00
RangeSelector.cpp [libTooling] Introduce the MatchConsumer abstraction 2019-09-25 13:34:04 +00:00
RefactoringActions.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SourceCode.cpp [LibTooling] Add function to translate and validate source range for editing 2019-07-18 17:26:57 +00:00
SourceCodeBuilders.cpp [libTooling] Introduce new library of source-code builders. 2019-09-23 12:40:10 +00:00
Stencil.cpp [libTooling] Add `run` combinator to Stencils. 2019-09-26 00:53:56 +00:00
Transformer.cpp [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes. 2019-09-27 15:26:04 +00:00