AK: Update clang workaround for consteval StringView literals

The underlying issue was fixed in clang-15. See:
a4f8590247

However, Apple and BSD distributions do not yet have this patch.
This commit is contained in:
Timothy Flynn 2023-06-19 11:44:39 -04:00 committed by Tim Flynn
parent 9f907ebb43
commit 2714f99c1c
Notes: sideshowbarker 2024-07-17 04:01:41 +09:00

View file

@ -371,9 +371,10 @@ struct CaseInsensitiveASCIIStringViewTraits : public Traits<StringView> {
} }
// FIXME: Remove this when clang fully supports consteval (specifically in the context of default parameter initialization). // FIXME: Remove this when clang on BSD distributions fully support consteval (specifically in the context of default parameter initialization).
// See: https://stackoverflow.com/questions/68789984/immediate-function-as-default-function-argument-initializer-in-clang // Note that this is fixed in clang-15, but is not yet picked up by all downstream distributions.
#if defined(AK_COMPILER_CLANG) // See: https://github.com/llvm/llvm-project/issues/48230
#if defined(AK_OS_BSD_GENERIC)
# define AK_STRING_VIEW_LITERAL_CONSTEVAL constexpr # define AK_STRING_VIEW_LITERAL_CONSTEVAL constexpr
#else #else
# define AK_STRING_VIEW_LITERAL_CONSTEVAL consteval # define AK_STRING_VIEW_LITERAL_CONSTEVAL consteval