[libcxx-commits] [PATCH] D143443: [libc++] Use __builtin_FILE and __builtin_LINE in _LIBCPP_ASSERT

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 7 07:35:44 PST 2023


ldionne marked 2 inline comments as done.
ldionne added inline comments.


================
Comment at: libcxx/include/__assert:20
 
 // TODO: Remove in LLVM 17.
 #if defined(_LIBCPP_DEBUG)
----------------
Mordante wrote:
> Can you look at this in a follow-up commit?
Will do, thanks for the heads up.


================
Comment at: libcxx/include/__assert:43
     (__builtin_expect(static_cast<bool>(expression), 1) ?                           \
       (void)0 :                                                                     \
+      _LIBCPP_VERBOSE_ABORT("%s:%d: assertion %s failed: %s", __builtin_FILE(), __builtin_LINE(), #expression, message))
----------------
Mordante wrote:
> When you apply clang-format does it fix-up the location of `\` in this file. (I wouldn't mind it in a follow-up or just prior to committing.)
I will fix prior to committing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143443



More information about the libcxx-commits mailing list