summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/log/internal/strip.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/absl/log/internal/strip.h b/absl/log/internal/strip.h
index ee7f296c..3e550104 100644
--- a/absl/log/internal/strip.h
+++ b/absl/log/internal/strip.h
@@ -31,6 +31,13 @@
// logging in subtly different ways for subtly different reasons (see below).
#if defined(STRIP_LOG) && STRIP_LOG
+// Attribute for marking variables used in implementation details of logging
+// macros as unused, but only when `STRIP_LOG` is defined.
+// With `STRIP_LOG` on, not marking them triggers `-Wunused-but-set-variable`,
+// With `STRIP_LOG` off, marking them triggers `-Wused-but-marked-unused`.
+//
+// TODO(b/290784225): Replace this macro with attribute [[maybe_unused]] when
+// Abseil stops supporting C++14.
#define ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG ABSL_ATTRIBUTE_UNUSED
#define ABSL_LOGGING_INTERNAL_LOG_INFO ::absl::log_internal::NullStream()