- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
rd76c588 r4d2d45f9 28 28 #include "Alternative.h" // for AltList, Alternative 29 29 #include "AlternativeFinder.h" 30 #include "AST/Expr.hpp"31 #include "AST/Type.hpp"32 30 #include "Common/SemanticError.h" // for SemanticError 33 31 #include "Common/utility.h" // for deleteAll, printAll, CodeLocation … … 224 222 cost.incReference(); 225 223 } 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 expr231 cost.incReference();232 return new ast::CastExpr{ expr->location, expr, expr->result->stripReferences() };233 }234 235 return expr;236 224 } 237 225
Note: See TracChangeset
for help on using the changeset viewer.