- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
rc1ed2ee rb69233ac 39 39 #include "AST/SymbolTable.hpp" 40 40 #include "AST/Type.hpp" 41 #include "Common/utility.h" // for move, copy42 41 #include "SymTab/Mangler.h" 43 42 #include "SymTab/Validate.h" // for validateType … … 47 46 48 47 namespace ResolvExpr { 48 49 using std::move; 50 51 /// partner to move that copies any copyable type 52 template<typename T> 53 T copy( const T & x ) { return x; } 49 54 50 55 const ast::Expr * referenceToRvalueConversion( const ast::Expr * expr, Cost & cost ) { … … 52 57 // cast away reference from expr 53 58 cost.incReference(); 54 return new ast::CastExpr{ expr , expr->result->stripReferences() };59 return new ast::CastExpr{ expr->location, expr, expr->result->stripReferences() }; 55 60 } 56 61 … … 121 126 ast::ptr< ast::Type > newType = paramType; 122 127 env.apply( newType ); 123 return new ast::CastExpr{ arg , newType };128 return new ast::CastExpr{ arg->location, arg, newType }; 124 129 125 130 // xxx - *should* be able to resolve this cast, but at the moment pointers are not … … 788 793 789 794 if ( aggrType.as< ast::ReferenceType >() ) { 790 aggrExpr = new ast::CastExpr{ aggrExpr, aggrType->stripReferences() }; 795 aggrExpr = 796 new ast::CastExpr{ aggrExpr->location, aggrExpr, aggrType->stripReferences() }; 791 797 } 792 798
Note:
See TracChangeset
for help on using the changeset viewer.