From 81fb8071eea45deba618575553cfc7906fc483c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferhat=20Ge=C3=A7do=C4=9Fan?= <54369961+ferhatgec@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:37:14 +0300 Subject: [PATCH 1/2] ``: add `noreturn` for !_HAS_STATIC_RTTI --- stl/inc/functional | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stl/inc/functional b/stl/inc/functional index d3eaf32517c..9fdc5ef94f5 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -749,6 +749,9 @@ private: } } +#if !_HAS_STATIC_RTTI + [[noreturn]] +#endif // !_HAS_STATIC_RTTI const type_info& _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); @@ -810,6 +813,9 @@ private: } } +#if !_HAS_STATIC_RTTI + [[noreturn]] +#endif // !_HAS_STATIC_RTTI const type_info& _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); From 776d6a275cc993b968e21bffb9566e02b5d14a85 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 17 Jul 2023 18:37:39 -0700 Subject: [PATCH 2/2] clang-format. --- stl/inc/functional | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stl/inc/functional b/stl/inc/functional index 9fdc5ef94f5..a2ef1f85151 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -752,7 +752,8 @@ private: #if !_HAS_STATIC_RTTI [[noreturn]] #endif // !_HAS_STATIC_RTTI - const type_info& _Target_type() const noexcept override { + const type_info& + _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); #else // _HAS_STATIC_RTTI @@ -816,7 +817,8 @@ private: #if !_HAS_STATIC_RTTI [[noreturn]] #endif // !_HAS_STATIC_RTTI - const type_info& _Target_type() const noexcept override { + const type_info& + _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); #else // _HAS_STATIC_RTTI