[libcxx-commits] [PATCH] D152097: [libc++][format] Make public functions nodiscard.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 10 06:33:08 PDT 2023


Mordante marked 2 inline comments as done.
Mordante added a subscriber: BillyONeal.
Mordante added a comment.

Thanks for the review!



================
Comment at: libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp:2
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
----------------
philnik wrote:
> You seem to be missing a positive test.
Nice catch, I'll commit my local file this time ;-)


================
Comment at: libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp:27
 void test() {
-  std::make_format_args<std::basic_format_context<
-      std::back_insert_iterator<std::basic_string<wchar_t>>, wchar_t>>('c');
+  TEST_IGNORE_NODISCARD
+  std::make_format_args<std::basic_format_context<std::back_insert_iterator<std::basic_string<wchar_t>>, wchar_t>>('c');
----------------
philnik wrote:
> Why not simply cast to void?
I prefer name instead of a magic invocation, @BillyONeal spend the effort to change them in D40065.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152097/new/

https://reviews.llvm.org/D152097



More information about the libcxx-commits mailing list