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

Jim M. R. Teichgräber via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 04:40:48 PDT 2024


================
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -pedantic -Wno-comment %s
----------------
J-MR-T wrote:

[This line](https://github.com/llvm/llvm-project/pull/91891/files#diff-7d0182b6392ee774cf192fde090a22efd8367b693b28bac42d2e3ae2f8c2d94bR50-R51) both warns about the empty initializer being used without `-std=c2x`, and now triggers the new diagnostic. As I understand `-verify`, this cannot be tested using `//` on subsequent lines, so I used the `\` syntax to chain these checks, as some other tests do. Without `-Wno-comment`, this would lead to an additional warning for the multiline `// ... \` comment.

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


More information about the cfe-commits mailing list