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