Changes in src/ResolvExpr/CastCost.cpp [85855b0:c92bdcc]
- File:
-
- 1 edited
-
src/ResolvExpr/CastCost.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cpp
r85855b0 rc92bdcc 36 36 namespace ResolvExpr { 37 37 38 Cost castCost(39 const ast::Type * src, const ast::Type * dst, bool srcIsLvalue,40 const ast::SymbolTable & symtab, const ast::TypeEnvironment & env41 );42 43 38 namespace { 44 39 struct CastCost : public ConversionCost { … … 50 45 const ast::TypeEnvironment & env, CostCalculation costFunc ) 51 46 : ConversionCost( dst, srcIsLvalue, symtab, env, costFunc ) {} 52 53 void postvisit( const ast::EnumInstType * enumInst ) {54 cost = conversionCost( enumInst, dst, srcIsLvalue, symtab, env );55 }56 47 57 48 void postvisit( const ast::BasicType * basicType ) { … … 113 104 cost = Cost::unsafe; 114 105 } 106 } 107 } 108 109 void postvist( const ast::EnumInstType * ) { 110 if ( auto basic = dynamic_cast< const ast::BasicType * >(dst) ) { 111 if ( basic->isInteger() ) cost = Cost::unsafe; 115 112 } 116 113 }
Note:
See TracChangeset
for help on using the changeset viewer.