Ignore:
Timestamp:
Nov 8, 2017, 5:43:33 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
954908d
Parents:
78315272 (diff), e35f30a (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:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.cc

    r78315272 r3f7e12cb  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 11 13:21:25 2017
    13 // Update Count     : 37
     12// Last Modified On : Mon Sep 25 15:16:32 2017
     13// Update Count     : 38
    1414//
    1515#include "Type.h"
     
    4545        "double _Imaginary",
    4646        "long double _Imaginary",
     47        "__int128",
     48        "unsigned __int128",
    4749};
    4850
     
    7375        Type * type;
    7476        ReferenceType * ref;
    75         for ( type = this; (ref = dynamic_cast<ReferenceType *>( type )); type = ref->get_base() );
     77        for ( type = this; (ref = dynamic_cast<ReferenceType *>( type )); type = ref->base );
    7678        return type;
    7779}
     
    7981int Type::referenceDepth() const { return 0; }
    8082
    81 void Type::print( std::ostream &os, int indent ) const {
     83void Type::print( std::ostream &os, Indenter indent ) const {
    8284        if ( ! forall.empty() ) {
    8385                os << "forall" << std::endl;
    84                 printAll( forall, os, indent + 4 );
    85                 os << std::string( indent+2, ' ' );
     86                printAll( forall, os, indent+1 );
     87                os << ++indent;
    8688        } // if
    8789
    8890        if ( ! attributes.empty() ) {
    89                 os << endl << string( indent+2, ' ' ) << "with attributes" << endl;
    90                 printAll( attributes, os, indent+4 );
     91                os << "with attributes" << endl;
     92                printAll( attributes, os, indent+1 );
    9193        } // if
    9294
     
    99101const Type::Qualifiers noQualifiers;
    100102
    101 std::ostream & operator<<( std::ostream & out, const Type * type ) {
    102         if ( type ) {
    103                 type->print( out );
    104         } else {
    105                 out << "nullptr";
    106         } // if
    107         return out;
    108 }
    109 
    110103// Local Variables: //
    111104// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.