================
@@ -1246,7 +1246,12 @@ void
Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
if (auto *BD = R.getAsSingle<BindingDecl>())
Var = BD;
- else
+ else if (auto *FD = R.getAsSingle<FieldDecl>()) {
+ Var = R.getAsSingle<VarDecl>();
----------------
Sirraide wrote:
> Could you explain what kinds of tests or what to verify? I tested the
> scenario in the issue.
Well, we need to add tests that verify that this actually solves the issue
(i.e. that we emit the diagnostic if someone tries to capture a class member);
you can take a look at some of the files in `clang/test/SemaCXX` to see how
that is usually done.
https://github.com/llvm/llvm-project/pull/94865
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits