Changeset 70a5acf for src/GenPoly
- Timestamp:
- Apr 17, 2018, 4:26:08 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:
- f74eb47
- Parents:
- 27aca84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r27aca84 r70a5acf 425 425 assert( diff == 0 ); 426 426 // conversion between references of the same depth 427 if ( ResolvExpr::typesCompatible( castExpr->result, castExpr->arg->result, SymTab::Indexer() ) && castExpr->isGenerated ) { 428 // Remove useless generated casts 429 PRINT( 430 std::cerr << "types are compatible, removing cast: " << castExpr << std::endl; 431 std::cerr << "-- " << castExpr->result << std::endl; 432 std::cerr << "-- " << castExpr->arg->result << std::endl; 433 ) 434 Expression * ret = castExpr->arg; 435 castExpr->arg = nullptr; 436 std::swap( castExpr->env, ret->env ); 437 delete castExpr; 438 return ret; 439 } 427 440 return castExpr; 428 441 }
Note: See TracChangeset
for help on using the changeset viewer.