Ignore:
Timestamp:
Jul 4, 2019, 10:57:41 AM (5 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1f1c102
Parents:
03bf5c8
Message:

An else-if for ZeroType? ended up in OneType? instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r03bf5c8 r2f98fb2  
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 24 13:33:00 2019
    13 // Update Count     : 26
     12// Last Modified On : Thr Jul  4 10:56:00 2019
     13// Update Count     : 27
    1414//
    1515
     
    764764                        cost.incSign( signMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ] );
    765765                }
     766        } else if ( dynamic_cast< const ast::PointerType * >( dst ) ) {
     767                cost = Cost::zero;
     768                // +1 for zero_t ->, +1 for disambiguation
     769                cost.incSafe( maxIntCost + 2 );
    766770        }
    767771}
     
    781785                        cost.incSign( signMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ] );
    782786                }
    783         } else if ( dynamic_cast< const ast::PointerType * >( dst ) ) {
    784                 cost = Cost::zero;
    785                 cost.incSafe( maxIntCost + 2 );
    786787        }
    787788}
Note: See TracChangeset for help on using the changeset viewer.