[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 02:20:01 PDT 2024


zyn0217 wrote:

I took a cursory look, and it seems that we pushed the same init capture to the scope chain three times:

1. `Sema::ActOnLambdaExpressionAfterIntroducer`
https://github.com/llvm/llvm-project/blob/6c59dfb0184aa11ec202f1cd8aee9e971a1565a4/clang/lib/Sema/SemaLambda.cpp#L1212-L1214

2. `Sema::ActOnLambdaExpressionAfterIntroducer`

https://github.com/llvm/llvm-project/blob/6c59dfb0184aa11ec202f1cd8aee9e971a1565a4/clang/lib/Sema/SemaLambda.cpp#L1324-L1327

3. `Sema::ActOnStartOfLambdaDefinition`
https://github.com/llvm/llvm-project/blob/6c59dfb0184aa11ec202f1cd8aee9e971a1565a4/clang/lib/Sema/SemaLambda.cpp#L1468-L1475

I'm confused if they're all necessary...

https://github.com/llvm/llvm-project/pull/107055


More information about the cfe-commits mailing list