[PATCH] D26596: [RFC] Add _LIBCPP_NO_DISCARD and apply it to unique_ptr<T>::release()

Chandler Carruth via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 13 14:18:51 PST 2016


chandlerc added a comment.

I think we want dedicated macros to disable each added [[nodiscard]]. The reason is that as you add each one, users will have to roll out cleanups for the new warnings. This may be hard to do quickly and cause problems updating libc++ for users with -Werror in their build. I'd prefer it if users can initially add a macro to disable the attribute until their cleanup is complete.

There should also be a page documenting all of the APIs that use this and the macros to control them.


https://reviews.llvm.org/D26596





More information about the cfe-commits mailing list