Ignore:
Timestamp:
Mar 30, 2016, 3:48:55 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, 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:
e0323a2
Parents:
4cc4286
Message:

choose destructor at at object declaration (CtorInit?), overhaul and simplification of resolver code for CtorInit?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Initializer.cc

    r4cc4286 r5b2f5bb  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 15:31:45 2016
     12// Last Modified On : Wed Mar 30 13:58:32 2016
    1313// Update Count     : 28
    1414//
     
    1616#include "Initializer.h"
    1717#include "Expression.h"
     18#include "Statement.h"
    1819#include "Common/utility.h"
    1920
     
    8182
    8283
    83 ConstructorInit::ConstructorInit( Expression * ctor, Initializer * init ) : Initializer( true ), ctor( ctor ), init( init ) {}
     84ConstructorInit::ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ) : Initializer( true ), ctor( ctor ), dtor( dtor ), init( init ) {}
    8485ConstructorInit::~ConstructorInit() {
    8586        delete ctor;
     
    9899        } // if
    99100
     101        if ( dtor ) {
     102                os << " destructed with ";
     103                dtor->print( os, indent+2 );
     104        }
     105
    100106        if ( init ) {
    101107                os << " with fallback C-style initializer: ";
Note: See TracChangeset for help on using the changeset viewer.