summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-05-24 07:10:39 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-05-24 07:11:32 -0700
commit7d7defda388b79e9c8d767c5fa66e4f2cdcb4c12 (patch)
treec1d498148386654e1292b5aacad0818c222f5c16
parentd23adc1cfba78931b4aa2edb81f10a39135d2d24 (diff)
fill ABSL_INTERNAL_(DISABLE|RESTORE)_DEPRECATED_DECLARATION_WARNING macro for clang
PiperOrigin-RevId: 534824761 Change-Id: I0ab78fcb211bc5df756fb581761ed8febc3d18fd
-rw-r--r--absl/base/attributes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h
index 34a35538..cb3f367f 100644
--- a/absl/base/attributes.h
+++ b/absl/base/attributes.h
@@ -695,7 +695,7 @@
// ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
// Baz ComputeBazFromFoo(Foo f);
// ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
// Clang also supports these GCC pragmas.
#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING \
_Pragma("GCC diagnostic push") \
@@ -705,7 +705,7 @@
#else
#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
-#endif // __GNUC__
+#endif // defined(__GNUC__) || defined(__clang__)
// ABSL_CONST_INIT
//