[PATCH] D112491: Add `LambdaCapture`-related matchers.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 4 06:08:00 PDT 2021


aaron.ballman added a comment.

In D112491#3107361 <https://reviews.llvm.org/D112491#3107361>, @fowles wrote:

> Do we also want a `forEachCapture` matcher?

That might be good follow-on work (I wouldn't insist on it for this patch though).



================
Comment at: clang/docs/ReleaseNotes.rst:223-229
+- ``LambdaCapture`` AST Matchers are now available. These matchers allow for
+  the binding of ``LambdaCapture`` nodes, and include the ``lambdaCapture``,
+  ``capturesVar``, and ``capturesThis`` matchers. In addition, the
+  ``hasAnyCapture`` matcher has been updated to accept an inner matcher of
+  type ``Matcher<LambdaCapture>`` - its original interface accepted an inner
+  matcher of type ``Matcher<CXXThisExpr>`` or ``Matcher<VarDecl>``, but did
+  not allow for the binding of ``LambdaCapture`` nodes.
----------------
We should have an additional note about the removal of the old matchers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112491



More information about the cfe-commits mailing list