From 8e6582b877d950cd5c6d05bc891bfc99c6ea2803 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Thu, 22 Dec 2022 07:36:35 -0800 Subject: Add a NOLINT to ABSL_UNREACHABLE() to disable the clang-tidy warning that the assert can be a static_assert PiperOrigin-RevId: 497161039 Change-Id: If714cb25ca1d9481ada94b3b5b4cb16a4dd4e85a --- absl/base/optimization.h | 1 + 1 file changed, 1 insertion(+) (limited to 'absl') diff --git a/absl/base/optimization.h b/absl/base/optimization.h index 04870cba..ad0121ad 100644 --- a/absl/base/optimization.h +++ b/absl/base/optimization.h @@ -222,6 +222,7 @@ // When NDEBUG is defined, reaching ABSL_UNREACHABLE() is undefined behavior. #define ABSL_UNREACHABLE() \ do { \ + /* NOLINTNEXTLINE: misc-static-assert */ \ assert(false && "ABSL_UNREACHABLE reached"); \ ABSL_INTERNAL_UNREACHABLE_IMPL(); \ } while (false) -- cgit v1.2.3