- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r4d2d45f9 rd76c588 28 28 #include "Alternative.h" // for AltList, Alternative 29 29 #include "AlternativeFinder.h" 30 #include "AST/Expr.hpp" 31 #include "AST/Type.hpp" 30 32 #include "Common/SemanticError.h" // for SemanticError 31 33 #include "Common/utility.h" // for deleteAll, printAll, CodeLocation … … 222 224 cost.incReference(); 223 225 } 226 } 227 228 const ast::Expr * referenceToRvalueConversion( const ast::Expr * expr, Cost & cost ) { 229 if ( expr->result.as< ast::ReferenceType >() ) { 230 // cast away reference from expr 231 cost.incReference(); 232 return new ast::CastExpr{ expr->location, expr, expr->result->stripReferences() }; 233 } 234 235 return expr; 224 236 } 225 237
Note: See TracChangeset
for help on using the changeset viewer.