rsmith added a comment.

The version of this attribute that was voted into the C++ standard 
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0189r1.pdf) does not 
support a message, and I expect that is the version that libc++ will want to 
use.

I think we should at least improve Clang's diagnostic message here, maybe 
something like:

  warning: value returned by call to function 'blah' should always be used
  note: 'blah' declared with attribute 'nodiscard' here

It would also seem sensible to propose extending the standard attribute with an 
optional message.


http://reviews.llvm.org/D17043



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

Reply via email to