[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf428778128f: [libTooling] Add assorted `EditGenerator` combinators. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84310/new/ https:/

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 280424. ymandel added a comment. fixed lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84310/new/ https://reviews.llvm.org/D84310 Files: clang/include/clang/Tooling/Transformer/MatchConsumer.h clang/inc

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:125 +/// not bound, then no edits are produced. +inline EditGenerator ifBound(std::string ID, ASTEdit TrueEdit) { + return ifBound(std::move

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-23 Thread Andy Soffer via Phabricator via cfe-commits
asoffer accepted this revision. asoffer added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:125 +/// not bound, then no edits are produced. +inline EditGenerator ifBound(std::string ID, ASTEdit

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 279771. ymandel added a comment. revert unrelated change in `RangeSelector.h` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84310/new/ https://reviews.llvm.org/D84310 Files: clang/include/clang/Tooling/Trans

[PATCH] D84310: [libTooling] Add assorted `EditGenerator` combinators.

2020-07-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: asoffer, gribozavr2. Herald added a project: clang. This patch adds various combinators that help in constructing `EditGenerator`s: - `noEdits` - `ifBound`, specialized to `ASTEdit` - `flatten` and `flattenVector` which allow for easy constr