Ignore:
Timestamp:
Jun 1, 2016, 11:54:23 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
be945ac
Parents:
70f89d00
Message:

can construct global const objects, except with intrinsic constructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.cc

    r70f89d00 rf1b1e4c  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Type.cc -- 
     7// Type.cc --
    88//
    99// Author           : Richard C. Bilson
     
    5454}
    5555
     56void Type::Qualifiers::print( std::ostream &os, int indent ) const {
     57        if ( isConst ) {
     58                os << "const ";
     59        } // if
     60        if ( isVolatile ) {
     61                os << "volatile ";
     62        } // if
     63        if ( isRestrict ) {
     64                os << "restrict ";
     65        } // if
     66        if ( isLvalue ) {
     67                os << "lvalue ";
     68        } // if
     69        if ( isAtomic ) {
     70                os << "_Atomic ";
     71        } // if
     72        if ( isAttribute ) {
     73                os << "__attribute(( )) ";
     74        } // if
     75}
     76
    5677void Type::print( std::ostream &os, int indent ) const {
    5778        if ( ! forall.empty() ) {
     
    6081                os << std::string( indent+2, ' ' );
    6182        } // if
    62         if ( tq.isConst ) {
    63                 os << "const ";
    64         } // if
    65         if ( tq.isVolatile ) {
    66                 os << "volatile ";
    67         } // if
    68         if ( tq.isRestrict ) {
    69                 os << "restrict ";
    70         } // if
    71         if ( tq.isLvalue ) {
    72                 os << "lvalue ";
    73         } // if
    74         if ( tq.isAtomic ) {
    75                 os << "_Atomic ";
    76         } // if
    77         if ( tq.isAttribute ) {
    78                 os << "__attribute(( )) ";
    79         } // if
     83        tq.print( os, indent );
    8084}
    8185
Note: See TracChangeset for help on using the changeset viewer.