[Sema] Fold VLA types in compound literals to constant arrays.
Similar to variables with an initializer, this is never valid in
standard C, so we can safely constant-fold as an extension. I ran into
this construct in a couple proprietary codebases.
While I'm here, drive-by fix for 090dd647: we should only fold variables
with VLA types, not arbitrary variably modified types.
Differential Revision: https://reviews.llvm.org/D98363
GitOrigin-RevId: dc1ab590a0527533815aeed0100de54a5f4a4829
4 files changed