[clang] [BoundsSafety] Handle the counted_by family as a type attribute (non-late parsing only) (PR #233582)

Yeoul Na via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 19 17:51:34 PST 2026


================
@@ -7289,6 +7281,12 @@ def note_counted_by_counter_field : Note<
 
 def err_counted_by_on_nested_pointer : Error<
   "'%select{counted_by|sized_by|counted_by_or_null|sized_by_or_null}0' attribute on nested pointer type is not allowed">;
+def err_counted_by_on_return_type : Error<
+  "'%select{counted_by|sized_by|counted_by_or_null|sized_by_or_null}0' attribute on a function return type is not yet supported">;
----------------
rapidsna wrote:

Thanks for the suggestion. I filed https://github.com/llvm/llvm-project/issues/244481 to follow up on this!

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


More information about the cfe-commits mailing list