aaron.ballman added a comment. Just to make sure I understand the purpose -- the goal here is to optionally match one or more inner matchers without failing even if none of the inner matchers match anything, and this is a different use case than `anyOf()` because that would fail when none of the inner matchers match?
================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2538 +/// Usable as: Any Matcher +extern const internal::VariadicOperatorMatcherFunc< + 1, std::numeric_limits<unsigned>::max()> ---------------- This needs to be registered in the dynamic matcher registry (Registry.cpp) as well. Also, you should regenerate the documentation by running `clang\docs\tools\dump_ast_matchers.py`. I think this matcher could use some example uses in the documentation as well. ================ Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:362 + BoundNodesTreeBuilder BuilderInner(*Builder); + if (InnerMatcher.matches(DynNode, Finder, &BuilderInner)) { + Result.addMatch(BuilderInner); ---------------- You can elide the braces here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72233/new/ https://reviews.llvm.org/D72233 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits