[cfe-commits] r86464 - in /cfe/trunk: include/clang/Analysis/LocalCheckers.h include/clang/Frontend/Analyses.def lib/Analysis/CheckSizeofPointer.cpp lib/Frontend/AnalysisConsumer.cpp

Zhongxing Xu xuzhongxing at gmail.com
Mon Nov 9 18:23:02 PST 2009


2009/11/10 Ted Kremenek <kremenek at apple.com>:
>
> On Nov 9, 2009, at 6:11 PM, Zhongxing Xu wrote:
>
> 2009/11/10 Ted Kremenek <kremenek at apple.com>:
>
> I wasn't arguing that we make the check malloc() specific, and I don't think
>
> we should because the problem is more general than just looking at pointers
>
> returned from malloc().  We just need to make it smart enough that when it
>
> gives a warning, it is:
>
> (a) correct most of the time
>
> (b) gives a meaningful diagnostic that people understand how they screwed up
>
> and how they can fix the issue
>
> I don't think we need to make it malloc() specific, but we can educate the
>
> check about malloc() if that helps accomplish (a) and (b).
>
> Make sense. Let's start with malloc. I'm fine to remove this too general
> check.
>
> I think we should just grind the check over real code first to get idea of
> when it fires.  That should be a superset of the cases we care about.

Yeah.




More information about the cfe-commits mailing list