Changeset 2164637


Ignore:
Timestamp:
Jun 2, 2017, 5:05:00 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
f94ca7e
Parents:
b1d4d60
Message:

don't clone member in conversion of OffsetPackExpr? to OffsetofExpr? [fixes #15]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rb1d4d60 r2164637  
    18061806                                        std::list< Initializer* > inits;
    18071807                                        for ( std::list< Declaration* >::const_iterator member = baseMembers.begin(); member != baseMembers.end(); ++member ) {
    1808                                                 DeclarationWithType *memberDecl;
    1809                                                 if ( DeclarationWithType *origMember = dynamic_cast< DeclarationWithType* >( *member ) ) {
    1810                                                         memberDecl = origMember->clone();
     1808                                                if ( DeclarationWithType *memberDecl = dynamic_cast< DeclarationWithType* >( *member ) ) {
     1809                                                        inits.push_back( new SingleInit( new OffsetofExpr( ty->clone(), memberDecl ) ) );
    18111810                                                } else {
    1812                                                         memberDecl = new ObjectDecl( (*member)->get_name(), Type::StorageClasses(), LinkageSpec::Cforall, 0, offsetType->clone(), 0 );
     1811                                                        assertf( false, "Requesting offset of Non-DWT member: %s", toString( *member ).c_str() );
    18131812                                                }
    1814                                                 inits.push_back( new SingleInit( new OffsetofExpr( ty->clone(), memberDecl ) ) );
    18151813                                        }
    18161814
Note: See TracChangeset for help on using the changeset viewer.