Ignore:
Timestamp:
Nov 28, 2017, 10:21:50 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
9c35431
Parents:
c0d00b6 (diff), c029f4d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rc0d00b6 rc6e2c18  
    375375                                continue;
    376376                        }
    377                         memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, 0, field->get_type()->clone(), 0 ) );
     377                        // do not carry over field's attributes to parameter type
     378                        Type * paramType = field->get_type()->clone();
     379                        deleteAll( paramType->attributes );
     380                        paramType->attributes.clear();
     381                        // add a parameter corresponding to this field
     382                        memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr ) );
    378383                        FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    379384                        makeFieldCtorBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), ctor );
     
    506511                                break;
    507512                        }
    508                         memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, field->get_type()->clone(), nullptr ) );
     513                        // do not carry over field's attributes to parameter type
     514                        Type * paramType = field->get_type()->clone();
     515                        deleteAll( paramType->attributes );
     516                        paramType->attributes.clear();
     517                        // add a parameter corresponding to this field
     518                        memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, paramType, nullptr ) );
    509519                        FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    510520                        ObjectDecl * srcParam = strict_dynamic_cast<ObjectDecl *>( ctor->type->parameters.back() );
Note: See TracChangeset for help on using the changeset viewer.