[PATCH] D69802: [libTooling] Further simplify `Stencil` type and introduce `MatchComputation`.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 06:23:16 PST 2019


ymandel created this revision.
ymandel added a reviewer: gribozavr.
Herald added a project: clang.
ymandel added a parent revision: D69613: [libTooling] Simplify type structure of `Stencil`s..

This revision introduces a new interface `MatchComputation` which generalizes
the `Stencil` interface and replaces the `std::function` interface of
`MatchConsumer`. With this revision, `Stencil` (as an abstraction) becomes just
one collection of implementations of
`MatchComputation<std::string>`. Correspondingly, we remove the `Stencil` class
entirely in favor of a simple type alias, deprecate `MatchConsumer` and change
all functions that accepted `MatchConsumer<std::string>` to use
`MatchComputation<std::string>` instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69802

Files:
  clang/include/clang/Tooling/Transformer/MatchConsumer.h
  clang/include/clang/Tooling/Transformer/RewriteRule.h
  clang/include/clang/Tooling/Transformer/Stencil.h
  clang/lib/Tooling/Transformer/RewriteRule.cpp
  clang/lib/Tooling/Transformer/Stencil.cpp
  clang/unittests/Tooling/StencilTest.cpp
  clang/unittests/Tooling/TransformerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69802.227701.patch
Type: text/x-patch
Size: 14075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191104/6d9cd415/attachment-0001.bin>


More information about the cfe-commits mailing list