[PATCH] D25850: [WIP] Accept nullability annotations (_Nullable) on array parameters

Jordan Rose via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 25 16:07:32 PDT 2016


jordan_rose added a comment.

> `_Nonnull` in this position seems very similar to `static` (which typically also implies non-nullness).

I wasn't actually sure if it was okay to assume this, but the standard does seem pretty clear:

> If the keyword `static` also appears within the `[` and `]` of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression. (C11 6.7.6.3p7)

We can pick this up on the Swift side.


Repository:
  rL LLVM

https://reviews.llvm.org/D25850





More information about the cfe-commits mailing list