From ef440b9aefcab33fab87c9260b13a20125f34465 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 28 Nov 2024 15:14:28 +0200 Subject: [PATCH] [UCRT] Add a hack for a clang bug See CORE-19902 --- sdk/lib/ucrt/inc/corecrt_internal_traits.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sdk/lib/ucrt/inc/corecrt_internal_traits.h b/sdk/lib/ucrt/inc/corecrt_internal_traits.h index 71f38ab32e7..ff3fd61d388 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_traits.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_traits.h @@ -53,6 +53,13 @@ errno_t __cdecl _wsopen_nolock( } // extern "C" #endif // __GNUC__ +#ifdef __clang__ +// Hack for broken Clang, which crashes, when using __cdecl on a static template function. +// See CORE-19902 +#undef __cdecl +#define __cdecl +#endif // __clang__ + //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ //