Changeset cad355a for src/ResolvExpr


Ignore:
Timestamp:
Jul 11, 2016, 5:20:03 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
919d1ba
Parents:
0b4d93ab
Message:

generated field constructors for structs with const members no longer cause an error, other generated constructors and destructors construct and destruct const members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r0b4d93ab rcad355a  
    550550                        // get Variable <array>, then get the base type of the VariableExpr - this is the type that needs to be fixed
    551551                        Expression * arr = InitTweak::getCallArg( plusExpr, 0 );
    552                         assert( dynamic_cast< VariableExpr * >( arr ) );
     552                        assert( dynamic_cast< VariableExpr * >( arr ) || dynamic_cast< MemberExpr *>( arr ) );
    553553                        assert( arr && arr->get_results().size() == 1 );
    554554                        type = arr->get_results().front()->clone();
     
    559559                        assert( constructee->get_results().size() == 1 );
    560560                        AddressExpr * addrExpr = dynamic_cast< AddressExpr * > ( constructee );
    561                         assert( addrExpr && addrExpr->get_results().size() == 1);
     561                        assert( addrExpr && addrExpr->get_results().size() == 1 );
    562562                        type = addrExpr->get_results().front()->clone();
    563563                }
Note: See TracChangeset for help on using the changeset viewer.