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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 7 00:48:34 PST 2023


Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.

Thanks for fixing this, LGTM!



================
Comment at: libcxx/include/__assert:20
 
 // TODO: Remove in LLVM 17.
 #if defined(_LIBCPP_DEBUG)
----------------
Can you look at this in a follow-up commit?


================
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))
----------------
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.)


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