[libcxx-commits] [PATCH] D142184: [libcxx] Add new line after assert message

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 25 07:52:53 PST 2023


ldionne added inline comments.


================
Comment at: libcxx/src/verbose_abort.cpp:39
     std::vfprintf(stderr, format, list);
+    std::fputc('\n', stderr);
     va_end(list);
----------------
vitalybuka wrote:
> Mordante wrote:
> > would it be possible to add require the newline in the `format` of `__libcpp_verbose_abort`? If not I'm happy with this approach.
> > would it be possible to add require the newline in the `format` of `__libcpp_verbose_abort`? If not I'm happy with this approach.
> 
> Here? https://github.com/llvm/llvm-project/blob/de6b75c4ab130a3c798f691923b4b78b773e53cc/libcxx/include/__assert#L44
> 
> \n is reasonable for stderr, but I am not sure if \n is appropriate for Apple and Android stuff below
I think it would be reasonable. I think I'd be happier with that approach too:

```
::std::__libcpp_verbose_abort("%s:%d: assertion %s failed: %s\n", __FILE__, __LINE__, #expression, message))
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142184



More information about the libcxx-commits mailing list