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

Andy Soffer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 23 09:33:58 PDT 2020


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 TrueEdit) {
+  return ifBound(std::move(ID), edit(std::move(TrueEdit)), noEdits());
----------------
I don't know about LLVM style preferences here, but a default argument to the example above seems reasonable too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84310/new/

https://reviews.llvm.org/D84310





More information about the cfe-commits mailing list