Changeset 79970ed for src/SynTree


Ignore:
Timestamp:
Aug 24, 2016, 12:36:33 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
0555f4b
Parents:
f87408e
Message:

implement warnings for missing struct member constructor calls, remove bad clones

Location:
src/SynTree
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    rf87408e r79970ed  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // AggregateDecl.cc -- 
     7// AggregateDecl.cc --
    88//
    99// Author           : Richard C. Bilson
  • src/SynTree/Expression.cc

    rf87408e r79970ed  
    200200
    201201OffsetofExpr::OffsetofExpr( const OffsetofExpr &other ) :
    202         Expression( other ), type( maybeClone( other.type ) ), member( maybeClone( other.member ) ) {}
     202        Expression( other ), type( maybeClone( other.type ) ), member( other.member ) {}
    203203
    204204OffsetofExpr::~OffsetofExpr() {
    205205        delete type;
    206         delete member;
    207206}
    208207
     
    359358        assert( member );
    360359        os << std::string( indent + 2, ' ' );
     360        os << (void*)member << " ";
    361361        member->print( os, indent + 2 );
    362362        os << std::endl;
  • src/SynTree/TypeSubstitution.h

    rf87408e r79970ed  
    169169        TypeSubstitution sub = TypeSubstitution( formalBegin, formalEnd, actual );
    170170        for ( std::list< Declaration* >::iterator i = memberBegin; i != memberEnd; ++i ) {
    171                 Declaration *newdecl = (*i)->clone();
    172                 sub.apply( newdecl );
    173                 *out++ = newdecl;
     171                sub.apply( *i );
     172                *out++ = *i;
    174173        } // for
    175174}
Note: See TracChangeset for help on using the changeset viewer.