Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Explode.cc

    rb8524ca rb910d15  
    133133                        if ( first ) {
    134134                                castAdded = true;
    135                                 const ast::Expr * tuple = new ast::TupleExpr{
    136                                         tupleExpr->location, std::move( exprs ) };
    137                                 return new ast::CastExpr{ tuple, new ast::ReferenceType{ tuple->result } };
     135                                const ast::Expr * tuple = new ast::TupleExpr(
     136                                        tupleExpr->location, std::move( exprs ) );
     137                                return new ast::CastExpr( tuple->location,
     138                                        tuple, new ast::ReferenceType( tuple->result.get(), ast::CV::Qualifiers() ) );
    138139                        } else {
    139140                                return new ast::TupleExpr( tupleExpr->location, std::move( exprs ) );
     
    144145                } else {
    145146                        castAdded = true;
    146                         return new ast::CastExpr{ expr, new ast::ReferenceType{ expr->result } };
     147                        return new ast::CastExpr( expr->location, expr,
     148                                new ast::ReferenceType( expr->result, ast::CV::Qualifiers() ) );
    147149                }
    148150        }
     
    162164                        castAdded = false;
    163165                        const ast::Type * newType = getReferenceBase( newNode->result );
    164                         return new ast::CastExpr{ newNode->location, node, newType };
     166                        return new ast::CastExpr( newNode->location, node, newType );
    165167                }
    166168                return newNode;
     
    181183        expr = expr->accept( exploder );
    182184        if ( ! exploder.pass.foundUniqueExpr ) {
    183                 expr = new ast::CastExpr{ expr, new ast::ReferenceType{ expr->result } };
     185                expr = new ast::CastExpr( expr->location, expr,
     186                        new ast::ReferenceType( expr->result, ast::CV::Qualifiers() ) );
    184187        }
    185188        return expr;
Note: See TracChangeset for help on using the changeset viewer.