[PATCH] D21232: Add attribute noreturn to functions that throw
Aditya Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 09:59:47 PDT 2016
hiraditya added a comment.
In https://reviews.llvm.org/D21232#524293, @mclow.lists wrote:
> I'm confused here.
> I thought that the goal of this patch was to add `noreturn` to functions that throw //in the case when exceptions are disabled//.
> which is why I suggested the macro name `LIBCPP_NORETURN_IF_NO_EXCEPTIONS`
>
> But that's not what the code does. It marks the functions as `noreturn` only when exceptions are **enabled**.
>
> What are we trying to accomplish here?
I think we should mark these functions as noreturn in both the cases (except when assert is a nop). I don't know how the find if assertions are enabled, so I added noreturn only when exceptions are enabled.
https://reviews.llvm.org/D21232
More information about the llvm-commits
mailing list