[PATCH] D68162: [analyzer][MallocChecker][NFC] Communicate the allocation family information to auxiliary functions with template parameters

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 1 07:20:52 PDT 2019


Szelethus added a comment.

In D68162#1686810 <https://reviews.llvm.org/D68162#1686810>, @NoQ wrote:

> Thank you, fantastic finding!
>
> > in fact we know it //compile time//
>
> Yeah, but is it accidental or is there a good reason behind always having this information at compile time? 'Cause i don't want to restrict the code to always provide this information at compile time if we're not sure it'll always be able to provide it in compile time.


Definitely accidental. And now that I think about it, maybe it would be better to turn these into non-optional regular arguments. Though its far in the future, we could eventually add annotations that tell whether a function returns with `new`ed or `malloc()`ated memory.

The entire point of the patch was to get rid of `getAllocationFamily`, because there really isn't a need to get the allocation family of hardcoded functions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68162/new/

https://reviews.llvm.org/D68162





More information about the cfe-commits mailing list