[PATCH] D30806: [nonnull] Teach Clang to attach the nonnull LLVM attribute to declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source code contains them.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 10 00:32:34 PST 2017


ahatanak added a comment.

Are users allowed to call these routines with a null pointer and a non-zero size? Or can we assume that if the size is known to be non-zero at compile time, the pointers are not null?

I'm thinking we might miss optimization opportunities if it's not possible to mark the pointer parameters as nonnull.


https://reviews.llvm.org/D30806





More information about the cfe-commits mailing list