[clang] [BoundsSafety] Support bounds-safety attributes in type positions (PR #179612)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 07:14:03 PST 2026


================
@@ -2484,8 +2457,11 @@ class Sema final : public SemaBase {
   /// `counted_by_or_null` attribute.
   ///
   /// \returns false iff semantically valid.
-  bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes,
-                                 bool OrNull);
+  bool CheckCountedByAttrOnField(FieldDecl *FD, QualType T, Expr *E,
+                                 bool CountInBytes, bool OrNull);
+
+  bool CheckCountedByAttrOnFieldDecl(FieldDecl *FD, Expr *E, bool CountInBytes,
+                                     bool OrNull);
----------------
zmodem wrote:

nit: I guess the doxygen comment above needs updating?

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


More information about the cfe-commits mailing list