[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 16 12:34:16 PDT 2019


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


================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:718
+template <typename T>
+internal::Matcher<T> traverse(ast_type_traits::TraversalKind TK,
+                              const internal::Matcher<T> &InnerMatcher) {
----------------
aaron.ballman wrote:
> steveire wrote:
> > aaron.ballman wrote:
> > > Is this an API we should be exposing to clang-query as well? Will those users be able to use a string literal for the traversal kind, like they already do for attribute kinds (etc)?
> > Yes, I thought about that, but in a follow-up patch. First, I aim to extend the `TraversalKind` enum with `TK_IgnoreInvisble`.
> This is new functionality, so why do you want to wait for a follow-up patch (is it somehow more involved)? We typically add support for dynamic matchers at the same time we add support for the static matchers because otherwise the two get frustratingly out of sync.
Perhaps I can add the support in DynamicASTMatchers. Can you give some direction on that? I don't recall where the attr strings are handled.

A corresponding change to `clang-query` will be in another patch anyway because it's a different repo.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61837





More information about the cfe-commits mailing list