[libcxx-commits] [PATCH] D97308: Add noreturn attribute to non-returning functions

Aditya Kumar via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 10 10:49:42 PST 2021


hiraditya added a comment.

In D97308#2616596 <https://reviews.llvm.org/D97308#2616596>, @Quuxplusone wrote:

> In D97308#2615920 <https://reviews.llvm.org/D97308#2615920>, @hiraditya wrote:
>
>> In D97308#2611794 <https://reviews.llvm.org/D97308#2611794>, @Quuxplusone wrote:
>>
>>> - `void __throw_runtime_error(const char* msg)` in `src/locale.cpp`: what's the deal with this one? should you attribute it as well?
>>
>> __throw_runtime_error is attributed with `noreturn` https://github.com/llvm/llvm-project/blob/main/libcxx/src/locale.cpp#L132
>
> No, I meant this version: https://github.com/llvm/llvm-project/blob/main/libcxx/src/locale.cpp#L6270

The declaration already has the attribute so we don't need it here. https://github.com/llvm/llvm-project/blob/main/libcxx/include/stdexcept#L217


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97308/new/

https://reviews.llvm.org/D97308



More information about the libcxx-commits mailing list