Changeset f5ef08c for src/SymTab
- Timestamp:
- Mar 18, 2016, 1:56:41 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 6943f051
- Parents:
- dac0aa9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
rdac0aa9 rf5ef08c 261 261 if ( parameter != params.end() ) { 262 262 // matching parameter, initialize field with copy ctor 263 std::cerr << "matching parameter - copy ctor" << std::endl;264 263 Expression *srcselect = new VariableExpr(*parameter); 265 264 makeStructMemberOp( dstParam, srcselect, field, func, genericSubs, isGeneric ); 266 265 ++parameter; 267 266 } else { 268 std::cerr << "no matching parameter - default ctor" << std::endl;269 267 // no matching parameter, initialize field with default ctor 270 268 makeStructMemberOp( dstParam, NULL, field, func, genericSubs, isGeneric ); … … 320 318 321 319 // create constructors which take each member type as a parameter. 322 // we might be able to eventually collapse this into a single function323 // which uses default parameters320 // for example, for struct A { int x, y; }; generate 321 // void ?{}(A *, int) and void ?{}(A *, int, int) 324 322 std::list<Declaration *> memCtors; 325 323 FunctionType * memCtorType = ctorType->clone();
Note: See TracChangeset
for help on using the changeset viewer.