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

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:29:57 PDT 2018


mclow.lists added a comment.

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.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45179





More information about the cfe-commits mailing list