erichkeane added a comment.

> For my purposes, it would be fine, and maybe even desirable, for the proposed 
> annotate_type to have the same limitations as _Nonnull.
>
> Are you saying that a) this would not be acceptable for a more 
> general-purpose attribute such as a putative annotate_type, or even that b) 
> the behavior of _Nonnull itself is seen as undesirable and should be changed 
> if possible?

Yes and Maybe?  The non-type-modifying type attributes we have are here for 
compatibility with GCC/MSVC, but are, IMO, a complete mistake otherwise.  The 
strange/obnoxious behavior of them disappearing off of something as soon as 
they are looked at funny makes them so non-intuitive that I see them as harmful.

Something as general as an 'annotate_type' would, IMO, need to be held to an 
even higher standard than our normal type attributes due to its nature.  And I 
don't see how a type attribute with the behaviors you require as being both 
intuitive and working in the C++ type system.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114235/new/

https://reviews.llvm.org/D114235

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to