a variably-modified type should not be referenceable from a local class scope #55686
Labels
c++
clang
Clang issues not falling into any other category
confirmed
Verified by a second party
crash-on-invalid
Various lines of this testcase cause Clang to crash:
Most of this is pretty clearly unsupportable: in particular, the calls to
A::f
andA::g
don't provide the value of the VLA bound, so those functions shouldn't be able to use the type. Probably the best rule here is that a variably-modified type is simply not referenceable at all from within a local class. (Note that we do allow this from within a local lambda, and have special logic to capture the type.)The text was updated successfully, but these errors were encountered: