[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 2 01:40:47 PST 2025


================
@@ -951,28 +959,130 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
   return New;
 }
 
+namespace {
+// CheckBindingsCount
+//  - Checks the arity of the structured bindings
+//  - Creates the resolved pack expr if there is
+//    one
+bool CheckBindingsCount(Sema &S, DecompositionDecl *DD, QualType DecompType,
+                        ArrayRef<BindingDecl *> Bindings,
+                        unsigned MemberCount) {
----------------
zyn0217 wrote:

style nit
```suggestion
// CheckBindingsCount
//  - Checks the arity of the structured bindings
//  - Creates the resolved pack expr if there is
//    one
static bool CheckBindingsCount(Sema &S, DecompositionDecl *DD, QualType DecompType,
                        ArrayRef<BindingDecl *> Bindings,
                        unsigned MemberCount) {
```

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


More information about the cfe-commits mailing list