Ignore:
Timestamp:
Nov 28, 2017, 11:49:12 AM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, 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:
36982fc, 6c2ba38, d5a52cc
Parents:
8a78dd3 (diff), 8eb348a (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    r8a78dd3 r8a0a64d9  
    372372                                continue;
    373373                        }
    374                         memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, 0, field->get_type()->clone(), 0 ) );
     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 ) );
    375380                        FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    376381                        makeFieldCtorBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), ctor );
     
    503508                                break;
    504509                        }
    505                         memCtorType->parameters.push_back( new ObjectDecl( field->name, Type::StorageClasses(), LinkageSpec::Cforall, nullptr, field->get_type()->clone(), nullptr ) );
     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 ) );
    506516                        FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting );
    507517                        ObjectDecl * srcParam = strict_dynamic_cast<ObjectDecl *>( ctor->type->parameters.back() );
Note: See TracChangeset for help on using the changeset viewer.