Ignore:
Timestamp:
Mar 15, 2017, 11:23:48 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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:
9243cc91, ecc7752
Parents:
3831b58 (diff), e61a35e (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/Parser/ParseNode.h

    r3831b58 rf841241  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 14 11:05:05 2017
    13 // Update Count     : 752
     12// Last Modified On : Tue Mar 14 16:53:19 2017
     13// Update Count     : 757
    1414//
    1515
     
    1919#include <string>
    2020#include <list>
    21 #include <bitset>
    2221#include <iterator>
    2322#include <memory>
     
    232231        }; // FuncSpecifiers
    233232
    234         enum TypeQualifier { Const, Restrict, Volatile, Lvalue, Mutex, Atomic, NoTypeQualifier };
     233        enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NoTypeQualifier = 6 };
     234        union TypeQualifiers {
     235                unsigned int val;
     236                struct {
     237                        bool is_const : 1;
     238                        bool is_restrict : 1;
     239                        bool is_volatile : 1;
     240                        bool is_lvalue : 1;
     241                        bool is_mutex : 1;
     242                        bool is_atomic : 1;
     243                };
     244                TypeQualifiers() : val( 0 ) {}
     245                TypeQualifiers( unsigned int val ) : val( val ) {}
     246                bool operator[]( unsigned int i ) const { return val & (1 << i); }
     247        }; // TypeQualifiers
     248
    235249        enum BasicType { Void, Bool, Char, Int, Float, Double, LongDouble, NoBasicType };
    236250        enum ComplexType { Complex, Imaginary, NoComplexType };
     
    254268        static DeclarationNode * newStorageClass( StorageClasses );
    255269        static DeclarationNode * newFuncSpecifier( FuncSpecifiers );
    256         static DeclarationNode * newTypeQualifier( TypeQualifier );
     270        static DeclarationNode * newTypeQualifier( TypeQualifiers );
    257271        static DeclarationNode * newBasicType( BasicType );
    258272        static DeclarationNode * newComplexType( ComplexType );
Note: See TracChangeset for help on using the changeset viewer.