[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 03:00:35 PDT 2024


================
@@ -1323,7 +1323,6 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
 
     if (C->Init.isUsable()) {
       addInitCapture(LSI, cast<VarDecl>(Var), C->Kind == LCK_ByRef);
-      PushOnScopeChains(Var, CurScope, false);
----------------
zyn0217 wrote:

Yeah, 2 is a duplicate of 1, but 3 is necessary because that constitutes a lambda body scope.

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


More information about the cfe-commits mailing list