[libcxx-commits] [PATCH] D131619: [libc++] Use __verbose_abort in additional contexts

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 10 14:40:57 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/include/__filesystem/filesystem_error.h:94
+void __throw_filesystem_error(_Args&&... __args) {
+  _LIBCPP_EXCEPTION_ABORT(filesystem_error(_VSTD::forward<_Args>(__args)...).what());
 }
----------------
Might as well remove `_VSTD` while you're at it.


================
Comment at: libcxx/include/__verbose_abort:59
+#define _LIBCPP_EXCEPTION_ABORT(__msg)                                                                              \
+    ::std::__exception_abort(__FILE__, __LINE__, __msg)
+
----------------
I don't think file and line are useful here. They will just be the file and line of the throw wrapper.


================
Comment at: libcxx/include/__verbose_abort:67
+// Handler for when an assertion fails
+#define _LIBCPP_ASSERTION_ABORT(__expr, __msg)                                                                      \
+    ::std::__assertion_abort(__FILE__, __LINE__, #__expr, __msg)
----------------
Why do you have this as an extra macro? It's used in just a single place.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131619



More information about the libcxx-commits mailing list