cor3ntin wrote: The second was clearly duplicated. The first one introduce a scope for the captures, so that captures are available in the declaration of the lambda (before its compound statement).
But the body introduces a new scope wherein we inject the parameters - and we also need to reinject the captures to make sure they cannot be shadowed by a local variables ````cpp [a = 0] // capture scope { // body scope int a = 42; // error! } ``` https://github.com/llvm/llvm-project/pull/107055 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits