[PATCH] D75365: [AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 07:09:17 PST 2020


gribozavr2 added a comment.

> I think the difference is in whether you continue with the submatchers after a success. Allof does while anyof does not.

Oh, the short-circuiting makes a difference! I see.

+1 to making it non-variadic then.


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