[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 06:13:54 PST 2020


njames93 marked an inline comment as done.
njames93 added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4772
+///
+/// FIXME: Tweak to improve docs generated
+extern const internal::VariadicFunction<internal::HasOpNameMatcher, StringRef,
----------------
gribozavr2 wrote:
> Any specific things you would like to improve? The fixme is rather vague.
This is what comes up in the ASTMatchersReference docs. 
```
Matcher<internal::HasOpNameMatcher>	hasAnyOperatorName	StringRef, ..., StringRef```
I would like it to have 
```
Matcher<BinaryOperator>  hasAnyOperatorName	StringRef, ..., StringRef
...
Matcher<UnaryOperator>  hasAnyOperatorName	StringRef, ..., StringRef```
However how VariadicFunction is matched in the dumper won't support that yet. And If you want to support it properly regex wouldn't work, instead you'd need a parser


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75040





More information about the cfe-commits mailing list