Skip to content

Commit 9e660cf

Browse files
Abseil Teamcopybara-github
authored andcommitted
Gate use of clang nullability qualifiers through absl nullability macros on nullability_on_classes.
This feature is already required for using the clang qualifiers through the absl nullability templates, and avoids breakage in older clang versions. PiperOrigin-RevId: 738520888 Change-Id: I3ed85ced162ee08e0814c40f33c4d2f8fa677f74
1 parent 8f8f54f commit 9e660cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

absl/base/nullability.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@
220220
// No-op except for being a human readable signal.
221221
#define ABSL_POINTERS_DEFAULT_NONNULL
222222

223-
#if defined(__clang__) && !defined(__OBJC__)
223+
#if defined(__clang__) && !defined(__OBJC__) && \
224+
ABSL_HAVE_FEATURE(nullability_on_classes)
224225
// absl_nonnull (default with `ABSL_POINTERS_DEFAULT_NONNULL`)
225226
//
226227
// The indicated pointer is never null. It is the responsibility of the provider

0 commit comments

Comments
 (0)