Changeset b0d9ff7 for src/ResolvExpr
- Timestamp:
- Sep 1, 2022, 1:27:52 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 12df6fe
- Parents:
- def751f
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
rdef751f rb0d9ff7 862 862 } 863 863 } 864 } 865 866 void postvisit( const ast::QualifiedNameExpr * qualifiedNameExpr ) { 867 auto mangleName = Mangle::mangle(qualifiedNameExpr->var); 868 addCandidate( qualifiedNameExpr, tenv ); 864 869 } 865 870 -
src/ResolvExpr/ConversionCost.cc
rdef751f rb0d9ff7 338 338 } else if ( const EnumInstType * enumInst = dynamic_cast< const EnumInstType * >( dest ) ) { 339 339 const EnumDecl * base_enum = enumInst->baseEnum; 340 if ( const Type * base = base_enum->base ) { // if the base enum has a base (if it is typed)340 if ( const Type * base = base_enum->base ) { 341 341 if ( const BasicType * enumBaseAstBasic = dynamic_cast< const BasicType *> (base) ) { 342 342 conversionCostFromBasicToBasic(basicType, enumBaseAstBasic); … … 632 632 } else if ( const ast::EnumInstType * enumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) { 633 633 const ast::EnumDecl * enumDecl = enumInst->base.get(); 634 if ( const ast::Type * enumType = enumDecl->base.get() ) { 634 if ( enumDecl->isTyped && !enumDecl->base.get() ) { 635 cost = Cost::infinity; 636 } else if ( const ast::Type * enumType = enumDecl->base.get() ) { 635 637 if ( const ast::BasicType * enumTypeAsBasic = dynamic_cast<const ast::BasicType *>(enumType) ) { 636 638 conversionCostFromBasicToBasic( basicType, enumTypeAsBasic ); … … 694 696 const ast::EnumDecl * baseEnum = enumInstType->base; 695 697 if ( const ast::Type * baseType = baseEnum->base ) { 696 cost = costCalc( baseType, dst, srcIsLvalue, symtab, env ); 697 // cost = Cost::safe; 698 costCalc( baseType, dst, srcIsLvalue, symtab, env ); 698 699 } else { 699 700 (void)enumInstType;
Note:
See TracChangeset
for help on using the changeset viewer.