Changeset 6eb4398


Ignore:
Timestamp:
Apr 15, 2017, 11:47:46 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
160af1e
Parents:
79b8dc3
Message:

recursively clone expression node lists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r79b8dc3 r6eb4398  
    107107  public:
    108108        ExpressionNode( Expression * expr = nullptr ) : expr( expr ) {}
    109         ExpressionNode( const ExpressionNode &other );
    110109        virtual ~ExpressionNode() {}
    111         virtual ExpressionNode * clone() const override { return expr ? new ExpressionNode( expr->clone() ) : nullptr; }
     110        virtual ExpressionNode * clone() const override { return expr ? static_cast<ExpressionNode*>((new ExpressionNode( expr->clone() ))->set_next( maybeClone( get_next() ) )) : nullptr; }
    112111
    113112        bool get_extension() const { return extension; }
Note: See TracChangeset for help on using the changeset viewer.