[clang] Diagnose potential size confusion with VLA params [contd.] (PR #181550)

Aryan Kadole via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 24 23:21:00 PDT 2026


================
@@ -1114,7 +1114,8 @@ def VexingParse : DiagGroup<"vexing-parse">;
 def VLAUseStaticAssert : DiagGroup<"vla-extension-static-assert">;
 def VLACxxExtension : DiagGroup<"vla-cxx-extension", [VLAUseStaticAssert]>;
 def VLAExtension : DiagGroup<"vla-extension", [VLACxxExtension]>;
-def VLA : DiagGroup<"vla", [VLAExtension]>;
+def VLASizeConfusion : DiagGroup<"vla-potential-size-confusion">;
----------------
ak1932 wrote:

Yes, if bounds safety is disabled, `-Wchanges-meaning` does not make sense; but if we need community concensus keeping the warning only when bounds-safety is enabled would defeat the purpose. Maybe we could have an experimental temporary warning and move to something like `-Wchanges-meaning` when bounds-safety is properly added?

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


More information about the cfe-commits mailing list