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

Ted Kremenek kremenek at apple.com
Thu Oct 28 11:16:47 PDT 2010


On Oct 27, 2010, at 11:15 PM, Zhanyong Wan (λx.x x) wrote:

>> (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.

Hi Zhanyong,

I don't think it would quite invasive to stop analyzing template definitions, as it is the right thing to do.  My concern is that your patch really only addresses specific symptoms, but not the general problem.  If we don't intend to analyze template definitions, then we will likely just keep on hitting corner cases like these.  The right thing is to have AnalysisConsumer not even construct GRExprEngine objects when faced with a template definition, and then in turn have GRExprEngine also do a similar sanity check.

Ted



More information about the cfe-dev mailing list