dougsonos wrote:

> ```
> #include <cstdlib>
> float* nb4() noexcept [[clang::nonallocating]]
> {
>   float* ptr = (float*)malloc(100 * sizeof(float));
>   return ptr;
> }
> ```
> 
> Produces no warnings:

Hi Chris,
Thanks. That turned out to be the impetus to start carving out exceptions to 
"built-in functions are always safe", since the `malloc` obtained by `cstdlib` 
gets recognized as a built-in. Pushed a first crack at handling that.

https://github.com/llvm/llvm-project/pull/99656
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to