Changeset d958834b for src/ResolvExpr
- Timestamp:
- Jul 25, 2022, 12:29:40 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- b729c01
- Parents:
- d4b37ab
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
rd4b37ab rd958834b 897 897 } 898 898 899 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer); 900 else if (const ast::EnumInstType * enumInst = argType.as<ast::EnumInstType>()) {901 const ast::EnumDecl * enumDecl = enumInst->base;902 if ( const ast::Type* enumType = enumDecl->base ) {903 // instance of enum (T) is a instance of type (T)904 funcFinder.otypeKeys.insert(Mangle::mangle(enumType, Mangle::NoGenericParams | Mangle::Type));905 } else {906 // instance of an untyped enum is techically int907 funcFinder.otypeKeys.insert(Mangle::mangle(enumDecl, Mangle::NoGenericParams | Mangle::Type));908 }909 }899 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer); 900 // else if (const ast::EnumInstType * enumInst = argType.as<ast::EnumInstType>()) { 901 // const ast::EnumDecl * enumDecl = enumInst->base; // Here 902 // if ( const ast::Type* enumType = enumDecl->base ) { 903 // // instance of enum (T) is a instance of type (T) 904 // funcFinder.otypeKeys.insert(Mangle::mangle(enumType, Mangle::NoGenericParams | Mangle::Type)); 905 // } else { 906 // // instance of an untyped enum is techically int 907 // funcFinder.otypeKeys.insert(Mangle::mangle(enumDecl, Mangle::NoGenericParams | Mangle::Type)); 908 // } 909 // } 910 910 else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type)); 911 911 } -
src/ResolvExpr/ConversionCost.cc
rd4b37ab rd958834b 695 695 if ( const ast::Type * baseType = baseEnum->base ) { 696 696 cost = costCalc( baseType, dst, srcIsLvalue, symtab, env ); 697 // cost = Cost::safe; 697 698 } else { 698 699 (void)enumInstType;
Note: See TracChangeset
for help on using the changeset viewer.