Changeset 9058414
- Timestamp:
- Dec 18, 2017, 2:11:13 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, resolv-new, with_gc
- Children:
- 7641b6c
- Parents:
- 74cdfb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleAssignment.cc
r74cdfb1 r9058414 272 272 // args.push_back( new AddressExpr( new VariableExpr( left ) ) ); 273 273 if ( right ) args.push_back( new VariableExpr( right ) ); 274 return new UntypedExpr( new NameExpr( fname ), args ); 274 if ( left->type->referenceDepth() > 1 && CodeGen::isConstructor( fname ) ) { 275 args.front() = new AddressExpr( args.front() ); 276 if ( right ) args.back() = new AddressExpr( args.back() ); 277 return new UntypedExpr( new NameExpr( "?=?" ), args ); 278 } else { 279 return new UntypedExpr( new NameExpr( fname ), args ); 280 } 275 281 } 276 282 … … 291 297 if ( ! dynamic_cast< ReferenceType * >( expr->get_result() ) ) { 292 298 ConstructorInit * ctorInit = InitTweak::genCtorInit( ret ); 293 ret-> set_init( ctorInit );299 ret->init = ctorInit; 294 300 ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object 295 301 PassVisitor<EnvRemover> rm; // remove environments from subexpressions of StmtExprs
Note: See TracChangeset
for help on using the changeset viewer.