llvm-project/clang/lib/Tooling
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
..
ASTDiff [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Core [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
DependencyScanning [clang-scan-deps] Fix for headers having the same name as a directory 2019-09-13 22:12:02 +00:00
Inclusions [clang-format] Modified SortIncludes and IncludeCategories to priority for sorting #includes within the Group Category. 2019-09-25 20:33:01 +00:00
Refactoring [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes. 2019-09-27 15:26:04 +00:00
Syntax [Syntax] Added function to get macro expansion tokens to TokenBuffer. 2019-08-20 13:34:01 +00:00
AllTUsExecution.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
ArgumentsAdjusters.cpp [clang-scan-deps] strip the --serialize-diagnostics argument 2019-09-21 00:17:26 +00:00
CMakeLists.txt [clang-scan-deps] Introduce the DependencyScanning library with the 2019-06-26 21:11:51 +00:00
CommonOptionsParser.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
CompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Execution.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileMatchTrie.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FixIt.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
GuessTargetAndModeCompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InterpolatingCompilationDatabase.cpp [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
JSONCompilationDatabase.cpp Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands. 2019-07-12 23:38:31 +00:00
Refactoring.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
RefactoringCallbacks.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
StandaloneExecution.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Tooling.cpp [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00