summaryrefslogtreecommitdiff
path: root/absl/log/internal
diff options
context:
space:
mode:
Diffstat (limited to 'absl/log/internal')
-rw-r--r--absl/log/internal/check_impl.h170
-rw-r--r--absl/log/internal/check_op.h87
2 files changed, 145 insertions, 112 deletions
diff --git a/absl/log/internal/check_impl.h b/absl/log/internal/check_impl.h
index d3238861..c9c28e3e 100644
--- a/absl/log/internal/check_impl.h
+++ b/absl/log/internal/check_impl.h
@@ -22,103 +22,129 @@
#include "absl/log/internal/strip.h"
// CHECK
-#define ABSL_CHECK_IMPL(condition, condition_str) \
+#define ABSL_CHECK_IMPL(condition, condition_text) \
ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, \
ABSL_PREDICT_FALSE(!(condition))) \
- ABSL_LOG_INTERNAL_CHECK(condition_str).InternalStream()
+ ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
-#define ABSL_QCHECK_IMPL(condition, condition_str) \
+#define ABSL_QCHECK_IMPL(condition, condition_text) \
ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, \
ABSL_PREDICT_FALSE(!(condition))) \
- ABSL_LOG_INTERNAL_QCHECK(condition_str).InternalStream()
+ ABSL_LOG_INTERNAL_QCHECK(condition_text).InternalStream()
-#define ABSL_PCHECK_IMPL(condition) \
- ABSL_CHECK_IMPL(condition, #condition).WithPerror()
+#define ABSL_PCHECK_IMPL(condition, condition_text) \
+ ABSL_CHECK_IMPL(condition, condition_text).WithPerror()
#ifndef NDEBUG
-#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(condition, #condition)
+#define ABSL_DCHECK_IMPL(condition, condition_text) \
+ ABSL_CHECK_IMPL(condition, condition_text)
#else
-#define ABSL_DCHECK_IMPL(condition) ABSL_CHECK_IMPL(true || (condition), "true")
+#define ABSL_DCHECK_IMPL(condition, condition_text) \
+ ABSL_CHECK_IMPL(true || (condition), "true")
#endif
// CHECK_EQ
-#define ABSL_CHECK_EQ_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val2)
-#define ABSL_CHECK_NE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_NE, !=, val1, val2)
-#define ABSL_CHECK_LE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val2)
-#define ABSL_CHECK_LT_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val2)
-#define ABSL_CHECK_GE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val2)
-#define ABSL_CHECK_GT_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_CHECK_OP(Check_GT, >, val1, val2)
-#define ABSL_QCHECK_EQ_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_EQ, ==, val1, val2)
-#define ABSL_QCHECK_NE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_NE, !=, val1, val2)
-#define ABSL_QCHECK_LE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_LE, <=, val1, val2)
-#define ABSL_QCHECK_LT_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_LT, <, val1, val2)
-#define ABSL_QCHECK_GE_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_GE, >=, val1, val2)
-#define ABSL_QCHECK_GT_IMPL(val1, val2) \
- ABSL_LOG_INTERNAL_QCHECK_OP(Check_GT, >, val1, val2)
+#define ABSL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
+#define ABSL_CHECK_NE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_NE, !=, val1, val1_text, val2, val2_text)
+#define ABSL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
+#define ABSL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
+#define ABSL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
+#define ABSL_CHECK_GT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_CHECK_OP(Check_GT, >, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_EQ_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_NE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_NE, !=, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_LE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_LT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_GE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
+#define ABSL_QCHECK_GT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OP(Check_GT, >, val1, val1_text, val2, val2_text)
#ifndef NDEBUG
-#define ABSL_DCHECK_EQ_IMPL(val1, val2) ABSL_CHECK_EQ_IMPL(val1, val2)
-#define ABSL_DCHECK_NE_IMPL(val1, val2) ABSL_CHECK_NE_IMPL(val1, val2)
-#define ABSL_DCHECK_LE_IMPL(val1, val2) ABSL_CHECK_LE_IMPL(val1, val2)
-#define ABSL_DCHECK_LT_IMPL(val1, val2) ABSL_CHECK_LT_IMPL(val1, val2)
-#define ABSL_DCHECK_GE_IMPL(val1, val2) ABSL_CHECK_GE_IMPL(val1, val2)
-#define ABSL_DCHECK_GT_IMPL(val1, val2) ABSL_CHECK_GT_IMPL(val1, val2)
+#define ABSL_DCHECK_EQ_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
+#define ABSL_DCHECK_NE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_NE_IMPL(val1, val1_text, val2, val2_text)
+#define ABSL_DCHECK_LE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
+#define ABSL_DCHECK_LT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
+#define ABSL_DCHECK_GE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
+#define ABSL_DCHECK_GT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_CHECK_GT_IMPL(val1, val1_text, val2, val2_text)
#else // ndef NDEBUG
-#define ABSL_DCHECK_EQ_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
-#define ABSL_DCHECK_NE_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
-#define ABSL_DCHECK_LE_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
-#define ABSL_DCHECK_LT_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
-#define ABSL_DCHECK_GE_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
-#define ABSL_DCHECK_GT_IMPL(val1, val2) ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_EQ_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_NE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_LE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_LT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_GE_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
+#define ABSL_DCHECK_GT_IMPL(val1, val1_text, val2, val2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
#endif // def NDEBUG
// CHECK_OK
-#define ABSL_CHECK_OK_IMPL(status) ABSL_LOG_INTERNAL_CHECK_OK(status)
-#define ABSL_QCHECK_OK_IMPL(status) ABSL_LOG_INTERNAL_QCHECK_OK(status)
+#define ABSL_CHECK_OK_IMPL(status, status_text) \
+ ABSL_LOG_INTERNAL_CHECK_OK(status, status_text)
+#define ABSL_QCHECK_OK_IMPL(status, status_text) \
+ ABSL_LOG_INTERNAL_QCHECK_OK(status, status_text)
#ifndef NDEBUG
-#define ABSL_DCHECK_OK_IMPL(status) ABSL_LOG_INTERNAL_CHECK_OK(status)
+#define ABSL_DCHECK_OK_IMPL(status, status_text) \
+ ABSL_LOG_INTERNAL_CHECK_OK(status, status_text)
#else
-#define ABSL_DCHECK_OK_IMPL(status) \
+#define ABSL_DCHECK_OK_IMPL(status, status_text) \
ABSL_LOG_INTERNAL_DCHECK_NOP(status, nullptr)
#endif
// CHECK_STREQ
-#define ABSL_CHECK_STREQ_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_CHECK_STROP(strcmp, ==, true, s1, s2)
-#define ABSL_CHECK_STRNE_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_CHECK_STROP(strcmp, !=, false, s1, s2)
-#define ABSL_CHECK_STRCASEEQ_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_CHECK_STROP(strcasecmp, ==, true, s1, s2)
-#define ABSL_CHECK_STRCASENE_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_CHECK_STROP(strcasecmp, !=, false, s1, s2)
-#define ABSL_QCHECK_STREQ_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_QCHECK_STROP(strcmp, ==, true, s1, s2)
-#define ABSL_QCHECK_STRNE_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_QCHECK_STROP(strcmp, !=, false, s1, s2)
-#define ABSL_QCHECK_STRCASEEQ_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_QCHECK_STROP(strcasecmp, ==, true, s1, s2)
-#define ABSL_QCHECK_STRCASENE_IMPL(s1, s2) \
- ABSL_LOG_INTERNAL_QCHECK_STROP(strcasecmp, !=, false, s1, s2)
+#define ABSL_CHECK_STREQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_CHECK_STROP(strcmp, ==, true, s1, s1_text, s2, s2_text)
+#define ABSL_CHECK_STRNE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_CHECK_STROP(strcmp, !=, false, s1, s1_text, s2, s2_text)
+#define ABSL_CHECK_STRCASEEQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_CHECK_STROP(strcasecmp, ==, true, s1, s1_text, s2, s2_text)
+#define ABSL_CHECK_STRCASENE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_CHECK_STROP(strcasecmp, !=, false, s1, s1_text, s2, s2_text)
+#define ABSL_QCHECK_STREQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_STROP(strcmp, ==, true, s1, s1_text, s2, s2_text)
+#define ABSL_QCHECK_STRNE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_STROP(strcmp, !=, false, s1, s1_text, s2, s2_text)
+#define ABSL_QCHECK_STRCASEEQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_STROP(strcasecmp, ==, true, s1, s1_text, s2, s2_text)
+#define ABSL_QCHECK_STRCASENE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_QCHECK_STROP(strcasecmp, !=, false, s1, s1_text, s2, \
+ s2_text)
#ifndef NDEBUG
-#define ABSL_DCHECK_STREQ_IMPL(s1, s2) ABSL_CHECK_STREQ_IMPL(s1, s2)
-#define ABSL_DCHECK_STRCASEEQ_IMPL(s1, s2) ABSL_CHECK_STRCASEEQ_IMPL(s1, s2)
-#define ABSL_DCHECK_STRNE_IMPL(s1, s2) ABSL_CHECK_STRNE_IMPL(s1, s2)
-#define ABSL_DCHECK_STRCASENE_IMPL(s1, s2) ABSL_CHECK_STRCASENE_IMPL(s1, s2)
+#define ABSL_DCHECK_STREQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_CHECK_STREQ_IMPL(s1, s1_text, s2, s2_text)
+#define ABSL_DCHECK_STRCASEEQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_CHECK_STRCASEEQ_IMPL(s1, s1_text, s2, s2_text)
+#define ABSL_DCHECK_STRNE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_CHECK_STRNE_IMPL(s1, s1_text, s2, s2_text)
+#define ABSL_DCHECK_STRCASENE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_CHECK_STRCASENE_IMPL(s1, s1_text, s2, s2_text)
#else // ndef NDEBUG
-#define ABSL_DCHECK_STREQ_IMPL(s1, s2) ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
-#define ABSL_DCHECK_STRCASEEQ_IMPL(s1, s2) ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
-#define ABSL_DCHECK_STRNE_IMPL(s1, s2) ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
-#define ABSL_DCHECK_STRCASENE_IMPL(s1, s2) ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
+#define ABSL_DCHECK_STREQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
+#define ABSL_DCHECK_STRCASEEQ_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
+#define ABSL_DCHECK_STRNE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
+#define ABSL_DCHECK_STRCASENE_IMPL(s1, s1_text, s2, s2_text) \
+ ABSL_LOG_INTERNAL_DCHECK_NOP(s1, s2)
#endif // def NDEBUG
#endif // ABSL_LOG_INTERNAL_CHECK_IMPL_H_
diff --git a/absl/log/internal/check_op.h b/absl/log/internal/check_op.h
index 559e5afc..4907b89b 100644
--- a/absl/log/internal/check_op.h
+++ b/absl/log/internal/check_op.h
@@ -57,35 +57,40 @@
::absl::log_internal::NullStream().InternalStream()
#endif
-#define ABSL_LOG_INTERNAL_CHECK_OP(name, op, val1, val2) \
+#define ABSL_LOG_INTERNAL_CHECK_OP(name, op, val1, val1_text, val2, val2_text) \
while ( \
::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
::absl::log_internal::name##Impl( \
::absl::log_internal::GetReferenceableValue(val1), \
::absl::log_internal::GetReferenceableValue(val2), \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#val1 " " #op \
- " " #val2))) \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text \
+ " " #op " " val2_text))) \
ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
-#define ABSL_LOG_INTERNAL_QCHECK_OP(name, op, val1, val2) \
- while (::std::string* absl_log_internal_qcheck_op_result = \
- ::absl::log_internal::name##Impl( \
- ::absl::log_internal::GetReferenceableValue(val1), \
- ::absl::log_internal::GetReferenceableValue(val2), \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#val1 " " #op \
- " " #val2))) \
+#define ABSL_LOG_INTERNAL_QCHECK_OP(name, op, val1, val1_text, val2, \
+ val2_text) \
+ while (::std::string* absl_log_internal_qcheck_op_result = \
+ ::absl::log_internal::name##Impl( \
+ ::absl::log_internal::GetReferenceableValue(val1), \
+ ::absl::log_internal::GetReferenceableValue(val2), \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL( \
+ val1_text " " #op " " val2_text))) \
ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_qcheck_op_result).InternalStream()
-#define ABSL_LOG_INTERNAL_CHECK_STROP(func, op, expected, s1, s2) \
+#define ABSL_LOG_INTERNAL_CHECK_STROP(func, op, expected, s1, s1_text, s2, \
+ s2_text) \
while (::std::string* absl_log_internal_check_strop_result = \
::absl::log_internal::Check##func##expected##Impl( \
(s1), (s2), \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#s1 " " #op " " #s2))) \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \
+ " " s2_text))) \
ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_strop_result) \
.InternalStream()
-#define ABSL_LOG_INTERNAL_QCHECK_STROP(func, op, expected, s1, s2) \
+#define ABSL_LOG_INTERNAL_QCHECK_STROP(func, op, expected, s1, s1_text, s2, \
+ s2_text) \
while (::std::string* absl_log_internal_qcheck_strop_result = \
::absl::log_internal::Check##func##expected##Impl( \
(s1), (s2), \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#s1 " " #op " " #s2))) \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \
+ " " s2_text))) \
ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_qcheck_strop_result) \
.InternalStream()
// This one is tricky:
@@ -108,33 +113,35 @@
// * As usual, no braces so we can stream into the expansion with `operator<<`.
// * Also as usual, it must expand to a single (partial) statement with no
// ambiguous-else problems.
-#define ABSL_LOG_INTERNAL_CHECK_OK(val) \
- for (::std::pair<const ::absl::Status*, ::std::string*> \
- absl_log_internal_check_ok_goo; \
- absl_log_internal_check_ok_goo.first = \
- ::absl::log_internal::AsStatus(val), \
- absl_log_internal_check_ok_goo.second = \
- ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok()) \
- ? nullptr \
- : ::absl::status_internal::MakeCheckFailString( \
- absl_log_internal_check_ok_goo.first, \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#val " is OK")), \
- !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \
- ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_ok_goo.second) \
+#define ABSL_LOG_INTERNAL_CHECK_OK(val, val_text) \
+ for (::std::pair<const ::absl::Status*, ::std::string*> \
+ absl_log_internal_check_ok_goo; \
+ absl_log_internal_check_ok_goo.first = \
+ ::absl::log_internal::AsStatus(val), \
+ absl_log_internal_check_ok_goo.second = \
+ ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok()) \
+ ? nullptr \
+ : ::absl::status_internal::MakeCheckFailString( \
+ absl_log_internal_check_ok_goo.first, \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val_text \
+ " is OK")), \
+ !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \
+ ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_ok_goo.second) \
.InternalStream()
-#define ABSL_LOG_INTERNAL_QCHECK_OK(val) \
- for (::std::pair<const ::absl::Status*, ::std::string*> \
- absl_log_internal_check_ok_goo; \
- absl_log_internal_check_ok_goo.first = \
- ::absl::log_internal::AsStatus(val), \
- absl_log_internal_check_ok_goo.second = \
- ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok()) \
- ? nullptr \
- : ::absl::status_internal::MakeCheckFailString( \
- absl_log_internal_check_ok_goo.first, \
- ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(#val " is OK")), \
- !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \
- ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_check_ok_goo.second) \
+#define ABSL_LOG_INTERNAL_QCHECK_OK(val, val_text) \
+ for (::std::pair<const ::absl::Status*, ::std::string*> \
+ absl_log_internal_check_ok_goo; \
+ absl_log_internal_check_ok_goo.first = \
+ ::absl::log_internal::AsStatus(val), \
+ absl_log_internal_check_ok_goo.second = \
+ ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok()) \
+ ? nullptr \
+ : ::absl::status_internal::MakeCheckFailString( \
+ absl_log_internal_check_ok_goo.first, \
+ ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val_text \
+ " is OK")), \
+ !ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \
+ ABSL_LOG_INTERNAL_QCHECK(*absl_log_internal_check_ok_goo.second) \
.InternalStream()
namespace absl {