[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 17 02:16:14 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:278
+/// Builds the matcher needed for registration.
+ast_matchers::internal::DynTypedMatcher buildMatcher(const RewriteRule &Rule);
+
----------------
ymandel wrote:
> ilya-biryukov wrote:
> > Can it be declared in `.cpp` file instead? Or is it used in `clang-tidy` integration? 
> `buildMatcher` and `findSelectedCase` will be used in the clang-tidy integration and in the apply-rule-to-single-node function that I'm planning.
I'd say this makes these functions a public interface of rewrite rule, albeit it's an "advanced" use-case.
It's probably ok to keep them in `detail` namespace for now, but would be nice to come up with a proper public functions that allow us to implement those use-cases.
(Or declare these function public and well-supported and move them out of `detail` at some point)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61335





More information about the cfe-commits mailing list