baloghadamsoftware added a comment.
In https://reviews.llvm.org/D39121#902121, @martong wrote:
> Consider the use of a function pointer:
>
> void* malloc(int);
> int strlen(char*);
> auto fp = malloc;
> void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); }
>
>
> I think, the checker will not match in this case.
>
> One might use allocation functions via a function pointer in case of more
> possible allocation strategies (e.g having a different strategy for a shared
> memory allocation).
Good point! But I think we should keep this first patch small, so I will do it
in a follow-up patch.
https://reviews.llvm.org/D39121
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits