AK: Remove consteval workaround in StringView.h

We don't support clang <15 anymore. FreeBSD, OpenBSD, and OSS-Fuzz seem
to be on newer versions either way.
This commit is contained in:
Sönke Holz
2026-02-04 01:07:53 +01:00
committed by Nico Weber
parent 978d6232a6
commit 3dd2ebfa42

View File

@@ -420,18 +420,7 @@ struct CaseInsensitiveASCIIStringViewTraits : public Traits<StringView> {
}
// FIXME: Remove this when clang on BSD distributions fully support consteval (specifically in the context of default parameter initialization).
// Note that this is fixed in clang-15, but is not yet picked up by all downstream distributions.
// See: https://github.com/llvm/llvm-project/issues/48230
// Additionally, oss-fuzz currently ships an llvm-project commit that is a pre-release of 15.0.0.
// See: https://github.com/google/oss-fuzz/issues/9989
#if defined(AK_OS_BSD_GENERIC) || defined(OSS_FUZZ)
# define AK_STRING_VIEW_LITERAL_CONSTEVAL constexpr
#else
# define AK_STRING_VIEW_LITERAL_CONSTEVAL consteval
#endif
[[nodiscard]] ALWAYS_INLINE AK_STRING_VIEW_LITERAL_CONSTEVAL AK::StringView operator""sv(char const* cstring, size_t length)
[[nodiscard]] ALWAYS_INLINE consteval AK::StringView operator""sv(char const* cstring, size_t length)
{
return AK::StringView(cstring, length);
}