Changeset 6eb4398 for src


Ignore:
Timestamp:
Apr 15, 2017, 11:47:46 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
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.