Changeset 572547c for src


Ignore:
Timestamp:
Mar 15, 2017, 9:20:57 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
bf4ac09
Parents:
e61a35e
Message:

rename bound for enumerated types

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    re61a35e r572547c  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 14 14:45:52 2017
    13 // Update Count     : 973
     12// Last Modified On : Tue Mar 14 22:42:54 2017
     13// Update Count     : 974
    1414//
    1515
     
    118118void DeclarationNode::print_StorageClass( std::ostream & output, StorageClasses storageClasses ) {
    119119        if ( storageClasses.val != 0 ) {                                        // storage classes ?
    120                 for ( unsigned int i = 0; i < DeclarationNode::NoStorageClass; i += 1 ) {
     120                for ( unsigned int i = 0; i < DeclarationNode::NumStorageClass; i += 1 ) {
    121121                        if ( storageClasses[i] ) {
    122122                                output << DeclarationNode::storageClassNames[i] << ' ';
     
    128128void DeclarationNode::print_FuncSpec( std::ostream & output, DeclarationNode::FuncSpecifiers funcSpec ) {
    129129        if ( funcSpec.val != 0 ) {                                                      // function specifiers ?
    130                 for ( unsigned int i = 0; i < DeclarationNode::NoFuncSpecifier; i += 1 ) {
     130                for ( unsigned int i = 0; i < DeclarationNode::NumFuncSpecifier; i += 1 ) {
    131131                        if ( funcSpec[i] ) {
    132132                                output << DeclarationNode::funcSpecifierNames[i] << ' ';
     
    460460
    461461        if ( (qsrc.val & qdst.val) != 0 ) {                                     // duplicates ?
    462                 for ( unsigned int i = 0; i < NoTypeQualifier; i += 1 ) { // find duplicates
     462                for ( unsigned int i = 0; i < NumTypeQualifier; i += 1 ) { // find duplicates
    463463                        if ( qsrc[i] && qdst[i] ) {
    464464                                appendError( error, string( "duplicate " ) + DeclarationNode::typeQualifierNames[i] );
     
    470470void DeclarationNode::checkSpecifiers( DeclarationNode * src ) {
    471471        if ( (funcSpecs.val & src->funcSpecs.val) != 0 ) {                // duplicates ?
    472                 for ( unsigned int i = 0; i < NoFuncSpecifier; i += 1 ) { // find duplicates
     472                for ( unsigned int i = 0; i < NumFuncSpecifier; i += 1 ) { // find duplicates
    473473                        if ( funcSpecs[i] && src->funcSpecs[i] ) {
    474474                                appendError( error, string( "duplicate " ) + DeclarationNode::funcSpecifierNames[i] );
     
    479479        if ( storageClasses.val != 0 && src->storageClasses.val != 0 ) { // any reason to check ?
    480480                if ( (storageClasses.val & src->storageClasses.val ) != 0 ) { // duplicates ?
    481                         for ( unsigned int i = 0; i < NoStorageClass; i += 1 ) { // find duplicates
     481                        for ( unsigned int i = 0; i < NumStorageClass; i += 1 ) { // find duplicates
    482482                                if ( storageClasses[i] && src->storageClasses[i] ) {
    483483                                        appendError( error, string( "duplicate " ) + storageClassNames[i] );
  • src/Parser/ParseNode.h

    re61a35e r572547c  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 14 16:53:19 2017
    13 // Update Count     : 757
     12// Last Modified On : Tue Mar 14 22:41:37 2017
     13// Update Count     : 758
    1414//
    1515
     
    203203        // These must remain in the same order as the corresponding DeclarationNode names.
    204204
    205         enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NoStorageClass = 5 };
     205        enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NumStorageClass = 5 };
    206206        union StorageClasses {
    207207                unsigned int val;
     
    218218        }; // StorageClasses
    219219
    220         enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NoFuncSpecifier = 3 };
     220        enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NumFuncSpecifier = 3 };
    221221        union FuncSpecifiers {
    222222                unsigned int val;
     
    231231        }; // FuncSpecifiers
    232232
    233         enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NoTypeQualifier = 6 };
     233        enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6 };
    234234        union TypeQualifiers {
    235235                unsigned int val;
  • src/Parser/TypeData.cc

    re61a35e r572547c  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 14 15:01:44 2017
    13 // Update Count     : 548
     12// Last Modified On : Tue Mar 14 22:43:20 2017
     13// Update Count     : 549
    1414//
    1515
     
    226226
    227227void TypeData::print( ostream &os, int indent ) const {
    228         for ( int i = 0; i < DeclarationNode::NoTypeQualifier; i += 1 ) {
     228        for ( int i = 0; i < DeclarationNode::NumTypeQualifier; i += 1 ) {
    229229                if ( typeQualifiers[i] ) os << DeclarationNode::typeQualifierNames[ i ] << ' ';
    230230        } // for
Note: See TracChangeset for help on using the changeset viewer.