On Tue, May 29, 2012 at 11:42 PM, Yang Chen <[email protected]> wrote:
> ** > Hi Richard, > > > On 5/29/12 6:41 PM, Richard Smith wrote: > > Hi, > > On Sun, May 27, 2012 at 6:29 PM, Yang Chen <[email protected]> wrote: > >> Seems RecursiveASTVisitor has a bug which could cause duplicated visits >> to default arguments for a class template. For example, given the code >> below: >> >> class X; >> template<class T = X> class Y; >> template<class T> class Y {}; >> >> The default argument 'X' will be visited twice. The attached patch fixed >> the problem. > > > Thanks, the patch looks good. We should also handle > NonTypeTemplateParmDecl in the same way. > > > Fixed. > > > > >> I also attached a small testcase. Thanks. > > > (It's conventional to put the code and test changes in the same patch > file.) Tests for the other two flavours of template parameters would be > great (you will probably need to add new ExpectedLocationVisitor subclasses > to RecursiveASTVisitorTest to test those). > > > Thanks for the info. I attached a new patch which includes two more test > cases for TemplateTemplateParmDecl and NonTypeTemplateParmDecl. > Thanks! Committed as r157723.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
