[clang] Diagnose potential size confusion with VLA params [contd.] (PR #181550)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 06:31:54 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">;
----------------
AaronBallman wrote:
I think separate flags probably makes sense; it may be the same confusion, but name lookup in structures is already sufficiently different than within a function prototype (parameters can refer to other parameters but fields cannot refer to other fields) that I think it likely makes sense to separate the flags. We would still want a parent group for them both so you can turn both on at the same time, but this would give users more control over where they see the diagnostics. That said, I don't have a strong opinion on it.
https://github.com/llvm/llvm-project/pull/181550
More information about the cfe-commits
mailing list