Lines Matching defs:nullability
600 // Transfer the nullability from method's return type.
1440 if (auto nullability = AttributedType::stripOuterNullability(T)) {
1442 return Context.getAttributedType(*nullability, Context.getObjCIdType(),
1459 /// to account for nullability.
1471 // Local function that transfers the nullability of the method's
1474 // If the method's result type has nullability, extract it.
1475 if (auto nullability =
1477 // Strip off any outer nullability sugar from the provided type.
1480 // Form a new attributed type using the method result type's nullability.
1481 return Context.getAttributedType(*nullability, type, type);
1532 // If this is a class message, ignore the nullability of the receiver.
1560 // There is nothing left to do if the result type cannot have a nullability
1565 // Map the nullability of the result into a table index.
1567 if (std::optional<NullabilityKind> nullability =
1569 if (*nullability == NullabilityKind::NullableResult)
1570 nullability = NullabilityKind::Nullable;
1571 receiverNullabilityIdx = 1 + static_cast<unsigned>(*nullability);
1575 if (std::optional<NullabilityKind> nullability =
1577 if (*nullability == NullabilityKind::NullableResult)
1578 nullability = NullabilityKind::Nullable;
1579 resultNullabilityIdx = 1 + static_cast<unsigned>(*nullability);
1582 // The table of nullability mappings, indexed by the receiver's nullability
1583 // and then the result type's nullability.
1601 // Strip off the existing nullability. This removes as little type sugar as
1611 // Add nullability back if needed.