[libTooling] Simplify the representation of Transformer's RewriteRules.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Fri, 3 Apr 2020 17:10:51 +0000 (13:10 -0400)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Wed, 8 Apr 2020 12:45:41 +0000 (08:45 -0400)
commit5e5d36671833e186e847e74bb5ed0c559625b906
tree3310984cbc736c9ea96c69887fda6ede042369b3
parentd5d0d8eb7d094f8270721662882c0094fc4fdc29
[libTooling] Simplify the representation of Transformer's RewriteRules.

Summary:
This revision simplifies the representation of edits in rewrite rules. The
simplified form is more general, allowing the user more flexibility in building
custom edit specifications.

The changes extend the API, without changing the signature of existing
functions. So this only risks breaking users that directly accessed the
`RewriteRule` struct.

Reviewers: gribozavr2

Subscribers: jfb, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77419
clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
clang/include/clang/Tooling/Transformer/RewriteRule.h
clang/lib/Tooling/Transformer/RewriteRule.cpp
clang/lib/Tooling/Transformer/Transformer.cpp