Changeset 00ac42e for src/ResolvExpr/PtrsCastable.cc
- Timestamp:
- Jun 1, 2018, 2:54:55 PM (7 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:
- 262bd63
- Parents:
- 41e16b1
- git-author:
- Aaron Moss <a3moss@…> (05/31/18 16:24:49)
- git-committer:
- Aaron Moss <a3moss@…> (06/01/18 14:54:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PtrsCastable.cc
r41e16b1 r00ac42e 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.