[PATCH] D65877: [libTooling] In Transformer, generalize `applyFirst` to admit rules with incompatible matchers.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 08:01:06 PDT 2019


ymandel created this revision.
ymandel added a reviewer: gribozavr.
Herald added a project: clang.

This patch removes an (artificial) limitation of `applyFirst`, which requires
that all of the rules' matchers can be grouped together in a single `anyOf()`.
This change generalizes the code to group the matchers into separate `anyOf`s
based on compatibility. Correspondingly, `buildMatcher` is changed to
`buildMatchers`, to allow for returning a set of matchers rather than just one.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65877

Files:
  clang/include/clang/Tooling/Refactoring/Transformer.h
  clang/lib/Tooling/Refactoring/Transformer.cpp
  clang/unittests/Tooling/TransformerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65877.213886.patch
Type: text/x-patch
Size: 11740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190807/ffa1c874/attachment-0001.bin>


More information about the cfe-commits mailing list