Changeset 5002738
- Timestamp:
- Apr 10, 2018, 3:14:36 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:
- 207b496
- Parents:
- 10246645
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r10246645 r5002738 528 528 } 529 529 if ( dynamic_cast< ReferenceType * >( dst->result ) ) { 530 dst = new AddressExpr( dst ); 530 for (int depth = dst->result->referenceDepth(); depth > 0; depth--) { 531 dst = new AddressExpr( dst ); 532 } 531 533 } else { 532 534 dst = new CastExpr( dst, new ReferenceType( noQualifiers, dst->result->clone() ) ); 533 535 } 534 536 if ( dynamic_cast< ReferenceType * >( src->result ) ) { 535 src = new CastExpr( src, new ReferenceType( noQualifiers, src->result->stripReferences()->clone() ) ); 537 for (int depth = src->result->referenceDepth(); depth > 0; depth--) { 538 src = new AddressExpr( src ); 539 } 536 540 } 537 541 return new ApplicationExpr( VariableExpr::functionPointer( assign ), { dst, src } );
Note: See TracChangeset
for help on using the changeset viewer.