llvm-project
e22ebee5 - [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (#93231)

Commit
1 year ago
[Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (#93231) The attributes `sized_by`, `counted_by_or_null` and `sized_by_or_null` have been added as variants on `counted_by`, each with slightly different semantics. `sized_by` takes a byte size parameter instead of an element count, allowing pointees with unknown size. The `counted_by_or_null` and `sized_by_or_null` variants are equivalent to their base variants, except the pointer can be null regardless of count/size value. If the pointer is null the size is effectively 0. rdar://125400354
Author
Parents
Loading