From d51f2a2a64dc9c65fee29cb1ea1ce3e4217dca64 Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Sat, 27 Aug 2016 02:26:42 +0000 Subject: [PATCH] Add attribute noreturn to functions that throw Reviewers: mclow.lists, EricWF, howard.hinnant, sebpop Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D21232 llvm-svn: 279903 --- libcxx/include/__locale | 2 ++ libcxx/include/system_error | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libcxx/include/__locale b/libcxx/include/__locale index e718f11..b618069 100644 --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -1183,6 +1183,8 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname) +_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*); + template struct __narrow_to_utf8 { diff --git a/libcxx/include/system_error b/libcxx/include/system_error index 134bb32..5145d23 100644 --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -635,7 +635,8 @@ private: static string __init(const error_code&, string); }; -_LIBCPP_FUNC_VIS void __throw_system_error(int ev, const char* what_arg); +_LIBCPP_NORETURN _LIBCPP_FUNC_VIS +void __throw_system_error(int ev, const char* what_arg); _LIBCPP_END_NAMESPACE_STD -- 2.7.4