[cfe-commits] [PATCH] Fix for CXXConstructExpr printing when implicit default argument is used.

Will Wilson will at indefiant.com
Sun Feb 3 14:41:42 PST 2013


Anyone? Should be quick and low risk if anyone has a few minutes.

Thanks!
Will.


On 31 January 2013 01:46, Will Wilson <will at indefiant.com> wrote:

> Thanks for committing the last patch however there's another edge case not
> covered by the previous patch:
>
>   struct VirualDestrClass
>   {
>     VirualDestrClass(int arg);
>     virtual ~VirualDestrClass();
>   };
>
>   struct ConstrWithCleanupsClass
>   {
>     ConstrWithCleanupsClass(const VirualDestrClass& cplx =
> VirualDestrClass(42));
>   };
>
>   ConstrWithCleanupsClass cwcNoArg;
>
> Here cwcNoArg has it's CXXConstructExpr wrapped in a ExprWithCleanups (to
> handle the cleanup of the temporary). As the old code didn't look through
> the implicit expressions the printed result was this:
>
>   ConstrWithCleanupsClass cwcNoArg();
>
> Patch attached with fix and new test-cases for review and commit if it
> LGTY. All tests passed locally.
>
> - Will.
>



-- 
*Indefiant Ltd.*
*
*
Firsby Lodge, New Main Road, Scamblesby, Louth, Lincs LN11 9XH UK
*Tel: +44 20 8123 7663 England Registered No. 07936820 VAT No. **128556202*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130203/d199b0cd/attachment.html>


More information about the cfe-commits mailing list