summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-12-22 07:36:35 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2022-12-22 07:37:26 -0800
commit8e6582b877d950cd5c6d05bc891bfc99c6ea2803 (patch)
tree5c76e716e4fc3ac26193878693232d31036325b7 /absl
parent8d0b869ad21fec7d099cc9fdcace12c8bc00ca4a (diff)
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
Diffstat (limited to 'absl')
-rw-r--r--absl/base/optimization.h1
1 files changed, 1 insertions, 0 deletions
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)