Changeset 1c9568f for src/ResolvExpr


Ignore:
Timestamp:
May 7, 2019, 2:36:10 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
3c1fa71, b1d3ee1
Parents:
9e6d652
Message:

choose integral zero over nullptr for any integral context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r9e6d652 r1c9568f  
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 26 16:33:04 2019
    13 // Update Count     : 24
     12// Last Modified On : Mon May  6 14:18:22 2019
     13// Update Count     : 25
    1414//
    1515
     
    249249                /*_FLDXC*/ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
    250250        }; // costMatrix
     251        static const int maxIntCost = 15;
    251252        // GENERATED END
    252253        static_assert(
     
    461462                        } // if
    462463                } else if ( dynamic_cast< PointerType* >( dest ) ) {
    463                         cost = Cost::safe;
     464                        cost = Cost::zero;
     465                        cost.incSafe( maxIntCost + 2 ); // +1 for zero_t -> int, +1 for disambiguation
    464466                } // if
    465467        }
Note: See TracChangeset for help on using the changeset viewer.