[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 22 07:25:38 PDT 2025
================
@@ -3684,6 +3684,12 @@ def warn_alloca_align_alignof : Warning<
"second argument to __builtin_alloca_with_align is supposed to be in bits">,
InGroup<DiagGroup<"alloca-with-align-alignof">>;
+def warn_alloc_size
+ : Warning<
+ "allocation of insufficient size '%0' for type %1 with size '%2'">,
+ InGroup<DiagGroup<"alloc-size">>,
+ DefaultIgnore;
----------------
AaronBallman wrote:
We typically don't add new default ignore diagnostics because users often don't enable them. Is there a reason this shouldn't be on by default?
https://github.com/llvm/llvm-project/pull/150028
More information about the cfe-commits
mailing list