Changeset 4d4882a for src/InitTweak/FixInit.cc
- Timestamp:
- Sep 1, 2016, 4:53:22 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
- 44f6341
- Parents:
- fba44f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
rfba44f8 r4d4882a 787 787 UntypedExpr * deref = new UntypedExpr( new NameExpr( "*?" ) ); 788 788 deref->get_args().push_back( new VariableExpr( thisParam ) ); 789 InitExpander srcParam( (Initializer *)NULL ); // xxx - if copy ctor, need to pass appropriate argument - second param of this function dot member 789 790 Expression * arg2 = 0; 791 if ( isCopyConstructor( function ) ) { 792 // if copy ctor, need to pass second-param-of-this-function.member 793 std::list< DeclarationWithType * > & params = function->get_functionType()->get_parameters(); 794 assert( params.size() == 2 ); 795 arg2 = new MemberExpr( member, new VariableExpr( params.back() ) ); 796 } 797 InitExpander srcParam( arg2 ); 790 798 SymTab::genImplicitCall( srcParam, new MemberExpr( member, deref ), function->get_name(), back_inserter( stmt ), member, isCtor ); 791 799 … … 832 840 handleFirstParam( firstParam ); 833 841 } 834 } else if ( fname == "?=?" && isIntrinsicCallExpr( appExpr ) ) {835 // forgive use of intrinsic assignment to construct, since instrinsic constructors836 // codegen as assignment anyway.837 assert( appExpr->get_args().size() == 2 );838 handleFirstParam( appExpr->get_args().front() );839 842 } 840 843
Note: See TracChangeset
for help on using the changeset viewer.