Changeset b8524ca for src/ResolvExpr
- Timestamp:
- Jun 20, 2019, 6:50:42 PM (5 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:
- 9af00d23
- Parents:
- 234b1cb
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r234b1cb rb8524ca 57 57 // cast away reference from expr 58 58 cost.incReference(); 59 return new ast::CastExpr{ expr ->location, expr, expr->result->stripReferences() };59 return new ast::CastExpr{ expr, expr->result->stripReferences() }; 60 60 } 61 61 … … 126 126 ast::ptr< ast::Type > newType = paramType; 127 127 env.apply( newType ); 128 return new ast::CastExpr{ arg ->location, arg, newType };128 return new ast::CastExpr{ arg, newType }; 129 129 130 130 // xxx - *should* be able to resolve this cast, but at the moment pointers are not … … 793 793 794 794 if ( aggrType.as< ast::ReferenceType >() ) { 795 aggrExpr = 796 new ast::CastExpr{ aggrExpr->location, aggrExpr, aggrType->stripReferences() }; 795 aggrExpr = new ast::CastExpr{ aggrExpr, aggrType->stripReferences() }; 797 796 } 798 797 -
src/ResolvExpr/Resolver.cc
r234b1cb rb8524ca 1109 1109 1110 1110 // set up and resolve expression cast to void 1111 ast::CastExpr * untyped = new ast::CastExpr{ expr ->location, expr};1111 ast::CastExpr * untyped = new ast::CastExpr{ expr }; 1112 1112 CandidateRef choice = findUnfinishedKindExpression( 1113 1113 untyped, symtab, "", anyCandidate, ResolvMode::withAdjustment() ); … … 1161 1161 ) { 1162 1162 assert( untyped && type ); 1163 ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped ->location, untyped, type };1163 ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped, type }; 1164 1164 ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, symtab ); 1165 1165 removeExtraneousCast( newExpr, symtab );
Note: See TracChangeset
for help on using the changeset viewer.