[PATCH] D77419: [libTooling] Simplify the representation of Transformer's RewriteRules.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 10:18:58 PDT 2020


ymandel marked 2 inline comments as done.
ymandel added inline comments.


================
Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:40
+
+/// A map from a match result to a list of concrete errors (with possible
+/// failure). This type is a building block of rewrite rules, but users will
----------------
gribozavr2 wrote:
> "A map"? it is a function.
> 
> Maybe "Maps a match result to..."
> 
> Also, "concrete errors" probably should be "concrete edits".
agreed on both. will update.


================
Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:44
+/// of `EditList`.
+using EditList = MatchConsumer<llvm::SmallVector<Edit, 1>>;
+
----------------
gribozavr2 wrote:
> Could you explain the idea behind the word "list" in the name? I don't get it.
> 
> Maybe "EditGenerator"?
It returns a list of edits. So, EditListGenerator is probably most precise, but I wasn't sure that "generator" added much. I'm fine with any of the names, EditGenerator probably being best (if we want Generator in the name) because its concise while still aligning with multiple edits (since a generator often can generate more than one item). WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77419





More information about the cfe-commits mailing list