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

Douglas Gregor dgregor at apple.com
Thu Oct 28 11:24:17 PDT 2010


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



More information about the cfe-dev mailing list