Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r64ac636 rfbcde64  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug  5 14:23:56 2016
    13 // Update Count     : 49
     12// Last Modified On : Thu Mar 30 16:41:13 2017
     13// Update Count     : 52
    1414//
    1515
     
    7777        assert( var->get_type() );
    7878        Type * type = var->get_type()->clone();
    79         type->set_isLvalue( true );
     79        type->set_lvalue( true );
    8080        set_result( type );
    8181}
     
    352352        sub.apply( res );
    353353        set_result( res );
    354         get_result()->set_isLvalue( true );
     354        get_result()->set_lvalue( true );
    355355}
    356356
     
    571571
    572572
    573 CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : type( type ), initializer( initializer ) {
     573CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : initializer( initializer ) {
    574574        assert( type && initializer );
    575         set_result( type->clone() );
    576 }
    577 
    578 CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr &other ) : Expression( other ), type( other.type->clone() ), initializer( other.initializer->clone() ) {}
     575        set_result( type );
     576}
     577
     578CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr &other ) : Expression( other ), initializer( other.initializer->clone() ) {}
    579579
    580580CompoundLiteralExpr::~CompoundLiteralExpr() {
    581581        delete initializer;
    582         delete type;
    583582}
    584583
     
    586585        os << "Compound Literal Expression: " << std::endl;
    587586        os << std::string( indent+2, ' ' );
    588         type->print( os, indent + 2 );
     587        get_result()->print( os, indent + 2 );
    589588        os << std::string( indent+2, ' ' );
    590589        initializer->print( os, indent + 2 );
Note: See TracChangeset for help on using the changeset viewer.