[clang] [clang][constexpr] Fix assertion failure in C++26 constexpr structured binding pack evaluation (#170991) (PR #213534)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 4 01:38:09 PDT 2026
zwuis wrote:
> To establish the bindings to the subobjects of `e`, expressions like ```e.m_i```, ```e[i]```, or ```get<i>(e)``` are formed.
>From the prospective of C++ standard, there are no `e.m_i` and `e[i]`. Accessing array elements / members is another 'magic'.
I just realize that there is an pre-existing issue that variables are marked odr-used for non-`constexpr` case, so it's acceptable to me.
---
The reproducer is not a minimal reproducer. Packs can be removed from structured bindings.
Please add tests of other 2 kinds of structured bindings.
https://github.com/llvm/llvm-project/pull/213534
More information about the cfe-commits
mailing list