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

James King via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 4 11:46:09 PDT 2021


jcking1034 marked an inline comment as done.
jcking1034 added inline comments.


================
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.
----------------
aaron.ballman wrote:
> We should have an additional note about the removal of the old matchers.
I believe that the only change made to the old matchers is that `hasAnyCapture` now accepts an inner matcher of type `Matcher<LambdaCapture>`, and no longer accepts inner matchers of type `Matcher<CXXThisExpr>` or `Matcher<VarDecl>`. I've revised this note and broken it up into two points for clarity.


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