[clang] [Clang][Parser] Fix crash on a compound literal in a VLA bound (PR #244274)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 19 12:09:37 PST 2026
https://github.com/efriedma-quic commented:
Is this specifically a C problem? Related testcase:
```
struct S { int a; constexpr ~S(){} }; int a[S().a];
```
```
<stdin>:1:45: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
1 | struct S { int a; constexpr ~S(){} }; int a[S().a];
| ^~~~~
<stdin>:1:43: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
1 | struct S { int a; constexpr ~S(){} }; int a[S().a];
| ^
```
https://github.com/llvm/llvm-project/pull/244274
More information about the cfe-commits
mailing list