ymandel added a comment.

In D75365#1900784 <https://reviews.llvm.org/D75365#1900784>, @gribozavr2 wrote:

> +1 to this fix.
>
> However, regarding `allOf` vs. `anyOf` semantics, since `optionally` always 
> succeeds, is there a difference between the two semantics?
>
> It seems to me that there should be no difference between 
> `allOf(optionally(a), optionally(b))` vs. `anyOf(optionally(a), 
> optionally(b))`.


I think the difference is in whether you continue with the submatchers after a 
success. Allof does while anyof does not.  That said, the original issue was 
forEach vs allOf/anyOf. So, I think Aaron's point holds - let optionally take 
one argument and then leave it to the user to explicitly specify forEach, 
allOf, anyOf, etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75365



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to