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

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:34:22 PDT 2018


So you're happy with this opt-in version?

On Tue, Apr 24, 2018 at 1:29 PM, Marshall Clow via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:

> 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
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180424/473f0885/attachment.html>


More information about the cfe-commits mailing list