Changeset 54dd994 for src/Tuples/Explode.cc
- Timestamp:
- Jun 24, 2019, 10:30:47 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 84917e2
- Parents:
- 3c6e417 (diff), 9e0a360 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.cc
r3c6e417 r54dd994 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->location, 138 tuple, new ast::ReferenceType( tuple->result.get(), ast::CV::Qualifiers() ) ); 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 } }; 139 138 } else { 140 139 return new ast::TupleExpr( tupleExpr->location, std::move( exprs ) ); … … 145 144 } else { 146 145 castAdded = true; 147 return new ast::CastExpr( expr->location, expr, 148 new ast::ReferenceType( expr->result, ast::CV::Qualifiers() ) ); 146 return new ast::CastExpr{ expr, new ast::ReferenceType{ expr->result } }; 149 147 } 150 148 } … … 164 162 castAdded = false; 165 163 const ast::Type * newType = getReferenceBase( newNode->result ); 166 return new ast::CastExpr ( newNode->location, node, newType );164 return new ast::CastExpr{ newNode->location, node, newType }; 167 165 } 168 166 return newNode; … … 183 181 expr = expr->accept( exploder ); 184 182 if ( ! exploder.pass.foundUniqueExpr ) { 185 expr = new ast::CastExpr( expr->location, expr, 186 new ast::ReferenceType( expr->result, ast::CV::Qualifiers() ) ); 183 expr = new ast::CastExpr{ expr, new ast::ReferenceType{ expr->result } }; 187 184 } 188 185 return expr;
Note:
See TracChangeset
for help on using the changeset viewer.