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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 25 06:49:44 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22
+
+_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; }
+
----------------
mclow.lists wrote:
> Shouldn't this be just `_LIBCPP_NODISCARD` ?
> 
I don't think so?
I thought we are intentionally testing the same macro that libc++ is using internally.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45179





More information about the cfe-commits mailing list