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