Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rba3706f r54c9000  
    377377                        paramType->attributes.clear();
    378378                        // add a parameter corresponding to this field
    379                         memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr ) );
     379                        ObjectDecl * param = new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr );
     380                        cloneAll_if( field->attributes, param->attributes, [](Attribute * attr) { return attr->isValidOnFuncParam(); } );
     381                        memCtorType->parameters.push_back( param );
    380382                        FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    381383                        makeFieldCtorBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), ctor );
Note: See TracChangeset for help on using the changeset viewer.