[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 26 02:48:18 PST 2025
================
@@ -1523,9 +1570,25 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
// If the type of the decomposition is dependent, then so is the type of
// each binding.
if (DecompType->isDependentType()) {
- for (auto *B : DD->bindings())
- B->setType(Context.DependentTy);
+ for (auto *B : DD->bindings()) {
+ // Do not overwrite any pack type.
+ if (B->getType().isNull())
+ B->setType(Context.DependentTy);
+ }
----------------
cor3ntin wrote:
I really would like to understand when this happen. Maybe a longer comment is in order?
https://github.com/llvm/llvm-project/pull/121417
More information about the cfe-commits
mailing list