[clang] [Clang][Sema] Fix an ICE where structured binding packs within a lambda should be diagnosed immediately (PR #214716)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 8 20:42:51 PDT 2026
================
@@ -914,6 +914,12 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
auto *BD = BindingDecl::Create(Context, DC, B.NameLoc, B.Name, QT);
+ if (BD->isParameterPack()) {
+ if (auto *CSI = getEnclosingLambdaOrBlock()) {
+ CSI->LocalPacks.push_back(BD);
+ }
+ }
----------------
zwuis wrote:
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/214716
More information about the cfe-commits
mailing list