Work around ClangTidy bug: it wrongly reports that assert(false)

should be replaced by static_assert(false, "").

PiperOrigin-RevId: 251222995
This commit is contained in:
Benoit Jacob 2019-06-03 06:59:31 -07:00 committed by TensorFlower Gardener
parent 620c62418c
commit c2c6fc9cd4

View File

@ -45,9 +45,14 @@ inline void InfiniteLoop() {
fprintf(stderr, "%s", (x)); \
} while (0)
#define TFLITE_ASSERT_FALSE assert(false)
#define TFLITE_ABORT abort()
#ifdef NDEBUG
#define TFLITE_ASSERT_FALSE (static_cast<void>(0))
#else
#define TFLITE_ASSERT_FALSE TFLITE_ABORT
#endif
#endif // TF_LITE_MCU_DEBUG_LOG
#define TF_LITE_FATAL(msg) \