Files
Henrik G. Olsson f77bebbd29 [Swiftify] don't unwrap pointers for UP! when not needed
Safe wrapper expansions included an explicit unwrap of the baseAddress
of the span parameter unless the underlying pointer parameter was
explicitly `_Nullable`. Since the baseAddress can only be null if the
count is 0, and the pointer is annotated with counted_by, it is not
allowed to dereference the zero-length buffer, even if the nullability
is not set (i.e. the underlying function parameter is imported with an
implicitly unwrapped optional type).

For consistency, this also adds the same early exit handling for the
return value as for nullable return values.

rdar://177555277
2026-06-04 22:10:47 -07:00
..
2025-10-10 17:00:25 -07:00