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

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 8 10:02:18 PDT 2023


philnik requested changes to this revision.
philnik added inline comments.
This revision now requires changes to proceed.


================
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.
----------------
You seem to be missing a positive test.


================
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');
----------------
Why not simply cast to void?


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