[cfe-dev] Prevent RetainCountChecker from Analyzing Function Bodies when They Have Certain Annotate Attribute

Malhar Thakkar via cfe-dev cfe-dev at lists.llvm.org
Tue Jul 18 07:48:33 PDT 2017


On Tue, Jul 18, 2017 at 6:30 PM, Sven Verdoolaege <skimo-cfe at kotnet.org>
wrote:

> On Sat, Jul 15, 2017 at 01:01:08AM +0530, Malhar Thakkar wrote:
> > Also, I have a few queries directed to Dr. Alexandre and Dr. Sven.
> > I applied these trusted annotations to obj_free(), obj_cow() and
> obj_copy()
> > as they have a pattern (__isl.*free, __isl.*cow and __isl.*copy).
> >
> > Do, functions of the type obj_alloc_* have the same pattern if at all
> they
> > do? Also, are there any other functions which require such annotations?
>
> I'm not sure I understand your question.
>
Do declarations of obj_alloc_* follow some kind of regular expression like
in the case of obj_free(), obj_cow() and obj_copy() which begin with
"__isl" and have the keyword free, cow and copy respectively?

> For each object type, there should only be a single function
> that allocates such objects.  However, there may be several
> functions that store objects in other objects, which may
> also confuse the checker since the ownership of the contained
> object is transfered to the containing object.

Yes, and I found obj_dup() to be such function. I'll have to check if other
such functions follow any kind of regular expression.

>
> skimo
>

ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170718/caba0749/attachment.html>


More information about the cfe-dev mailing list