[PATCH] D123083: Attributes: add a new `allocptr` attribute

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 10:15:10 PDT 2022


durin42 added a comment.

In D123083#3474078 <https://reviews.llvm.org/D123083#3474078>, @nikic wrote:

> By the way, in which revision is this actually used? Do you plan to change the isRealloc/isFree APIs to check a specific operand of the call, rather than just the call?

Yeah, eventually the (remaining) callers of isFree need to check for the annotated operand rather than just blindly grabbing the first one (as an example). Mercifully all free/realloc functions today are similar-enough that the hard coded argument number works today, but this is futureproofing to make sure everything continues to work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123083



More information about the llvm-commits mailing list