[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:51:52 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D45179#1077048, @mclow.lists wrote:

> In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote:
>
> > Is Marshall arguing that the standard doesn't allow compilers to warn about failing to use these function results prior to C++17?  Because I don't think that's true; warnings are thoroughly non-normative.
>
>
> I have proposed to add different forms of "nodiscard" warnings to libc++ in the past, and received **strong** pushback from people who:
>
> - Compile with -Werror
> - Don't want to change their code.
>
>   I'm not willing to have that argument again.


Alright, well, I won't push you on it.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45179





More information about the cfe-commits mailing list