[clang] [Clang][Sema] Mark decomposition decl invalid for explicit array type (PR #210964)
Shengxin Pei via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 23:14:22 PDT 2026
================
@@ -229,4 +229,13 @@ namespace by_value_array_copy {
auto [d] = T{};
}
+ // A structured binding cannot be declared with an explicit array type: the
+ // array type it binds to is deduced from the initializer. Such an ill-formed
+ // declaration must not be initialized, so only one error is expected here.
----------------
TPPPP72 wrote:
I think these comments are unnecessary; of course, we should hear @cor3ntin opinion on the matter.
https://github.com/llvm/llvm-project/pull/210964
More information about the cfe-commits
mailing list