Changeset adb6a4f1 for src/ResolvExpr/PtrsCastable.cc
- Timestamp:
- Jun 1, 2018, 7:53:55 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- d56cc219
- Parents:
- ecae5860 (diff), 262bd63 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PtrsCastable.cc
recae5860 radb6a4f1 57 57 return -1; 58 58 } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( src ) ) { 59 EqvClass eqvClass;60 59 if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) { 61 60 if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) { … … 64 63 } // if 65 64 } //if 66 } else if ( env.lookup( typeInst->get_name(), eqvClass) ) {67 if ( eqvClass .data.kind == TypeDecl::Ftype ) {65 } else if ( const EqvClass *eqvClass = env.lookup( typeInst->get_name() ) ) { 66 if ( eqvClass->data.kind == TypeDecl::Ftype ) { 68 67 return -1; 69 68 } // if … … 79 78 int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) { 80 79 if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) { 81 EqvClass eqvClass; 82 if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) { 80 if ( const EqvClass *eqvClass = env.lookup( destAsTypeInst->get_name() ) ) { 83 81 // xxx - should this be ptrsCastable? 84 return ptrsAssignable( src, eqvClass .type, env );82 return ptrsAssignable( src, eqvClass->type, env ); 85 83 } // if 86 84 } // if
Note: See TracChangeset
for help on using the changeset viewer.