Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    rc1ed2ee rb69233ac  
    3939#include "AST/SymbolTable.hpp"
    4040#include "AST/Type.hpp"
    41 #include "Common/utility.h"       // for move, copy
    4241#include "SymTab/Mangler.h"
    4342#include "SymTab/Validate.h"      // for validateType
     
    4746
    4847namespace ResolvExpr {
     48
     49using std::move;
     50
     51/// partner to move that copies any copyable type
     52template<typename T>
     53T copy( const T & x ) { return x; }
    4954
    5055const ast::Expr * referenceToRvalueConversion( const ast::Expr * expr, Cost & cost ) {
     
    5257                // cast away reference from expr
    5358                cost.incReference();
    54                 return new ast::CastExpr{ expr, expr->result->stripReferences() };
     59                return new ast::CastExpr{ expr->location, expr, expr->result->stripReferences() };
    5560        }
    5661       
     
    121126                        ast::ptr< ast::Type > newType = paramType;
    122127                        env.apply( newType );
    123                         return new ast::CastExpr{ arg, newType };
     128                        return new ast::CastExpr{ arg->location, arg, newType };
    124129
    125130                        // xxx - *should* be able to resolve this cast, but at the moment pointers are not
     
    788793                       
    789794                        if ( aggrType.as< ast::ReferenceType >() ) {
    790                                 aggrExpr = new ast::CastExpr{ aggrExpr, aggrType->stripReferences() };
     795                                aggrExpr =
     796                                        new ast::CastExpr{ aggrExpr->location, aggrExpr, aggrType->stripReferences() };
    791797                        }
    792798
Note: See TracChangeset for help on using the changeset viewer.