Skip to content

Commit 585f214

Browse files
committed
fixup: update documentation
Reflect that pointer+pointer is also possible now.
1 parent 45c1a77 commit 585f214

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Attribute Changes in Clang
329329

330330
- New function attribute `malloc_span` is added. It has semantics similar to that of the `malloc`
331331
attribute, but `malloc_span` applies not to functions returning pointers, but to functions returning
332-
span-like structures (i.e. those that contain a pointer field and a size integer field).
332+
span-like structures (i.e. those that contain a pointer field and a size integer field or two pointers).
333333

334334
Improvements to Clang's diagnostics
335335
-----------------------------------

clang/include/clang/Basic/AttrDocs.td

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5257,8 +5257,9 @@ where the returned memory range does not alias storage from any other object
52575257
accessible to the caller.
52585258

52595259
In this context, a span-like structure is assumed to have two fields, one of
5260-
which is a pointer to the allocated memory and another one is an integer type
5261-
containing the size of the actually allocated memory.
5260+
which is a pointer to the start of theallocated memory and another one is
5261+
either an integer type containing the size of the actually allocated memory
5262+
or a pointer the end of the allocated region.
52625263
}];
52635264
}
52645265

0 commit comments

Comments
 (0)