cor3ntin added a comment.
@shafik Thanks for the review. I was able to reorganize the things you pointed
out to be more consistent such that the checks for structured bindings and
regular vars are made in the same place.
I think it's much better that way. It took me a while to find the correct way
to do that, which was somewhat useful in hindsight.
================
Comment at: clang/lib/Sema/SemaInit.cpp:7851
+ bool InitCapture =
+ isa<VarDecl>(VD) && cast<VarDecl>(VD)->isInitCapture();
Diag(Elem.Capture->getLocation(),
diag::note_lambda_capture_initializer)
----------------
shafik wrote:
> I see we are doing this kind of check to see if we have a `VarDecl` and then
> check if it is an init capture and I wish there was a way not to repeat this
> but I don't see it.
I considered having a function In ValueDecl, what do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122768/new/
https://reviews.llvm.org/D122768
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits