SuccessChanges

Summary

  1. [LibTooling] Relax Transformer to allow rewriting macro expansions Summary: Currently, Transformer rejects any changes to source locations inside macro expansions. This change relaxes that constraint to allow rewrites when the entirety of the expansion is replaced, since that can be mapped to replacing the entirety of the expansion range in the file source. This change makes Transformer consistent with the handling of edit ranges in `clang::edit::Commit` (which is used, for example, for applying `FixItHint`s from diagnostics). Reviewers: ilya-biryukov Subscribers: gribozavr, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64518
Revision 366473 by ymandel:
[LibTooling] Relax Transformer to allow rewriting macro expansions

Summary:
Currently, Transformer rejects any changes to source locations inside macro
expansions. This change relaxes that constraint to allow rewrites when the
entirety of the expansion is replaced, since that can be mapped to replacing the
entirety of the expansion range in the file source.  This change makes
Transformer consistent with the handling of edit ranges in `clang::edit::Commit`
(which is used, for example, for applying `FixItHint`s from diagnostics).

Reviewers: ilya-biryukov

Subscribers: gribozavr, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64518
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp (diff)clang.src/lib/Tooling/Refactoring/Transformer.cpp
The file was modified/cfe/trunk/unittests/Tooling/TransformerTest.cpp (diff)clang.src/unittests/Tooling/TransformerTest.cpp