Changes in src/SymTab/Autogen.cc [1f370451:f203a7a]
- File:
-
- 1 edited
-
src/SymTab/Autogen.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r1f370451 rf203a7a 372 372 continue; 373 373 } 374 // do not carry over field's attributes to parameter type 375 Type * paramType = field->get_type()->clone(); 376 deleteAll( paramType->attributes ); 377 paramType->attributes.clear(); 378 // add a parameter corresponding to this field 379 memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr ) ); 374 memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, 0, field->get_type()->clone(), 0 ) ); 380 375 FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting ); 381 376 makeFieldCtorBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), ctor ); … … 508 503 break; 509 504 } 510 // do not carry over field's attributes to parameter type 511 Type * paramType = field->get_type()->clone(); 512 deleteAll( paramType->attributes ); 513 paramType->attributes.clear(); 514 // add a parameter corresponding to this field 515 memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr ) ); 505 memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, field->get_type()->clone(), nullptr ) ); 516 506 FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting ); 517 507 ObjectDecl * srcParam = strict_dynamic_cast<ObjectDecl *>( ctor->type->parameters.back() );
Note:
See TracChangeset
for help on using the changeset viewer.