Ignore:
Timestamp:
Oct 19, 2017, 12:01:04 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
837ce06
Parents:
b96ec83 (diff), a15b72c (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' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/NamedTypeDecl.cc

    rb96ec83 r6840e7c  
    3838}
    3939
    40 void NamedTypeDecl::print( std::ostream &os, int indent ) const {
     40void NamedTypeDecl::print( std::ostream &os, Indenter indent ) const {
    4141        using namespace std;
    4242
    43         if ( get_name() != "" ) {
    44                 os << get_name() << ": ";
    45         } // if
    46         if ( get_linkage() != LinkageSpec::Cforall ) {
    47                 os << LinkageSpec::linkageName( get_linkage() ) << " ";
     43        if ( name != "" ) os << name << ": ";
     44
     45        if ( linkage != LinkageSpec::Cforall ) {
     46                os << LinkageSpec::linkageName( linkage ) << " ";
    4847        } // if
    4948        get_storageClasses().print( os );
     
    5150        if ( base ) {
    5251                os << " for ";
    53                 base->print( os, indent );
     52                base->print( os, indent+1 );
    5453        } // if
    5554        if ( ! parameters.empty() ) {
    56                 os << endl << string( indent, ' ' ) << "with parameters" << endl;
    57                 printAll( parameters, os, indent+2 );
     55                os << endl << indent << "... with parameters" << endl;
     56                printAll( parameters, os, indent+1 );
    5857        } // if
    5958        if ( ! assertions.empty() ) {
    60                 os << endl << string( indent, ' ' ) << "with assertions" << endl;
    61                 printAll( assertions, os, indent+2 );
     59                os << endl << indent << "... with assertions" << endl;
     60                printAll( assertions, os, indent+1 );
    6261        } // if
    6362}
    6463
    65 void NamedTypeDecl::printShort( std::ostream &os, int indent ) const {
     64void NamedTypeDecl::printShort( std::ostream &os, Indenter indent ) const {
    6665        using namespace std;
    6766
    68         if ( get_name() != "" ) {
    69                 os << get_name() << ": ";
    70         } // if
     67        if ( name != "" ) os << name << ": ";
    7168        get_storageClasses().print( os );
    7269        os << typeString();
    7370        if ( base ) {
    7471                os << " for ";
    75                 base->print( os, indent );
     72                base->print( os, indent+1 );
    7673        } // if
    7774        if ( ! parameters.empty() ) {
    78                 os << endl << string( indent, ' ' ) << "with parameters" << endl;
    79                 printAll( parameters, os, indent+2 );
     75                os << endl << indent << "... with parameters" << endl;
     76                printAll( parameters, os, indent+1 );
    8077        } // if
    8178}
Note: See TracChangeset for help on using the changeset viewer.