[clang] Diagnose potential size confusion with VLA params [contd.] (PR #181550)
Yeoul Na via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 20 11:08:19 PST 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">;
----------------
rapidsna wrote:
My question is more about what's proper warning category for this. Since we are going to warn about array parameters with constant sizes too, it probably makes more sense to introduce a new category of warning (`-Warray-parameter-size-confusion`) or put it a sub category of (`-Wshadow`) so something like (`-Wshadow-array-parameter-size-confusion`), instead of putting it under `-Wvla`.
https://github.com/llvm/llvm-project/pull/181550
More information about the cfe-commits
mailing list