[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 14:51:03 PDT 2018
EricWF added a comment.
I'm also in favor of making this opt-out instead of opt-in, except for a handful of functions like `unique_ptr::release` which may yield false positives. However, for functions where discarding the return value is always a bug, I don't see an issue in libc++ emitting a warning where it didn't previously.
Repository:
rCXX libc++
https://reviews.llvm.org/D45179
More information about the cfe-commits
mailing list