Changeset fe26fbf for src/SynTree/AggregateDecl.cc
- Timestamp:
- Feb 7, 2017, 1:01:34 PM (9 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AggregateDecl.cc
rdbe8f244 rfe26fbf 10 10 // Created On : Sun May 17 23:56:39 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 13 18:03:30 201613 // Update Count : 1 012 // Last Modified On : Mon Feb 6 15:31:23 2017 13 // Update Count : 17 14 14 // 15 15 16 16 #include "Declaration.h" 17 #include "Attribute.h" 17 18 #include "Type.h" 18 19 #include "Common/utility.h" 19 20 20 21 21 AggregateDecl::AggregateDecl( const std::string &name ) : Parent( name, DeclarationNode::NoStorageClass, LinkageSpec::Cforall ), body( false) {22 AggregateDecl::AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes ) : Parent( name, DeclarationNode::NoStorageClass, LinkageSpec::Cforall ), body( false ), attributes( attributes ) { 22 23 } 23 24 … … 25 26 cloneAll( other.members, members ); 26 27 cloneAll( other.parameters, parameters ); 28 cloneAll( other.attributes, attributes ); 27 29 body = other.body; 28 30 } 29 31 30 32 AggregateDecl::~AggregateDecl() { 33 deleteAll( attributes ); 34 deleteAll( parameters ); 31 35 deleteAll( members ); 32 deleteAll( parameters );33 36 } 34 37 … … 47 50 os << endl << string( indent+2, ' ' ) << "with members" << endl; 48 51 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 ); 49 56 } // if 50 57 }
Note:
See TracChangeset
for help on using the changeset viewer.