[cfe-commits] [Patch] - Avoid duplicated visits to default arguments for class templates

Manuel Klimek klimek at google.com
Tue May 29 00:24:35 PDT 2012


On Mon, May 28, 2012 at 3:29 AM, Yang Chen <chenyang at cs.utah.edu> wrote:

> Hi,
>
> 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. I also attached a small testcase. Thanks.


Looks good from my side; perhaps Richard or Daniel can come up with more
test cases?

Cheers,
/Manuel


>
>
> - Yang
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120529/07b0ee08/attachment.html>


More information about the cfe-commits mailing list