-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nullability attributes to nullability type aliases.
This is a followup to the [previous change](69195d5) that added the `ABSL_NULLABILITY_COMPATIBLE` attribute macro. Adding these attributes has the following benefits: - Clang itself can now diagnose certain nullability errors through the `-Wnonnull` and `-Wnullability` warnings. - The nullability annotations can now also be used on pointers to incomplete types, as we have removed the `IsSupportedType` mechanism that used the `absl_nullability_compatible` tag to check whether a type is nullability-compatible (which only worked for complete types) and instead let Clang perform this check through the `ABSL_NULLABILITY_COMPATIBLE` attribute (which also works on incomplete types). PiperOrigin-RevId: 684342145 Change-Id: I94c8affd5be704cb49340058ced177f09ebd83a3
- Loading branch information
1 parent
8634e35
commit 485f2be
Showing
2 changed files
with
24 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters