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

Yang Chen chenyang at cs.utah.edu
Sun May 27 18:29:24 PDT 2012


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.

- Yang
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: RecursiveASTVisitor.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120527/6aac937e/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: RecursiveASTVisitorTest.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120527/6aac937e/attachment-0001.ksh>


More information about the cfe-commits mailing list