erichkeane wrote:

> Hmm, I can’t really think of a situation when this note would actually 
> help... at least for `deprecated`, you could _maybe_ argue that you might 
> want to know what part of the codebase marked it as deprecated in case there 
> are multiple declarations, but for `nodiscard`, I don’t think you really care 
> that much, so I feel like this might just be adding noise instead of helping. 
> Imo just the error is enough, but that’s just my opinion.

The one use case I could see is that the `nodiscard` is on the TYPE instead of 
the function itself (which, as you said before, is goofy for an overload set 
with this only partially applied).  But I don't really see value besides "this 
should not be discarded", and the actual location of the attribute isn't 
particularly valuable.  What IS important is the 'reason', which we already 
have.

So this is definitely causing me troubles with 'motivation'.

https://github.com/llvm/llvm-project/pull/112289
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to