Lines Matching refs:condition

58 // The CHECK(condition) macro is active in both debug and release builds and
87 // PCHECK(condition) << "Couldn't do foo";
88 // DPCHECK(condition) << "Couldn't do foo";
210 // the condition doesn't hold. Condition is evaluated once and only once.
211 #define LAZY_STREAM(stream, condition) \
212 !(condition) ? (void)0 : ::logging::LogMessageVoidify() & (stream)
225 #define LOG_IF(severity, condition) \
226 LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
228 #define LOG_ASSERT(condition) \
229 LOG_IF(FATAL, !(ANALYZER_ASSUME_TRUE(condition))) \
230 << "Assert failed: " #condition ". "
246 #define PLOG_IF(severity, condition) \
247 LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition))
381 // CHECK dies with a fatal error if condition is not true. It is *not*
396 #define CHECK(condition) \
397 UNLIKELY(!(condition)) ? IMMEDIATE_CRASH() : EAT_STREAM_PARAMETERS
400 // why the condition failed. In official builds, preserve only the error code
402 // condition and any additional stream parameters are dropped.
403 #define PCHECK(condition) \
404 LAZY_STREAM(PLOG_STREAM(FATAL), UNLIKELY(!(condition))); \
414 // parameter doesn't reference 'condition' in /analyze builds because
415 // this evaluation confuses /analyze. The !! before condition is because
419 #define CHECK(condition) \
420 __analysis_assume(!!(condition)), LAZY_STREAM(LOG_STREAM(FATAL), false) \
421 << "Check failed: " #condition ". "
423 #define PCHECK(condition) \
424 __analysis_assume(!!(condition)), LAZY_STREAM(PLOG_STREAM(FATAL), false) \
425 << "Check failed: " #condition ". "
430 #define CHECK(condition) \
431 LAZY_STREAM(::logging::LogMessage(__FILE__, __LINE__, #condition).stream(), \
432 !ANALYZER_ASSUME_TRUE(condition))
434 #define PCHECK(condition) \
435 LAZY_STREAM(PLOG_STREAM(FATAL), !ANALYZER_ASSUME_TRUE(condition)) \
436 << "Check failed: " #condition ". "
541 // The checked condition is wrapped with ANALYZER_ASSUME_TRUE, which under
543 // condition is false.
585 #define DLOG_IF(severity, condition) LOG_IF(severity, condition)
586 #define DLOG_ASSERT(condition) LOG_ASSERT(condition)
587 #define DPLOG_IF(severity, condition) PLOG_IF(severity, condition)
591 // If !DCHECK_IS_ON(), we want to avoid emitting any references to |condition|
596 #define DLOG_IF(severity, condition) EAT_STREAM_PARAMETERS
597 #define DLOG_ASSERT(condition) EAT_STREAM_PARAMETERS
598 #define DPLOG_IF(severity, condition) EAT_STREAM_PARAMETERS
624 // DCHECK et al. make sure to reference |condition| regardless of
636 #define DCHECK(condition) \
637 __analysis_assume(!!(condition)), LAZY_STREAM(LOG_STREAM(DCHECK), false) \
638 << "Check failed: " #condition ". "
640 #define DPCHECK(condition) \
641 __analysis_assume(!!(condition)), LAZY_STREAM(PLOG_STREAM(DCHECK), false) \
642 << "Check failed: " #condition ". "
648 #define DCHECK(condition) \
649 LAZY_STREAM(LOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
650 << "Check failed: " #condition ". "
651 #define DPCHECK(condition) \
652 LAZY_STREAM(PLOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
653 << "Check failed: " #condition ". "
657 #define DCHECK(condition) EAT_STREAM_PARAMETERS << !(condition)
658 #define DPCHECK(condition) EAT_STREAM_PARAMETERS << !(condition)
752 LogMessage(const char* file, int line, const char* condition);
881 #define RAW_CHECK(condition) \
883 if (!(condition)) \
885 "Check failed: " #condition "\n"); \