Changes in src/Tuples/Explode.cc [b8524ca:b910d15]
- File:
-
- 1 edited
-
src/Tuples/Explode.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.cc
rb8524ca rb910d15 133 133 if ( first ) { 134 134 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() ) ); 138 139 } else { 139 140 return new ast::TupleExpr( tupleExpr->location, std::move( exprs ) ); … … 144 145 } else { 145 146 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() ) ); 147 149 } 148 150 } … … 162 164 castAdded = false; 163 165 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 ); 165 167 } 166 168 return newNode; … … 181 183 expr = expr->accept( exploder ); 182 184 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() ) ); 184 187 } 185 188 return expr;
Note:
See TracChangeset
for help on using the changeset viewer.