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


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4224
+///     float z;
+///     auto f = [=]() { return x + y + z; };
+///   }
----------------
fowles wrote:
> it would be nice to be able to do something like
> 
> ```
> int main() {
>   int x, y;
>   float z;
>   auto f = [=, z]() { return x+ y + z; };
> }
> ```
> 
> `lambdaExpr(forEachLambdaCapture(isImplicit())` matches `x` and `y` but not 
> `z`
I believe that this should be possible, I've gone ahead and added some unit 
tests to demonstrate (see the tests named `MatchImplicitCapturesOnly` and 
`MatchExplicitCapturesOnly`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113575

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

Reply via email to