<div dir="ltr"><div>Hi David,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 2:00 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sun, Jun 12, 2022 at 10:17 AM Kazu Hirata via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-      return args_end() != std::find_if(<br>
-          args_begin(), args_end(),<br>
-          [=](const ParamIdx &Idx) { return Idx.getASTIndex() == IdxAST; });<br>
+      return llvm::any_of(args(), [=](const ParamIdx &Idx) {<br>
+        return Idx.getASTIndex() == IdxAST;<br>
+      });<br></blockquote><div><br>Generally, I think for locally scoped lambdas (lambdas that don't escape their scope) we should prefer/default to default reference capture (`[&]`) - it simplifies changes in the future. Would that be OK for these sort of cleanups?<br></div></div></div></blockquote><div><br></div><div>Sure.  I've often wondered about the point of explicitly specifying captures.</div><div><br></div><div>Kazu Hirata</div><div><br></div></div></div>