Changes in / [395fc37:1fbab5a]


Ignore:
Location:
src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/ScrubTyVars.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 15:44:27 2017
    13 // Update Count     : 3
     12// Last Modified On : Tue May 19 16:42:42 2015
     13// Update Count     : 2
    1414//
    1515
     
    109109                if ( Type *dynType = shouldScrub( pointer->get_base() ) ) {
    110110                        Type *ret = dynType->acceptMutator( *this );
    111                         ret->get_qualifiers() |= pointer->get_qualifiers();
     111                        ret->get_qualifiers() += pointer->get_qualifiers();
    112112                        pointer->set_base( 0 );
    113113                        delete pointer;
  • src/Parser/DeclarationNode.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 17:16:31 2017
    13 // Update Count     : 1014
     12// Last Modified On : Thu Mar 16 09:10:57 2017
     13// Update Count     : 1007
    1414//
    1515
     
    1919#include <algorithm>
    2020#include <cassert>
     21#include <strings.h>                                                                    // ffs
    2122
    2223#include "TypeData.h"
     
    242243
    243244DeclarationNode * DeclarationNode::newAggregate( Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
    244         assert( name );
    245245        DeclarationNode * newnode = new DeclarationNode;
    246246        newnode->type = new TypeData( TypeData::Aggregate );
    247247        newnode->type->aggregate.kind = kind;
    248         newnode->type->aggregate.name = name;
     248        if ( name ) {
     249                newnode->type->aggregate.name = name;
     250        } else {                                                                                        // anonymous aggregate ?
     251                newnode->type->aggregate.name = new string( anonymous.newName() );
     252        } // if
    249253        newnode->type->aggregate.actuals = actuals;
    250254        newnode->type->aggregate.fields = fields;
     
    254258
    255259DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) {
    256         assert( name );
    257260        DeclarationNode * newnode = new DeclarationNode;
    258261        newnode->type = new TypeData( TypeData::Enum );
    259         newnode->type->enumeration.name = name;
     262        if ( name ) {
     263                newnode->type->enumeration.name = name;
     264        } else {                                                                                        // anonymous aggregate ?
     265                newnode->type->enumeration.name = new string( anonymous.newName() );
     266        } // if
    260267        newnode->type->enumeration.constants = constants;
    261268        newnode->type->enumeration.body = body;
     
    429436        const Type::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers; // optimization
    430437
    431         if ( (qsrc & qdst).any() ) {                                            // duplicates ?
     438        if ( (qsrc.val & qdst.val) != 0 ) {                                     // duplicates ?
    432439                for ( unsigned int i = 0; i < Type::NumTypeQualifier; i += 1 ) { // find duplicates
    433440                        if ( qsrc[i] && qdst[i] ) {
     
    439446
    440447void DeclarationNode::checkSpecifiers( DeclarationNode * src ) {
    441         if ( (funcSpecs & src->funcSpecs).any() ) {                     // duplicates ?
     448        if ( (funcSpecs.val & src->funcSpecs.val) != 0 ) {      // duplicates ?
    442449                for ( unsigned int i = 0; i < Type::NumFuncSpecifier; i += 1 ) { // find duplicates
    443450                        if ( funcSpecs[i] && src->funcSpecs[i] ) {
     
    448455
    449456        if ( storageClasses.any() && src->storageClasses.any() ) { // any reason to check ?
    450                 if ( (storageClasses & src->storageClasses ).any() ) { // duplicates ?
     457                if ( (storageClasses.val & src->storageClasses.val ) != 0 ) { // duplicates ?
    451458                        for ( unsigned int i = 0; i < Type::NumStorageClass; i += 1 ) { // find duplicates
    452459                                if ( storageClasses[i] && src->storageClasses[i] ) {
     
    456463                        // src is the new item being added and has a single bit
    457464                } else if ( ! src->storageClasses.is_threadlocal ) { // conflict ?
    458                         appendError( error, string( "conflicting " ) + Type::StorageClasses::Names[storageClasses.ffs()] +
    459                                                  " & " + Type::StorageClasses::Names[src->storageClasses.ffs()] );
    460                         src->storageClasses.reset();                            // FIX to preserve invariant of one basic storage specifier
     465                        appendError( error, string( "conflicting " ) + Type::StorageClasses::Names[ffs( storageClasses.val ) - 1] +
     466                                                 " & " + Type::StorageClasses::Names[ffs( src->storageClasses.val ) - 1] );
     467                        src->storageClasses.val = 0;                            // FIX to preserve invariant of one basic storage specifier
    461468                } // if
    462469        } // if
     
    466473
    467474DeclarationNode * DeclarationNode::copySpecifiers( DeclarationNode * q ) {
    468         funcSpecs |= q->funcSpecs;
    469         storageClasses |= q->storageClasses;
     475        funcSpecs.val |= q->funcSpecs.val;
     476        storageClasses.val |= q->storageClasses.val;
    470477
    471478        for ( Attribute *attr: reverseIterate( q->attributes ) ) {
     
    490497                src = nullptr;
    491498        } else {
    492                 dst->qualifiers |= src->qualifiers;
     499                dst->qualifiers += src->qualifiers;
    493500        } // if
    494501} // addQualifiersToType
     
    548555                switch ( dst->kind ) {
    549556                  case TypeData::Unknown:
    550                         src->qualifiers |= dst->qualifiers;
     557                        src->qualifiers += dst->qualifiers;
    551558                        dst = src;
    552559                        src = nullptr;
    553560                        break;
    554561                  case TypeData::Basic:
    555                         dst->qualifiers |= src->qualifiers;
     562                        dst->qualifiers += src->qualifiers;
    556563                        if ( src->kind != TypeData::Unknown ) {
    557564                                assert( src->kind == TypeData::Basic );
     
    589596                                        dst->base->aggInst.params = maybeClone( src->aggregate.actuals );
    590597                                } // if
    591                                 dst->base->qualifiers |= src->qualifiers;
     598                                dst->base->qualifiers += src->qualifiers;
    592599                                src = nullptr;
    593600                                break;
     
    621628                                                type->aggInst.hoistType = o->type->enumeration.body;
    622629                                        } // if
    623                                         type->qualifiers |= o->type->qualifiers;
     630                                        type->qualifiers += o->type->qualifiers;
    624631                                } else {
    625632                                        type = o->type;
     
    777784                                        p->type->base->aggInst.params = maybeClone( type->aggregate.actuals );
    778785                                } // if
    779                                 p->type->base->qualifiers |= type->qualifiers;
     786                                p->type->base->qualifiers += type->qualifiers;
    780787                                break;
    781788
     
    814821                                lastArray->base->aggInst.params = maybeClone( type->aggregate.actuals );
    815822                        } // if
    816                         lastArray->base->qualifiers |= type->qualifiers;
     823                        lastArray->base->qualifiers += type->qualifiers;
    817824                        break;
    818825                  default:
  • src/Parser/parser.yy

    r395fc37 r1fbab5a  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 12:57:03 2017
    13 // Update Count     : 2316
     12// Last Modified On : Thu Mar 16 08:36:17 2017
     13// Update Count     : 2310
    1414//
    1515
     
    16121612aggregate_type:                                                                                 // struct, union
    16131613        aggregate_key attribute_list_opt '{' field_declaration_list '}'
    1614                 { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), nullptr, $4, true )->addQualifiers( $2 ); }
     1614                { $$ = DeclarationNode::newAggregate( $1, nullptr, nullptr, $4, true )->addQualifiers( $2 ); }
    16151615        | aggregate_key attribute_list_opt no_attr_identifier_or_type_name
    16161616                { typedefTable.makeTypedef( *$3 ); }
     
    16181618                { $$ = DeclarationNode::newAggregate( $1, $3, nullptr, $6, true )->addQualifiers( $2 ); }
    16191619        | aggregate_key attribute_list_opt '(' type_name_list ')' '{' field_declaration_list '}' // CFA
    1620                 { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), $4, $7, false )->addQualifiers( $2 ); }
     1620                { $$ = DeclarationNode::newAggregate( $1, nullptr, $4, $7, false )->addQualifiers( $2 ); }
    16211621        | aggregate_type_nobody
    16221622        ;
     
    16881688        // empty
    16891689                { $$ = DeclarationNode::newName( 0 ); /* XXX */ } // CFA, no field name
    1690         // '@'
    1691         //      { $$ = DeclarationNode::newName( new string( DeclarationNode::anonymous.newName() ) ); } // CFA, no field name
     1690        // '@' // empty
     1691        //      { $$ = DeclarationNode::newName( 0 ); /* XXX */ } // CFA, no field name
    16921692        | bit_subrange_size                                                                     // no field name
    16931693                { $$ = DeclarationNode::newBitfield( $1 ); }
     
    17151715enum_type:                                                                                              // enum
    17161716        ENUM attribute_list_opt '{' enumerator_list comma_opt '}'
    1717                 { $$ = DeclarationNode::newEnum( new string( DeclarationNode::anonymous.newName() ), $4, true )->addQualifiers( $2 ); }
     1717                { $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); }
    17181718        | ENUM attribute_list_opt no_attr_identifier_or_type_name
    17191719                { typedefTable.makeTypedef( *$3 ); }
  • src/ResolvExpr/CommonType.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Sun May 17 06:59:27 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 16:24:31 2017
    13 // Update Count     : 7
     12// Last Modified On : Wed Mar  2 17:35:34 2016
     13// Update Count     : 3
    1414//
    1515
     
    7171                                                        if ( unifyExact( type1, type->get_base(), env, have, need, newOpen, indexer ) ) {
    7272                                                                result = type1->clone();
    73                                                                 result->get_qualifiers() = tq1 | tq2;
     73                                                                result->get_qualifiers() = tq1 + tq2;
    7474                                                        } // if
    7575                                                        type1->get_qualifiers() = tq1;
     
    133133                        BasicType::Kind newType = combinedType[ basicType->get_kind() ][ otherBasic->get_kind() ];
    134134                        if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= otherBasic->get_qualifiers() ) || widenFirst ) && ( ( newType == otherBasic->get_kind() && basicType->get_qualifiers() <= otherBasic->get_qualifiers() ) || widenSecond ) ) {
    135                                 result = new BasicType( basicType->get_qualifiers() | otherBasic->get_qualifiers(), newType );
     135                                result = new BasicType( basicType->get_qualifiers() + otherBasic->get_qualifiers(), newType );
    136136                        } // if
    137137                } else if ( dynamic_cast< EnumInstType * > ( type2 ) || dynamic_cast< ZeroType* >( type2 ) || dynamic_cast< OneType* >( type2 ) ) {
     
    139139                        BasicType::Kind newType = combinedType[ basicType->get_kind() ][ BasicType::SignedInt ];
    140140                        if ( ( ( newType == basicType->get_kind() && basicType->get_qualifiers() >= type2->get_qualifiers() ) || widenFirst ) && ( ( newType != basicType->get_kind() && basicType->get_qualifiers() <= type2->get_qualifiers() ) || widenSecond ) ) {
    141                                 result = new BasicType( basicType->get_qualifiers() | type2->get_qualifiers(), newType );
     141                                result = new BasicType( basicType->get_qualifiers() + type2->get_qualifiers(), newType );
    142142                        } // if
    143143                } // if
     
    154154                }
    155155                result = voidPointer->clone();
    156                 result->get_qualifiers() |= otherPointer->get_qualifiers();
     156                result->get_qualifiers() += otherPointer->get_qualifiers();
    157157        }
    158158
     
    176176                                                result = otherPointer->clone();
    177177                                        } // if
    178                                         result->get_qualifiers() = tq1 | tq2;
     178                                        result->get_qualifiers() = tq1 + tq2;
    179179                                } else {
    180180                                        /// std::cout << "place for ptr-to-type" << std::endl;
     
    185185                } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
    186186                        result = pointerType->clone();
    187                         result->get_qualifiers() |= type2->get_qualifiers();
     187                        result->get_qualifiers() += type2->get_qualifiers();
    188188                } // if
    189189        }
     
    230230                                        if ( unifyExact( type->get_base(), type2, env, have, need, newOpen, indexer ) ) {
    231231                                                result = type2->clone();
    232                                                 result->get_qualifiers() = tq1 | tq2;
     232                                                result->get_qualifiers() = tq1 + tq2;
    233233                                        } // if
    234234                                        type2->get_qualifiers() = tq2;
     
    250250                                if ( widenSecond || zeroType->get_qualifiers() <= type2->get_qualifiers() ) {
    251251                                        result = type2->clone();
    252                                         result->get_qualifiers() |= zeroType->get_qualifiers();
     252                                        result->get_qualifiers() += zeroType->get_qualifiers();
    253253                                }
    254254                        } else if ( widenSecond && dynamic_cast< OneType* >( type2 ) ) {
    255255                                result = new BasicType( zeroType->get_qualifiers(), BasicType::SignedInt );
    256                                 result->get_qualifiers() |= type2->get_qualifiers();
     256                                result->get_qualifiers() += type2->get_qualifiers();
    257257                        }
    258258                }
     
    264264                                if ( widenSecond || oneType->get_qualifiers() <= type2->get_qualifiers() ) {
    265265                                        result = type2->clone();
    266                                         result->get_qualifiers() |= oneType->get_qualifiers();
     266                                        result->get_qualifiers() += oneType->get_qualifiers();
    267267                                }
    268268                        } else if ( widenSecond && dynamic_cast< ZeroType* >( type2 ) ) {
    269269                                result = new BasicType( oneType->get_qualifiers(), BasicType::SignedInt );
    270                                 result->get_qualifiers() |= type2->get_qualifiers();
     270                                result->get_qualifiers() += type2->get_qualifiers();
    271271                        }
    272272                }
  • src/ResolvExpr/Unify.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Sun May 17 12:27:10 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 16:22:54 2017
    13 // Update Count     : 42
     12// Last Modified On : Thu Mar 16 07:59:59 2017
     13// Update Count     : 40
    1414//
    1515
     
    353353#endif
    354354                        if ( ( common = commonType( type1, type2, widenMode.widenFirst, widenMode.widenSecond, indexer, env, openVars ) ) ) {
    355                                 common->get_qualifiers() = tq1 | tq2;
     355                                common->get_qualifiers() = tq1 + tq2;
    356356#ifdef DEBUG
    357357                                std::cerr << "unifyInexact: common type is ";
     
    370370                                if ( ( tq1 > tq2 || widenMode.widenFirst ) && ( tq2 > tq1 || widenMode.widenSecond ) ) {
    371371                                        common = type1->clone();
    372                                         common->get_qualifiers() = tq1 | tq2;
     372                                        common->get_qualifiers() = tq1 + tq2;
    373373                                        result = true;
    374374                                } else {
  • src/SymTab/ImplementationType.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Sun May 17 21:32:01 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 15:54:08 2017
    13 // Update Count     : 4
     12// Last Modified On : Wed Mar  2 17:31:20 2016
     13// Update Count     : 3
    1414//
    1515
     
    105105                if ( typeDecl && typeDecl->get_base() ) {
    106106                        Type *base = implementationType( typeDecl->get_base(), indexer );
    107                         base->get_qualifiers() |= inst->get_qualifiers();
     107                        base->get_qualifiers() += inst->get_qualifiers();
    108108                        result = base;
    109109                } // if
     
    114114                for ( std::list< Type* >::iterator i = tupleType->get_types().begin(); i != tupleType->get_types().end(); ++i ) {
    115115                        Type *implType = implementationType( *i, indexer );
    116                         implType->get_qualifiers() |= tupleType->get_qualifiers();
     116                        implType->get_qualifiers() += tupleType->get_qualifiers();
    117117                        newType->get_types().push_back( implType );
    118118                } // for
  • src/SymTab/Validate.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 16:39:15 2017
    13 // Update Count     : 353
     12// Last Modified On : Thu Mar 16 08:02:54 2017
     13// Update Count     : 351
    1414//
    1515
     
    611611                if ( def != typedefNames.end() ) {
    612612                        Type *ret = def->second.first->get_base()->clone();
    613                         ret->get_qualifiers() |= typeInst->get_qualifiers();
     613                        ret->get_qualifiers() += typeInst->get_qualifiers();
    614614                        // place instance parameters on the typedef'd type
    615615                        if ( ! typeInst->get_parameters().empty() ) {
     
    656656                // hence the type-name "screen" must be defined.
    657657                // Note, qualifiers on the typedef are superfluous for the forward declaration.
    658 
    659                 Type *designatorType = tyDecl->get_base()->stripDeclarator();
    660                 if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
     658                if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( tyDecl->get_base() ) ) {
    661659                        return new StructDecl( aggDecl->get_name() );
    662                 } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
     660                } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( tyDecl->get_base() ) ) {
    663661                        return new UnionDecl( aggDecl->get_name() );
    664                 } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
     662                } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( tyDecl->get_base() ) ) {
    665663                        return new EnumDecl( enumDecl->get_name() );
    666664                } else {
  • src/SynTree/Type.cc

    r395fc37 r1fbab5a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 16:25:49 2017
    13 // Update Count     : 27
     12// Last Modified On : Thu Mar 16 10:25:06 2017
     13// Update Count     : 23
    1414//
    1515
     
    1919#include "Declaration.h"
    2020#include "Attribute.h"
    21 #include "InitTweak/InitTweak.h"
    2221#include "Common/utility.h"
    2322
     
    6564const char * Type::Qualifiers::Names[] = { "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic" };
    6665
    67 Type *Type::stripDeclarator() {
    68         Type * type = this;
    69         while ( Type * at = InitTweak::getPointerBase( type ) ) {
    70                 type = at;
    71         }
    72         return type;
    73 }
    74 
    7566void Type::print( std::ostream &os, int indent ) const {
    7667        if ( ! forall.empty() ) {
  • src/SynTree/Type.h

    r395fc37 r1fbab5a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 17:44:11 2017
    13 // Update Count     : 135
     12// Last Modified On : Thu Mar 16 12:11:50 2017
     13// Update Count     : 116
    1414//
    1515
     
    2121#include "SynTree.h"
    2222#include "Visitor.h"
    23 #include <strings.h>                                                                    // ffs
    2423
    2524class Type : public BaseSyntaxNode {
    2625  public:
    27         // Simulate inheritance because union does not allow it.
    28         #define BFCommon( BFType, N ) \
     26        #define CommonBF( N ) \
    2927                bool operator[]( unsigned int i ) const { return val & (1 << i); } \
    3028                bool any() const { return val != 0; } \
    31                 void reset() { val = 0; } \
    32                 int ffs() { return ::ffs( val ) - 1; } \
    3329                static const char * Names[]; \
    34                 BFType operator&=( BFType other ) { \
    35                         val &= other.val; return *this; \
    36                 } \
    37                 BFType operator&( BFType other ) const { \
    38                         BFType q = other; \
    39                         q &= *this; \
    40                         return q; \
    41                 } \
    42                 BFType operator|=( BFType other ) { \
    43                         val |= other.val; return *this; \
    44                 } \
    45                 BFType operator|( BFType other ) const { \
    46                         BFType q = other; \
    47                         q |= *this; \
    48                         return q; \
    49                 } \
    50                 BFType operator-=( BFType other ) { \
    51                         val &= ~other.val; return *this; \
    52                 } \
    5330                void print( std::ostream & os ) const { \
    5431                        if ( (*this).any() ) { \
     
    7350                FuncSpecifiers() : val( 0 ) {}
    7451                FuncSpecifiers( unsigned int val ) : val( val ) {}
    75                 bool operator==( FuncSpecifiers other ) const { return val == other.val; }
    76                 bool operator!=( FuncSpecifiers other ) const { return val != other.val; }
    77                 BFCommon( FuncSpecifiers, NumFuncSpecifier )
     52                CommonBF( NumFuncSpecifier )
    7853        }; // FuncSpecifiers
    7954
     
    9166                StorageClasses() : val( 0 ) {}
    9267                StorageClasses( unsigned int val ) : val( val ) {}
    93                 bool operator==( StorageClasses other ) const { return val == other.val; }
    94                 bool operator!=( StorageClasses other ) const { return val != other.val; }
    95                 BFCommon( StorageClasses, NumStorageClass )
     68                CommonBF( NumStorageClass )
    9669        }; // StorageClasses
    9770
     
    11992                bool operator<=( Qualifiers other ) const {
    12093                        return isConst <= other.isConst && isVolatile <= other.isVolatile &&
    121                                 isMutex >= other.isMutex && isAtomic == other.isAtomic;
    122                 }
    123                 bool operator<( Qualifiers other ) const { return *this != other && *this <= other; }
    124                 bool operator>=( Qualifiers other ) const { return ! (*this < other); }
    125                 bool operator>( Qualifiers other ) const { return *this != other && *this >= other; }
    126                 BFCommon( Qualifiers, NumTypeQualifier )
     94                                isMutex == other.isMutex && isAtomic == other.isAtomic;
     95                }
     96                bool operator>=( Qualifiers other ) const {
     97                        return isConst >= other.isConst && isVolatile >= other.isVolatile &&
     98                                isMutex == other.isMutex && isAtomic == other.isAtomic;
     99                }
     100                bool operator<( Qualifiers other ) const {
     101                        return *this != other && *this <= other;
     102                }
     103                bool operator>( Qualifiers other ) const {
     104                        return *this != other && *this >= other;
     105                }
     106                Qualifiers operator&=( Type::Qualifiers other ) {
     107                        val &= other.val; return *this;
     108                }
     109                Qualifiers operator+=( Qualifiers other ) {
     110                        val |= other.val; return *this;
     111                }
     112                Qualifiers operator-=( Qualifiers other ) {
     113                        val &= ~other.val; return *this;
     114                }
     115                Qualifiers operator+( Qualifiers other ) const {
     116                        Qualifiers q = other;
     117                        q += *this;
     118                        return q;
     119                }
     120                CommonBF( NumTypeQualifier )
    127121        }; // Qualifiers
    128122
     
    153147        virtual bool isVoid() const { return size() == 0; }
    154148        virtual Type * getComponent( unsigned i ) { assertf( size() == 1 && i == 0, "Type::getComponent was called with size %d and index %d\n", size(), i ); return this; }
    155 
    156         Type *stripDeclarator();
    157149
    158150        virtual bool isComplete() const { return true; }
  • src/SynTree/TypeSubstitution.cc

    r395fc37 r1fbab5a  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 15:54:35 2017
    13 // Update Count     : 4
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Tue Apr 26 11:15:29 2016
     13// Update Count     : 3
    1414//
    1515
     
    127127                subCount++;
    128128                Type *newtype = i->second->clone();
    129                 newtype->get_qualifiers() |= inst->get_qualifiers();
     129                newtype->get_qualifiers() += inst->get_qualifiers();
    130130                delete inst;
    131131                return newtype;
Note: See TracChangeset for help on using the changeset viewer.