Missing info in AST for CXXConstructExpr

Richard Smith richard at metafoo.co.uk
Wed Jan 28 14:07:59 PST 2015


Fixed in r227377.

On Wed, Jan 28, 2015 at 2:27 AM, Abramo Bagnara <abramo.bagnara at bugseng.com>
wrote:

> Il 27/01/2015 02:50, Richard Smith ha scritto:
>
> >
> > There should be a CXXFunctionalCastExpr (with cast kind CK_NoOp) between
> > the MaterializeTemporaryExpr and its contained CXXStdInitializerListExpr:
> >
> >     `-CallExpr 0x7962cd0 <line:11:3, col:9> 'void'
> >       |-ImplicitCastExpr 0x7962cb8 <col:3> 'void
> > (*)(class std::initializer_list<int>)' <FunctionToPointerDecay>
> >       | `-DeclRefExpr 0x7962c60 <col:3> 'void
> > (class std::initializer_list<int>)' lvalue [...]
> >       `-CXXConstructExpr 0x7962d18 <col:6, col:8> [...]
> >         `-MaterializeTemporaryExpr 0x7962d00 <col:6, col:8>
> > 'class std::initializer_list<int>' xvalue
> > *          `-CXXFunctionalCastExpr 0x... <NoOp>
> > *            `-CXXStdInitializerListExpr 0x7962910 <col:6,
> > col:8> 'T':'class std::initializer_list<int>'
> >               `-MaterializeTemporaryExpr 0x79628f8 <col:6, col:8>
> > 'const int [1]' xvalue
> >                 `-InitListExpr 0x79628b0 <col:6, col:8> 'const int [1]'
> >                   `-IntegerLiteral 0x7962848 <col:7> 'int' 0
> >
> > This case appears to be missing from Sema::BuildCXXTypeConstructExpr; it
> > looks like it assumes that initialization will give us either a
> > CXXConstructExpr or an InitListExpr.
>
> Filed as http://llvm.org/bugs/show_bug.cgi?id=22367 with reference to
> your proposed solution.
>
>
> --
> Abramo Bagnara
>
> BUGSENG srl - http://bugseng.com
> mailto:abramo.bagnara at bugseng.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150128/4b729194/attachment.html>


More information about the cfe-commits mailing list