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/ResolvExpr/CandidateFinder.cpp

    r3c6e417 r54dd994  
    3939#include "AST/SymbolTable.hpp"
    4040#include "AST/Type.hpp"
     41#include "Common/utility.h"       // for move, copy
    4142#include "SymTab/Mangler.h"
    4243#include "SymTab/Validate.h"      // for validateType
     
    4647
    4748namespace 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; }
    5449
    5550const ast::Expr * referenceToRvalueConversion( const ast::Expr * expr, Cost & cost ) {
     
    5752                // cast away reference from expr
    5853                cost.incReference();
    59                 return new ast::CastExpr{ expr->location, expr, expr->result->stripReferences() };
     54                return new ast::CastExpr{ expr, expr->result->stripReferences() };
    6055        }
    6156       
     
    126121                        ast::ptr< ast::Type > newType = paramType;
    127122                        env.apply( newType );
    128                         return new ast::CastExpr{ arg->location, arg, newType };
     123                        return new ast::CastExpr{ arg, newType };
    129124
    130125                        // xxx - *should* be able to resolve this cast, but at the moment pointers are not
     
    793788                       
    794789                        if ( aggrType.as< ast::ReferenceType >() ) {
    795                                 aggrExpr =
    796                                         new ast::CastExpr{ aggrExpr->location, aggrExpr, aggrType->stripReferences() };
     790                                aggrExpr = new ast::CastExpr{ aggrExpr, aggrType->stripReferences() };
    797791                        }
    798792
Note: See TracChangeset for help on using the changeset viewer.