[PATCH] fix parentheses location in a CXXConstructExpr

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 01:07:58 PDT 2015


On Sat, Aug 29, 2015 at 12:23 PM Olivier Goffart via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Hi,
>
> Please review the attached patch.
>
> In Sema::BuildCXXFunctionalCastExpr, if the class has a destructor, the
> Op.SrcExpr might be a CXXBindTemporaryExpr which we need to unwrap.
>
> In the testcase, the first new CHECK worked (because A does not have a
> destructor),  but the second CHECK failed (did not include the last
> parenthese) because D has a destructor.
>
> I used dyn_cast_or_null just to be safe, becasue i don't know if it is
> possible for the BindExpr->getSubExpr() to be null.
>

Do you know why the added test for A says 'class foo::A' instead of
'foo::A' as the other tests do in that file?


>
> Thanks
> --
> Olivier
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150831/1b698d51/attachment.html>


More information about the cfe-commits mailing list