Ignore:
Timestamp:
Feb 7, 2017, 1:01:34 PM (9 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:
35b1bf4
Parents:
dbe8f244 (diff), b4d65c7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    rdbe8f244 rfe26fbf  
    1010// Created On       : Sun May 17 23:56:39 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 13 18:03:30 2016
    13 // Update Count     : 10
     12// Last Modified On : Mon Feb  6 15:31:23 2017
     13// Update Count     : 17
    1414//
    1515
    1616#include "Declaration.h"
     17#include "Attribute.h"
    1718#include "Type.h"
    1819#include "Common/utility.h"
    1920
    2021
    21 AggregateDecl::AggregateDecl( const std::string &name ) : Parent( name, DeclarationNode::NoStorageClass, LinkageSpec::Cforall ), body( false ) {
     22AggregateDecl::AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes ) : Parent( name, DeclarationNode::NoStorageClass, LinkageSpec::Cforall ), body( false ), attributes( attributes ) {
    2223}
    2324
     
    2526        cloneAll( other.members, members );
    2627        cloneAll( other.parameters, parameters );
     28        cloneAll( other.attributes, attributes );
    2729        body = other.body;
    2830}
    2931
    3032AggregateDecl::~AggregateDecl() {
     33        deleteAll( attributes );
     34        deleteAll( parameters );
    3135        deleteAll( members );
    32         deleteAll( parameters );
    3336}
    3437
     
    4750                os << endl << string( indent+2, ' ' ) << "with members" << endl;
    4851                printAll( members, os, indent+4 );
     52        } // if
     53        if ( ! attributes.empty() ) {
     54                os << endl << string( indent+2, ' ' ) << "with attributes" << endl;
     55                printAll( attributes, os, indent+4 );
    4956        } // if
    5057}
Note: See TracChangeset for help on using the changeset viewer.