AaronBallman wrote:

> Is there a reason why a new attribute name can't be used instead? Like say 
> `malloc_span` and `alloc_size_span`. This should make easier to keep things 
> working when trying with say `__has_attribute` and older clang/gcc and you 
> don't need to hard code the exact version of clang/gcc where the support was 
> added. I know GCC's malloc attribute added an extra argument which is hard to 
> test for except via a feature test via an autoconf like but I feel like that 
> was a mistake [one which we need to live with now] (I didn't think of the 
> issue back when GCC added that support nor I responded to the review back 
> then either).

I think that's a reasonable idea; I'd be happy with `malloc_span`

https://github.com/llvm/llvm-project/pull/165433
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to