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

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 15 07:14:04 PST 2025


================
@@ -237,7 +237,7 @@ bool Decl::isTemplateParameterPack() const {
 }
 
 bool Decl::isParameterPack() const {
-  if (const auto *Var = dyn_cast<VarDecl>(this))
+  if (const auto *Var = dyn_cast<ValueDecl>(this))
----------------
zwuis wrote:

My idea about this part of changes is adding `BindingDecl::isParameterPack()` and
```cpp
if (const auto *BD = dyn_cast<BindingDecl>(this))
  return BD->isParameterPack();
```
rather than changing `VarDecl::isParameterPack()` to `ValueDecl::isParameterPack()`. WDYT?

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


More information about the cfe-commits mailing list