Changeset 330d933 for src/GenPoly/Lvalue.cc
- Timestamp:
- Aug 25, 2019, 8:48:51 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2aab69b, 5a43ab8
- Parents:
- f9bf142 (diff), bbb1b35 (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/GenPoly/Lvalue.cc
rf9bf142 r330d933 363 363 int diff = depth1 - depth2; 364 364 365 if ( diff > 0 && ! srcType->get_lvalue() ) {365 if ( diff > 0 && ! castExpr->arg->get_lvalue() ) { 366 366 // rvalue to reference conversion -- introduce temporary 367 367 // know that reference depth of cast argument is 0, need to introduce n temporaries for reference depth of n, e.g. … … 407 407 ret = new AddressExpr( ret ); 408 408 } 409 if ( srcType->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) {409 if ( castExpr->arg->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) { 410 410 // must keep cast if cast-to type is different from the actual type 411 411 castExpr->arg = ret;
Note: See TracChangeset
for help on using the changeset viewer.