================
@@ -7012,6 +7012,9 @@ def err_builtin_counted_by_ref_invalid_use : Error<
"value returned by '__builtin_counted_by_ref' cannot be used in "
"%select{an array subscript|a binary}0 expression">;
+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">;
----------------
AaronBallman wrote:
Are we sure that "nested pointer type" is sufficiently clear?
```
void (*fp)(int size, int *ptr __counted_by(size));
```
is `ptr` a "nested" pointer type given that it's within the declarator for a
function pointer?
Maybe "on a pointer to pointer type is not allowed"?
https://github.com/llvm/llvm-project/pull/166491
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits