Skip to content

Commit 8cb1082

Browse files
RWC workaround: Use __builtin_trap for ancient Clang (#5458)
1 parent 4e5eb85 commit 8cb1082

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stl/inc/type_traits

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ constexpr bool is_enum_v = __is_enum(_Ty);
335335

336336
#if _HAS_CXX23
337337
#if defined(__clang__) && !defined(__EDG__) \
338-
&& __clang_major__ >= 16 // TRANSITION, DevCom-10870354, Real World Code relying on ancient Clang
338+
&& __clang_major__ >= 16 // TRANSITION, DevCom-10870354 (MSVC, EDG), VSO-2397560 (RWC relying on ancient Clang)
339339
_EXPORT_STD template <class _Ty>
340340
constexpr bool is_scoped_enum_v = __is_scoped_enum(_Ty);
341341

stl/inc/yvals.h

+2
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ _EMIT_STL_ERROR(STL1008, "_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER has been
245245
#ifndef _MSVC_STL_DOOM_FUNCTION
246246
#ifdef _MSVC_STL_USE_ABORT_AS_DOOM_FUNCTION // The user wants to use abort():
247247
#define _MSVC_STL_DOOM_FUNCTION(mesg) _CSTD abort()
248+
#elif defined(__clang__) && __clang_major__ < 19 // TRANSITION, VSO-2397560, Real World Code relying on ancient Clang
249+
#define _MSVC_STL_DOOM_FUNCTION(mesg) __builtin_trap()
248250
#elif defined(__clang__) // Use the Clang intrinsic:
249251
#define _MSVC_STL_DOOM_FUNCTION(mesg) __builtin_verbose_trap("MSVC STL error", mesg)
250252
#elif defined(_M_CEE) // TRANSITION, VSO-2457624 (/clr silent bad codegen for __fastfail); /clr:pure lacks __fastfail

0 commit comments

Comments
 (0)