Changes in src/ResolvExpr/CastCost.cc [46da46b:251ce80]
- File:
-
- 1 edited
-
src/ResolvExpr/CastCost.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
r46da46b r251ce80 13 13 // Update Count : 9 14 14 // 15 16 #include "CastCost.hpp" 15 17 16 18 #include <cassert> // for assert … … 22 24 #include "ConversionCost.h" // for ConversionCost 23 25 #include "Cost.h" // for Cost, Cost::infinity 26 #include "ResolvExpr/ConversionCost.h" // for conversionCost 27 #include "ResolvExpr/PtrsCastable.hpp" // for ptrsCastable 24 28 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment, EqvClass 29 #include "ResolvExpr/typeops.h" // for ptrsCastable 30 #include "ResolvExpr/Unify.h" // for typesCompatibleIgnoreQualifiers 25 31 #include "SymTab/Indexer.h" // for Indexer 26 32 #include "SynTree/Declaration.h" // for TypeDecl, NamedTypeDecl 27 33 #include "SynTree/Type.h" // for PointerType, Type, TypeInstType 28 #include "typeops.h" // for typesCompatibleIgnoreQualifiers29 34 30 35 #if 0 … … 160 165 if ( 161 166 pointerType->qualifiers <= ptr->qualifiers 162 && typesCompatibleIgnoreQualifiers( pointerType->base, ptr->base, symtab,env )167 && typesCompatibleIgnoreQualifiers( pointerType->base, ptr->base, env ) 163 168 ) { 164 169 cost = Cost::safe; … … 227 232 ) 228 233 229 if ( typesCompatibleIgnoreQualifiers( src, dst, symtab,env ) ) {234 if ( typesCompatibleIgnoreQualifiers( src, dst, env ) ) { 230 235 PRINT( std::cerr << "compatible!" << std::endl; ) 231 if (dynamic_cast<const ast::ZeroType *>(dst) || dynamic_cast<const ast::OneType *>(dst)) {232 return Cost::spec;233 }234 236 return Cost::zero; 235 237 } else if ( dynamic_cast< const ast::VoidType * >( dst ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.