[clang] [Clang] Add -Wcounted-by-addrof to warn when &fam discards __counted_by (PR #206760)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 08:22:21 PDT 2026
================
@@ -1870,6 +1870,7 @@ def NoDeref : DiagGroup<"noderef">;
// -fbounds-safety and bounds annotation related warnings
def BoundsSafetyCountedByEltTyUnknownSize :
DiagGroup<"bounds-safety-counted-by-elt-type-unknown-size">;
+def CountedByAddrof : DiagGroup<"counted-by-addrof">;
----------------
AaronBallman wrote:
Are we going to be adding more diagnostics to this group (or this group to other groups)? If not, you can back this change out and define the group inline with the diagnostic.
https://github.com/llvm/llvm-project/pull/206760
More information about the cfe-commits
mailing list