Ignore:
Timestamp:
Apr 3, 2017, 10:38:04 AM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1d29d46
Parents:
814525c (diff), 36e05a2 (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 changes to generics paper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r814525c rfc19129  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 09:42:04 2017
    13 // Update Count     : 51
     12// Last Modified On : Thu Mar 30 16:41:13 2017
     13// Update Count     : 52
    1414//
    1515
     
    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.