Ignore:
Timestamp:
Jun 24, 2019, 10:30:47 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Explode.cc

    r3c6e417 r54dd994  
    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->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 } };
    139138                        } else {
    140139                                return new ast::TupleExpr( tupleExpr->location, std::move( exprs ) );
     
    145144                } else {
    146145                        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 } };
    149147                }
    150148        }
     
    164162                        castAdded = false;
    165163                        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 };
    167165                }
    168166                return newNode;
     
    183181        expr = expr->accept( exploder );
    184182        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 } };
    187184        }
    188185        return expr;
Note: See TracChangeset for help on using the changeset viewer.