diff options
| author | Ziqing Luo <ziqing@udel.edu> | 2025-03-07 15:05:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-07 15:05:20 -0800 |
| commit | b2563028cf8285f1e77f6bdba9268cd92cd9355e (patch) | |
| tree | 5aba2036b1eeb08a5a62f491ea294d014f3d77d9 /lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp | |
| parent | e3076c6f3df8e5611406426f6c93b38c8a721a4b (diff) | |
[-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (#114894)
We can take advantage of the attribute `alloc_size`. For example,
```
void * malloc(size_t size) __attribute__((alloc_size(1)));
std::span<char>{(char *)malloc(x), x}; // this is safe
```
rdar://136634730
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp')
0 files changed, 0 insertions, 0 deletions
