llvm-project/clang/unittests/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
..
RecursiveASTVisitorTests [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created. 2019-08-09 07:30:28 +00:00
Syntax [Syntax] Added function to get macro expansion tokens to TokenBuffer. 2019-08-20 13:34:01 +00:00
ASTSelectionTest.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
CastExprTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommentHandlerTest.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
CompilationDatabaseTest.cpp Remove unused variables. 2019-08-26 20:51:23 +00:00
DependencyScannerTest.cpp Use FileEntryRef for PPCallbacks::HasInclude 2019-08-27 17:32:42 +00:00
DiagnosticsYamlTest.cpp [test] Delete trailing spaces from YAML tests 2019-07-12 05:59:28 +00:00
ExecutionTest.cpp Changed FrontendActionFactory::create to return a std::unique_ptr 2019-08-29 16:38:36 +00:00
FixItTest.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
HeaderIncludesTest.cpp [Tooling] Handle #pragma once header guard in include insertion. 2019-01-29 14:40:01 +00:00
LexicallyOrderedRecursiveASTVisitorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LookupTest.cpp Fix gcc "-Wdangling-else" warning. NFCI. 2019-04-30 10:57:37 +00:00
QualTypeNamesTest.cpp Make getFullyQualifiedName qualify both the pointee and class type for member ptr types 2019-03-15 11:09:41 +00:00
RangeSelectorTest.cpp [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators. 2019-09-20 17:11:03 +00:00
RecursiveASTVisitorTestDeclVisitor.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RecursiveASTVisitorTestPostOrderVisitor.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RecursiveASTVisitorTestTypeLocVisitor.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RefactoringActionRulesTest.cpp [test] Delete trailing spaces from YAML tests 2019-07-12 05:59:28 +00:00
RefactoringCallbacksTest.cpp Removed the 'id' AST matcher, which is superseded by '.bind()' 2019-08-20 13:02:28 +00:00
RefactoringTest.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
ReplacementTest.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ReplacementsYamlTest.cpp [test] Delete trailing spaces from YAML tests 2019-07-12 05:59:28 +00:00
RewriterTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RewriterTestContext.h [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
SourceCodeBuildersTest.cpp [libTooling] Introduce new library of source-code builders. 2019-09-23 12:40:10 +00:00
SourceCodeTest.cpp [LibTooling] Add function to translate and validate source range for editing 2019-07-18 17:26:57 +00:00
StencilTest.cpp [libTooling] Add `run` combinator to Stencils. 2019-09-26 00:53:56 +00:00
TestVisitor.h [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
ToolingTest.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
TransformerTest.cpp [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes. 2019-09-27 15:26:04 +00:00