[clang] [clang] Disallow VLA type compound literals (PR #91891)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 04:20:26 PDT 2024


================
@@ -3371,6 +3371,8 @@ def err_field_with_address_space : Error<
   "field may not be qualified with an address space">;
 def err_compound_literal_with_address_space : Error<
   "compound literal in function scope may not be qualified with an address space">;
+def err_compound_literal_with_vla_type : Error<
+  "compound literal has variable-length array type">;
----------------
AaronBallman wrote:

```suggestion
  "compound literal cannot be of variable-length array type">;
```

https://github.com/llvm/llvm-project/pull/91891


More information about the cfe-commits mailing list