[libcxx-commits] [PATCH] D141453: [libc++][test] cleanup in formatter.h

Casey Carter via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 11 12:57:21 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0d91b0505214: [libc++][test] cleanup in formatter.h (authored by CaseyCarter).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141453

Files:
  libcxx/test/std/time/time.syn/formatter_tests.h


Index: libcxx/test/std/time/time.syn/formatter_tests.h
===================================================================
--- libcxx/test/std/time/time.syn/formatter_tests.h
+++ libcxx/test/std/time/time.syn/formatter_tests.h
@@ -70,6 +70,9 @@
         std::cerr << "\nFormat string   " << fmt << "\nExpected exception " << what << "\nActual exception   "
                   << e.what() << '\n';
     assert(e.what() == what);
+#  else
+    (void)what;
+    (void)e;
 #  endif
     return;
   }
@@ -92,10 +95,9 @@
           std::basic_string_view<CharT>{fmt}, std::make_format_args<format_context<CharT>>(arg));
 #ifndef TEST_HAS_NO_EXCEPTIONS
     } catch (const std::format_error& e) {
-#  if defined(_LIBCPP_VERSION)
+      (void)e;
       if constexpr (std::same_as<CharT, char>)
         std::cerr << "\nFormat string        " << fmt << "\nUnexpected exception " << e.what() << '\n';
-#  endif
       assert(false);
     }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141453.488349.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230111/035f27f2/attachment.bin>


More information about the libcxx-commits mailing list