Don't emit `-Wnullability-completeness` warnings on `weak` Objective-C properties.
Zeroing weak references are by definition `nullable`, and adding `nonnull` or `_Nullable` yields a mutual-exclusivity error. When `-Wnullability-completeness` is enabled, however, non-audited header regions require adding the `nullable` property keyword to avoid a warning. This should be unnecessary, since it restates known nullability of the `weak` property. Additionally, the fix-it hints are both non-idiomatic Objective-C (adding `_Nullable` to the property's pointer type rather than in the `@property` attributes) and suggest the option of adding `_Nonnull`, which would be an error. Differential Revision: https://reviews.llvm.org/D128031
parent
e5f6ad22
Please register or sign in to comment