[libcxx-commits] [libcxx] b27360c - [libc++][test] Fix Clang `-Wunused-variable` warnings in time.zone.members/to_sys.pass.cpp (#100504)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 25 15:45:34 PDT 2024
Author: Stephan T. Lavavej
Date: 2024-07-25T15:45:29-07:00
New Revision: b27360c346a529affde40150f46b967b616a2144
URL: https://github.com/llvm/llvm-project/commit/b27360c346a529affde40150f46b967b616a2144
DIFF: https://github.com/llvm/llvm-project/commit/b27360c346a529affde40150f46b967b616a2144.diff
LOG: [libc++][test] Fix Clang `-Wunused-variable` warnings in time.zone.members/to_sys.pass.cpp (#100504)
Added:
Modified:
libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp
index 874c3d52e460b..e32b6d523d0ed 100644
--- a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp
@@ -89,7 +89,7 @@ static void test_nonexistent() {
TEST_VALIDATE_EXCEPTION(
std::chrono::nonexistent_local_time,
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-03-30 02:30:00.000000000 is in a gap between
1986-03-30 02:00:00 CET and
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -103,7 +103,7 @@ static void test_nonexistent() {
TEST_VALIDATE_EXCEPTION(
std::chrono::nonexistent_local_time,
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-03-30 02:30:00.000000 is in a gap between
1986-03-30 02:00:00 CET and
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -117,7 +117,7 @@ static void test_nonexistent() {
TEST_VALIDATE_EXCEPTION(
std::chrono::nonexistent_local_time,
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-03-30 02:30:00.000 is in a gap between
1986-03-30 02:00:00 CET and
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -131,7 +131,7 @@ static void test_nonexistent() {
TEST_VALIDATE_EXCEPTION(
std::chrono::nonexistent_local_time,
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-03-30 02:30:00 is in a gap between
1986-03-30 02:00:00 CET and
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -173,7 +173,7 @@ static void test_ambiguous() {
TEST_VALIDATE_EXCEPTION(
std::chrono::ambiguous_local_time,
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-09-28 02:30:00.000000000 is ambiguous. It could be
1986-09-28 02:30:00.000000000 CEST == 1986-09-28 00:30:00.000000000 UTC or
1986-09-28 02:30:00.000000000 CET == 1986-09-28 01:30:00.000000000 UTC)";
@@ -186,7 +186,7 @@ static void test_ambiguous() {
TEST_VALIDATE_EXCEPTION(
std::chrono::ambiguous_local_time,
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-09-28 02:30:00.000000 is ambiguous. It could be
1986-09-28 02:30:00.000000 CEST == 1986-09-28 00:30:00.000000 UTC or
1986-09-28 02:30:00.000000 CET == 1986-09-28 01:30:00.000000 UTC)";
@@ -199,7 +199,7 @@ static void test_ambiguous() {
TEST_VALIDATE_EXCEPTION(
std::chrono::ambiguous_local_time,
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-09-28 02:30:00.000 is ambiguous. It could be
1986-09-28 02:30:00.000 CEST == 1986-09-28 00:30:00.000 UTC or
1986-09-28 02:30:00.000 CET == 1986-09-28 01:30:00.000 UTC)";
@@ -212,7 +212,7 @@ static void test_ambiguous() {
TEST_VALIDATE_EXCEPTION(
std::chrono::ambiguous_local_time,
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
- std::string_view what =
+ [[maybe_unused]] std::string_view what =
R"(1986-09-28 02:30:00 is ambiguous. It could be
1986-09-28 02:30:00 CEST == 1986-09-28 00:30:00 UTC or
1986-09-28 02:30:00 CET == 1986-09-28 01:30:00 UTC)";
More information about the libcxx-commits
mailing list