Ignore:
Timestamp:
Nov 24, 2017, 9:02:40 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
cf966b5
Parents:
88ef2af (diff), 3de176d (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/SynTree/Expression.cc

    r88ef2af rf7a4f89  
    8888        Type * type = var->get_type()->clone();
    8989        type->set_lvalue( true );
     90
     91        // xxx - doesn't quite work yet - get different alternatives with the same cost
     92
     93        // // enumerators are not lvalues
     94        // if ( EnumInstType * inst = dynamic_cast< EnumInstType * >( var->get_type() ) ) {
     95        //      assert( inst->baseEnum );
     96        //      EnumDecl * decl = inst->baseEnum;
     97        //      for ( Declaration * member : decl->members ) {
     98        //              if ( member == _var ) {
     99        //                      type->set_lvalue( false );
     100        //              }
     101        //      }
     102        // }
     103
    90104        set_result( type );
    91105}
     
    324338                        return makeSub( refType->get_base() );
    325339                } else if ( StructInstType * aggInst = dynamic_cast< StructInstType * >( t ) ) {
    326                         return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
     340                        return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->parameters.begin() );
    327341                } else if ( UnionInstType * aggInst = dynamic_cast< UnionInstType * >( t ) ) {
    328                         return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
     342                        return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->parameters.begin() );
    329343                } else {
    330344                        assertf( false, "makeSub expects struct or union type for aggregate, but got: %s", toString( t ).c_str() );
Note: See TracChangeset for help on using the changeset viewer.