Author: Fady Farag
Date: 2026-01-19T10:27:20-05:00
New Revision: 07bedda4d3612f61cde7ffdb4652d89e9d8f66d3
URL: https://github.com/llvm/llvm-project/commit/07bedda4d3612f61cde7ffdb4652d89e9d8f66d3
DIFF: https://github.com/llvm/llvm-project/commit/07bedda4d3612f61cde7ffdb4652d89e9d8f66d3.diff
LOG: [libc++] Remove redundant code after static_assert(false) (#176294)
Eliminate unreachable code after static_assert(false).
Added:
Modified:
libcxx/src/experimental/time_zone.cpp
Removed:
################################################################################
diff --git a/libcxx/src/experimental/time_zone.cpp b/libcxx/src/experimental/time_zone.cpp
index 2cbce14af4ff6..d954932ffa37f 100644
--- a/libcxx/src/experimental/time_zone.cpp
+++ b/libcxx/src/experimental/time_zone.cpp
@@ -209,8 +209,6 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
return chrono::seconds{0};
else
static_assert(false);
-
- std::__libcpp_unreachable();
},
__continuation.__rules);
@@ -235,8 +233,6 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
return __value(__year, __month);
else
static_assert(false);
-
- std::__libcpp_unreachable();
},
__on);
}
@@ -698,8 +694,6 @@ __get_sys_info(sys_seconds __time,
return chrono::__get_sys_info_basic(__time, __continuation_begin, __continuation, __value.__time);
else
static_assert(false);
-
- std::__libcpp_unreachable();
},
__continuation.__rules);
}