[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


================
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify=disabled -Wno-counted-by-addrof %s
+// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+// RUN: cp %s %t.c
+// RUN: %clang_cc1 -fixit %t.c
+// RUN: %clang_cc1 -fsyntax-only -Werror=counted-by-addrof %t.c
----------------
AaronBallman wrote:

Should we verify we get no diagnostics after applying the fixes?

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


More information about the cfe-commits mailing list