Ignore:
Timestamp:
Mar 30, 2017, 5:21:07 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
936a287
Parents:
89ae7f4
Message:

remove duplication in compound literal, support aggregate-type compound literals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r89ae7f4 rfbcde64  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 16:39:15 2017
    13 // Update Count     : 353
     12// Last Modified On : Thu Mar 30 16:50:13 2017
     13// Update Count     : 357
    1414//
    1515
     
    222222                CompoundLiteral compoundliteral;
    223223
     224                HoistStruct::hoistStruct( translationUnit );
    224225                EliminateTypedef::eliminateTypedef( translationUnit );
    225                 HoistStruct::hoistStruct( translationUnit );
    226226                ReturnTypeFixer::fix( translationUnit ); // must happen before autogen
    227227                acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
     
    824824                static UniqueName indexName( "_compLit" );
    825825
    826                 ObjectDecl *tempvar = new ObjectDecl( indexName.newName(), storageClasses, LinkageSpec::C, 0, compLitExpr->get_type(), compLitExpr->get_initializer() );
    827                 compLitExpr->set_type( 0 );
     826                ObjectDecl *tempvar = new ObjectDecl( indexName.newName(), storageClasses, LinkageSpec::C, 0, compLitExpr->get_result(), compLitExpr->get_initializer() );
     827                compLitExpr->set_result( 0 );
    828828                compLitExpr->set_initializer( 0 );
    829829                delete compLitExpr;
Note: See TracChangeset for help on using the changeset viewer.