[cfe-dev] Fix for Clang PR 8426, 8427, & 8433

Ted Kremenek kremenek at apple.com
Fri Oct 29 17:34:22 PDT 2010


Looks great!  Thanks Zhanyong!

On Oct 29, 2010, at 3:30 PM, Zhanyong Wan (λx.x x) wrote:

> Hi Ted and Doug,
> 
> On Thu, Oct 28, 2010 at 11:24 AM, Douglas Gregor <dgregor at apple.com> wrote:
>> 
>> On Oct 27, 2010, at 11:15 PM, Zhanyong Wan (λx.x x) wrote:
>> 
>>> Hi Ted,
>>> 
>>> On Wed, Oct 27, 2010 at 5:55 PM, Ted Kremenek <kremenek at apple.com> wrote:
>>>> Hi Zhanyong,
>>>> 
>>>> Thanks for working on this.  I admit that I haven't had a chance to investigate those PRs myself.
>>>> 
>>>> The changes look good, but I had two questions/comments.
>>>> 
>>>> (1) Do we even want to be analyzing template definitions (as opposed to instantiations)?  It seems like we'd be doing a bunch of guess work.  It also seems like a performance issue if we analyze template code that is never used.
>>> 
>>> I agree that there's little point analyzing template definitions.  It
>>> would be a quite invasive change to stop doing that though, so I'd
>>> like to get this patch in before attempting that.
>> 
>> 
>> How is such a change invasive? One can just check whether a FunctionDecl is a dependent context (FunctionDecl::isDependentContext()), and ignore it if it is.
>> 
>>        - Doug
> 
> Thanks for the tips.  I've uploaded a new patch to the same URL (also
> attached in this message) to skip function templates in static
> analysis.  Could you take a look?  Thanks,
> 
> -- 
> Zhanyong
> <pr8426.patch>





More information about the cfe-dev mailing list