[libcxx-commits] [libcxx] c4bd597 - [libcxx] Add new line after assert message
Vitaly Buka via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 27 13:32:51 PDT 2023
Author: Vitaly Buka
Date: 2023-06-27T13:32:41-07:00
New Revision: c4bd5977f429629fda2045eaf80f6ad85982f592
URL: https://github.com/llvm/llvm-project/commit/c4bd5977f429629fda2045eaf80f6ad85982f592
DIFF: https://github.com/llvm/llvm-project/commit/c4bd5977f429629fda2045eaf80f6ad85982f592.diff
LOG: [libcxx] Add new line after assert message
Abort signal handler may print aswell. Without new line it goes into the
same.
Reviewed By: #libc, philnik, Mordante
Differential Revision: https://reviews.llvm.org/D142184
Added:
Modified:
libcxx/include/__assert
Removed:
################################################################################
diff --git a/libcxx/include/__assert b/libcxx/include/__assert
index e20ee50b127ce..277f12367991e 100644
--- a/libcxx/include/__assert
+++ b/libcxx/include/__assert
@@ -37,7 +37,7 @@
(__builtin_expect(static_cast<bool>(expression), 1) \
? (void)0 \
: _LIBCPP_VERBOSE_ABORT( \
- "%s:%d: assertion %s failed: %s", __builtin_FILE(), __builtin_LINE(), #expression, message))
+ "%s:%d: assertion %s failed: %s\n", __builtin_FILE(), __builtin_LINE(), #expression, message))
#elif !defined(_LIBCPP_ASSERTIONS_DISABLE_ASSUME) && __has_builtin(__builtin_assume)
# define _LIBCPP_ASSERT(expression, message) \
(_LIBCPP_DIAGNOSTIC_PUSH _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wassume") \
More information about the libcxx-commits
mailing list