[PATCH] D75365: [AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 10:51:41 PST 2020
ymandel added a comment.
In D75365#1898536 <https://reviews.llvm.org/D75365#1898536>, @aaron.ballman wrote:
>
...
> Good question! My intuition is that `optionally` should take exactly one argument and the user should be explicit as to whether they mean `allOf` or `anyOf` when there is a list of optional matchers. Defaulting to the `allOf` behavior for a list may be surprising to some folks because the `anyOf` behavior also seems reasonable for a list of optional matchers. WDYT?
Sounds good to me. That's my ideal solution. Will update my patch and send along... Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75365/new/
https://reviews.llvm.org/D75365
More information about the cfe-commits
mailing list