[cfe-commits] [analyzer] Patch to stop tracking symbols based on a retain count summary of inlined function

Jordan Rose jordan_rose at apple.com
Tue Aug 21 09:04:56 PDT 2012


On Aug 20, 2012, at 18:47 , Jordan Rose <jordan_rose at apple.com> wrote:

> Yeah, I don't like this approach as much as I thought I would. My original reason for making a new summary out of an old one was to re-use the existing summary evaluation code. This eliminates that, and processSummaryOfInlined is crippled since it only handles StopTrackingHard and NoRetHard. And there's a lot of duplication elsewhere.
> 
> I'd rather see this:
> 
>  RetainSummaryManager &Summaries = getSummaryManager(C);
>  const RetainSummary *Summ = Summaries.getSummary(Call, C.getState());
> 
>  if (C.wasInlined && !Summ->appliesToInlined())
>    return;
> 
>  checkSummary(*Summ, Call, C);

Thinking about this again, this is about whether we're saying "this summary should be applied even when inlining", or "these /effects/ should be applied even when inlining". Even in the latter case I'd consider adding flags to the ArgEffects rather than adding new ArgEffect kinds, but that's an interesting distinction/decision. Obviously the latter is more flexible, but which do you think we /should/ be doing?

Jordan



More information about the cfe-commits mailing list