Changeset 0caaa6a


Ignore:
Timestamp:
Jun 23, 2016, 12:16:45 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
23b6f4d7
Parents:
1e1e15b
git-author:
Rob Schluntz <rschlunt@…> (06/23/16 11:30:45)
git-committer:
Rob Schluntz <rschlunt@…> (06/23/16 12:16:45)
Message:

fix CompositeExprNode? copy ctor bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    r1e1e15b r0caaa6a  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpressionNode.cc -- 
    8 // 
     7// ExpressionNode.cc --
     8//
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:17:07 2015
     
    1212// Last Modified On : Mon Jun 13 14:46:17 2016
    1313// Update Count     : 307
    14 // 
     14//
    1515
    1616#include <cassert>
     
    231231        // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string.
    232232        value.insert( value.length() - 1, newValue->substr( 1, newValue->length() - 2 ) );
    233        
     233
    234234        delete newValue;                                                                        // allocated by lexer
    235235        return this;
     
    347347
    348348        if ( isArrayIndex ) {
    349                 // need to traverse entire structure and change any instances of 0 or 1 to 
     349                // need to traverse entire structure and change any instances of 0 or 1 to
    350350                // ConstantExpr
    351351                DesignatorFixer fixer;
     
    440440}
    441441
    442 CompositeExprNode::CompositeExprNode( const CompositeExprNode &other ) : ExpressionNode( other ), function( maybeClone( other.function ) ) {
     442CompositeExprNode::CompositeExprNode( const CompositeExprNode &other ) : ExpressionNode( other ), function( maybeClone( other.function ) ), arguments( 0 ) {
    443443        ParseNode *cur = other.arguments;
    444444        while ( cur ) {
     
    608608                {
    609609                        assert( args.size() == 2 );
    610                        
     610
    611611                        if ( TypeValueNode * arg = dynamic_cast<TypeValueNode *>( get_args() ) ) {
    612612                                NameExpr *member = dynamic_cast<NameExpr *>( args.back() );
Note: See TracChangeset for help on using the changeset viewer.