Changeset b1e63ac5 for src/SynTree/TypeDecl.cc
- Timestamp:
- Jul 4, 2017, 9:40:16 AM (8 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:
- 208e5be
- Parents:
- 9c951e3 (diff), f7cb0bc (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/TypeDecl.cc
r9c951e3 rb1e63ac5 18 18 #include "Common/utility.h" 19 19 20 TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind ) : Parent( name, scs, type ), kind( kind), sized( kind == Any || kind == Ttype ) {20 TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), kind( kind ), init( init ), sized( kind == Any || kind == Ttype ) { 21 21 } 22 22 23 TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), sized( other.sized ) { 23 TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), init( maybeClone( other.init ) ), sized( other.sized ) { 24 } 25 26 TypeDecl::~TypeDecl() { 27 delete init; 24 28 } 25 29 … … 34 38 } 35 39 40 void TypeDecl::print( std::ostream &os, int indent ) const { 41 NamedTypeDecl::print( os, indent ); 42 if ( init ) { 43 os << std::endl << std::string( indent, ' ' ) << "with type initializer: "; 44 init->print( os, indent + 2 ); 45 } 46 } 47 48 36 49 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ) { 37 50 return os << data.kind << ", " << data.isComplete;
Note:
See TracChangeset
for help on using the changeset viewer.