[PATCH] D72233: Add a new AST matcher 'optionally'.
Rihan Yang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 09:08:56 PST 2020
air20 marked an inline comment as done.
air20 added a comment.
In D72233#1806483 <https://reviews.llvm.org/D72233#1806483>, @aaron.ballman wrote:
> 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?
That’s exactly right.
In D72233#1807698 <https://reviews.llvm.org/D72233#1807698>, @aaron.ballman wrote:
> LGTM aside from a minor nit. Do you need someone to commit on your behalf?
How do I submit a patch from here?
================
Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:282
REGISTER_MATCHER(hasInitStatement);
+ REGISTER_MATCHER(hasInitializer);
REGISTER_MATCHER(hasKeywordSelector);
----------------
aaron.ballman wrote:
> Why did this one move? Please keep the list sorted alphabetically.
I think this wasn’t sorted correctly before.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72233/new/
https://reviews.llvm.org/D72233
More information about the cfe-commits
mailing list